:root {
    --navy: #0f2744;
    --navy-2: #1e3a5f;
    --navy-3: #2d4a7c;
    --gold: #d4af37;
    --gold-2: #b8912a;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --success: #166534;
    --success-bg: #f0fdf4;
    --error: #991b1b;
    --error-bg: #fef2f2;
    --info: #1e40af;
    --info-bg: #eff6ff;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background:
        linear-gradient(rgba(15, 39, 68, 0.94), rgba(15, 39, 68, 0.97)),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 44px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 44px),
        #0b1e36;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.portal-header {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 700;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 700;
}

.brand-copy small {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.back-link {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 14px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    transition: all 0.25s ease;
}

.back-link:hover {
    color: var(--navy);
    background: var(--gold);
    border-color: var(--gold);
}

.portal-main {
    width: 100%;
    max-width: 1180px;
    flex: 1;
    margin: 0 auto;
    padding: 42px 20px 60px;
}

.eyebrow {
    display: inline-block;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
    align-items: center;
    gap: clamp(40px, 7vw, 96px);
}

.auth-intro h1 {
    margin: 18px 0 18px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.08;
    font-weight: 600;
}

.auth-intro > p {
    max-width: 550px;
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.7;
}

.trust-list {
    display: grid;
    gap: 13px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
}

.trust-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.trust-list span {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--navy);
    background: var(--gold);
    font-size: 12px;
    font-weight: 900;
}

.auth-card,
.verify-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(2, 12, 27, 0.35);
}

.auth-card {
    padding: 30px;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    color: var(--navy);
    background: #f1f5f9;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.card-heading h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.2;
}

.card-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    padding: 5px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: #eef2f7;
}

.auth-tab {
    padding: 11px 12px;
    border-radius: 9px;
    color: #475569;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.auth-tab:hover {
    color: var(--navy);
}

.auth-tab.is-active {
    color: var(--navy);
    background: #fff;
    box-shadow: 0 3px 10px rgba(15, 39, 68, 0.12);
}

.notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
}

.notice ul {
    margin: 7px 0 0;
    padding-left: 20px;
}

.notice-success {
    color: var(--success);
    background: var(--success-bg);
    border-color: #bbf7d0;
}

.notice-error {
    color: var(--error);
    background: var(--error-bg);
    border-color: #fecaca;
}

.notice-info {
    color: var(--info);
    background: var(--info-bg);
    border-color: #bfdbfe;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field > span {
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.field input,
.field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
    color: #94a3b8;
}

.field input:focus,
.field select:focus {
    border-color: var(--navy-3);
    box-shadow: 0 0 0 3px rgba(45, 74, 124, 0.14);
}

.field input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 40px #fff inset;
    -webkit-text-fill-color: var(--text);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.field-help {
    margin: -9px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.form-links {
    display: flex;
    justify-content: flex-end;
    margin-top: -7px;
}

.form-links a {
    color: var(--navy-3);
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.check-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #475569;
    font-size: 12.5px;
    line-height: 1.5;
    cursor: pointer;
}

.check-line input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--navy);
    flex: 0 0 auto;
}

.check-line a {
    color: var(--navy-3);
    font-weight: 700;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border: 0;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.22s ease;
}

.button-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.24);
}

.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 11px 26px rgba(30, 58, 95, 0.32);
}

.button-primary:active {
    transform: translateY(0);
}

.button-secondary {
    color: var(--navy);
    background: #fff;
    border: 1px solid #cbd5e1;
}

.button-secondary:hover {
    border-color: var(--navy);
}

