/* ===================================================
   main.css — Global reusable components & utilities
   =================================================== */

/* --- Reset & Focus --- */
*:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface-soft);
}

::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* --- Client sidebar navigation (shared across dashboard/profile/etc.) ---
   Sits below the page's own header (var(--site-header-h)) so the header always stays visible;
   minimized (off-canvas) by default, slides in on toggle click. */
.dashboard-sidebar {
    position: fixed;
    top: var(--site-header-h, 84px);
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    width: 250px;
    height: calc(100vh / var(--page-zoom) - var(--site-header-h, 84px));
    padding: 18px 16px;
    border-right: 1px solid var(--line, #d8e5e8);
    background: var(--surface);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transform: translateX(-100%);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.dashboard-sidebar.open {
    transform: translateX(0);
    box-shadow: none;
}

/* Push main content when sidebar is open (desktop only) */

.dashboard-sidebar .brand {
    padding: 0 8px 18px;
    border-bottom: 1px solid var(--line, #d8e5e8);
    margin-bottom: 14px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    color: var(--muted, #64788b);
    font:
        600 0.84rem "DM Sans",
        sans-serif;
    text-decoration: none;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav-item:hover {
    background: var(--teal-soft, #edf6f4);
    color: var(--teal, #087f79);
}

.sidebar-nav-item.active {
    background: var(--teal-soft, #edf6f4);
    color: var(--teal, #087f79);
    font-weight: 700;
    border-left: 3px solid var(--teal, #087f79);
    padding-left: 9px;
}

.sidebar-nav-icon {
    display: inline-flex;
    width: 20px;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.sidebar-nav-item--logout:hover {
    background: rgba(166, 83, 72, 0.1);
    color: var(--coral);
}

/* Disabled state for nav items (e.g., New Filing when active filing exists) */

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line, #d8e5e8);
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink, #17324d);
    border-radius: 1px;
}

.sidebar-toggle:hover {
    background: var(--teal-soft, #edf6f4);
}

.sidebar-toggle:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 3px;
}

/* Dims the page below the header, since the sidebar itself starts below the header too. */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--site-header-h, 84px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 19;
    background: rgba(23, 50, 77, 0.35);
}

.sidebar-overlay:not([hidden]) {
    display: block;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.4s ease both;
}

/* --- Shared Auth Theme --- */
.auth-page {
    --auth-paper: var(--bg-gradient);
    --auth-surface: var(--surface);
    --auth-ink: var(--ink);
    --auth-muted: var(--muted);
    --auth-line: var(--line);
    --auth-primary: var(--brand);
    --auth-primary-dark: var(--brand-dark);
    --auth-input: var(--surface-soft);
    --auth-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    background: var(--auth-paper);
    color: var(--auth-ink);
    font-family: var(--font-body);
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

html[data-theme="dark"] .auth-page {
    --auth-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.auth-theme-toggle {
    align-items: center;
    background: transparent;
    border: 1px solid var(--auth-line);
    border-radius: 50%;
    color: var(--auth-primary);
    cursor: pointer;
    display: flex;
    height: 2.5rem;
    justify-content: center;
    position: fixed;
    right: 1.5rem;
    top: 1.5rem;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
    width: 2.5rem;
}

.auth-theme-toggle:hover {
    background: var(--brand-soft);
    border-color: var(--auth-primary);
}

.auth-theme-toggle svg {
    height: 1.1rem;
    width: 1.1rem;
}

.auth-theme-toggle .theme-icon-moon,
html[data-theme="dark"] .auth-theme-toggle .theme-icon-sun {
    display: none;
}

html[data-theme="dark"] .auth-theme-toggle .theme-icon-moon {
    display: block;
}

/* --- Back Link (reusable across auth pages) --- */
.back-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--auth-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    text-decoration: none;
}

.back-link:hover {
    color: var(--auth-primary);
}

.back-link--button {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    padding: 0.6rem 0.9rem;
}

.back-link--button:hover {
    background: var(--auth-input);
    border-color: var(--auth-primary);
}

/* --- Tax year picker (post-login gate) --- */
.year-select {
    cursor: pointer;
}

.previous-filings-panel {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: var(--radius-lg);
    margin: 1.5rem auto 0;
    max-width: 34rem;
    padding: 1.25rem;
    width: calc(100% - 2rem);
}

.previous-filings-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.previous-filings-heading h2 {
    color: var(--auth-ink);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin: 0.2rem 0 0;
}

.previous-filings-count {
    align-items: center;
    background: var(--auth-input);
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    color: var(--auth-primary);
    display: flex;
    font-size: 0.8rem;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
    min-width: 2rem;
}

.previous-filings-list {
    display: grid;
    gap: 0.65rem;
}

.previous-filing-row {
    align-items: center;
    background: var(--auth-input);
    border: 1px solid var(--auth-line);
    border-radius: var(--radius);
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 4.5rem minmax(0, 1fr) auto;
    padding: 0.75rem;
}

.previous-filing-year {
    color: var(--auth-primary);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.previous-filing-details {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.previous-filing-details strong {
    color: var(--auth-ink);
    font-size: 0.85rem;
}

.previous-filing-details span {
    color: var(--auth-muted);
    font-size: 0.75rem;
}

.previous-filing-action {
    background: var(--auth-primary);
    border: 1px solid var(--auth-primary);
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    font: 700 0.75rem var(--font-body);
    padding: 0.55rem 0.7rem;
    white-space: nowrap;
}

.previous-filing-action:hover {
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
}

.previous-filings-empty {
    color: var(--auth-muted);
    font-size: 0.875rem;
    margin: 0;
}

@media (max-width: 520px) {
    .previous-filing-row {
        grid-template-columns: 3.5rem minmax(0, 1fr);
    }

    .previous-filing-action {
        grid-column: 2;
        justify-self: start;
    }
}

/* --- Brand Logo Icon (MO box) --- */
.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-weight: 900;
    background: var(--auth-primary);
    color: #fff;
}

.brand-icon--lg {
    width: 3rem;
    height: 3rem;
    font-size: 1.125rem;
}

/* --- Form Label --- */
.form-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--auth-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Form Input (light theme — landing/auth pages) --- */
.form-input {
    background: var(--auth-input);
    border: 1px solid var(--auth-line);
    border-radius: 0.35rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--auth-ink);
    width: 100%;
    transition: all 0.2s;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: var(--auth-surface);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap .form-input {
    padding-right: 3rem;
}

.password-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--auth-muted);
    cursor: pointer;
    display: flex;
    height: 100%;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 0.75rem;
    top: 0;
    width: 1.5rem;
}

.password-toggle:hover {
    color: var(--auth-primary);
}

.password-toggle:focus-visible {
    border-radius: 0.25rem;
    outline: 2px solid var(--auth-primary);
    outline-offset: 2px;
}

.password-toggle-icon {
    height: 1.1rem;
    width: 1.1rem;
}

.password-eye-off-icon {
    display: none;
}

.password-toggle.is-visible .password-eye-icon {
    display: none;
}

.password-toggle.is-visible .password-eye-off-icon {
    display: block;
}

.phone-fields {
    align-items: stretch;
    background: var(--auth-input);
    border: 1px solid var(--auth-line);
    border-radius: 0.35rem;
    display: flex;
    transition: all 0.2s;
}

.phone-fields:focus-within {
    background: var(--auth-surface);
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.country-picker {
    flex-shrink: 0;
    position: relative;
}

.country-picker-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-right: 1px solid var(--auth-line);
    color: var(--auth-ink);
    cursor: pointer;
    display: flex;
    gap: 0.3rem;
    height: 100%;
    padding: 0.75rem 0.6rem;
    text-align: left;
}

.country-picker-toggle:focus-visible {
    outline: 2px solid var(--auth-primary);
    outline-offset: -2px;
}

.country-flag {
    align-items: center;
    display: flex;
    line-height: 1;
}

.country-flag-img,
.country-option-flag {
    border-radius: 0.15rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
    display: block;
    flex-shrink: 0;
    height: 15px;
    object-fit: cover;
    width: 20px;
}

.country-picker-code {
    color: var(--auth-ink);
    font-size: 0.875rem;
    font-weight: 600;
}

.country-picker-chevron {
    color: var(--auth-muted);
    flex-shrink: 0;
    height: 0.9rem;
    width: 0.9rem;
}

.phone-number-input {
    background: transparent;
    border: 0;
    color: var(--auth-ink);
    flex: 1;
    font-size: 0.875rem;
    min-width: 0;
    padding: 0.75rem 1rem;
}

.phone-number-input:focus {
    outline: none;
}

.phone-number-input::placeholder {
    color: #94a3b8;
}

.country-picker-menu {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 0.6rem;
    box-shadow: var(--auth-shadow);
    left: 0;
    min-width: 17.5rem;
    overflow: hidden;
    padding: 0.6rem;
    position: absolute;
    top: calc(100% + 0.4rem);
    z-index: 20;
}

.country-search {
    background: var(--auth-input);
    border: 1px solid var(--auth-line);
    border-radius: 0.4rem;
    color: var(--auth-ink);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.75rem;
    width: 100%;
}

.country-search:focus {
    border-color: var(--auth-primary);
    outline: none;
}

.country-options {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    max-height: 14rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.country-options::-webkit-scrollbar {
    width: 6px;
}

.country-options::-webkit-scrollbar-thumb {
    background: var(--auth-line);
    border-radius: 999px;
}

.country-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 0.4rem;
    color: var(--auth-ink);
    cursor: pointer;
    display: flex;
    font-size: 0.85rem;
    gap: 0.6rem;
    padding: 0.55rem 0.6rem;
    text-align: left;
    width: 100%;
}

.country-option:hover,
.country-option:focus-visible {
    background: rgba(15, 118, 110, 0.1);
    outline: none;
}

.country-option-code {
    color: var(--auth-muted);
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 2.6rem;
}

.country-option-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Submit Button (full width) --- */
.btn-submit {
    width: 100%;
    font-weight: 700;
    padding: 0.875rem;
    border-radius: 0.35rem;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
}

/* --- Alert Boxes --- */
.alert {
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border-width: 1px;
    border-style: solid;
}

.alert--error {
    background: rgba(189, 95, 82, 0.1);
    color: var(--coral);
    border-color: rgba(189, 95, 82, 0.2);
}

.alert--success {
    background: rgba(43, 139, 99, 0.1);
    color: var(--green);
    border-color: rgba(43, 139, 99, 0.2);
}

/* --- Auth Page Wrapper --- */
.auth-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--auth-paper);
}

.auth-page .auth-header__title {
    color: var(--auth-ink);
    text-shadow: none;
}

.auth-page .auth-header__subtitle {
    color: var(--auth-muted);
    text-shadow: none;
}

.auth-page .auth-title-accent {
    color: var(--auth-primary);
}

/* --- Auth Form Card --- */
.auth-card {
    width: 100%;
    max-width: 28rem;
    padding: 0 1.5rem;
    z-index: 10;
    margin: auto 0;
    padding-top: 3rem;
    padding-bottom: 3rem;
    position: relative;
}

.year-selection-page {
    justify-content: flex-start;
    padding: 3rem 0 1.5rem;
}

.year-selection-content {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(8rem, 12rem) minmax(0, 28rem);
    justify-content: center;
    width: calc(100% - 2rem);
}

.year-selection-logout {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    margin: 0;
}

.year-selection-logout .back-link {
    position: static;
}

.year-selection-page .auth-card {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding-top: 0rem;
    padding-bottom: 1rem;
}

.year-selection-page .auth-header {
    margin-bottom: 0rem;
}

.year-selection-page .auth-card .glass-strong {
    margin-bottom: 0 !important;
}

.year-selection-page .previous-filings-panel {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
    width: 100%;
}

@media (max-width: 820px) {
    .year-selection-content {
        grid-template-columns: minmax(0, 28rem);
    }

    .year-selection-logout,
    .year-selection-page .auth-card,
    .year-selection-page .previous-filings-panel {
        grid-column: 1;
    }

    .year-selection-logout {
        grid-row: 1;
    }

    .year-selection-page .auth-card {
        grid-row: 2;
    }

    .year-selection-page .previous-filings-panel {
        grid-row: 3;
    }
}

/* --- Auth Header (logo + title + subtitle) --- */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header__title {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--auth-ink);
}

.auth-header__subtitle {
    font-size: 0.875rem;
    color: var(--auth-muted);
    margin-top: 0.5rem;
}

/* Bottom of form links — always uses the muted token, never inherits the background-image white */

.auth-title-accent {
    color: var(--auth-primary);
}

.auth-page .glass-strong {
    background: var(--auth-surface);
    border: 1px solid var(--auth-line);
    border-radius: 0.5rem;
    box-shadow: var(--auth-shadow);
    transition:
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.auth-page .btn-primary {
    background: var(--auth-primary);
    color: #fff;
}

.auth-page .btn-primary:hover {
    background: var(--auth-primary-dark);
}

.auth-page a:not(.back-link) {
    color: var(--auth-primary);
}

.auth-page .alert--error {
    background: rgba(220, 38, 38, 0.09);
    border-color: rgba(220, 38, 38, 0.25);
    color: #dc2626;
}

.auth-page .alert--success {
    background: rgba(22, 163, 74, 0.09);
    border-color: rgba(22, 163, 74, 0.25);
    color: #15803d;
}

@media (max-width: 640px) {
    .auth-theme-toggle {
        right: 1rem;
        top: 1rem;
    }

    .auth-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* --- Section Heading --- */
.section-heading {
    font-size: 2.25rem;
    font-weight: 900;
    color: #1e3a8a;
    line-height: 1.2;
}

/* --- Container --- */
.container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Avatar Lightbox Modal --- */
#avatar-lightbox-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

#avatar-lightbox-modal.is-open {
    display: flex;
}

.avatar-lightbox-inner {
    position: relative;
    background: var(--surface);
    border-radius: 16px;
    padding: 1.5rem;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    border: 1px solid var(--line);
}

.avatar-lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    background: #ef4444;
    color: white;
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-weight: bold;
}

.avatar-lightbox-title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

#avatar-lightbox-img {
    max-width: 80vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    border: 2px solid var(--line);
    margin: 0 auto;
    display: block;
}


/* ── Choose a Tax Year (/client/years): modern restyle, same pieces (client feedback, Oct 2026) ── */
.year-selection-page {
    min-height: 100vh;
    padding: 0 0 3rem;
    background:
        radial-gradient(40rem 26rem at 12% -10%, rgba(37, 99, 235, 0.14), transparent 70%),
        radial-gradient(34rem 24rem at 100% 0%, rgba(124, 58, 237, 0.10), transparent 70%),
        var(--auth-bg, #f5f7fb);
}
.year-topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 5.5rem 0.85rem 1.75rem;   /* room on the right for the theme switch */
    border-bottom: 1px solid var(--auth-line);
    background: color-mix(in srgb, var(--auth-surface) 82%, transparent);
    backdrop-filter: blur(10px);
}
.year-topbar__brand { color: var(--auth-ink); font: 800 1.35rem var(--font-heading); letter-spacing: -0.02em; }
.year-selection-page .auth-theme-toggle { top: 0.7rem; right: 1.25rem; z-index: 6; }
.year-selection-logout { margin: 0; }
.year-selection-logout .back-link {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid var(--auth-line);
    border-radius: 999px;
    background: var(--auth-surface);
    color: var(--auth-ink);
    font-weight: 600;
    font-size: 0.86rem;
}
.year-selection-logout .back-link:hover { border-color: #ef4444; color: #dc2626; }

.year-selection-content {
    display: grid;
    grid-template-columns: minmax(0, 30rem);
    justify-content: center;
    gap: 1.25rem;
    width: calc(100% - 2rem);
    margin: 3rem auto 0;
}
.year-selection-page .auth-card,
.year-selection-page .previous-filings-panel { grid-column: 1; grid-row: auto; width: 100%; margin: 0; }
.year-selection-page .auth-card {
    padding: 2rem 2rem 1.75rem;
    border: 1px solid var(--auth-line);
    border-radius: 20px;
    background: var(--auth-surface);
    box-shadow: 0 24px 60px -28px rgba(15, 23, 42, 0.35);
}
.year-selection-page .auth-header { margin-bottom: 1.25rem; }
.year-hero-icon {
    display: inline-grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: 0.9rem;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 12px 26px -10px rgba(37, 99, 235, 0.65);
}
.year-hero-icon svg { width: 1.7rem; height: 1.7rem; }
.year-hello { margin: 0 0 0.25rem; color: var(--auth-primary); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.year-selection-page .auth-card .glass-strong { background: none; border: 0; box-shadow: none; margin: 0 !important; }
.year-selection-page .auth-card .glass-strong form { padding: 0 !important; }
.year-selection-page .year-select {
    appearance: none;
    -webkit-appearance: none;
    height: 3.25rem;
    padding: 0 2.75rem 0 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--auth-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 1rem center / 1.1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.year-selection-page .year-select:focus { border-color: var(--auth-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); outline: none; }
.year-preview-text { margin: 0; color: var(--auth-muted); font-size: 0.85rem; }
.year-continue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3.1rem;
    border-radius: 12px;
    font-size: 1rem;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 14px 28px -14px rgba(37, 99, 235, 0.9);
    transition: transform 0.15s, box-shadow 0.15s;
}
.year-continue:hover { transform: translateY(-1px); box-shadow: 0 18px 32px -14px rgba(37, 99, 235, 0.95); }
.year-continue svg { width: 1.1rem; height: 1.1rem; }

.year-selection-page .previous-filings-panel {
    padding: 1.4rem 1.5rem;
    border-radius: 20px;
    background: var(--auth-surface);
    box-shadow: 0 18px 44px -30px rgba(15, 23, 42, 0.35);
}
.year-selection-page .previous-filings-heading h2 { font-size: 1.1rem; font-weight: 700; }
.year-selection-page .previous-filing-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    transition: border-color 0.15s, transform 0.15s;
}
.year-selection-page .previous-filing-row:hover { border-color: var(--auth-primary); transform: translateY(-1px); }
.year-selection-page .previous-filing-year {
    padding: 0.45rem 0.7rem;
    border-radius: 10px;
    font-size: 1.05rem;
    background: rgba(37, 99, 235, 0.10);
    color: var(--auth-primary);
}
.year-selection-page .previous-filing-details span { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.year-status { padding: 0.1rem 0.55rem; border-radius: 999px; font-style: normal; font-weight: 700; font-size: 0.7rem; }
.year-status--complete { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.year-status--progress { background: rgba(217, 119, 6, 0.12); color: #b45309; }
.year-selection-page .previous-filing-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: transparent;
    color: var(--auth-primary);
    border-color: rgba(37, 99, 235, 0.35);
}
.year-selection-page .previous-filing-action:hover { background: var(--auth-primary); color: #fff; }
.year-selection-page .previous-filing-action svg { width: 0.9rem; height: 0.9rem; }

html[data-theme="dark"] .year-selection-page {
    background:
        radial-gradient(40rem 26rem at 12% -10%, rgba(37, 99, 235, 0.22), transparent 70%),
        radial-gradient(34rem 24rem at 100% 0%, rgba(124, 58, 237, 0.16), transparent 70%),
        var(--auth-bg, #0b1220);
}
html[data-theme="dark"] .year-status--complete { color: #4ade80; }
html[data-theme="dark"] .year-status--progress { color: #fbbf24; }

@media (max-width: 520px) {
    .year-topbar { padding-left: 1rem; }
    .year-selection-content { margin-top: 1.75rem; }
    .year-selection-page .auth-card { padding: 1.5rem 1.25rem; }
    .year-selection-page .previous-filing-row { grid-template-columns: auto minmax(0, 1fr); }
}
.year-selection-page .auth-card,
.year-selection-page .previous-filings-panel { max-width: none; box-sizing: border-box; }

/* Choose a Tax Year: picker on the left, previous filings on the right (stacked on narrow screens) */
@media (min-width: 900px) {
    .year-selection-content {
        grid-template-columns: minmax(0, 30rem) minmax(0, 30rem);
        align-items: start;
        gap: 1.75rem;
        margin-top: 3.5rem;
    }
    .year-selection-page .auth-card { grid-column: 1; grid-row: 1; }
    .year-selection-page .previous-filings-panel { grid-column: 2; grid-row: 1; }
}


/* ── Choose a Tax Year: year tiles (client feedback, Oct 2026) ── */
.year-tiles-page { width: calc(100% - 2rem); max-width: 64rem; margin: 3.5rem auto 0; }
.year-tiles-head { text-align: center; margin-bottom: 2.25rem; }
.year-tiles-head .auth-header__title { font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0.35rem 0 0.5rem; }
.year-tiles-head .auth-header__subtitle { margin: 0 auto; max-width: 34rem; }
.year-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr)); gap: 1.25rem; }
.year-tile-form { margin: 0; display: flex; }
.year-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
    padding: 1.4rem 1.4rem 1.25rem;
    border: 1px solid var(--auth-line);
    border-radius: 20px;
    background: var(--auth-surface);
    box-shadow: 0 18px 44px -30px rgba(15, 23, 42, 0.4);
    color: var(--auth-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.year-tile:hover, .year-tile:focus-visible {
    transform: translateY(-4px);
    border-color: var(--auth-primary);
    box-shadow: 0 26px 50px -26px rgba(37, 99, 235, 0.55);
    outline: none;
}
.year-tile.is-current {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(140deg, #2563eb 0%, #4f46e5 100%);
    box-shadow: 0 26px 50px -24px rgba(37, 99, 235, 0.8);
}
.year-tile__top { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 0.4rem; }
.year-tile__icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 12px; background: rgba(37, 99, 235, 0.1); color: var(--auth-primary); }
.year-tile__icon svg { width: 1.3rem; height: 1.3rem; }
.year-tile--complete .year-tile__icon { background: rgba(22, 163, 74, 0.12); color: #16a34a; }
.year-tile--progress .year-tile__icon { background: rgba(217, 119, 6, 0.12); color: #d97706; }
.year-tile.is-current .year-tile__icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
.year-tile__tag { padding: 0.2rem 0.6rem; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.year-tile__year { font: 800 2.4rem/1 var(--font-heading); letter-spacing: -0.03em; }
.year-tile__detail { color: var(--auth-muted); font-size: 0.85rem; }
.year-tile.is-current .year-tile__detail { color: rgba(255, 255, 255, 0.85); }
.year-status--none { background: rgba(100, 116, 139, 0.12); color: #475569; }
.year-tile.is-current .year-status { background: rgba(255, 255, 255, 0.2); color: #fff; }
.year-tile__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.9rem;
    color: var(--auth-primary);
    font-size: 0.9rem;
    font-weight: 700;
}
.year-tile__cta svg { width: 1rem; height: 1rem; transition: transform 0.18s ease; }
.year-tile:hover .year-tile__cta svg { transform: translateX(3px); }
.year-tile.is-current .year-tile__cta { color: #fff; }
html[data-theme="dark"] .year-status--none { color: #cbd5e1; background: rgba(148, 163, 184, 0.16); }
@media (max-width: 520px) {
    .year-tiles-page { margin-top: 1.75rem; }
    .year-tile__year { font-size: 2rem; }
}
.year-tiles-page { max-width: 78rem; }
.year-tiles { grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); }

/* Year picker above the year cards */
.year-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 34rem;
    margin: 0 auto 2.5rem;
    padding: 0.6rem 0.6rem 0.6rem 1.1rem;
    border: 1px solid var(--auth-line);
    border-radius: 18px;
    background: var(--auth-surface);
    box-shadow: 0 18px 44px -30px rgba(15, 23, 42, 0.45);
}
.year-picker__label { color: var(--auth-muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.year-picker .year-select { flex: 1; min-width: 0; height: 3rem; margin: 0; }
.year-picker .year-continue { width: auto; height: 3rem; margin: 0; padding: 0 1.4rem; white-space: nowrap; }
.year-cards-title { margin: 0 0 1rem; color: var(--auth-ink); font: 700 1.15rem var(--font-heading); }
.year-tiles { grid-template-columns: repeat(auto-fill, minmax(14rem, 17rem)); }
@media (max-width: 560px) {
    .year-picker { flex-wrap: wrap; padding: 0.9rem; }
    .year-picker__label { width: 100%; }
    .year-picker .year-continue { width: 100%; }
    .year-tiles { grid-template-columns: 1fr; }
}
.year-tiles { justify-content: center; }
.year-cards-title { text-align: center; }
.year-tiles { display: flex; flex-wrap: wrap; justify-content: center; }
.year-tile-form { width: 17rem; }
@media (max-width: 560px) { .year-tile-form { width: 100%; } }
