:root {
    --canvas: #f7f6f3;
    --sidebar: #f1efeb;
    --surface: #ffffff;
    --surface-soft: #fbfaf8;
    --text: #292724;
    --text-soft: #716d67;
    --text-faint: #918c85;
    --border: #e6e2dc;
    --border-strong: #d6d0c7;
    --coral: #e96f51;
    --coral-hover: #d85d42;
    --coral-soft: #fff0eb;
    --teal: #2c8b80;
    --teal-hover: #24766d;
    --teal-soft: #eaf6f3;
    --amber: #b4771b;
    --amber-soft: #fff5df;
    --danger: #c64e43;
    --danger-soft: #fff0ee;
    --blue: #5579a6;
    --blue-soft: rgba(85, 121, 166, 0.11);
    --topbar-bg: rgba(247, 246, 243, 0.94);
    --nav-hover-bg: rgba(255, 255, 255, 0.65);
    --sidebar-status-bg: rgba(255, 255, 255, 0.55);
    --settings-trigger-bg: rgba(255, 255, 255, 0.7);
    --feature-glow: rgba(233, 111, 81, 0.035);
    --neutral-badge-bg: rgba(41, 39, 36, 0.04);
    --sparkline-transparent: rgba(255, 255, 255, 0);
    --tooltip-background: #292724;
    --tooltip-text: #ffffff;
    --tooltip-border: #514d48;
    --chart-bar-highlight-top: #3f3f46;
    --chart-bar-highlight-mid: #8b8b93;
    --chart-bar-highlight-bottom: #d4d4d8;
    --chart-bar-top: #71717a;
    --chart-bar-mid: #a1a1aa;
    --chart-bar-bottom: #e4e4e7;
    --chart-bar-border: rgba(41, 39, 36, 0.14);
    --shadow: 0 1px 2px rgba(53, 46, 39, 0.04), 0 8px 24px rgba(53, 46, 39, 0.05);
    --shadow-raised: 0 16px 45px rgba(53, 46, 39, 0.16);
    --card-hover-shadow: 0 10px 28px rgba(53, 46, 39, 0.08);
    --radius: 12px;
    --radius-small: 8px;
    --sidebar-width: 248px;
}

[data-theme="dark"] {
    --canvas: #121214;
    --sidebar: #151517;
    --surface: #18181b;
    --surface-soft: #202024;
    --text: #f4f4f5;
    --text-soft: #a1a1aa;
    --text-faint: #71717a;
    --border: #2a2a2f;
    --border-strong: #3f3f46;
    --coral: #fb7185;
    --coral-hover: #f43f5e;
    --coral-soft: rgba(251, 113, 133, 0.12);
    --teal: #5eead4;
    --teal-hover: #2dd4bf;
    --teal-soft: rgba(94, 234, 212, 0.11);
    --amber: #fbbf24;
    --amber-soft: rgba(251, 191, 36, 0.11);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.12);
    --blue: #60a5fa;
    --blue-soft: rgba(96, 165, 250, 0.12);
    --topbar-bg: rgba(18, 18, 20, 0.9);
    --nav-hover-bg: rgba(255, 255, 255, 0.035);
    --sidebar-status-bg: rgba(255, 255, 255, 0.025);
    --settings-trigger-bg: rgba(255, 255, 255, 0.035);
    --feature-glow: rgba(255, 255, 255, 0.035);
    --neutral-badge-bg: rgba(255, 255, 255, 0.035);
    --sparkline-transparent: rgba(24, 24, 27, 0);
    --tooltip-background: #09090b;
    --tooltip-text: #f4f4f5;
    --tooltip-border: #3f3f46;
    --chart-bar-highlight-top: #f4f4f5;
    --chart-bar-highlight-mid: #a1a1aa;
    --chart-bar-highlight-bottom: #3f3f46;
    --chart-bar-top: #8a8a93;
    --chart-bar-mid: #52525b;
    --chart-bar-bottom: #27272a;
    --chart-bar-border: rgba(244, 244, 245, 0.15);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 18px 45px rgba(0, 0, 0, 0.16);
    --shadow-raised: 0 24px 60px rgba(0, 0, 0, 0.42);
    --card-hover-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body,
button,
input,
select {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--canvas);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

.theme-transition-overlay {
    position: fixed;
    z-index: 2147483647;
    inset: 0;
    pointer-events: none;
    opacity: 1;
    backdrop-filter: blur(1.5px) saturate(0.88);
    -webkit-backdrop-filter: blur(1.5px) saturate(0.88);
    transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-transition-overlay.is-fading {
    opacity: 0;
}

html.theme-transitioning body,
html.theme-transitioning .sidebar,
html.theme-transitioning .topbar,
html.theme-transitioning .card,
html.theme-transitioning .metric-card,
html.theme-transitioning .modal-card,
html.theme-transitioning .nav-link,
html.theme-transitioning .form-select,
html.theme-transitioning .company-summary-item,
html.theme-transitioning .theme-mode-option {
    transition-property: color, background-color, border-color, box-shadow;
    transition-duration: 420ms;
    transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

button,
input,
select {
    font-size: inherit;
}

button {
    color: inherit;
}

button,
[role="button"],
select,
input[type="file"],
input[type="checkbox"] {
    cursor: pointer;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(233, 111, 81, 0.3);
    outline-offset: 2px;
}

a {
    color: var(--teal);
}

svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.hidden {
    display: none !important;
}

body:not([data-role="admin"]) [data-admin-only],
body:not([data-role="employee"]) [data-employee-only] {
    display: none !important;
}

.employee-dashboard-grid {
    margin-top: 20px;
}

#employee-dashboard-content > .table-card {
    margin-top: 20px;
}

.staff-create-form {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.staff-create-form .settings-note {
    margin: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    flex: 0 0 var(--sidebar-width);
    flex-direction: column;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 24px 16px 18px;
    overflow-y: auto;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 8px;
    margin-bottom: 30px;
}

.brand-mark {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--coral);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 11px;
    place-items: center;
    box-shadow: 0 3px 12px rgba(53, 46, 39, 0.05);
}

.brand-mark svg {
    width: 21px;
    height: 21px;
}

.brand-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    margin-left: 12px;
}