.button-link {
    padding: 0;
    border: 0;
    color: var(--navy-3);
    background: transparent;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.button-link:disabled {
    color: #94a3b8;
    cursor: default;
    text-decoration: none;
}

.form-hint {
    margin: -3px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.role-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

.role-switch a {
    color: var(--navy-3);
    font-weight: 800;
}

.verify-layout {
    display: flex;
    justify-content: center;
}

.verify-card {
    width: 100%;
    max-width: 580px;
    padding: 38px;
    text-align: center;
}

.verify-card .eyebrow {
    color: var(--gold-2);
}

.verify-icon {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 18px auto 16px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
    box-shadow: 0 0 0 8px rgba(30, 58, 95, 0.08);
}

.verify-icon svg {
    width: 34px;
    height: 34px;
    fill: currentColor;
}

.verify-card h1 {
    margin: 0 0 12px;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    line-height: 1.2;
}

.verify-lead {
    margin: 0 auto 24px;
    max-width: 470px;
    color: #475569;
    font-size: 14px;
    line-height: 1.7;
}

.verify-lead strong {
    color: var(--navy);
}

.verify-form {
    display: grid;
    gap: 16px;
    max-width: 380px;
    margin: 0 auto;
}

.code-field input {
    height: 62px;
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 10px;
    padding-left: 20px;
}

.code-field input::placeholder {
    color: #cbd5e1;
    letter-spacing: 10px;
}

.verify-meta {
    display: grid;
    gap: 5px;
    margin: 22px auto 14px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.verify-meta strong {
    color: var(--navy);
}

.resend-form {
    margin: 0;
}

.verify-footer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}

.verify-footer a {
    color: var(--navy-3);
    font-weight: 700;
}

.dashboard {
    display: grid;
    gap: 22px;
}

.dashboard-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 10px 2px 8px;
}

.dashboard-hero h1 {
    margin: 14px 0 10px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
}

.dashboard-hero p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 15px;
    line-height: 1.65;
}

.dashboard-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.dashboard-actions .button-link {
    color: #fff;
}

.dashboard-actions .button-link:hover {
    color: var(--gold);
}

.account-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    overflow: hidden;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 14px 40px rgba(2, 12, 27, 0.22);
}

.account-strip > div {
    display: grid;
    gap: 6px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.94);
}

