/*
 * Frenet labels admin — Frenet brand (frenet.com.br): violet #7b3ff3 for actions, navy #0c005a for titles,
 * Host Grotesk for headings and Inter for the interface. Fonts are bundled (OFL, see assets/fonts) so no
 * external request is made. Data areas stay flat; the brand gradient lives only in the thin page header.
 * Text contrast >= 4.5:1, UI components >= 3:1.
 *
 * Layout rules: every screen shares one width (1280px); the actions of a screen live in a bar that sticks to
 * the bottom of the viewport (.frenet-bar), so they are never "down there" after a long table.
 */
@font-face {
	font-family: "Frenet Inter";
	src: url("../fonts/inter-latin.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Frenet Host Grotesk";
	src: url("../fonts/host-grotesk-latin.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.frenet-labels,
.frenet-box,
.frenet-dialog {
	--fl-violet: #7b3ff3;
	--fl-violet-dark: #5b21d6;
	--fl-violet-ink: #f9f5ff;
	--fl-violet-soft: #f9f5ff;
	--fl-violet-tint: #f2ecfe;
	--fl-lavender: #c4aeff;
	--fl-navy: #0c005a;
	--fl-navy-2: #2a0f8f;
	--fl-ink: #344054;
	--fl-muted: #565a72;
	--fl-field: #8c8f94;
	--fl-line: #eaecf0;
	--fl-row: #f2f4f7;
	--fl-page: #fafaff;
	--fl-mint: #5fe3b0;
	--fl-ok-bg: #e6fbf3;
	--fl-ok: #0b6b47;
	--fl-wait-bg: #fff4dc;
	--fl-wait: #7a4b00;
	--fl-bad-bg: #fde8e8;
	--fl-bad: #a4161a;
	--fl-off-bg: #f2f4f7;
	--fl-off: #4a4f5c;
	--fl-radius: 8px;
	--fl-width: 1280px;
	--fl-font: "Frenet Inter", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--fl-display: "Frenet Host Grotesk", "Host Grotesk", "Frenet Inter", -apple-system, sans-serif;
	font-family: var(--fl-font);
	color: var(--fl-ink);
}

.frenet-labels { max-width: var(--fl-width); }
.frenet-labels p,
.frenet-labels td,
.frenet-labels th,
.frenet-labels label,
.frenet-labels input,
.frenet-labels select,
.frenet-labels button,
.frenet-labels .button,
.frenet-box,
.frenet-box .button,
.frenet-dialog,
.frenet-dialog .button { font-family: var(--fl-font); }

/* Brand header: the only place with the Frenet gradient */
.frenet-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 10px 0 16px;
	padding: 14px 24px;
	border-radius: 12px;
	background: linear-gradient(110deg, var(--fl-navy) 0%, var(--fl-navy-2) 55%, var(--fl-violet) 100%);
	color: #fff;
}
.frenet-brand { display: inline-flex; align-items: center; gap: 8px; padding-right: 16px; border-right: 1px solid rgba(249, 245, 255, .28); }
/* Wallet inside the brand strip: balance, labels left, add balance (Frenet panel) and refresh. */
.frenet-header__wallet { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin-left: auto; }
.frenet-header__label { color: #f9f5ff; font-size: 13px; }
.frenet-header__value { color: #fff; font-family: var(--fl-display); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1; }
.frenet-header__value.is-muted { color: #f9f5ff; font-size: 15px; }
.frenet-header__meta { color: #f9f5ff; font-size: 13px; }
.frenet-header__cta { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: #fff; color: var(--fl-navy); font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.frenet-header__cta:hover,
.frenet-header__cta:focus { background: var(--fl-violet-soft); color: var(--fl-navy); }
.frenet-header__cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* "Adicionar saldo": a button that opens a small white panel under it (amount, quick picks, Mercado Pago). */
.frenet-header__wallet { position: relative; }
.frenet-refill { position: relative; }
.frenet-refill > summary { list-style: none; }
.frenet-refill > summary::-webkit-details-marker { display: none; }
.frenet-refill > summary::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .15s ease; }
.frenet-refill[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.frenet-refill__panel { position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: 320px; max-width: calc(100vw - 32px); padding: 18px; border: 1px solid var(--fl-line); border-radius: 12px; background: #fff; box-shadow: 0 12px 32px rgba(12, 0, 90, .18); color: var(--fl-ink); }
.frenet-refill__panel form { margin: 0; }
.frenet-refill__panel .frenet-field { margin-top: 0; }
.frenet-refill__money { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 1px solid var(--fl-field); border-radius: 8px; background: #fff; }
.frenet-refill__money:focus-within { border-color: var(--fl-violet); box-shadow: 0 0 0 1px var(--fl-violet); }
.frenet-refill__money > span { color: var(--fl-muted); font-weight: 500; }
.frenet-labels .frenet-refill__money input { flex: 1; min-width: 0; min-height: 44px; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; color: var(--fl-navy); font-family: var(--fl-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; outline: none; }
.frenet-labels .frenet-refill__money input:focus { border: 0; box-shadow: none; outline: none; }
.frenet-refill__money.is-invalid { border-color: var(--fl-bad); box-shadow: 0 0 0 1px var(--fl-bad); }
.frenet-refill__picks { display: flex; gap: 6px; margin: 10px 0 8px; }
.frenet-refill__pick { flex: 1; min-height: 32px; border: 1px solid var(--fl-lavender); border-radius: 999px; background: var(--fl-violet-tint); color: var(--fl-navy); font: inherit; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; }
.frenet-refill__pick:hover,
.frenet-refill__pick[aria-pressed="true"] { border-color: var(--fl-violet); background: var(--fl-violet); color: #fff; }
.frenet-refill__pick:focus-visible { outline: 2px solid var(--fl-violet); outline-offset: 2px; }
.frenet-refill__after { display: flex; justify-content: space-between; margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--fl-page); box-shadow: inset 0 0 0 1px var(--fl-line); color: var(--fl-muted); font-size: 12px; }
.frenet-refill__after[hidden] { display: none; }
.frenet-refill__after strong { color: var(--fl-navy); font-variant-numeric: tabular-nums; }
.frenet-refill__help { display: block; color: var(--fl-muted); font-size: 12px; line-height: 1.5; }
.frenet-refill__help.is-error { color: var(--fl-bad); font-weight: 500; }
.frenet-refill__warn { display: block; margin-top: 4px; color: var(--fl-wait); font-size: 12px; line-height: 1.5; }
.frenet-refill__actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.frenet-labels .frenet-refill__actions .button-primary { flex: 1; justify-content: center; min-height: 40px; text-align: center; }
.frenet-refill__actions .button-link { color: var(--fl-muted); }
.frenet-header__link { margin: 0; padding: 0; border: 0; background: none; color: #f9f5ff; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.frenet-header__link:hover,
.frenet-header__link:focus-visible { color: #fff; text-decoration-thickness: 2px; }
.frenet-header__link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.frenet-header__link[aria-disabled="true"] { cursor: progress; }
.frenet-brand img { width: 28px; height: 28px; border-radius: 7px; }
.frenet-brand__word { font-family: var(--fl-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.frenet-labels .frenet-header .frenet-title { margin: 0; padding: 0; color: #fff; font-family: var(--fl-display); font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.frenet-title { color: var(--fl-navy); font-family: var(--fl-display); font-weight: 700; }
.frenet-labels h2,
.frenet-box h2,
.frenet-dialog h2 { font-family: var(--fl-display); font-weight: 700; letter-spacing: -.01em; }
/* WordPress notices (update nags, Action Scheduler) share the screen width and keep a steady rhythm. */
.frenet-labels > .notice,
.frenet-labels > .updated,
.frenet-labels > .error { margin: 0 0 14px; }

.frenet-lead { max-width: 780px; margin: 0 0 16px; color: var(--fl-muted); font-size: 14px; line-height: 1.6; }
.frenet-muted { color: var(--fl-muted); }
.frenet-block { display: block; }
.frenet-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; color: var(--fl-navy); }
.frenet-error { color: var(--fl-bad); }
.frenet-labels a:not(.button):not(.frenet-chip) { color: var(--fl-violet-dark); }

/* Buttons (frenet.com.br: radius 8, weight 500). Primary violet, secondary violet-soft. */
.frenet-labels .button,
.frenet-box .button,
.frenet-dialog .button {
	min-height: 36px;
	padding: 0 16px;
	border: 1px solid var(--fl-lavender);
	border-radius: var(--fl-radius);
	background: var(--fl-violet-soft);
	color: var(--fl-violet-dark);
	font-size: 14px;
	font-weight: 500;
	line-height: 34px;
	box-shadow: none;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.frenet-labels .button:hover,
.frenet-box .button:hover,
.frenet-dialog .button:hover { border-color: var(--fl-violet); background: var(--fl-violet-tint); color: var(--fl-violet-dark); }
.frenet-labels .button-primary,
.frenet-box .button-primary,
.frenet-dialog .button-primary { border-color: var(--fl-violet); background: var(--fl-violet); color: var(--fl-violet-ink); }
.frenet-labels .button-primary:hover,
.frenet-labels .button-primary:focus,
.frenet-box .button-primary:hover,
.frenet-dialog .button-primary:hover,
.frenet-dialog .button-primary:focus { border-color: var(--fl-violet-dark); background: var(--fl-violet-dark); color: #fff; }
.frenet-labels .button:focus-visible,
.frenet-box .button:focus-visible,
.frenet-dialog .button:focus-visible { outline: 2px solid var(--fl-violet); outline-offset: 2px; box-shadow: none; }
.frenet-labels .button:disabled,
.frenet-labels .button[disabled],
.frenet-dialog .button:disabled { border-color: var(--fl-line) !important; background: var(--fl-row) !important; color: #8a8f9c !important; cursor: not-allowed; }
.frenet-danger,
.frenet-labels .button.frenet-danger,
.frenet-box .button.frenet-danger { border-color: #e7a3a5; background: #fff; color: var(--fl-bad); }
.frenet-labels .button.frenet-danger:hover,
.frenet-box .button.frenet-danger:hover { border-color: var(--fl-bad); background: var(--fl-bad-bg); color: #7a0f12; }
.frenet-labels .button.button-small,
.frenet-box .button.button-small { min-height: 30px; padding: 0 12px; font-size: 13px; line-height: 28px; }
.frenet-labels .button.button-hero { min-height: 42px; padding: 0 22px; font-size: 15px; line-height: 40px; }

/* Cards and forms: cards fill the screen width; the settings form lays them out in two columns. */
.frenet-card { margin: 0 0 16px; padding: 22px 26px; border: 1px solid var(--fl-line); border-radius: 12px; background: #fff; }
.frenet-card h2 { margin: 0 0 6px; color: var(--fl-navy); font-size: 18px; }
.frenet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 16px; align-items: start; }
.frenet-grid .frenet-card { margin: 0; height: 100%; box-sizing: border-box; }
.frenet-grid > .frenet-card:last-child:nth-child(odd) { grid-column: 1 / -1; height: auto; }
.frenet-field { display: block; margin: 16px 0 6px; color: var(--fl-navy); font-weight: 600; }
.frenet-sender { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
.frenet-sender p { margin: 0; }
.frenet-sender .frenet-sender__wide { grid-column: span 2; }
@media (max-width: 600px) { .frenet-sender .frenet-sender__wide { grid-column: auto; } }
.frenet-labels input[type="text"],
.frenet-labels input[type="password"],
.frenet-labels input[type="url"],
.frenet-labels select,
.frenet-box input[type="text"] { min-height: 38px; border: 1px solid var(--fl-field); border-radius: var(--fl-radius); color: var(--fl-ink); }
.frenet-labels .regular-text { width: 100%; max-width: 440px; }
.frenet-labels input:focus,
.frenet-labels select:focus,
.frenet-box input:focus { border-color: var(--fl-violet); box-shadow: 0 0 0 3px rgba(123, 63, 243, .18); outline: 0; }
.frenet-labels input[type="checkbox"]:checked,
.frenet-labels input[type="radio"]:checked { border-color: var(--fl-violet); }
.frenet-labels input[type="checkbox"]:checked,
.frenet-dialog input[type="checkbox"]:checked { border-color: var(--fl-violet); background: var(--fl-violet); }
.frenet-labels input[type="checkbox"]:checked::before,
.frenet-dialog input[type="checkbox"]:checked::before { content: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2020%2020%27%3E%3Cpath%20d%3D%27M14.83%204.89l1.34.94-5.81%208.38H9.02L5.78%209.67l1.34-1.25%202.57%202.4z%27%20fill%3D%27%23ffffff%27%2F%3E%3C%2Fsvg%3E"); }
.frenet-labels input[type="checkbox"]:focus-visible,
.frenet-labels input[type="radio"]:focus-visible { outline: 2px solid var(--fl-violet); outline-offset: 2px; box-shadow: none; }
.frenet-labels input[type="radio"]:checked::before { background: var(--fl-violet); }
.frenet-switch,
.frenet-inline { display: flex; align-items: center; gap: 8px; margin: 12px 0 4px; }
.frenet-inline { display: inline-flex; margin-right: 16px; }
.frenet-choice { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; padding: 12px 14px; border: 1px solid var(--fl-line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.frenet-choice:hover { border-color: var(--fl-lavender); }
.frenet-choice:has(input:checked) { border-color: var(--fl-violet); background: var(--fl-violet-soft); }
.frenet-choice input { margin-top: 2px; }
.frenet-choice strong { display: block; color: var(--fl-navy); font-weight: 600; }
.frenet-form .description { max-width: 640px; margin-top: 4px; color: var(--fl-muted); }
.frenet-labels fieldset { margin: 0; padding: 0; border: 0; }

/* Wallet */
.frenet-wallet { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 16px; padding: 14px 22px; border: 1px solid var(--fl-line); border-radius: 12px; background: #fff; }
.frenet-wallet > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.frenet-wallet__label { color: var(--fl-muted); font-size: 13px; }
.frenet-wallet__value { color: var(--fl-navy); font-family: var(--fl-display); font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.frenet-wallet__value.is-muted { color: var(--fl-muted); font-size: 16px; }
.frenet-wallet__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.frenet-wallet__actions .frenet-block { flex-basis: 100%; }

/* Action bar: sticks to the bottom of the screen while the table scrolls under it. */
.frenet-bar {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 24px;
	margin: 0;
	padding: 12px 20px;
	border: 1px solid var(--fl-line);
	border-top: 3px solid var(--fl-violet);
	border-radius: 12px 12px 0 0;
	background: #fff;
	box-shadow: 0 -8px 20px rgba(12, 0, 90, .07);
}
.frenet-table-wrap + .frenet-bar,
.frenet-grid + .frenet-bar { margin-top: 16px; }
.frenet-bar__facts { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; }
.frenet-bar__fact { display: flex; flex-direction: column; color: var(--fl-muted); font-size: 12px; }
.frenet-bar__fact strong { color: var(--fl-navy); font-family: var(--fl-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; line-height: 1.2; }
.frenet-bar__fact[hidden] { display: none; }
.frenet-bar__fact .frenet-error,
.frenet-bar__fact strong.frenet-error { color: var(--fl-bad); }
.frenet-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.frenet-bar .frenet-status-line { flex-basis: 100%; min-height: 0; margin: 0; }
.frenet-bar .frenet-status-line:empty { display: none; }
.frenet-bar .frenet-muted.frenet-small { margin-left: 4px; }

/* Create screen */
.frenet-summary { margin: 0 0 16px; padding: 18px 22px; border: 1px solid var(--fl-line); border-radius: 12px; background: #fff; }
.frenet-summary h2 { margin: 0 0 10px; color: var(--fl-navy); font-size: 17px; }
.frenet-select { width: 100%; min-width: 300px; max-width: 440px; }
.frenet-nfe-cell { min-width: 160px; }
.frenet-nfe-cell input { width: 100%; min-width: 200px; margin: 6px 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.frenet-nfe-cell summary { color: var(--fl-violet-dark); font-weight: 500; cursor: pointer; }
.frenet-field-msg { display: block; margin-top: 4px; font-size: 12px; }

/* Tables: flat surfaces behind data. Dense enough to fit the screen without a horizontal scroll. */
.frenet-table-wrap { overflow-x: auto; border: 1px solid var(--fl-line); border-radius: 12px; background: #fff; }
.frenet-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.frenet-summary .frenet-table,
.frenet-dialog .frenet-table { overflow: hidden; border: 1px solid var(--fl-line); border-radius: 12px; border-collapse: separate; border-spacing: 0; }
.frenet-table th { padding: 10px 12px; border-bottom: 1px solid var(--fl-line); background: var(--fl-page); color: var(--fl-muted); font-size: 12px; font-weight: 600; letter-spacing: .02em; text-align: left; white-space: nowrap; }
.frenet-table td,
.frenet-table tbody th { padding: 10px 12px; border-bottom: 1px solid var(--fl-row); color: var(--fl-ink); font-size: 13px; line-height: 1.45; vertical-align: middle; }
.frenet-table tfoot th,
.frenet-table tfoot td { border-top: 1px solid var(--fl-line); border-bottom: 0; background: var(--fl-violet-soft); color: var(--fl-navy); font-weight: 600; }
.frenet-table tbody tr:last-child td,
.frenet-table tbody tr:last-child th { border-bottom: 0; }
.frenet-table tbody tr:hover td,
.frenet-table tbody tr:hover th { background: #fcfbff; }
.frenet-table .is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.frenet-table .is-nowrap { white-space: nowrap; }
.frenet-table .check-column { width: 32px; }
.frenet-table thead .check-column input { margin: 0; }

/* Extrato */
.frenet-statement__what { max-width: 420px; }
.frenet-statement__value { font-weight: 600; white-space: nowrap; }
.frenet-statement__value.is-in { color: var(--fl-ok); }
.frenet-statement__value.is-out { color: var(--fl-bad); }
.frenet-statement__value.is-info { color: var(--fl-muted); font-weight: 400; }
.frenet-table .frenet-code { font-size: 12px; }
.frenet-cell-sub { display: block; margin-top: 2px; color: var(--fl-muted); font-size: 12px; }
.frenet-row-actions { width: 1%; white-space: nowrap; text-align: right; }
.frenet-row-actions .button { margin-left: 6px; }
/* Summary of carriers: the option applied to every order, and the two "any carrier" rows below the carriers. */
.frenet-table .is-action { width: 1%; text-align: right; white-space: nowrap; }
.frenet-table tbody tr.is-applied td,
.frenet-table tbody tr.is-applied th { background: var(--fl-violet-tint); }
.frenet-summary__best tr:first-child td,
.frenet-summary__best tr:first-child th { border-top: 1px solid var(--fl-line); }
.frenet-summary__best th,
.frenet-summary__best td { background: var(--fl-violet-soft); color: var(--fl-navy); font-weight: 600; }
.frenet-summary__hint { margin: 8px 0 0; font-size: 13px; }
.frenet-small { font-size: 12px; }
.frenet-service-cell { min-width: 260px; }
/* Service picker: the carrier logo lives inside the control and inside every option. */
.frenet-choice-box { position: relative; max-width: 380px; }
.frenet-choice-box__btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; margin: 0; padding: 6px 34px 6px 10px; border: 1px solid var(--fl-field); border-radius: 8px; background: #fff; color: var(--fl-ink); font: inherit; text-align: left; cursor: pointer; }
.frenet-choice-box__btn:hover { border-color: var(--fl-violet); }
.frenet-choice-box__btn:focus-visible,
.frenet-choice-box.is-open .frenet-choice-box__btn { border-color: var(--fl-violet); box-shadow: 0 0 0 1px var(--fl-violet); outline: none; }
.frenet-choice-box__logo { display: flex; flex: none; justify-content: center; width: 64px; }
.frenet-choice-box__logo .frenet-carrier__logo { height: 18px; max-width: 64px; }
.frenet-choice-box__logo .frenet-carrier__name { display: none; }
.frenet-choice-box__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.frenet-choice-box__text strong { overflow: hidden; color: var(--fl-navy); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.frenet-choice-box__text .frenet-cell-sub { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frenet-choice-box__caret { position: absolute; top: 50%; right: 12px; width: 8px; height: 8px; border-right: 2px solid var(--fl-muted); border-bottom: 2px solid var(--fl-muted); transform: translateY(-70%) rotate(45deg); }
.frenet-choice-box__list { position: fixed; z-index: 100000; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--fl-line); border-radius: 10px; background: #fff; box-shadow: 0 12px 32px rgba(12, 0, 90, .14); overflow: auto; outline: none; }
.frenet-choice-box__list[hidden] { display: none; }
.frenet-choice-box__item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.frenet-choice-box__item[aria-selected="true"] { background: var(--fl-violet-tint); }
.frenet-choice-box__item.is-active { background: var(--fl-violet-soft); box-shadow: inset 0 0 0 2px var(--fl-violet); }
.frenet-choice-box__item[aria-selected="true"].is-active { background: var(--fl-violet-tint); }
.frenet-choice-box__item[aria-selected="true"] strong { color: var(--fl-violet-dark); }
/* Carrier logos: bundled official files; a monogram in the brand colour when a carrier has none. */
.frenet-carrier { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.frenet-carrier__logo { display: block; width: auto; height: 20px; max-width: 84px; object-fit: contain; }
.frenet-carrier__mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.frenet-carrier__name { color: var(--fl-navy); font-weight: 600; }
.frenet-service { display: inline-flex; align-items: center; gap: 10px; }
.frenet-summary .frenet-carrier__logo,
.frenet-dialog .frenet-carrier__logo,
.frenet-dropoff .frenet-carrier__logo { height: 22px; max-width: 96px; }

/* Status pills: text + colour, never colour alone */
.frenet-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.frenet-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.frenet-pill.is-ok { background: var(--fl-ok-bg); color: var(--fl-ok); box-shadow: inset 0 0 0 1px rgba(95, 227, 176, .6); }
.frenet-pill.is-wait { background: var(--fl-wait-bg); color: var(--fl-wait); }
.frenet-pill.is-bad { background: var(--fl-bad-bg); color: var(--fl-bad); }
.frenet-pill.is-off { background: var(--fl-off-bg); color: var(--fl-off); }
/* "Observações": a label that failed keeps the row red until it goes through. Long reasons are clamped;
   the full text is in the title. */
.frenet-table tbody tr.is-failed td,
.frenet-table tbody tr.is-failed th { background: var(--fl-bad-bg); }
.frenet-table tbody tr.is-failed > :first-child { box-shadow: inset 3px 0 0 var(--fl-bad); }
.frenet-issue-cell { min-width: 160px; max-width: 260px; font-size: 12px; line-height: 1.45; }
.frenet-issue-cell .frenet-error { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.frenet-box__issue { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--fl-bad); border-radius: 0 var(--fl-radius) var(--fl-radius) 0; background: var(--fl-bad-bg); font-size: 13px; line-height: 1.45; }

/* Filters, toolbar, actions, pager */
.frenet-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 12px; }
.frenet-toolbar > p { margin: 0; }
.frenet-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.frenet-toolbar .frenet-filters { margin: 0; }
.frenet-filters__label { align-self: center; color: var(--fl-muted); font-size: 13px; }
.frenet-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border: 1px solid var(--fl-line); border-radius: 999px; background: #fff; color: var(--fl-ink); font-weight: 500; text-decoration: none; transition: border-color .15s ease, color .15s ease; }
.frenet-chip span { color: var(--fl-muted); font-variant-numeric: tabular-nums; }
.frenet-chip:hover { border-color: var(--fl-violet); color: var(--fl-violet-dark); }
.frenet-chip.is-active { border-color: var(--fl-violet); background: var(--fl-violet); color: var(--fl-violet-ink); }
.frenet-chip.is-active span { color: var(--fl-violet-ink); }
.frenet-chip:focus-visible { outline: 2px solid var(--fl-violet); outline-offset: 2px; box-shadow: none; }
.frenet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.frenet-actions--top { margin-top: 0; }
.frenet-status-line { color: var(--fl-muted); }
.frenet-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 20px 0; }

/* Facts and messages */
.frenet-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 0; }
/* The script hides these with the hidden attribute; their display rules would otherwise keep them visible. */
.frenet-facts[hidden], .frenet-summary[hidden], .frenet-warning[hidden], .frenet-note[hidden] { display: none; }
.frenet-facts div { padding: 12px 14px; border-radius: 10px; background: var(--fl-violet-soft); }
.frenet-facts dt { color: var(--fl-muted); font-size: 12px; }
.frenet-facts dd { margin: 0; color: var(--fl-navy); font-family: var(--fl-display); font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.frenet-facts dd.is-bad { color: var(--fl-bad); }
.frenet-warning,
.frenet-note { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid; border-radius: 0 var(--fl-radius) var(--fl-radius) 0; }
.frenet-warning { border-color: #d98e04; background: var(--fl-wait-bg); color: var(--fl-wait); }
.frenet-note { border-color: var(--fl-violet); background: var(--fl-violet-soft); color: var(--fl-navy); }
.frenet-note p { margin: 4px 0 0; }

/* Empty states */
.frenet-empty { max-width: 640px; margin: 24px 0; padding: 36px 32px; border: 1px dashed var(--fl-lavender); border-radius: 12px; background: #fff; text-align: center; }
.frenet-empty h2 { margin-top: 8px; color: var(--fl-navy); font-size: 20px; }
.frenet-empty--small { padding: 22px; }

/* Ponto de postagem: overview per carrier, then the editor of the chosen one. */
.frenet-dropoff .frenet-table tbody th { font-weight: 600; color: var(--fl-navy); }
.frenet-dropoff .frenet-table tbody th .frenet-muted { font-weight: 400; font-size: 12px; }
.frenet-dropoff .is-action a { margin-top: 6px; }
.frenet-dropoff__editor { margin-top: 16px; scroll-margin-top: 48px; }
.frenet-dropoff__editor[hidden] { display: none; }
.frenet-dropoff__search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.frenet-dropoff__search input { width: 160px; }
.frenet-dropoff input[type="search"] { width: 100%; max-width: 520px; min-height: 38px; border: 1px solid var(--fl-field); border-radius: var(--fl-radius); }
.frenet-dropoff select[size] { display: block; width: 100%; height: auto; min-height: 220px; padding: 4px; border-radius: var(--fl-radius); background-image: none; }
.frenet-dropoff select[size] option { padding: 8px 10px; border-radius: 6px; white-space: normal; }
.frenet-dropoff select[size] option:checked { background: var(--fl-violet-tint); color: var(--fl-navy); font-weight: 600; }
.frenet-dropoff__address { min-height: 1.4em; margin: 8px 0 0; color: var(--fl-navy); font-weight: 500; }

/* Review dialog */
.frenet-dialog { width: min(580px, calc(100vw - 32px)); padding: 26px 28px; border: 0; border-radius: 16px; box-shadow: 0 24px 56px rgba(12, 0, 90, .28); }
.frenet-dialog::backdrop { background: rgba(12, 0, 90, .45); }
.frenet-dialog h2 { margin-top: 0; color: var(--fl-navy); font-size: 20px; }
.frenet-dialog .frenet-actions { justify-content: flex-end; margin-bottom: 0; }

/* Order box (side meta box) */
.frenet-box .frenet-actions { margin: 10px 0; }
.frenet-box .frenet-wallet { flex-direction: column; align-items: flex-start; padding: 12px 14px; border-radius: 10px; }
.frenet-box .frenet-wallet__value { font-size: 20px; }
.frenet-box__nfe { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--fl-line); }

@media (max-width: 960px) {
	.frenet-grid { grid-template-columns: 1fr; }
	.frenet-header { flex-wrap: wrap; }
	.frenet-brand { border-right: 0; }
	.frenet-header__wallet { flex-basis: 100%; margin-left: 0; }
	.frenet-refill__panel { right: auto; left: 0; }
	.frenet-bar { border-radius: 0; margin-left: -10px; margin-right: -10px; }
	.frenet-bar__actions { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.frenet-labels *,
	.frenet-box *,
	.frenet-dialog * { transition: none !important; }
}
@media (forced-colors: active) {
	.frenet-header { border: 1px solid CanvasText; }
	.frenet-pill { border: 1px solid CanvasText; }
	.frenet-bar { border-top-width: 3px; }
}

/* ---- Tracking (Rastreios, order box, bulk import) ---- */
.frenet-status-line.is-loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border: 2px solid var(--fl-violet); border-right-color: transparent; border-radius: 50%; animation: frenet-spin .7s linear infinite; }
.frenet-status-line.is-ok { color: var(--fl-ok); }
.frenet-status-line.is-warn { color: var(--fl-wait); }
.frenet-status-line.is-error { color: var(--fl-bad); }
@keyframes frenet-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .frenet-status-line.is-loading::before { animation: none; } }
.frenet-tracking-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 0; border: 0; background: transparent; }
.frenet-tracking-head p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.frenet-import { max-width: 960px; }
.frenet-import__lines { width: 100%; font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; border-radius: 8px; }
.frenet-import__lines[readonly] { background: var(--fl-violet-soft); }
.frenet-import__preview { display: grid; gap: 12px; margin-top: 12px; }
.frenet-box__tracking { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--fl-line); display: grid; gap: 6px; }
.frenet-box__tracking h4 { margin: 0; color: var(--fl-ink); font-size: 13px; }
.frenet-box__tracking p { margin: 0; }
.frenet-box__tracking .frenet-actions { margin-top: 2px; }

/* Automação: aviso antes de ligar (gasta saldo sozinho) */
.frenet-dialog--auto { max-width: 34rem; }
.frenet-note--warn { border-color: #f0b429; background: #fff8e6; color: #5c4300; }
.frenet-note--warn strong { display: block; margin-bottom: .25rem; color: #5c4300; }
.frenet-list { margin: 1rem 0 0; padding-left: 1.2rem; }
.frenet-list li { margin: 0 0 .45rem; line-height: 1.45; }

/* Produtos: peso, medidas e transportadora por produto, editáveis na tabela */
.frenet-products .frenet-table td.is-num input { width: 6.5rem; text-align: right; }
.frenet-products .frenet-table select { max-width: 18rem; }
.frenet-products tr.is-dirty td, .frenet-products tr.is-dirty th { background: #fff8e1; }
.frenet-bar--products { flex-wrap: wrap; align-items: flex-end; gap: 1rem; }
.frenet-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex: 1 1 36rem; }
.frenet-bulk__count { flex: 1 1 100%; font-weight: 600; }
.frenet-bulk input { width: 7.5rem; }
.frenet-bulk select { min-width: 17rem; }

/* Primeiros passos: stepper on the left, one step at a time on the right. */
.frenet-setup { display: grid; grid-template-columns: 260px minmax(0, 760px); gap: 24px; align-items: start; margin-top: 16px; }
.frenet-steps { position: sticky; top: 48px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.frenet-steps__item { margin: 0 0 4px; }
.frenet-steps__item a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; color: var(--fl-ink); text-decoration: none; }
.frenet-labels .frenet-steps__item a { color: var(--fl-ink); }
.frenet-steps__item a:hover { background: var(--fl-violet-soft); }
.frenet-steps__item a:focus-visible { outline: 2px solid var(--fl-violet); outline-offset: 2px; box-shadow: none; }
.frenet-steps__item.is-current a { background: #fff; box-shadow: inset 0 0 0 1px var(--fl-lavender); }
.frenet-steps__dot { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; border: 2px solid var(--fl-line); border-radius: 50%; background: #fff; color: var(--fl-muted); font-weight: 700; }
.frenet-steps__item.is-current .frenet-steps__dot { border-color: var(--fl-violet); background: var(--fl-violet); color: var(--fl-violet-ink); }
.frenet-steps__item.is-done .frenet-steps__dot { border-color: var(--fl-mint); background: var(--fl-ok-bg); color: var(--fl-ok); }
.frenet-steps__text { display: flex; flex-direction: column; line-height: 1.35; }
.frenet-steps__text strong { color: var(--fl-navy); }
.frenet-steps__text span { color: var(--fl-muted); font-size: 12px; }
.frenet-steps__item.is-done .frenet-steps__text span { color: var(--fl-ok); }
/* Basic mode (no partner token): the label steps are shown but not reachable. */
.frenet-steps__item.is-locked > span { display: flex; gap: 12px; align-items: center; padding: 10px 12px; color: var(--fl-muted, #6b6b80); opacity: .75; cursor: default; }
.frenet-box__basic { margin-top: 10px; }
.frenet-setup__panel { margin: 0; }
.frenet-setup__panel h2 { font-family: var(--fl-display); font-size: 22px; letter-spacing: -.01em; }
.frenet-setup__kicker { margin: 0 0 4px; color: var(--fl-violet-dark); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.frenet-setup__form .regular-text { width: 100%; max-width: 480px; }
.frenet-setup__form .frenet-actions { margin-top: 24px; }
.frenet-setup .frenet-field-msg.is-error { color: var(--fl-bad); font-weight: 500; }
.frenet-setup [aria-invalid="true"] { border-color: var(--fl-bad); box-shadow: 0 0 0 1px var(--fl-bad); }
.frenet-setup__summary { margin: 16px 0; padding: 0; list-style: none; }
.frenet-setup__summary li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--fl-line); }
.frenet-setup__summary strong { flex: 0 0 90px; color: var(--fl-navy); }
.frenet-setup__summary a { margin-left: auto; }
.frenet-setup-banner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin: 16px 0; padding: 14px 18px; border-radius: 12px; background: var(--fl-violet-tint); box-shadow: inset 0 0 0 1px var(--fl-lavender); }
.frenet-setup-banner p { margin: 0; color: var(--fl-navy); }
.frenet-setup-banner strong { display: block; }
@media (max-width: 960px) {
	.frenet-setup { grid-template-columns: minmax(0, 1fr); }
	.frenet-steps { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
	.frenet-steps__text span { display: none; }
}
@media (max-width: 600px) {
	.frenet-steps__text strong { font-size: 12px; }
}