.brand-copy strong {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-copy span {
    overflow: hidden;
    color: var(--text-soft);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-close {
    display: none !important;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-link {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 13px;
    padding: 11px 13px;
    color: var(--text-soft);
    font-weight: 550;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.nav-link svg {
    flex: 0 0 auto;
    width: 19px;
    height: 19px;
}

.nav-link:hover {
    color: var(--text);
    background: var(--nav-hover-bg);
}

.nav-link.active {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.nav-link.active svg {
    color: var(--coral);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    padding-top: 28px;
}

.sidebar-status,
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 9px;
}

.sidebar-status {
    background: var(--sidebar-status-bg);
    border: 1px solid var(--border);
}

.sidebar-status > div,
.sidebar-user > div:not(.avatar) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.sidebar-user-copy {
    flex: 1 1 auto;
}

.settings-trigger {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    margin-left: auto;
    color: var(--text-soft);
    background: var(--settings-trigger-bg);
    border: 1px solid var(--border);
}

.settings-trigger:hover {
    color: var(--coral);
    background: var(--surface);
}

.sidebar-status strong,
.sidebar-user strong {
    font-size: 12px;
    font-weight: 600;
}

.sidebar-status span:not(.status-dot),
.sidebar-user span {
    overflow: hidden;
    color: var(--text-soft);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--teal-soft);
}

.avatar {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: var(--surface);
    font-size: 11px;
    font-weight: 700;
    background: var(--text);
    border-radius: 50%;
    place-items: center;
}

.workspace {
    min-width: 0;
    flex: 1;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 17px 32px;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.topbar-heading {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
}

.topbar-heading h1 {
    overflow: hidden;
    font-size: clamp(20px, 2vw, 25px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-report-badge {
    margin-top: 3px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.active-report-badge.is-success {
    color: var(--teal);
}

.active-report-badge.is-error {
    color: var(--danger);
}

.topbar-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
}

.notification-anchor {
    position: relative;
    flex: 0 0 auto;
}

.notification-button {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.notification-button.has-unread {
    color: var(--coral);
    border-color: var(--coral);
}

.notification-badge {
    position: absolute;
    top: -7px;
    right: -8px;
    display: grid;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    background: var(--danger);
    border: 2px solid var(--surface);
    border-radius: 999px;
    place-items: center;
}

.notification-panel {
    position: fixed;
    z-index: 45;
    top: 78px;
    right: 24px;
    display: flex;
    width: min(420px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 100px));
    overflow: hidden;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-raised);
}

.notification-panel.hidden {
    display: none;
}

.notification-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px;
    border-bottom: 1px solid var(--border);
}

.notification-panel-header h2 {
    font-size: 18px;
}

.notification-panel-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notification-list {
    padding: 8px;
    overflow-y: auto;
}

.notification-item {
    display: grid;
    width: 100%;
    padding: 12px;
    color: var(--text);
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    gap: 5px;
}

.notification-item:hover,
.notification-item:focus-visible {
    background: var(--surface-soft);
    border-color: var(--border);
}

.notification-item.is-unread {
    background: var(--coral-soft);
}

.notification-item.is-resolved {
    opacity: 0.66;
}

.notification-item-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification-item-heading strong {
    font-size: 12px;
}

.notification-severity {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    background: var(--teal);
    border-radius: 50%;
}

.notification-severity.warning {
    background: var(--amber);
}

.notification-severity.critical {
    background: var(--danger);
}

.notification-item p,
.notification-item time,
.notification-empty {
    color: var(--text-soft);
    font-size: 11px;
}

.notification-empty {
    padding: 24px 12px;
    text-align: center;
}

.global-filters {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 10px;
}

.filter-field,
.inline-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-field > span,
.inline-field > span {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.filter-field .form-select {
    width: 164px;
}

.icon-button {
    display: inline-grid;
    width: 38px;
    height: 38px;
    padding: 0;
    color: var(--text-soft);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    place-items: center;
}

.icon-button:hover {
    color: var(--text);
    background: var(--surface-soft);
    border-color: var(--border);
}

.menu-toggle {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.main-content {
    width: 100%;
    padding: 28px 32px 48px;
}

.view {
    display: none;
    width: 100%;
}

.view.active {
    display: block;
    animation: view-in 220ms ease-out;
}

@keyframes view-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card,
.metric-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    padding: 22px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.company-summary-card {
    margin-bottom: 18px;
}

.tax-summary-card,
.import-errors-card {
    margin-bottom: 18px;
}

.tax-period-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 14px;
}

.tax-summary-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.tax-summary-values > div {
    padding: 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.tax-summary-values span,
.tax-summary-values strong {
    display: block;
}

.tax-summary-values span {
    color: var(--text-soft);
    font-size: 12px;
}

.tax-summary-values strong {
    margin-top: 7px;
    color: var(--text);
    font-size: 18px;
}

.import-errors-card {
    border-color: #efb8aa;
    background: #fffaf8;
}

.company-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.company-summary-item {
    padding: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.company-summary-item strong,
.company-summary-item span {
    display: block;
}

.company-summary-item strong {
    margin-bottom: 8px;
    color: var(--text);
    font-size: 16px;
}

.company-summary-item span {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
}

.app-toast {
    position: fixed;
    z-index: 1000;
    right: 22px;
    bottom: 22px;
    max-width: min(460px, calc(100vw - 44px));
    padding: 14px 16px;
    color: #8b2415;
    background: #fff0ec;
    border: 1px solid #efb8aa;
    border-radius: 10px;
    box-shadow: var(--shadow);
    white-space: pre-line;
}

.status-success {
    color: var(--teal);
    font-weight: 700;
}

.status-error {
    color: var(--coral);
    font-weight: 700;
}

.metric-card {
    display: flex;
    min-height: 138px;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 19px;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: var(--card-hover-shadow);
}

.metric-card--featured {
    min-height: 176px;
    padding: 20px;
    background:
        radial-gradient(circle at 92% 92%, var(--feature-glow), transparent 42%),
        var(--surface);
}

.metric-card-body {
    display: flex;
    min-width: 0;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.metric-card-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.metric-sparkline {
    width: min(38%, 132px);
    height: 70px;
    flex: 0 0 min(38%, 132px);
}

.metric-card--featured .metric-value {
    font-size: clamp(22px, 1.7vw, 27px);
    white-space: nowrap;
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 600;
}

.metric-icon {
    display: grid;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    place-items: center;
}

.metric-icon svg {
    width: 16px;
    height: 16px;
}

.metric-coral {
    color: var(--coral);
    background: var(--coral-soft);
}

.metric-teal {
    color: var(--teal);
    background: var(--teal-soft);
}

.metric-warning {
    color: var(--amber);
    background: var(--amber-soft);
}

.metric-neutral {
    color: var(--text-soft);
    background: var(--surface-soft);
    border: 1px solid var(--border);
}

.metric-value {
    display: block;
    margin-top: 18px;
    overflow-wrap: anywhere;
    font-size: clamp(23px, 2.2vw, 32px);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.metric-context {
    margin-top: 8px;
    color: var(--text-faint);
    font-size: 11px;
}

.metric-trend-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    color: var(--text-faint);
    font-size: 11px;
    white-space: nowrap;
}

.metric-trend-badge {
    display: inline-flex;
    min-height: 23px;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    background: var(--blue-soft);
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 7px;
    white-space: nowrap;
}

.metric-trend-badge.positive {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: rgba(94, 234, 212, 0.18);
}

.metric-trend-badge.negative {
    color: var(--coral);
    background: var(--coral-soft);
    border-color: rgba(251, 113, 133, 0.18);
}

.metric-trend-badge.neutral {
    color: var(--text-soft);
    background: var(--neutral-badge-bg);
    border-color: var(--border);
}

.attention-metric-card {
    min-height: 178px;
}

.attention-machines {
    display: grid;
    gap: 5px;
    max-height: 78px;
    margin: 10px 0 0;
    overflow-y: auto;
    padding: 0;
    list-style: none;
}

.attention-machine-item,
.attention-machine-empty {
    overflow-wrap: anywhere;
    color: var(--text-soft);
    font-size: 10px;
    line-height: 1.35;
}

.attention-machine-item {
    border-top: 1px solid var(--border);
    padding-top: 5px;
}

.attention-machine-empty {
    color: var(--text-faint);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

.dashboard-grid > *,
.recent-grid > *,
.compare-charts-grid > *,
.invoices-layout > * {
    min-width: 0;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.card-header,
.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.card-header {
    margin-bottom: 18px;
}

.collapsible-card-header {
    position: relative;
    padding-right: 46px;
}

.collapsible-card-header .live-badge {
    margin-left: auto;
}

.collapsible-card-toggle {
    position: absolute;
    top: -5px;
    right: 0;
    width: 34px;
    height: 34px;
    background: var(--surface-soft);
    border-color: var(--border);
}

.collapsible-card-toggle:hover {
    border-color: var(--border-strong);
}

.collapsible-card-toggle .collapse-icon {
    width: 16px;
    height: 16px;
}

.collapse-icon-collapsed,
[data-collapsed="true"] .collapse-icon-expanded {
    display: none;
}

[data-collapsed="true"] .collapse-icon-collapsed {
    display: block;
}

[data-collapsed="true"] > .card-header {
    margin-bottom: 0;
}

.collapsible-card-body[hidden] {
    display: none;
}

.chart-card {
    padding: 0;
}

.chart-card > .card-header {
    padding: 19px 22px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}

.chart-heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.chart-heading-icon {
    display: grid;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    color: var(--text-soft);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 9px;
    place-items: center;
}

.chart-heading-icon svg {
    width: 16px;
    height: 16px;
}

.chart-summary {
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 9px;
    padding: 18px 24px 4px;
}

.chart-summary > strong {
    margin-right: 3px;
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 600;
    letter-spacing: -0.05em;
    line-height: 1;
}

.chart-summary > span:last-child {
    color: var(--text-faint);
    font-size: 11px;
}

.card-header h2,
.section-heading h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.3;
}

.card-header p:not(.eyebrow),
.section-heading p {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 12px;
}

.eyebrow {
    margin-bottom: 4px;
    color: var(--coral);
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.chart-controls {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.chart-frame {
    position: relative;
    width: 100%;
    height: 410px;
    padding: 8px 18px 20px;
    min-width: 0;
    overflow: hidden;
}

.compare-chart-frame {
    position: relative;
    width: 100%;
    height: 305px;
    min-width: 0;
    overflow: hidden;
}

.chart-frame canvas,
.compare-chart-frame canvas {
    max-width: 100% !important;
}

.insights-card {
    display: flex;
    min-height: 320px;
    flex-direction: column;
}

.insights-card[data-collapsed="true"] {
    min-height: 0;
}

.live-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    color: var(--teal);
    font-size: 10px;
    font-weight: 600;
    background: var(--teal-soft);
    border-radius: 999px;
    white-space: nowrap;
}

.live-badge > span {
    width: 6px;
    height: 6px;
    background: var(--teal);
    border-radius: 50%;
}

.insights-scroll {
    max-height: 390px;
    padding-right: 4px;
    overflow-y: auto;
    scrollbar-color: var(--border-strong) transparent;
    scrollbar-width: thin;
}

.insight-section + .insight-section {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--border);
}

.insight-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 700;
}

.insight-section h3 svg {
    width: 15px;
    height: 15px;
    color: var(--coral);
}

.insight-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.insight-list li {
    position: relative;
    padding: 10px 12px 10px 28px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.55;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.insight-list li::before {
    position: absolute;
    top: 15px;
    left: 13px;
    width: 6px;
    height: 6px;
    content: "";
    background: var(--teal);
    border-radius: 50%;
}

.alert-list li {
    background: var(--coral-soft);
    border-color: #f5d4ca;
}

.alert-list li::before {
    background: var(--coral);
}

.recent-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.recent-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 0;
    border-top: 1px solid var(--border);
}

.recent-item:first-child {
    border-top: 0;
}

.recent-item-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.recent-item-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    color: var(--teal);
    background: var(--teal-soft);
    border-radius: 9px;
    place-items: center;
}

.recent-item-icon.invoice-icon {
    color: var(--coral);
    background: var(--coral-soft);
}

.recent-item-icon svg {
    width: 16px;
    height: 16px;
}

.recent-item-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.recent-item-copy strong {
    overflow: hidden;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item-copy span,
.recent-item-meta {
    color: var(--text-soft);
    font-size: 10px;
}

.recent-item-meta {
    text-align: right;
    white-space: nowrap;
}

.text-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px;
    color: var(--teal);
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    border: 0;
}

.text-button:hover {
    color: var(--teal-hover);
}

.text-button svg {
    width: 14px;
    height: 14px;
}

.empty-state {
    padding: 18px 0;
    color: var(--text-soft);
    font-size: 12px;
    text-align: center;
}

.section-heading {
    margin-bottom: 18px;
}

.section-icon {
    width: 28px;
    height: 28px;
    color: var(--coral);
}

.upload-card,
.compare-builder {
    margin-bottom: 18px;
}

.upload-icon {
    display: grid;
    width: 46px;
    height: 46px;
    color: var(--teal);
    background: var(--teal-soft);
    border-radius: 12px;
    place-items: center;
}

.upload-icon svg {
    width: 22px;
    height: 22px;
}

.upload-form-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
    gap: 14px;
    align-items: end;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field + .form-field {
    margin-top: 16px;
}

.form-field > span,
.field-label {
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
}

.form-field small {
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 400;
}

.form-control,
.form-select {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    color: var(--text);
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form-control:hover,
.form-select:hover {
    border-color: var(--text-faint);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--coral);
    box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.12);
}

.form-control[readonly] {
    color: var(--text-soft);
    background: var(--surface-soft);
}

.form-select {
    padding-right: 34px;
}

.form-select-compact {
    width: auto;
    min-width: 138px;
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 11px;
}

.file-control {
    min-height: 44px;
    padding: 6px;
    color: var(--text-soft);
}

.file-control::file-selector-button {
    padding: 7px 10px;
    margin-right: 10px;
    color: var(--text);
    font-weight: 600;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.drop-zone {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 14px 18px;
    color: var(--text-soft);
    text-align: left;
    background: var(--surface-soft);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-small);
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.drop-zone:hover,
.drop-zone.dragover {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: var(--teal);
}

.drop-zone svg {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    color: var(--coral);
}

.drop-zone > div {
    display: flex;
    flex-direction: column;
}

.drop-zone strong {
    color: var(--text);
    font-size: 12px;
}

.drop-zone span {
    margin-top: 2px;
    font-size: 10px;
}

.upload-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
    color: var(--teal);
    font-size: 11px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 13px;
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-small);
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-primary {
    color: var(--surface);
    background: var(--coral);
    border-color: var(--coral);
}

.btn-primary:hover:not(:disabled) {
    background: var(--coral-hover);
    border-color: var(--coral-hover);
}

.btn-secondary {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #cfe7e2;
}

.btn-secondary:hover:not(:disabled) {
    background: #ddf0ec;
    border-color: #b8d9d2;
}

.btn-ghost {
    color: var(--text-soft);
    background: transparent;
    border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
    color: var(--text);
    background: var(--surface-soft);
    border-color: var(--border);
}

.btn-danger {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0d0cc;
}

.btn-danger:hover:not(:disabled) {
    color: #a93c32;
    background: #fee4e0;
}

.btn-success {
    color: var(--surface);
    background: var(--teal);
    border-color: var(--teal);
}

.btn-success:hover:not(:disabled) {
    background: var(--teal-hover);
    border-color: var(--teal-hover);
}

.btn-small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 10px;
}

.btn-block {
    width: 100%;
}

.button-group,
.compare-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-filter-grid {
    display: grid;
    align-items: end;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
}

.compare-filter-grid .inline-field {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
}

.compare-filter-grid .form-select {
    width: 100%;
}

.compare-company-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
}

.compare-actions {
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 18px;
}

.compare-filter-status {
    color: var(--text-soft);
    font-size: 11px;
}

.compare-reports-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.compare-pill-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 500;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.compare-pill-label:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.compare-pill-label.checked {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #b8d9d2;
}

.compare-pill-label input {
    width: 14px;
    height: 14px;
    accent-color: var(--teal);
}

.compare-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.compare-kpi-grid .metric-card {
    min-height: 138px;
}

.compare-data-notice {
    margin-bottom: 18px;
    padding: 12px 14px;
    color: #805614;
    font-size: 11px;
    background: var(--amber-soft);
    border: 1px solid #ecd49f;
    border-radius: var(--radius-small);
}

.compare-charts-grid {
    display: grid;
    align-items: start;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
    gap: 18px;
    margin-bottom: 18px;
}

.compare-chart-scroll {
    width: 100%;
    overflow-x: auto;
    scrollbar-color: var(--border-strong) transparent;
    scrollbar-width: thin;
}

.compare-chart-frame-wide {
    width: 100%;
}

.compare-matrix-table th:not(:first-child),
.compare-matrix-table td:not(:first-child) {
    text-align: right;
}

.compare-matrix-table th:first-child,
.compare-matrix-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    box-shadow: 1px 0 0 var(--border);
}

.compare-matrix-table thead th:first-child {
    z-index: 2;
}

.compare-company-cell {
    max-width: 220px;
    overflow-wrap: anywhere;
}

.compare-missing-cell {
    color: var(--text-faint) !important;
    font-weight: 600;
}

.compare-insights {
    margin-top: 18px;
}

.table-card {
    overflow: hidden;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    scrollbar-color: var(--border-strong) transparent;
    scrollbar-width: thin;
}

.data-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    border-top: 1px solid var(--border);
}

.data-table th {
    color: var(--text-soft);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.045em;
    text-transform: uppercase;
    white-space: nowrap;
}

.report-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    white-space: inherit;
}

.report-sort-button:hover,
.report-sort-button.is-active {
    color: var(--teal);
}

.report-sort-indicator:empty {
    display: none;
}

.data-table td {
    color: var(--text-soft);
    font-size: 11px;
}

.data-table td:first-child,
.data-table td:nth-child(2) {
    color: var(--text);
}

.data-table tbody tr {
    transition: background-color 150ms ease;
}

.data-table tbody tr:hover {
    background: var(--surface-soft);
}

.table-empty {
    padding: 28px !important;
    color: var(--text-soft) !important;
    text-align: center !important;
}

.table-primary {
    color: var(--teal) !important;
    font-weight: 600;
}

.table-money {
    color: var(--text) !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.active-filter-label {
    display: inline-flex;
    align-items: center;
    margin-left: 7px;
    color: var(--teal);
    font-size: 9px;
    font-weight: 600;
}

.invoices-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.55fr);
    gap: 18px;
    align-items: start;
}