.account-strip span {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.account-strip strong {
    color: var(--navy);
    font-size: 14px;
    word-break: break-word;
}

.status-ok {
    color: #15803d !important;
}

.panel-jump {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.panel-jump a {
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.84);
    background: rgba(255, 255, 255, 0.06);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.panel-jump a:hover {
    color: var(--navy);
    background: var(--gold);
    border-color: var(--gold);
}

.data-section {
    display: grid;
    gap: 20px;
    padding: 26px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(2, 12, 27, 0.18);
    scroll-margin-top: 20px;
}

.data-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.data-head .eyebrow {
    color: var(--gold-2);
    font-size: 10px;
}

.data-head h2 {
    margin: 8px 0 7px;
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    line-height: 1.2;
}

.data-head p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.year-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.year-filter label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.year-filter select,
.year-filter button {
    height: 40px;
    border-radius: 9px;
    font-size: 13px;
}

.year-filter select {
    min-width: 92px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    color: var(--navy);
    background: #fff;
    outline: none;
}

.year-filter select:focus {
    border-color: var(--navy-3);
    box-shadow: 0 0 0 3px rgba(45, 74, 124, 0.12);
}

.year-filter button {
    padding: 0 14px;
    border: 0;
    color: #fff;
    background: var(--navy-2);
    font-weight: 700;
    cursor: pointer;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metric-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
}

.metric-card span {
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.metric-card strong {
    color: var(--navy);
    font-size: 18px;
    word-break: break-word;
}

.record-counter {
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 999px;
    color: #8a6a12;
    background: #fef9e7;
    font-size: 11px;
    font-weight: 800;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.data-table {
    width: 100%;
    min-width: 740px;
    border-collapse: collapse;
    font-size: 12.5px;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: middle;
}

.data-table thead th {
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fbfdff;
}

.data-table td {
    color: #334155;
    white-space: nowrap;
}

.month-cell {
    color: var(--navy);
    font-weight: 700;
}

.month-cell strong {
    display: block;
    font-size: 13px;
}

.month-cell span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
}

.due-dates,
.status-stack {
    display: grid;
    gap: 5px;
}

.due-dates span {
    color: #475569;
    font-size: 11.5px;
    white-space: nowrap;
}

.status-stack {
    justify-items: start;
}

.status-paid {
    color: #166534;
    background: #f0fdf4;
}

.status-pending {
    color: #92400e;
    background: #fffbeb;
}

.status-none,
.status-empty {
    color: #64748b;
    background: #f1f5f9;
}

.table-note {
    margin: -6px 0 0;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.55;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.dashboard-card {
    position: relative;
    min-height: 210px;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(2, 12, 27, 0.18);
}

.dashboard-card-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--navy);
    background: #eef2f7;
}

.dashboard-card-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-card h2 {
    margin: 18px 0 8px;
    color: var(--navy);
    font-size: 18px;
}

.dashboard-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.soon-badge {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #8a6a12;
    background: #fef9e7;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.security-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
}

.security-panel h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 16px;
}

.security-panel p {
    max-width: 690px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12.5px;
    line-height: 1.6;
}

.security-meta {
    display: grid;
    gap: 5px;
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.portal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 20px 24px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
}

.portal-footer p {
    margin: 0;
}

.portal-footer a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

.portal-footer a:hover {
    color: var(--gold);
}

@media (max-width: 920px) {
    .auth-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .auth-intro h1 {
        font-size: 42px;
    }

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

    .account-strip {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .data-head {
        flex-direction: column;
    }

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

    .security-panel {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .portal-header {
        padding: 18px 16px;
    }

    .portal-main {
        padding: 24px 16px 44px;
    }

    .auth-intro h1 {
        font-size: 34px;
    }

    .auth-intro > p {
        font-size: 15px;
    }

    .auth-card,
    .verify-card {
        padding: 22px 18px;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .account-strip {
        grid-template-columns: 1fr;
    }

    .data-section {
        padding: 20px 16px;
    }

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

    .dashboard-actions {
        flex-wrap: wrap;
    }

    .portal-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* High-contrast panel overrides */
.panel-page .data-section {
    background: #ffffff !important;
    color: #0f172a !important;
}

.panel-page .data-head h2 {
    color: #0f2744 !important;
}

.panel-page .data-head p,
.panel-page .table-note,
.panel-page .metric-card span,
.panel-page .month-cell span {
    color: #475569 !important;
}

.panel-page .data-table td,
.panel-page .data-table tbody th,
.panel-page .metric-card strong {
    color: #1e293b !important;
}

.panel-page .data-table thead th {
    color: #334155 !important;
    background: #f1f5f9 !important;
}

.panel-page .metric-card {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.panel-page .dashboard-card {
    background: #ffffff !important;
}

.panel-page .panel-jump a {
    color: #ffffff !important;
    background: rgba(15, 39, 68, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
}

/* Slightly stronger panel typography */
.panel-page {
    font-weight: 500;
}

.panel-page .dashboard-hero h1,
.panel-page .data-head h2,
.panel-page .dashboard-card h2,
.panel-page .panel-jump a,
.panel-page .data-table thead th,
.panel-page .account-strip strong,
.panel-page .metric-card strong,
.panel-page .month-cell strong {
    font-weight: 700 !important;
}

.panel-page .data-head p,
.panel-page .table-note,
.panel-page .dashboard-card p,
.panel-page .data-table td,
.panel-page .account-strip span {
    font-weight: 500 !important;
}

.company-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
    padding: 18px 22px;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: 14px;
    background: rgba(15, 39, 68, 0.78);
    color: #ffffff;
}

.company-switcher strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.company-switcher-form {
    display: flex;
    align-items: end;
    gap: 10px;
}

.company-switcher-form label {
    display: grid;
    gap: 6px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 700;
}

.company-switcher-form select {
    min-width: 230px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
}

.company-switcher-form button {
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    background: #d4af37;
    color: #0f172a;
    font-weight: 800;
    cursor: pointer;
}

.inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.button-danger {
    padding: 11px 16px;
    border: 0;
    border-radius: 8px;
    background: #b42318;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.assignment-chip {
    display: inline-block;
    margin: 2px 5px 2px 0;
    padding: 4px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 12px;
}

.calendar-item {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(150px, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #d7e0ea;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
}

.calendar-item > span:nth-child(2) {
    color: #475569;
}

.status-badge.status-overdue {
    background: #fee4e2;
    color: #b42318;
}

.message-thread {
    display: grid;
    gap: 12px;
    max-height: 620px;
    overflow-y: auto;
    padding: 6px;
}

.message-bubble {
    width: min(78%, 720px);
    padding: 14px 16px;
    border: 1px solid #d7e0ea;
    border-radius: 14px 14px 14px 4px;
    background: #f8fafc;
    color: #1e293b;
}

.message-bubble.is-mine {
    justify-self: end;
    border-color: #bdd0e6;
    border-radius: 14px 14px 4px 14px;
    background: #eaf2fb;
}

.message-bubble p {
    margin: 10px 0 0;
    line-height: 1.6;
}

.message-bubble small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    text-align: right;
}

.message-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.message-meta span {
    color: #64748b;
    font-size: 12px;
}

.thread-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.thread-actions form {
    margin: 0;
}

.message-attachment {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid #bfd0e6;
    border-radius: 10px;
    background: #fff;
    color: #0f2744;
    text-decoration: none;
}

.message-attachment span {
    color: #64748b;
    font-size: 9px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.message-attachment strong {
    word-break: break-word;
}

.message-attachment small {
    margin: 0;
    text-align: left;
}

.message-form {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.message-form textarea {
    width: 100%;
    resize: vertical;
}

.setup-key {
    display: grid;
    gap: 10px;
    margin-bottom: 22px;
    padding: 18px;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
}

.setup-key strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: clamp(18px, 3vw, 26px);
    letter-spacing: 2px;
    word-break: break-all;
}

.setup-key code {
    padding: 10px;
    border-radius: 8px;
    background: #e2e8f0;
    word-break: break-all;
}

.notification-list {
    display: grid;
    gap: 10px;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px 16px;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
}

.notification-item.is-unread {
    border-left: 5px solid #d4af37;
    background: #fffbeb;
}

.notification-item h3,
.notification-item p {
    margin: 4px 0;
}

.notification-item time,
.notification-type {
    color: #64748b;
    font-size: 12px;
}

.notification-type {
    text-transform: uppercase;
    font-weight: 700;
}

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

.export-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
}

.export-card p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.55;
}

.export-card > div {
    display: flex;
    gap: 14px;
}

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

.calculator-card {
    align-content: start;
}

.calculator-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.calculator-form {
    display: grid;
    gap: 16px;
}

.quick-kdv-section .data-head {
    align-items: center;
}

.quick-kdv-form {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(320px, 1.1fr) minmax(360px, 1.35fr);
    align-items: end;
    gap: 14px;
}

.quick-kdv-form .calculator-segment {
    min-height: 82px;
}

.quick-kdv-form .calculator-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calculator-segment {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}

.calculator-segment legend {
    grid-column: 1 / -1;
    margin-bottom: 2px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.calculator-segment label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.calculator-segment label:has(input:checked) {
    border-color: #2d4a7c;
    background: #eaf2fb;
    color: #0f2744;
}

.calculator-segment input {
    accent-color: #0f2744;
}

.calculator-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.calculator-results > div {
    display: grid;
    gap: 5px;
    padding: 13px 14px;
    border: 1px solid #d7e0ea;
    border-radius: 10px;
    background: #f8fafc;
}

.calculator-results > .is-primary {
    border-color: #9ab5d3;
    background: #eaf2fb;
}

.calculator-results span {
    color: #64748b;
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.calculator-results strong {
    color: #0f2744;
    font-size: 17px;
    word-break: break-word;
}

.minimum-wage-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.minimum-wage-card {
    display: grid;
    gap: 7px;
    padding: 16px;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    background: #f8fafc;
}

.minimum-wage-card.is-featured {
    border-color: #b8912a;
    background: #fffbeb;
}

.minimum-wage-card.is-success {
    border-color: #86c99a;
    background: #f0fdf4;
}

.minimum-wage-card span {
    color: #64748b;
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.minimum-wage-card strong {
    color: #0f2744;
    font-size: 20px;
}

.minimum-wage-card small {
    color: #475569;
    font-size: 10.5px;
    line-height: 1.45;
}

.calculator-subtitle {
    margin: 5px 0 -5px;
    color: #0f2744;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}

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

.tax-brackets-grid article {
    padding: 17px;
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    background: #f8fafc;
}

.tax-brackets-grid h3 {
    margin: 0 0 10px;
    color: #0f2744;
}

.tax-brackets-grid dl {
    display: grid;
    gap: 1px;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #d7e0ea;
}

.tax-brackets-grid dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 11px;
    background: #fff;
    color: #334155;
    font-size: 12px;
}

.tax-brackets-grid dt,
.tax-brackets-grid dd {
    margin: 0;
}

.tax-brackets-grid dd {
    color: #0f2744;
    font-weight: 800;
}

.report-main {
    max-width: 1080px;
}

.report-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.report-toolbar h1 {
    margin: 10px 0 8px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 42px);
}

.report-toolbar p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.report-sheet {
    padding: 42px;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    box-shadow: 0 16px 50px rgba(2, 12, 27, 0.24);
}

.report-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 22px;
    border-bottom: 3px solid #0f2744;
}

.report-head > div:first-child {
    display: grid;
    gap: 4px;
    color: #0f2744;
}

.report-head > div:first-child strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
}

.report-head > div:first-child span {
    color: #64748b;
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.report-head > div:last-child {
    text-align: right;
}

.report-head h1 {
    margin: 0;
    color: #0f2744;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
}

.report-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 11px;
}

.report-company,
.report-metrics {
    display: grid;
    gap: 1px;
    margin: 22px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #d7e0ea;
}

.report-company {
    grid-template-columns: repeat(3, 1fr);
}

.report-metrics {
    grid-template-columns: repeat(3, 1fr);
}

.report-company > div,
.report-metrics > div {
    display: grid;
    gap: 5px;
    padding: 13px 15px;
    background: #f8fafc;
}

.report-company span,
.report-metrics span {
    color: #64748b;
    font-size: 10px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.report-company strong,
.report-metrics strong {
    color: #0f2744;
    font-size: 13px;
}

.report-sheet > h2 {
    margin: 25px 0 9px;
    color: #0f2744;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
}

.report-sheet table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5px;
}

.report-sheet th,
.report-sheet td {
    padding: 7px 6px;
    border: 1px solid #d7e0ea;
    text-align: left;
    vertical-align: top;
}

.report-sheet thead th {
    color: #0f2744;
    background: #eef2f7;
    font-size: 8.5px;
    text-transform: uppercase;
}

.report-sheet tbody th {
    color: #0f2744;
    background: #f8fafc;
    white-space: nowrap;
}

.report-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 9px;
}

.report-foot p {
    max-width: 680px;
    margin: 0;
    line-height: 1.5;
}

.inline-actions select,
.inline-actions input {
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
}

@media (max-width: 720px) {
    .company-switcher,
    .company-switcher-form {
        align-items: stretch;
        flex-direction: column;
    }

    .company-switcher-form select {
        width: 100%;
        min-width: 0;
    }

    .calendar-item {
        grid-template-columns: 1fr;
    }

    .export-grid,
    .report-company,
    .report-metrics,
    .calculator-grid,
    .minimum-wage-grid,
    .tax-brackets-grid,
    .quick-kdv-form {
        grid-template-columns: 1fr;
    }

    .quick-kdv-form .calculator-results {
        grid-template-columns: 1fr;
    }

    .report-toolbar,
    .report-head {
        align-items: stretch;
        flex-direction: column;
    }

    .report-head > div:last-child {
        text-align: left;
    }

    .report-sheet {
        padding: 22px 16px;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 10mm;
    }

    body.report-page {
        color: #000;
        background: #fff !important;
    }

    .report-page .portal-header,
    .report-page .portal-footer,
    .no-print {
        display: none !important;
    }

    .report-page .portal-main {
        display: block;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .report-sheet {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .report-sheet table {
        break-inside: avoid;
        font-size: 8.5px;
    }

    .report-sheet h2 {
        break-after: avoid;
    }
}
