:root {
    --gold-900: #6A4D0A;
    --gold-700: #8A650F;
    --gold-500: #B88916;
    --gold-100: #F6E7B5;
    --gold-50: #FFF9EB;
    --surface: #fffefa;
    --gold-road: #ead79d;
    --ink: #3e321b;
    --muted: #756743;
    --accent: var(--gold-700);
    --sidebar: var(--gold-900);
    --line: #e8dcc1;
    --canvas: var(--gold-50);
    --font: "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 3px solid var(--gold-700); outline-offset: 5px; }
.skip-link { position: fixed; top: -70px; left: 16px; padding: 12px 20px; background: white; color: var(--ink); z-index: 10; border-radius: 6px; }
.skip-link:focus { top: 12px; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 226px; padding: 36px 20px 20px; background: var(--sidebar); color: var(--gold-100); flex-shrink: 0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; align-self: flex-start; }
.brand-icon { width: 28px; height: 28px; stroke-width: 1.65; color: var(--gold-100); }
.brand-logo { display: block; width: 80px; height: auto; }
.sidebar-label { margin: 15px 0 45px 12px; font-size: 8px; letter-spacing: 1.9px; color: #e3d09d; font-weight: 600; }
.main-navigation { display: flex; flex-direction: column; flex-grow: 1; }
.nav-label { font-size: 9px; letter-spacing: 1.8px; margin: 0 14px 15px; color: #e3d09d; }
.nav-section-label { margin-top: 25px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 12px 14px; font-size: 12px; border-radius: 7px; margin-bottom: 7px; transition: background .15s, color .15s; }
.nav-link svg { width: 17px; height: 17px; }
.nav-link:hover { background: var(--gold-700); color: #fff; }
.nav-link.is-current { color: var(--gold-900); background: var(--gold-100); }
.nav-group { margin-bottom: 7px; }
.nav-group-heading { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 14px; font-size: 12px; border-radius: 7px; list-style: none; cursor: pointer; user-select: none; }
.nav-group-heading::-webkit-details-marker { display: none; }
.nav-group-heading > span { flex: 1; }
.nav-group-heading svg { width: 17px; height: 17px; }
.nav-group-heading .nav-group-chevron { width: 13px; height: 13px; transition: transform .15s; }
.nav-group[open] > .nav-group-heading { background: var(--gold-100); color: var(--gold-900); }
.nav-group[open] > .nav-group-heading .nav-group-chevron { transform: rotate(90deg); }
.nav-submenu { display: grid; gap: 3px; margin: 6px 0 8px 22px; padding: 3px 0 3px 10px; border-left: 1px solid #a08443; }
.nav-subitem { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 9px; border-radius: 5px; font-size: 12px; line-height: 1.5; }
.nav-subitem::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .65; flex-shrink: 0; }
.nav-subitem.is-current { background: #806017; color: #fff4d5; font-weight: 600; }
.nav-subitem.is-current::before { opacity: 1; }
.nav-group-heading:hover, .nav-subitem:hover { background: var(--gold-700); color: #fff; }
@media (prefers-reduced-motion: reduce) { .nav-group-heading .nav-group-chevron { transition: none; } }
.nav-active-dot { width: 5px; height: 5px; background: var(--gold-700); border-radius: 50%; margin-left: auto; }
.nav-count { font-size: 10px; color: var(--gold-100); margin-left: auto; }
.sidebar-bottom { margin-top: auto; padding-top: 65px; }
.sidebar-note { margin: 0 12px 30px; border-top: 1px solid var(--gold-700); padding-top: 25px; display: flex; gap: 11px; align-items: center; }
.small-orbit { display: grid; place-items: center; color: var(--gold-100); border: 1px solid var(--gold-500); border-radius: 50%; width: 27px; height: 27px; font-size: 21px; font-weight: 300; }
.sidebar-note p { font-size: 11px; line-height: 1.8; margin: 0; color: var(--gold-100); }
.sidebar-note strong { font-weight: 500; color: var(--gold-50); }
.admin-nav { border: 1px solid var(--gold-700); font-size: 11px; }
.admin-nav .external-icon { width: 13px; height: 13px; margin-left: auto; }
.sidebar-footer { display: flex; gap: 7px; align-items: center; margin: 24px 10px 0; font-size: 9px; color: #e3d09d; }
.footer-dot { width: 4px; height: 4px; background: var(--gold-100); border-radius: 50%; }
.menu-toggle { display: none; }
.workspace { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: var(--surface); gap: 16px; }
.breadcrumb { color: var(--muted); font-size: 11px; white-space: nowrap; }
.breadcrumb > span { margin: 0 13px; color: #c5b58d; }
.breadcrumb strong { color: var(--ink); font-weight: 500; }
.workspace-badge { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); }
.workspace-badge > span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-700); }
.main-content { width: 100%; max-width: 1420px; padding: 39px 42px 28px; margin: 0 auto; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { font-size: 9px; font-weight: 650; letter-spacing: 1.6px; color: var(--gold-700); margin: 0 0 9px; }
h1 { font-size: clamp(25px, 2.4vw, 36px); font-weight: 600; letter-spacing: -1.2px; line-height: 1.2; margin: 0 0 10px; }
.page-description { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.7; }
.stage-badge { font-size: 10px; color: var(--gold-900); background: var(--gold-100); border: 1px solid var(--gold-road); border-radius: 5px; padding: 8px 11px; display: flex; gap: 7px; align-items: center; white-space: nowrap; }
.stage-badge > span { border: 1px solid var(--gold-700); width: 6px; height: 6px; border-radius: 50%; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.account-label { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--muted); }
.account-avatar { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 50%; background: var(--gold-50); color: var(--gold-900); font-size: 12px; font-weight: 600; }
.button { border: 0; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 600; border-radius: 6px; cursor: pointer; }
.button-primary { padding: 12px 17px; color: #fff; background: var(--accent); transition: background .15s; }
.button-primary:hover { background: var(--gold-900); }
.button svg { width: 16px; height: 16px; }
.filter-panel { padding: 21px 23px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.filter-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.field-heading { font-size: 9px; font-weight: 600; letter-spacing: 1.4px; margin: 0 0 10px; color: var(--muted); }
.carrier-tabs { display: flex; gap: 4px; align-items: center; background: var(--gold-50); border: 1px solid var(--line); padding: 4px; border-radius: 7px; }
.carrier-tab { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; min-height: 37px; border-radius: 5px; font-size: 12px; color: var(--muted); border: 1px solid transparent; }
.carrier-tab > svg { width: 15px; height: 15px; }
.carrier-tab:hover { background: var(--gold-100); color: var(--gold-900); }
.carrier-tab.is-active { background: var(--surface); border-color: var(--line); box-shadow: 0 2px 3px #6a4d0a0a; color: var(--gold-900); font-weight: 600; }
.carrier-letter { width: 19px; height: 19px; display: inline-grid; place-items: center; border: 1px solid var(--gold-road); background: var(--gold-100); color: var(--gold-900); border-radius: 5px; font-size: 10px; font-weight: 700; }
.date-filter { display: flex; gap: 9px; align-items: flex-end; }
.date-field { display: flex; flex-direction: column; gap: 8px; }
.date-field label { color: var(--muted); font-size: 11px; }
.date-field input { width: 145px; min-width: 0; height: 42px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 9px 10px; font: 12px var(--font); }
.date-field input:focus { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.date-separator { color: #baa775; padding-bottom: 13px; }
.date-filter .button { height: 42px; margin-left: 4px; }
.filter-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 18px; font-size: 10px; color: var(--muted); }
.filter-caption > span { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.filter-caption svg { width: 12px; height: 12px; margin-right: 2px; }
.filter-caption strong { font-weight: 600; }
.filter-caption > a { color: var(--gold-700); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.filter-errors { padding: 12px 15px; margin-bottom: 15px; background: #fff0e7; border: 1px solid #e9c8b3; border-radius: 6px; color: #8b3e22; font-size: 12px; line-height: 1.7; }
.filter-errors p, .filter-errors ul { margin: 3px 0; }
.overview-section { margin-top: 29px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 17px; }
.section-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: -.5px; margin: 0 0 5px; }
.section-heading p { font-size: 11px; color: var(--muted); margin: 0; }
.section-note { font-size: 10px; color: var(--muted); }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.metric-card { padding: 10px 14px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; }
.metric-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: var(--gold-50); border: 1px solid #f1e6cd; color: var(--gold-700); }
.metric-icon svg { width: 17px; height: 17px; }
.metric-value { display: block; margin-top: 6px; font-size: 33px; font-weight: 550; letter-spacing: -.9px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric-money { font-size: clamp(22px, 2vw, 30px); min-height: 35px; overflow-wrap: anywhere; }
.metric-money small { font-size: 13px; font-weight: 500; letter-spacing: 0; }
.metric-card > p { font-size: 10px; line-height: 1.6; color: var(--muted); margin: 4px 0 7px; }
.metric-foot { padding: 7px 0; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted); display: block; }
.metric-action { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.metric-action svg { height: 13px; width: 13px; }
.metric-action:hover { text-decoration: underline; text-underline-offset: 3px; }
.metric-alert { border-color: #dfc288; background: #fff9ec; }
.metric-alert .metric-icon { background: var(--gold-100); border-color: var(--gold-road); color: var(--gold-900); }
.metric-alert .metric-value, .metric-alert .metric-action { color: var(--gold-900); }
.metric-pending { border-color: #d9c9a4; }
.metric-pending .metric-icon { background: var(--gold-100); border-color: var(--gold-road); color: var(--gold-900); }
.metric-pending .metric-value { color: var(--gold-900); }
.movements-panel { margin-top: 27px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.movements-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 25px 19px; }
.movements-heading .eyebrow { font-size: 8px; margin-bottom: 7px; }
.movements-heading h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.table-count { font-size: 10px; color: var(--muted); }
.status-tabs { display: flex; gap: 23px; padding: 0 25px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.status-tab { padding: 12px 0 14px; font-size: 11px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.status-tab:hover { color: var(--gold-900); }
.status-tab.is-active { color: var(--gold-900); border-bottom-color: var(--gold-700); font-weight: 650; }
.table-scroll { overflow-x: auto; }
.movements-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.movements-table th { font-size: 9px; font-weight: 600; padding: 15px 17px; background: #fffcf5; color: #82724c; border-bottom: 1px solid #f0e9d8; }
.movements-table td { font-size: 11px; line-height: 1.7; padding: 17px; border-bottom: 1px solid var(--line); }
.movements-table th:first-child, .movements-table td:first-child { padding-left: 25px; }
.movements-table th:last-child, .movements-table td:last-child { padding-right: 25px; }
.movements-table td strong { font-size: 11px; font-weight: 600; }
.movements-table small { display: block; font-size: 9px; color: var(--muted); }
.carrier-name { display: inline-flex; align-items: center; gap: 7px; }
.align-right { text-align: right; }
.muted-text { color: var(--muted); }
.movements-table .overdue-text { color: #a04927; }
.status-badge { display: inline-flex; padding: 3px 7px; border: 1px solid var(--gold-road); background: var(--gold-50); color: var(--gold-900); border-radius: 4px; font-size: 9px; }
.status-entregue { background: #edf3e9; border-color: #d1dec8; color: #436139; }
.status-cancelada { background: #f1eeea; border-color: #ddd6cc; color: #6c665e; }
.empty-state { text-align: center; padding: 32px 20px 35px; }
.empty-illustration { position: relative; display: inline-grid; place-items: center; width: 65px; height: 65px; margin-bottom: 14px; border-radius: 20px; border: 1px solid var(--gold-road); background: var(--gold-50); color: var(--gold-700); transform: rotate(-7deg); }
.empty-illustration > svg { height: 33px; width: 33px; }
.empty-orbit { position: absolute; width: 6px; height: 6px; border: 1px solid var(--gold-500); border-radius: 50%; }
.orbit-one { left: -15px; top: 7px; }
.orbit-two { right: -18px; bottom: 7px; width: 4px; height: 4px; background: var(--gold-100); }
.empty-state h3 { font-size: 17px; font-weight: 550; letter-spacing: -.4px; margin: 0 0 9px; }
.empty-state > p { font-size: 11px; color: var(--muted); line-height: 1.9; margin: 0 0 17px; }
.empty-tag { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 9px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--gold-700); background: var(--gold-50); }
.empty-tag > span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-500); flex-shrink: 0; }
.inline-link { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; color: var(--gold-700); font-weight: 600; }
.inline-link svg { height: 14px; width: 14px; }
.inline-link:hover { text-decoration: underline; }
.table-note { padding: 14px 25px; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); background: #fffdf7; color: var(--muted); }
.table-note svg { width: 14px; height: 14px; }
.table-note p { margin: 0; font-size: 9px; line-height: 1.8; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px 25px; font-size: 11px; }
.pagination > div { display: flex; gap: 15px; }
.pagination a { text-decoration: underline; text-underline-offset: 3px; color: var(--gold-700); }
.tracking-note { display: flex; align-items: center; gap: 16px; margin-top: 20px; padding: 21px 23px; border: 1px solid var(--gold-road); background: #fbf0cd; border-radius: 9px; }
.note-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #dcc88a; background: #fff9e5; border-radius: 10px; color: var(--gold-900); flex-shrink: 0; }
.note-icon svg { height: 22px; width: 22px; }
.tracking-note h2 { font-size: 13px; font-weight: 600; margin: 0 0 5px; }
.tracking-note p { font-size: 10px; color: var(--muted); line-height: 1.8; max-width: 600px; margin: 0; }
.tracking-carriers { display: inline-flex; gap: 10px; color: var(--gold-900); font-size: 12px; font-weight: 600; margin-left: auto; white-space: nowrap; }
.tracking-carriers > span { font-weight: 400; color: var(--gold-500); }
.page-footer { display: flex; justify-content: space-between; gap: 15px; padding: 21px 42px; margin-top: 5px; border-top: 1px solid var(--line); font-size: 9px; color: var(--muted); }
.footer-divider { margin: 0 8px; color: #c5b58d; }
.postage-intro { display: flex; gap: 25px; align-items: center; padding: 32px; background: var(--gold-100); border: 1px solid var(--gold-road); border-radius: 10px; }
.postage-emblem { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 19px; border: 1px solid #dbc17d; background: var(--gold-50); color: var(--gold-900); flex-shrink: 0; transform: rotate(-6deg); }
.postage-emblem svg { width: 36px; height: 36px; }
.postage-intro h2 { font-size: 26px; font-weight: 550; letter-spacing: -.6px; margin: 0 0 10px; }
.postage-intro p:last-child { font-size: 12px; color: var(--muted); line-height: 1.9; margin: 0; max-width: 650px; }
.postage-flow { margin-top: 30px; }
.postage-steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; margin: 0; gap: 16px; }
.postage-steps li { padding: 25px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
.postage-step-number { display: inline-grid; place-items: center; width: 31px; height: 31px; font-size: 11px; background: var(--gold-100); color: var(--gold-900); border-radius: 7px; margin-bottom: 18px; }
.postage-steps h3 { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.postage-steps p { font-size: 11px; line-height: 1.9; color: var(--muted); margin: 0; }
.postage-pending { display: flex; gap: 13px; align-items: flex-start; padding: 22px; border: 1px solid var(--gold-road); border-radius: 8px; margin-top: 25px; background: #fffcf3; }
.postage-pending > svg { color: var(--gold-700); width: 19px; height: 19px; }
.postage-pending h2 { font-size: 13px; font-weight: 600; margin: 1px 0 7px; }
.postage-pending p { font-size: 11px; line-height: 1.9; color: var(--muted); margin: 0; }
.postage-back { margin-top: 25px; }
@media (max-width: 760px) {
    .postage-intro { flex-direction: column; align-items: flex-start; padding: 25px; gap: 20px; }
    .postage-intro h2 { font-size: 25px; }
    .postage-steps { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) {
    .sidebar { width: 212px; padding-left: 14px; padding-right: 14px; }
    .main-content { padding: 30px 27px; }
    .topbar, .page-footer { padding-left: 27px; padding-right: 27px; }
    .metrics-grid { gap: 11px; }
    .metric-card { padding-left: 15px; padding-right: 15px; }
    .metric-card > p { min-height: 32px; }
    .metric-top { font-size: 11px; }
    .filter-top { gap: 20px 12px; }
    .date-field input { width: 133px; }
    .carrier-tab { padding-left: 9px; padding-right: 9px; }
    .tracking-carriers { display: none; }
}
@media (max-width: 950px) {
    .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .metric-card > p { min-height: auto; }
    .filter-top { align-items: flex-start; flex-direction: column; }
    .date-filter { width: 100%; }
    .date-field { flex: 1; }
    .date-field input { width: 100%; }
    .page-heading { align-items: flex-start; }
    .stage-badge { white-space: normal; line-height: 1.6; max-width: 140px; flex-shrink: 0; }
    h1 { font-size: 28px; }
}
@media (max-width: 760px) {
    .app-shell { flex-direction: column; }
    .sidebar { height: auto; width: 100%; padding: 19px 22px; position: relative; overflow-y: visible; }
    .brand { margin: 0; }
    .brand-icon { width: 25px; height: 25px; }
    .brand-logo { width: 72px; }
    .sidebar-label { margin: 11px 0 0; font-size: 7px; }
    .main-navigation { margin-top: 24px; }
    .js-enabled .menu-toggle { display: flex; align-items: center; gap: 7px; background: transparent; border: 1px solid var(--gold-500); border-radius: 5px; color: var(--gold-50); padding: 9px 11px; position: absolute; right: 22px; top: 25px; font-size: 11px; cursor: pointer; }
    .menu-toggle svg { width: 16px; height: 16px; }
    .js-enabled .menu-toggle[aria-expanded="false"] + .main-navigation { display: none; }
    .sidebar-bottom { padding-top: 5px; }
    .sidebar-note, .sidebar-footer { display: none; }
    .admin-nav { margin-top: 10px; }
    .topbar { height: 58px; padding: 0 22px; }
    .breadcrumb { font-size: 10px; }
    .breadcrumb > span { margin: 0 7px; }
    .account-label { font-size: 10px; }
    .account-avatar { width: 26px; height: 26px; font-size: 10px; }
    .main-content { padding: 27px 22px; }
    .page-heading { display: block; margin-bottom: 22px; }
    .stage-badge { display: inline-flex; max-width: none; margin-top: 14px; font-size: 9px; }
    .filter-panel { padding: 18px 18px 0; }
    .date-filter { flex-wrap: wrap; }
    .date-filter .button { margin: 5px 0 0; width: 100%; }
    .date-separator { padding-bottom: 12px; }
    .date-field { min-width: 0; }
    .filter-caption { font-size: 9px; gap: 9px; align-items: flex-start; }
    .filter-caption > span { display: block; line-height: 1.8; }
    .filter-caption svg { vertical-align: middle; }
    .section-heading h2 { font-size: 19px; }
    .section-note { font-size: 9px; max-width: 125px; text-align: right; line-height: 1.7; }
    .movements-heading { padding: 22px 19px 17px; }
    .status-tabs { padding-left: 19px; padding-right: 19px; gap: 22px; }
    .movements-table { min-width: 840px; }
    .empty-state { padding: 28px 19px 32px; }
    .empty-state h3 { font-size: 16px; }
    .table-note { padding: 14px 19px; align-items: flex-start; }
    .table-note svg { margin-top: 3px; }
    .tracking-note { padding: 19px; align-items: flex-start; gap: 12px; }
    .tracking-note h2 { line-height: 1.6; }
    .page-footer { padding: 20px 22px; }
    .page-footer > span:last-child { display: none; }
}
@media (max-width: 400px) {
    .main-content { padding-left: 16px; padding-right: 16px; }
    .eyebrow { font-size: 8px; }
    h1 { font-size: 27px; }
    .page-description { font-size: 11px; }
    .carrier-tabs { width: 100%; gap: 2px; }
    .carrier-tab { flex: 1; font-size: 10px; padding: 8px 6px; gap: 5px; }
    .carrier-letter { width: 16px; height: 16px; }
    .metrics-grid { gap: 10px; }
    .metric-card { padding-left: 13px; padding-right: 13px; }
    .metric-top { font-size: 11px; }
    .metric-icon { height: 27px; width: 27px; }
    .metric-card > p { min-height: 32px; }
    .metric-foot { font-size: 8px; }
    .empty-tag { font-size: 8px; }
}
@media (max-width: 360px) {
    .filter-top > div { width: 100%; }
    .date-filter { display: grid; grid-template-columns: 1fr; }
    .date-separator { display: none; }
    .section-heading { display: block; }
    .section-note { display: block; margin-top: 8px; max-width: none; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

/* Solicitações de autorização */
.rastro-search { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 20px; }
.rastro-search .postage-field { min-width: 250px; flex: 1; max-width: 420px; }
.rastro-search > button { margin-top: 23px; }
.braspress-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0 20px; }
.braspress-filter > label { font-size: 12px; font-weight: 600; }
.braspress-filter-controls { display: flex; align-items: center; gap: 20px; max-width: 100%; }
.braspress-filter select { min-width: 0; width: 230px; max-width: 100%; min-height: 43px; border: 1px solid #d4c7a8; border-radius: 7px; padding: 10px 32px 10px 12px; background: white; color: var(--ink); font: inherit; }
.braspress-filter select:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.braspress-filter-controls > button { min-height: 34px; padding: 7px 12px; flex-shrink: 0; margin: 0; }
.braspress-invoice-filter { display:flex; align-items:flex-end; gap:20px; flex-wrap:wrap; }
.braspress-invoice-filter .postage-field { flex:1 1 220px; margin:0; }
.braspress-invoice-filter > button { min-height:43px; }
.invoice-dialog { width:min(760px, calc(100% - 24px)); max-height:90vh; padding:0; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--surface); box-shadow:0 14px 45px #33271340; }
.invoice-dialog::backdrop { background:#33271360; }
.invoice-detail-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; border-bottom:1px solid var(--line); }
.invoice-close { border:0; border-radius:6px; width:36px; height:36px; font-size:26px; color:var(--ink); background:var(--gold-50); cursor:pointer; }
.invoice-detail-body { padding:20px 24px; }
.invoice-summary { display:grid; grid-template-columns:1fr 1fr; gap:16px 24px; margin:0 0 15px; }
.invoice-summary dt { color:var(--muted); font-size:11px; margin-bottom:5px; }
.invoice-summary dd { margin:0; overflow-wrap:anywhere; }
.invoice-summary .invoice-value { font-size:22px; color:var(--gold-900); font-weight:600; }
.invoice-analysis { border:0; padding:0; margin:20px 0; min-width:0; }
.invoice-analysis legend { font-weight:600; margin-bottom:10px; }
.invoice-statuses { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:18px; }
.invoice-statuses label { position:relative; cursor:pointer; }
.invoice-statuses input { position:absolute; opacity:0; }
.invoice-statuses span { display:block; padding:7px 10px; border:1px solid var(--line); border-radius:5px; background:var(--gold-50); font-size:11px; }
.invoice-statuses input:checked + span { background:var(--gold-700); color:white; border-color:var(--gold-700); }
.invoice-statuses input[value="liberado"]:checked + span { background:#315f48; border-color:#315f48; }
.invoice-statuses input[value="nao_pagar"]:checked + span { background:#8b3931; border-color:#8b3931; }
.invoice-statuses input:focus-visible + span { outline:2px solid var(--gold-700); outline-offset:2px; }
.invoice-statuses input:disabled + span { opacity:.7; cursor:default; }
.invoice-analysis textarea { width:100%; min-height:65px; resize:vertical; border:1px solid #d4c7a8; border-radius:6px; padding:10px 12px; color:var(--ink); font:inherit; background:var(--surface); }
.invoice-finance { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; background:var(--gold-50); padding:14px; border-radius:7px; }
.invoice-finance p { color:var(--muted); font-size:11px; margin:5px 0 0; }
.invoice-finance button:disabled { opacity:.5; cursor:not-allowed; padding:8px 12px; }
.invoice-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin:14px 0; }
.invoice-actions .button, .invoice-copy .button { padding:8px 12px; }
.invoice-document, .invoice-code { margin-top:25px; }
.invoice-document h3, .invoice-code h3 { font-size:14px; margin:0 0 10px; }
.invoice-pdf { background:#efede7; border-radius:7px; margin-bottom:14px; padding:10px; }
.invoice-pdf summary { cursor:pointer; margin-bottom:10px; }
.invoice-pdf iframe { display:block; width:100%; height:430px; border:0; background:white; }
.invoice-pdf img { display:block; width:100%; height:auto; background:white; }
.invoice-copy { display:flex; gap:10px; align-items:center; margin:7px 0 14px; flex-wrap:wrap; }
.invoice-copy input { flex:1 1 270px; width:100%; min-width:0; padding:10px; border:1px solid var(--line); border-radius:6px; color:var(--ink); background:var(--gold-50); font-family:monospace; font-size:12px; }
@media (max-width:500px) { .invoice-summary { grid-template-columns:1fr; } .invoice-detail-heading, .invoice-detail-body { padding:16px; } .invoice-pdf iframe { height:330px; } }
.rastro-auth-button { background: var(--gold-100); color: var(--gold-900); padding: 12px 16px; }
.rastro-timeline time { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.operation-message { padding: 16px; background: var(--gold-100); border-radius: 8px; line-height: 1.6; }
.operation-message.error { background: #fff0eb; color: #9d2920; }
.postage-actions { margin-top: 24px; }
.postage-action-buttons { display: flex; gap: 15px; flex-wrap: wrap; margin: 20px 0 14px; }
.execution-history { padding: 0; list-style: none; }
.execution-history li { border-top: 1px solid var(--line); padding: 20px 0 8px; font-size: 12px; }
.execution-history small { display: block; margin-top: 8px; color: var(--muted); }
.execution-history p { line-height: 1.8; }
.postage-layout { display: grid; grid-template-columns: minmax(0, 1fr) 295px; gap: 22px; align-items: start; margin: 24px 0; }
.postage-fields { min-width: 0; display: grid; gap: 22px; }
.postage-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 26px; min-width: 0; }
.postage-card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.postage-card h3 { font-size: 15px; margin: 0 0 10px; }
.postage-section-heading { display: flex; gap: 13px; margin-bottom: 25px; }
.postage-section-heading > span { background: var(--gold-100); color: var(--gold-900); border-radius: 9px; width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; font-weight: 600; font-size: 12px; }
.postage-section-heading p, .postage-card > p { line-height: 1.7; color: var(--muted); }
.postage-section-heading p { margin: 0; font-size: 12px; }
.postage-field { margin-bottom: 19px; min-width: 0; }
.postage-field > label { display: block; font-weight: 600; font-size: 12px; margin-bottom: 8px; }
.postage-field input, .postage-field select { width: 100%; min-height: 43px; border: 1px solid #d4c7a8; border-radius: 7px; padding: 10px 12px; background: white; color: var(--ink); font: inherit; }
.postage-field input:focus, .postage-field select:focus { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.field-help { font-size: 11px; line-height: 1.65; margin: 7px 0 0; color: var(--muted); }
.address-preview { font-size: 12px; line-height: 1.8; color: var(--muted); padding: 12px 15px; background: var(--gold-50); border-radius: 7px; margin: -6px 0 22px; overflow-wrap: anywhere; }
.address-preview:empty { display: none; }
.choice-field, .postage-options { padding: 0; border: 0; margin: 23px 0 20px; min-width: 0; }
.choice-field legend, .postage-options legend { font-weight: 600; font-size: 12px; margin-bottom: 12px; }
.choice-field > div { display: flex; gap: 12px; flex-wrap: wrap; }
.choice-field label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 7px; padding: 13px 15px; font-size: 12px; cursor: pointer; background: white; }
.choice-field label:has(input:checked) { border-color: var(--gold-700); background: var(--gold-50); color: var(--gold-900); }
.postage-options label { display: flex; gap: 10px; align-items: center; margin-top: 15px; font-size: 12px; line-height: 1.6; cursor: pointer; }
.postage-layout input[type=radio], .postage-layout input[type=checkbox] { accent-color: var(--gold-700); width: 16px; height: 16px; flex-shrink: 0; }
.address-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin-top: 20px; }
.address-title { margin-top: 24px !important; }
.postage-summary { position: sticky; top: 24px; }
.postage-summary dl { margin: 25px 0; }
.postage-summary dt, .postage-detail-data dt { color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.postage-summary dd, .postage-detail-data dd { margin: 0 0 21px; font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.postage-submit { width: 100%; display: flex; gap: 8px; align-items: center; justify-content: center; background: var(--gold-700); color: white; padding: 14px 12px; border: 0; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 20px; }
.postage-submit:hover { background: var(--gold-900); }
.postage-submit svg { width: 16px; height: 16px; }
.postage-table-scroll { overflow-x: auto; }
.postage-table { width: 100%; border-collapse: collapse; text-align: left; }
.postage-table th { padding: 14px 12px; font-size: 10px; color: var(--muted); background: var(--gold-50); white-space: nowrap; }
.postage-table td { padding: 18px 12px; font-size: 12px; border-bottom: 1px solid var(--line); }
.postage-table small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.postage-history { margin-top: 25px; }
.postage-status-tabs { margin: 0 0 18px; padding: 0; border-bottom: 1px solid var(--line); }
.postage-empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.postage-empty > svg { margin-bottom: 14px; width: 30px; height: 30px; }
.postage-empty p { font-size: 12px; line-height: 1.7; }
.postage-pagination { display: flex; justify-content: center; align-items: center; gap: 25px; padding-top: 22px; font-size: 12px; }
.postage-pagination a { text-decoration: underline; }
.postage-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 24px 0; }
.postage-detail-grid p { font-size: 12px; line-height: 1.9; overflow-wrap: anywhere; }
.postage-detail-data { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 24px; }
.errorlist { list-style: none; padding: 0; color: #9d2920; font-size: 12px; line-height: 1.6; margin: 8px 0; }
.has-error input, .has-error select { border-color: #9d2920; }
.form-errors { border: 1px solid #d4aaa0; border-radius: 8px; padding: 16px; background: #fff5f1; color: #9d2920; font-size: 12px; }
[hidden] { display: none !important; }
@media (max-width: 1150px) { .postage-layout { grid-template-columns: minmax(0, 1fr); } .postage-summary { position: static; } .postage-summary dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 15px; } .postage-summary dd { margin-bottom: 12px; } }
@media (max-width: 760px) { .postage-card { padding: 21px; } .postage-detail-grid { grid-template-columns: 1fr; } .postage-detail-data { grid-template-columns: repeat(2, minmax(0, 1fr)); } .postage-table { min-width: 650px; } }
@media (max-width: 450px) { .address-grid, .postage-detail-data { grid-template-columns: 1fr; } .postage-summary dl { display: block; } .choice-field > div { flex-direction: column; } }

.logout-form { margin-left: 14px; }
.logout-form button { border: 1px solid var(--line); border-radius: 6px; background: transparent; padding: 6px 12px; color: var(--muted); cursor: pointer; }