.invoice-form-card {
    position: sticky;
    top: 116px;
}

.invoice-validation-status {
    min-height: 44px;
    padding: 10px 11px;
    margin: 16px 0 12px;
    color: var(--text-soft);
    font-size: 10px;
    line-height: 1.5;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.invoice-validation-status.checking {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #b8d9d2;
}

.invoice-validation-status.valid {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #9fcec5;
}

.invoice-validation-status.invalid {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 700;
    border: 1px solid;
    border-radius: 999px;
    white-space: nowrap;
}

.badge-paid {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #b8d9d2;
}

.badge-unpaid {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: #edd7a8;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.file-link:hover {
    color: var(--teal-hover);
    text-decoration: underline;
}

.invoice-management-header {
    margin-bottom: 16px;
}

.invoice-management-header h2 {
    margin: 3px 0 5px;
}

.invoice-management-header p:last-child {
    color: var(--text-soft);
}

.invoice-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    padding: 5px;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.invoice-tab {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 14px;
    color: var(--text-soft);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: transparent;
    border: 0;
    border-radius: var(--radius-small);
    cursor: pointer;
}

.invoice-tab:hover {
    color: var(--text);
    background: var(--surface-soft);
}

.invoice-tab.active {
    color: var(--teal);
    background: var(--teal-soft);
}

.invoice-tab svg {
    width: 16px;
    height: 16px;
}

.invoice-tab-panel {
    display: none;
}

.invoice-tab-panel.active {
    display: block;
}

.invoice-dashboard-filter {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.invoice-filter-row,
.incoming-list-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: flex-end;
    gap: 9px;
}

.incoming-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.incoming-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
    gap: 16px;
}

.invoice-ranking-grid {
    margin-top: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reconciliation-match {
    color: var(--teal);
    font-weight: 700;
}

.reconciliation-missing {
    color: var(--amber);
    font-weight: 700;
}

.reconciliation-excess {
    color: var(--danger);
    font-weight: 700;
}

.incoming-chart-frame {
    min-height: 300px;
}

.incoming-workspace {
    display: grid;
    grid-template-columns: minmax(280px, 0.58fr) minmax(0, 1.42fr);
    gap: 16px;
    align-items: start;
}

.incoming-upload-card {
    position: sticky;
    top: 116px;
}

.incoming-review-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.incoming-seller-field,
.incoming-review-form .invoice-validation-status,
.incoming-form-actions {
    grid-column: 1 / -1;
}

.incoming-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.incoming-list-card {
    margin-top: 16px;
}

.incoming-list-filters {
    max-width: 900px;
}

.incoming-search-field {
    min-width: 210px;
}

.form-control-compact {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 10px;
}

.badge-error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.danger-button {
    color: var(--danger);
}

.outgoing-placeholder {
    display: grid;
    min-height: 330px;
    place-content: center;
    justify-items: center;
    text-align: center;
}

.outgoing-placeholder h3 {
    margin: 8px 0;
    font-size: 22px;
}

.outgoing-placeholder p:last-child {
    max-width: 520px;
    color: var(--text-soft);
}

.app-toast-success {
    color: #17685f;
    background: #edf8f6;
    border-color: #a9d8d0;
}

@media (max-width: 1100px) {
    .incoming-dashboard-grid,
    .incoming-workspace {
        grid-template-columns: 1fr;
    }

    .incoming-metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .incoming-upload-card {
        position: static;
    }

    .invoice-dashboard-filter {
        align-items: start;
        flex-direction: column;
    }

    .invoice-filter-row,
    .incoming-list-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 680px) {
    .invoice-tabs {
        padding: 4px;
    }

    .invoice-tab {
        flex: 1 0 auto;
    }

    .incoming-metrics-grid,
    .incoming-review-form {
        grid-template-columns: 1fr;
    }

    .incoming-seller-field,
    .incoming-review-form .invoice-validation-status,
    .incoming-form-actions {
        grid-column: auto;
    }

    .incoming-form-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.file-link svg {
    width: 14px;
    height: 14px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    padding: 20px;
    background: rgba(41, 39, 36, 0.52);
    backdrop-filter: blur(5px);
    place-items: center;
}

.modal-card {
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    padding: 24px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-raised);
    animation: modal-in 180ms ease-out;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header,
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-header {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
}

.modal-body {
    padding: 18px 0;
}

.modal-body > p {
    color: var(--text-soft);
    font-size: 12px;
}

.payment-summary {
    display: grid;
    gap: 9px;
    padding: 14px;
    margin-top: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.payment-summary > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.payment-summary dt {
    color: var(--text-soft);
    font-size: 10px;
}

.payment-summary dd {
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.confirmation-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 16px;
    color: var(--text);
    font-size: 11px;
}

.confirmation-check input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--teal);
}

.report-decision-overlay {
    z-index: 140;
}

.report-decision-card {
    width: min(100%, 560px);
}

.report-decision-context {
    padding: 12px 14px;
    margin: 0 0 16px;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    line-height: 1.5;
}

.report-decision-note-field {
    display: grid;
    gap: 7px;
}

.report-decision-note {
    min-height: 112px;
    resize: vertical;
}

.report-decision-check {
    padding: 11px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.report-decision-error {
    margin: 12px 0 0;
}

.modal-footer {
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.btn-danger-soft {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.btn-danger-soft:hover:not(:disabled) {
    color: #a93e35;
    border-color: #dda79f;
}

.settings-overlay {
    padding: 16px;
}

.temporary-credential-card {
    width: min(100%, 560px);
}

.temporary-credential-body {
    display: grid;
    gap: 16px;
}

.temporary-credential-body .settings-note {
    margin: 0;
}

.temporary-credential-value-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.temporary-credential-value {
    min-width: 0;
    flex: 1;
    padding: 14px 16px;
    overflow-wrap: anywhere;
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    user-select: all;
}

.temporary-credential-body .settings-message {
    margin: 0;
}

.settings-modal-card {
    display: flex;
    width: min(100%, 940px);
    height: min(760px, calc(100vh - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
    flex-direction: column;
}

.settings-modal-header {
    flex: 0 0 auto;
    padding: 20px 22px 16px;
}

.settings-loading {
    display: grid;
    flex: 1;
    color: var(--text-soft);
    font-size: 12px;
    place-items: center;
}

.settings-layout {
    display: grid;
    min-height: 0;
    flex: 1;
    grid-template-columns: 205px minmax(0, 1fr);
}

.settings-nav {
    display: flex;
    min-width: 0;
    padding: 18px 12px;
    overflow-y: auto;
    flex-direction: column;
    gap: 4px;
    background: var(--surface-soft);
    border-right: 1px solid var(--border);
}

.settings-nav-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    padding: 10px 11px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
}

.settings-nav-item svg {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
}

.settings-nav-item:hover,
.settings-nav-item.active {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.settings-nav-item.active svg {
    color: var(--coral);
}

.settings-panels {
    min-width: 0;
    overflow-y: auto;
}

.settings-panel {
    display: none;
    padding: 24px 26px 32px;
}

.settings-panel.active {
    display: block;
}

.upload-comparison-panel {
    padding: 18px;
    margin-top: 20px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.upload-comparison-panel.hidden {
    display: none;
}

.comparison-summary-grid {
    display: grid;
    margin: 16px 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.comparison-summary-card {
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.comparison-summary-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 10px;
}

.comparison-summary-card strong {
    font-size: 13px;
}

.comparison-items-table {
    max-height: 360px;
    overflow: auto;
}

.comparison-approval-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
}

.comparison-approval-actions.hidden {
    display: none;
}

.settings-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.settings-section-heading h3 {
    font-size: 18px;
    letter-spacing: -0.025em;
}

.settings-theme-section {
    padding: 16px;
    margin-bottom: 24px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.settings-subsection-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.settings-subsection-heading h4 {
    color: var(--text);
    font-size: 13px;
    letter-spacing: -0.01em;
}

.settings-subsection-heading p {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 10px;
}

.settings-system-status-heading {
    padding-bottom: 10px;
}

.theme-mode-grid {
    display: grid;
    gap: 9px;
    margin-top: 15px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-mode-option {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding: 12px;
    color: var(--text-soft);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.theme-mode-option:hover {
    color: var(--text);
    border-color: var(--border-strong);
    transform: translateY(-1px);
}

.theme-mode-option:has(input:checked) {
    color: var(--text);
    background: var(--blue-soft);
    border-color: var(--blue);
}

.theme-mode-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.theme-mode-option:has(input:focus-visible) {
    outline: 3px solid color-mix(in srgb, var(--blue) 30%, transparent);
    outline-offset: 2px;
}

.theme-mode-icon {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    color: var(--blue);
    background: var(--blue-soft);
    border-radius: 8px;
    place-items: center;
}

.theme-mode-icon svg {
    width: 15px;
    height: 15px;
}

.theme-mode-option > span:last-child {
    min-width: 0;
}

.theme-mode-option strong,
.theme-mode-option small {
    display: block;
}

.theme-mode-option strong {
    font-size: 10px;
}

.theme-mode-option small {
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-faint);
    font-size: 8px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.settings-theme-solar {
    margin-top: 12px;
    color: var(--text-soft);
    font-size: 9px;
    line-height: 1.5;
}

.settings-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 700;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    white-space: nowrap;
}

.settings-status.ok {
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #b8d9d2;
}

.settings-status.warning {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: #edd7a8;
}

.settings-status.error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.audit-filter-form {
    display: grid;
    align-items: end;
    gap: 10px;
    padding: 14px;
    margin-bottom: 14px;
    grid-template-columns: minmax(140px, 1.2fr) repeat(2, minmax(120px, 1fr)) repeat(2, minmax(115px, 0.8fr));
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.audit-filter-actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 8px;
}

.audit-session-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    margin-bottom: 12px;
    color: var(--text-soft);
    font-size: 10px;
    background: var(--teal-soft);
    border: 1px solid #b8d9d2;
    border-radius: var(--radius-small);
}

.audit-session-filter strong {
    color: var(--text);
    overflow-wrap: anywhere;
}

.audit-table-wrap {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.audit-table-wrap::-webkit-scrollbar {
    display: none;
}

.audit-table-scrollbar {
    position: fixed;
    z-index: 1;
    height: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    opacity: 0.3;
    scrollbar-color: var(--border-strong) transparent;
    scrollbar-width: thin;
    transition: opacity 160ms ease;
}

.audit-table-scrollbar:hover,
.audit-table-scrollbar:focus-visible {
    opacity: 1;
}

.audit-table-scrollbar > div {
    width: 1040px;
    height: 1px;
}

.audit-table-scrollbar.hidden {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .audit-table-scrollbar {
        transition: none;
    }
}

.audit-table {
    min-width: 1040px;
}

.audit-table th,
.audit-table td {
    vertical-align: top;
}

.audit-table td {
    line-height: 1.45;
}

.audit-risk-badge,
.audit-processing-badge {
    display: block;
    width: fit-content;
    padding: 2px 6px;
    margin-top: 5px;
    font-size: 8px;
    font-weight: 700;
    border: 1px solid;
    border-radius: 999px;
    white-space: nowrap;
}

.audit-risk-badge.unusual,
.audit-processing-badge {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: #edd7a8;
}

.audit-risk-badge.foreign {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.audit-session-link {
    max-width: 112px;
    padding: 0;
    overflow: hidden;
    color: var(--teal);
    font: inherit;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
    background: transparent;
    border: 0;
}

.audit-session-link:hover {
    text-decoration: underline;
}

.audit-detail-row:hover {
    background: transparent !important;
}

.audit-detail-cell {
    padding: 0 12px 12px !important;
}

.audit-detail-grid {
    display: grid;
    gap: 8px;
    padding: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.audit-detail-grid > div {
    min-width: 0;
}

.audit-detail-grid dt {
    margin-bottom: 3px;
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.audit-detail-grid dd {
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 10px;
}

.audit-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
    color: var(--text-soft);
    font-size: 10px;
}

.settings-facts,
.settings-status-grid {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.settings-facts > div,
.settings-status-grid > div,
.settings-readonly-field {
    min-width: 0;
    padding: 12px 13px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.settings-facts dt,
.settings-status-grid span,
.settings-readonly-field span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.settings-facts dd,
.settings-status-grid strong,
.settings-readonly-field strong {
    overflow-wrap: anywhere;
    font-size: 11px;
    font-weight: 600;
}

.settings-form {
    display: grid;
    gap: 13px;
    padding: 16px;
    margin-bottom: 18px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.settings-form small,
.settings-switch-row small {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 9px;
    font-weight: 400;
}

.settings-form .btn {
    justify-self: flex-start;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.settings-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.settings-switch-row input {
    width: 38px;
    height: 20px;
    accent-color: var(--teal);
}

.settings-alert,
.settings-note,
.settings-message {
    padding: 10px 12px;
    color: var(--text-soft);
    font-size: 10px;
    line-height: 1.5;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.settings-alert {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.settings-alert.warning {
    color: var(--amber);
    background: var(--amber-soft);
    border-color: #edd7a8;
}

.settings-alert.error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

.settings-key-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
}

.settings-key-card > div {
    min-width: 0;
}

.settings-key-card strong,
.settings-key-card span {
    display: block;
}

.settings-key-card strong {
    font-size: 11px;
}

.settings-key-card span {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 9px;
}

.settings-note {
    margin-top: 16px;
}

.settings-confirmation {
    display: grid;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    grid-template-columns: minmax(170px, 1fr) repeat(2, minmax(160px, 0.8fr)) auto auto;
    background: var(--amber-soft);
    border-top: 1px solid #edd7a8;
}

.settings-confirmation > div strong,
.settings-confirmation > div span {
    display: block;
}

.settings-confirmation > div strong {
    font-size: 11px;
}

.settings-confirmation > div span {
    color: var(--text-soft);
    font-size: 9px;
}

#settings-confirmation-description {
    white-space: pre-line;
}

.settings-message {
    flex: 0 0 auto;
    margin: 0 18px 14px;
    color: var(--teal);
    background: var(--teal-soft);
    border-color: #b8d9d2;
}

.settings-message.error {
    color: var(--danger);
    background: var(--danger-soft);
    border-color: #f0c5bf;
}

@media (max-width: 1280px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .compare-filter-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }

    .tax-summary-values {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .insights-card {
        min-height: auto;
    }

    .insights-scroll {
        max-height: 330px;
    }
}

@media (max-width: 1080px) {
    :root {
        --sidebar-width: 82px;
    }

    .sidebar {
        padding-right: 12px;
        padding-left: 12px;
    }

    .brand {
        justify-content: center;
        padding: 0;
    }

    .brand-copy,
    .sidebar-status > div,
    .sidebar-user > div:not(.avatar),
    .nav-link span {
        display: none;
    }

    .nav-link {
        justify-content: center;
        padding: 12px;
    }

    .sidebar-status,
    .sidebar-user {
        justify-content: center;
        padding: 10px;
    }

    .settings-trigger {
        display: none;
    }

    .topbar,
    .main-content {
        padding-right: 24px;
        padding-left: 24px;
    }

    .global-filters {
        min-width: 0;
    }

    .topbar-actions {
        gap: 10px;
    }

    .filter-field {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .filter-field .form-select {
        width: 146px;
    }

    .compare-charts-grid,
    .invoices-layout {
        grid-template-columns: 1fr;
    }

    .compare-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .invoice-form-card {
        position: static;
    }
}

@media (max-width: 767px) {
    :root {
        --sidebar-width: 280px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: var(--sidebar-width);
        padding: 20px 16px;
        visibility: hidden;
        box-shadow: var(--shadow-raised);
        transform: translateX(-104%);
        transition: transform 220ms ease, visibility 220ms ease;
    }

    body.sidebar-open .sidebar {
        visibility: visible;
        transform: translateX(0);
    }

    .brand {
        justify-content: flex-start;
    }

    .brand-copy,
    .sidebar-status > div,
    .sidebar-user > div:not(.avatar),
    .nav-link span {
        display: flex;
    }

    .brand-copy {
        display: flex;
    }

    .sidebar-close {
        display: inline-grid !important;
    }

    .nav-link {
        justify-content: flex-start;
        padding: 11px 13px;
    }

    .sidebar-status,
    .sidebar-user {
        justify-content: flex-start;
    }

    .settings-trigger {
        display: inline-grid;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 35;
        display: block;
        visibility: hidden;
        background: rgba(41, 39, 36, 0.38);
        border: 0;
        opacity: 0;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    body.sidebar-open .sidebar-backdrop {
        visibility: visible;
        opacity: 1;
    }

    .menu-toggle {
        display: inline-grid;
        flex: 0 0 auto;
    }

    .workspace {
        width: 100%;
    }

    .topbar {
        position: relative;
        min-height: auto;
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .topbar-heading {
        width: 100%;
    }

    .topbar-heading > div:last-child {
        min-width: 0;
    }

    .global-filters {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-actions {
        width: 100%;
        align-items: flex-end;
    }

    .topbar-actions .global-filters {
        flex: 1;
    }

    .notification-panel {
        top: 12px;
        right: 12px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .comparison-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-field .form-select {
        width: 100%;
    }

    .main-content {
        padding: 16px 16px 36px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-card {
        min-height: 134px;
    }

    .metric-card--featured {
        min-height: 176px;
    }

    .recent-grid,
    .upload-form-grid {
        grid-template-columns: 1fr;
    }

    .card-header-responsive,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .card-header-responsive .btn,
    .card-header-responsive .inline-field {
        align-self: flex-start;
    }

    .chart-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .chart-controls .form-select {
        flex: 1 1 150px;
    }

    .chart-frame {
        height: 330px;
        padding-right: 8px;
        padding-left: 8px;
    }

    .compare-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .compare-filter-grid {
        grid-template-columns: 1fr;
    }

    .compare-company-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .compare-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .button-group {
        flex-wrap: wrap;
    }

    .compare-charts-grid {
        grid-template-columns: 1fr !important;
    }

    .compare-filter-status {
        line-height: 1.45;
    }

    .modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .modal-footer .btn {
        width: 100%;
    }

    .settings-overlay {
        padding: 0;
    }

    .settings-modal-card {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .settings-layout {
        display: flex;
        flex-direction: column;
    }

    .settings-nav {
        overflow-x: auto;
        overflow-y: hidden;
        flex: 0 0 auto;
        flex-direction: row;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .settings-nav-item {
        width: auto;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .settings-panel {
        padding: 20px 16px 28px;
    }

    .theme-mode-grid {
        grid-template-columns: 1fr;
    }

    .audit-filter-form,
    .audit-detail-grid {
        grid-template-columns: 1fr;
    }

    .audit-filter-actions {
        grid-column: auto;
    }

    .audit-pagination {
        justify-content: space-between;
    }

    .settings-confirmation {
        grid-template-columns: 1fr 1fr;
    }

    .settings-confirmation > div,
    .settings-confirmation .form-control {
        grid-column: 1 / -1;
    }
}

@media (max-width: 520px) {
    .temporary-credential-value-row {
        align-items: stretch;
        flex-direction: column;
    }

    .metrics-grid,
    .compare-kpi-grid {
        grid-template-columns: 1fr;
    }

    .tax-summary-values {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 126px;
    }

    .metric-card--featured {
        min-height: 170px;
    }

    .global-filters {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 18px;
    }

    .chart-card {
        padding: 0;
    }

    .chart-summary {
        flex-wrap: wrap;
        padding-right: 18px;
        padding-left: 18px;
    }

    .chart-frame {
        height: 300px;
    }

    .settings-facts,
    .settings-status-grid {
        grid-template-columns: 1fr;
    }

    .settings-actions,
    .settings-actions .btn {
        width: 100%;
    }

    .settings-key-card {
        align-items: stretch;
        flex-direction: column;
    }

    .recent-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .recent-item-meta {
        padding-left: 44px;
        text-align: left;
    }
}

.sidebar-account-actions {
    display: flex;
    gap: 8px;
}

.sidebar-account-actions .btn {
    flex: 1;
}

.bin-intro-card {
    margin-bottom: 20px;
}

.bin-policy-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--teal-soft);
    color: var(--text-soft);
    line-height: 1.55;
}

.bin-policy-note svg {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--teal);
}

.bin-toolbar {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.bin-item-detail,
.bin-status-error-copy {
    display: block;
    margin-top: 4px;
    color: var(--text-faint);
    font-size: 0.78rem;
    font-weight: 400;
}

.bin-status {
    white-space: nowrap;
}

.bin-status-safe {
    background: var(--teal-soft);
    color: var(--teal);
}

.bin-status-pending,
.bin-status-restoring,
.bin-status-expiring {
    background: var(--amber-soft);
    color: var(--amber);
}

.bin-status-error,
.bin-status-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.bin-status-error-copy {
    max-width: 240px;
    color: var(--danger);
    line-height: 1.4;
}

.form-error {
    margin: 4px 0 14px;
    color: #B42318;
    font-size: 0.875rem;
    line-height: 1.5;
}

.login-page {
    --canvas: #f7f6f3;
    --sidebar: #f1efeb;
    --surface: #ffffff;
    --surface-soft: #fbfaf8;
    --text: #292724;
    --text-soft: #716d67;
    --text-faint: #918c85;
    --border: #e6e2dc;
    --border-strong: #d6d0c7;
    --coral: #e96f51;
    --coral-hover: #d85d42;
    --coral-soft: #fff0eb;
    --teal: #2c8b80;
    --teal-hover: #24766d;
    --teal-soft: #eaf6f3;
    --amber: #b4771b;
    --amber-soft: #fff5df;
    --danger: #c64e43;
    --danger-soft: #fff0ee;
    color-scheme: light;
    min-height: 100vh;
    color: #292724;
    background:
        radial-gradient(circle at top left, rgba(233, 111, 81, 0.12), transparent 35%),
        var(--bg, #F7F6F3);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 430px);
    padding: 40px;
    border: 1px solid var(--border, #E6E2DC);
    border-radius: 22px;
    background: var(--surface, #FFFFFF);
    box-shadow: 0 24px 70px rgba(41, 39, 36, 0.12);
}

.login-brand {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 14px;
    background: var(--coral, #E96F51);
    color: #FFFFFF;
    font-weight: 700;
}

.login-card h1 {
    margin: 5px 0 10px;
    font-size: clamp(1.65rem, 4vw, 2rem);
}

.login-intro {
    margin: 0 0 28px;
    color: var(--muted, #716D67);
    line-height: 1.6;
}

.login-card .form-field {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-security-note {
    margin: 20px 0 0;
    color: var(--muted, #716D67);
    font-size: 0.78rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 520px) {
    .login-card {
        padding: 28px 22px;
    }

    .bin-toolbar {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .bin-toolbar .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
