/* =========================================================
   1. SHARED LAYOUT CARDS
   Used by simple centered pages and shared card layouts
   ========================================================= */


    

    


    

        

/* =========================================================
   2. SHARED BUTTONS
   Used across hero, pricing, navbar, account and flows
   ========================================================= */

.app-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-height: 36px;
    border-radius: 11px;
    padding: 0.62rem 1.05rem;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.1;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

    .app-btn:hover {
        text-decoration: none;
        transform: translateY(-1px);
    }

.app-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

    .app-btn-primary:hover {
        color: #ffffff;
        box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
    }

.app-btn-secondary {
    background: #ffffff;
    color: #1d4ed8;
    border-color: #c7d7fe;
}

    .app-btn-secondary:hover {
        color: #1d4ed8;
        background: #f8fbff;
    }

.app-btn-danger {
    background: #ffffff;
    color: #b42318;
    border-color: #f3b5b1;
}

    .app-btn-danger:hover {
        color: #b42318;
        background: #fff5f4;
    }

.app-btn-sm {
    min-height: 32px;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 9px;
}

.hero-btn {
    min-width: 180px;
}

.pricing-btn {
    width: 100%;
}

/* =========================================================
   3. AUTH PAGES
   Login, forgot password, reset password, auth prompts
   ========================================================= */

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 35%), linear-gradient(135deg, #eef2f7 0%, #dde5ef 100%);
}

.auth-card {
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 2.5rem 2rem;
}

.auth-card-wide {
    max-width: 520px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-brand-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #111827;
    margin-bottom: 0.5rem;
}

.auth-brand-subtitle {
    font-size: 1rem;
    color: #667085;
}

.auth-alert {
    margin-bottom: 1rem;
    border-radius: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
}

.auth-label {
    width: 100%;
    max-width: 340px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #475467;
    text-align: left;
}

.auth-input {
    width: 100%;
    max-width: 340px;
    height: 52px;
    padding: 0.85rem 1rem;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    background: #f9fafb;
    color: #101828;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .auth-input:focus {
        border-color: #3b82f6;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    }

.auth-btn {
    width: 100%;
    max-width: 340px;
    align-self: center;
    height: 52px;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

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

.auth-btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

    .auth-btn-primary:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
    }

.auth-switch {
    margin-top: 0.5rem;
    text-align: center;
    color: #667085;
    font-size: 0.95rem;
}

.auth-link-btn {
    background: none;
    border: none;
    padding: 0;
    margin-left: 0.35rem;
    color: #1d4ed8;
    font-weight: 600;
    cursor: pointer;
}

    .auth-link-btn:hover {
        text-decoration: underline;
    }

.auth-legal,
.subscription-legal {
    margin-top: 12px;
    font-size: 13px;
    color: #666;
}

    .auth-legal a,
.subscription-legal a {
        color: #007bff;
        text-decoration: none;
    }

        .auth-legal a:hover,
.subscription-legal a:hover {
            text-decoration: underline;
        }

/* =========================================================
   4. MARKETING / HOME PAGE
   Hero, features, steps, pricing and CTA
   ========================================================= */

.marketing-home {
    color: #111827;
}

.hero-section {
    padding: 6rem 1.5rem 4rem;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 35%), linear-gradient(135deg, #eef2f7 0%, #dde5ef 100%);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-weight: 600;
    font-size: 0.9rem;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.08;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero-subtitle {
    max-width: 720px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #667085;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}


.hero-auth-message {
    margin-top: 1.25rem;
    color: #475467;
}

.features-section,
.steps-section,
.pricing-section,
.cta-section {
    padding: 4rem 1.5rem;
}

.pricing-section {
    background: #f9fafb;
}

.section-header {
    max-width: 720px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

    .section-header h2 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 0.75rem;
    }

    .section-header p {
        color: #667085;
        font-size: 1.05rem;
        line-height: 1.7;
    }

.feature-grid,
.steps-grid,
.pricing-grid {
    display: grid;
    gap: 24px;
    align-items: stretch;
}

.feature-grid,
.steps-grid {
    max-width: 1100px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pricing-grid {
    max-width: 1380px;
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: stretch;
}

.feature-card,
.step-card,
.cta-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.feature-card,
.step-card {
    padding: 1.75rem;
}

    .feature-card h3,
.step-card h3 {
        margin-bottom: 0.75rem;
        font-size: 1.2rem;
        font-weight: 700;
    }

    .feature-card p,
.step-card p {
        margin: 0;
        color: #667085;
        line-height: 1.7;
    }

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.step-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
}

/* PRICING CARDS - hard pinned CTA layout */
.pricing-card {
    position: relative;
    display: block;
    min-height: 560px;
    height: 100%;
    padding: 24px 24px 108px 24px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    overflow: visible;
}

    .pricing-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    }

.pricing-highlight {
    border: 2px solid #2563eb;
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.14);
}

.pricing-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: #fff;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    z-index: 2;
    white-space: nowrap;
}

.pricing-card-body {
    display: block;
}

.pricing-card h3 {
    margin: 1rem 0 0.75rem;
    text-align: center;
}

.pricing-price {
    font-size: 2rem;
    font-weight: 800;
    margin: 0.5rem 0 1rem;
    min-height: 3.5rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.15rem;
    flex-wrap: wrap;
    text-align: center;
}

    .pricing-price span {
        font-size: 0.9rem;
        color: #667085;
        font-weight: 500;
    }

.pricing-subtext {
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.pricing-feature-list,
.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .pricing-feature-list li,
.pricing-card li {
        margin-bottom: 0.75rem;
        text-align: center;
        color: #667085;
        line-height: 1.5;
    }

.pricing-grid .pricing-card .pricing-btn,
.pricing-grid .pricing-card a.pricing-btn,
.pricing-grid .pricing-card button.pricing-btn {
    position: absolute !important;
    left: 24px;
    right: 24px;
    bottom: 24px;
    width: auto !important;
    min-height: 52px;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transform: none !important;
}

@media (max-width: 1200px) {
    .pricing-grid {
        max-width: 1100px;
    }
}

.cta-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    text-align: center;
}

    .cta-card h2 {
        margin-bottom: 0.75rem;
        font-size: 2rem;
        font-weight: 700;
    }

    .cta-card p {
        margin-bottom: 1.5rem;
        color: #667085;
        line-height: 1.7;
    }

/* =========================================================
   5. NAVBAR
   Main site navigation across public and signed-in pages
   ========================================================= */


/* =========================================================
   6. REGISTRATION / CHECKOUT FLOW
   Multi-step sign-up, payment, result and summary panels
   ========================================================= */

.register-flow-shell {
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 35%), linear-gradient(135deg, #eef2f7 0%, #dde5ef 100%);
}

.register-flow-shell-wide {
    align-items: flex-start;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.register-flow-page {
    width: 100%;
    max-width: 1100px;
}

.register-flow-card {
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    border: 1px solid rgba(15, 23, 42, 0.06);
    padding: 2.25rem 2rem;
}

.register-flow-card-medium {
    max-width: 560px;
}

.register-flow-card-success {
    text-align: center;
}

.register-flow-step {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
    font-size: 0.85rem;
    font-weight: 600;
}

.register-flow-header {
    margin-bottom: 1.5rem;
}

.register-flow-header-centered {
    text-align: center;
}

.register-flow-header h1 {
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
}

.register-flow-header p {
    margin: 0;
    color: #667085;
    line-height: 1.7;
}

.register-flow-alert {
    margin-bottom: 1rem;
    border-radius: 14px;
}

.register-flow-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.register-flow-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.register-flow-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #475467;
}

.register-flow-input {
    width: 100%;
    height: 52px;
    padding: 0.85rem 1rem;
    border: 1px solid #d0d5dd;
    border-radius: 14px;
    background: #f9fafb;
    color: #101828;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    .register-flow-input:focus {
        border-color: #3b82f6;
        background: #ffffff;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
    }

.register-flow-note {
    color: #667085;
    font-size: 0.95rem;
    line-height: 1.6;
}

.register-flow-btn {
    width: 100%;
    margin-top: 0.25rem;
}

.register-flow-footer {
    margin-top: 0.5rem;
    text-align: center;
    color: #667085;
}

.register-flow-footer-centered {
    text-align: center;
}

.register-flow-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.register-flow-actions-centered {
    justify-content: center;
}

.register-flow-info {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    background: #f8fafc;
    color: #475467;
    line-height: 1.6;
}

.register-flow-info-centered {
    text-align: center;
}

.register-flow-legal {
    margin-top: 1rem;
    color: #667085;
    font-size: 0.92rem;
    line-height: 1.6;
}

.register-existing-user-panel {
    margin-top: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #f8fafc;
    color: #475467;
    line-height: 1.6;
}

.order-summary-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 1.25rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #475467;
}

    .order-summary-row:last-child {
        border-bottom: none;
    }

    .order-summary-row strong {
        color: #111827;
        text-align: right;
    }

.order-summary-row-total {
    font-size: 1.05rem;
}

.register-success-icon,
.register-cancelled-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
}

.register-success-icon {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.register-cancelled-icon {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

/* =========================================================
   7. ACCOUNT AREA
   Signed-in account dashboard and subscription summary
   ========================================================= */

.account-shell {
    min-height: calc(100vh - 72px);
    padding: 3rem 1.5rem;
    background: radial-gradient(circle at top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 35%), linear-gradient(135deg, #eef2f7 0%, #dde5ef 100%);
}

.account-page {
    max-width: 1100px;
    margin: 0 auto;
}

.account-header {
    margin-bottom: 2rem;
    text-align: center;
}

    .account-header h1 {
        margin-bottom: 0.5rem;
        font-size: 2.4rem;
        font-weight: 700;
        color: #111827;
    }

    .account-header p {
        margin: 0;
        color: #667085;
        line-height: 1.7;
    }

.account-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.account-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
    padding: 1.75rem;
}

    .account-card h2 {
        margin-bottom: 1.25rem;
        font-size: 1.35rem;
        font-weight: 700;
        color: #111827;
    }

.account-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    color: #475467;
}

    .account-detail-row:last-child {
        border-bottom: none;
    }

    .account-detail-row strong {
        color: #111827;
        text-align: right;
    }

.account-action-row {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-start;
}

.account-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.account-status-active {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.account-status-expired {
    background: rgba(234, 88, 12, 0.12);
    color: #c2410c;
}

.account-status-none {
    background: rgba(71, 84, 103, 0.12);
    color: #475467;
}

.account-subscription-summary {
    margin-bottom: 2rem;
}

.account-pricing-section {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    background: transparent;
}

/* =========================================================
   8. FOOTER, LEGAL AND COOKIE BANNER
   Footer links, legal pages, cookie consent
   ========================================================= */

.app-footer {
    border-top: 1px solid #eee;
    margin-top: 40px;
    padding: 20px 0;
    font-size: 14px;
    background: #fafafa;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-link {
    margin-left: 16px;
    text-decoration: none;
    color: #555;
}

    .footer-link:hover {
        text-decoration: underline;
    }

.footer-link-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: #555;
}

    .footer-link-button:hover {
        text-decoration: underline;
    }

.legal-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    line-height: 1.6;
}

    .legal-container h1 {
        margin-bottom: 10px;
    }

    .legal-container h2 {
        margin-top: 30px;
    }

    .legal-container h3 {
        margin-top: 20px;
        font-size: 18px;
    }

    .legal-container ul {
        margin-left: 20px;
    }

    .legal-container hr {
        margin: 30px 0;
        border: none;
        border-top: 1px solid #eee;
    }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}

.cookie-banner__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: center;
}

.cookie-banner__text h2 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
}

.cookie-banner__text p {
    margin: 0;
    line-height: 1.5;
    max-width: 760px;
}

.cookie-banner__text a {
    color: #ffffff;
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* =========================================================
   9. RESPONSIVE RULES
   Mobile and tablet adjustments across the site
   ========================================================= */

@media (max-width: 768px) {
    .hero-section {
        padding-top: 4.5rem;
    }

    .features-section,
.steps-section,
.pricing-section,
.cta-section {
        padding: 3rem 1rem;
    }

    .pricing-highlight {
        transform: none;
    }

    

    

    .register-flow-shell {
        padding: 1.25rem 1rem;
    }

    .register-flow-card {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }

    .register-flow-header h1 {
        font-size: 1.7rem;
    }

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

    .order-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }

        .order-summary-row strong {
            text-align: left;
        }

    .account-shell {
        padding: 2rem 1rem;
    }

    .account-header h1 {
        font-size: 2rem;
    }

    .account-detail-row {
        flex-direction: column;
        align-items: flex-start;
    }

        .account-detail-row strong {
            text-align: left;
        }

    .account-action-row {
        justify-content: stretch;
    }

        .account-action-row .app-btn {
            width: 100%;
        }

    .cookie-banner__content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .auth-shell {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    .auth-brand-title {
        font-size: 1.7rem;
    }
}

/* Admin portal */
.admin-page-shell {
    max-width: 1320px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

    .admin-page-header h1 {
        margin: 0 0 0.35rem;
        font-size: 2rem;
    }

    .admin-page-header p {
        margin: 0;
        color: #5f6b7a;
    }

.admin-toast {
    position: sticky;
    top: 1rem;
    z-index: 20;
    margin-bottom: 1rem;
    padding: 0.95rem 1.15rem;
    border-radius: 16px;
    font-weight: 600;
    box-shadow: 0 18px 35px rgba(16, 24, 40, 0.12);
}


    


.admin-section-summary {
    color: #0f172a;
    font-weight: 700;
    white-space: nowrap;
}


.admin-panel-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-toolbar,
.admin-toolbar-wrap {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-toolbar-left,
.admin-toolbar-right,
.admin-toolbar-stats {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.admin-inline-stat {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.9rem;
}

.admin-inline-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #475467;
    font-weight: 600;
}

    .admin-inline-label .form-select {
        min-width: 120px;
    }

.admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 0.9rem;
    width: 100%;
}

    .admin-filter-grid label,
.admin-action-panel label,
.admin-form-group-card label,
.admin-permission-card label {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        color: #344054;
        font-weight: 600;
    }

        .admin-filter-grid label span,
.admin-action-panel label span,
.admin-form-group-card label span,
.admin-permission-card label span {
            font-size: 0.9rem;
        }

.admin-grid-card,
.admin-editor-card,
.admin-form-group-card,
.admin-permission-group-card,
.admin-permission-card,
.admin-loading-card {
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.admin-grid-card,
.admin-editor-card,
.admin-loading-card,
.admin-permission-group-card {
    padding: 1rem;
}

.admin-loading-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #475467;
    min-height: 86px;
}

.admin-spinner {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    animation: admin-spin 0.85s linear infinite;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

    .admin-table thead th {
        text-align: left;
        color: #667085;
        font-size: 0.84rem;
        font-weight: 700;
        padding: 0.75rem 0.85rem;
        border-bottom: 1px solid #eaecf0;
    }

    .admin-table tbody td {
        padding: 0.9rem 0.85rem;
        border-bottom: 1px solid #f2f4f7;
        vertical-align: top;
    }

    .admin-table tbody tr:last-child td {
        border-bottom: none;
    }

    .admin-table tbody tr:hover {
        background: #fafcff;
    }

.admin-row-active {
    background: #eff6ff;
}

.admin-table-muted {
    color: #667085;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.admin-plan-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-actions-cell {
    text-align: right;
    white-space: nowrap;
}

.admin-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.32rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #b7ebc6;
}

.badge-warning {
    background: #fffaeb;
    color: #b54708;
    border-color: #fedf89;
}

.badge-muted {
    background: #f2f4f7;
    color: #475467;
    border-color: #d0d5dd;
}

.badge-business {
    background: #eff8ff;
    color: #175cd3;
    border-color: #b2ddff;
}

.badge-individual {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #d9d6fe;
}

.badge-popular {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.badge-manual {
    background: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

.badge-active {
    background: #ecfdf3;
    color: #166534;
    border-color: #b7ebc6;
}

.badge-inactive {
    background: #fef3f2;
    color: #b42318;
    border-color: #fecdca;
}


.badge-pending {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.admin-editor-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .admin-editor-header h3,
.admin-form-group-card h4,
.admin-permission-group-header h3 {
        margin: 0 0 0.25rem;
    }

    .admin-editor-header p,
.admin-form-group-card p {
        margin: 0;
        color: #667085;
    }

.admin-form-grid,
.admin-field-grid {
    display: grid;
    gap: 1rem;
}

    .admin-form-grid.two-column,
.admin-field-grid.two-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-field-grid.one-column {
        grid-template-columns: 1fr;
    }

.admin-form-group-card {
    padding: 1rem;
}

.admin-editor-actions,
.admin-permission-actions,
.admin-modal-actions,
.admin-pager-actions,
.admin-tab-strip {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-editor-actions {
    margin-top: 1rem;
}

.admin-check-field {
    flex-direction: row !important;
    align-items: center;
    gap: 0.6rem !important;
    min-height: 42px;
}

    .admin-check-field input {
        width: 18px;
        height: 18px;
        margin: 0;
    }

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.admin-modal-card {
    width: min(460px, 100%);
    background: #ffffff;
    border-radius: 24px;
    padding: 1.4rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
}

    .admin-modal-card h3 {
        margin-top: 0;
    }

    .admin-modal-card p {
        color: #667085;
    }

.admin-permission-groups {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-permission-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-permission-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.admin-permission-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.admin-permission-name {
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, monospace;
    font-size: 0.88rem;
    color: #1f2937;
    background: #f8fafc;
    border: 1px solid #e4e7ec;
    border-radius: 14px;
    padding: 0.65rem 0.75rem;
}

.admin-paging-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid #eaecf0;
    margin-top: 0.5rem;
    padding-top: 0.9rem;
}

.admin-detail-list {
    display: grid;
    gap: 0.7rem;
}

    .admin-detail-list > div {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        align-items: center;
        padding-bottom: 0.55rem;
        border-bottom: 1px solid #f2f4f7;
    }

        .admin-detail-list > div:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

    .admin-detail-list span {
        color: #667085;
    }

.admin-tab {
    border: 1px solid #d0d5dd;
    background: #fff;
    border-radius: 999px;
    padding: 0.6rem 0.9rem;
    font-weight: 700;
    color: #475467;
}

    .admin-tab.active {
        border-color: #93c5fd;
        background: #eff6ff;
        color: #1d4ed8;
    }

.admin-action-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-top: 1rem;
}

.admin-info-note,
.admin-empty-note {
    border-radius: 16px;
    padding: 0.9rem 1rem;
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.admin-empty-note {
    background: #f8fafc;
    color: #475467;
    border-color: #e4e7ec;
}

.borderless {
    padding: 0;
    border: none;
    box-shadow: none;
}

@media (max-width: 992px) {
    .admin-filter-grid,
.admin-form-grid.two-column,
.admin-field-grid.two-column {
        grid-template-columns: 1fr;
    }

    .admin-paging-bar,
.admin-toolbar,
.admin-toolbar-wrap,
.admin-editor-header,
.admin-permission-group-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-actions-cell {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .admin-page-shell {
        padding: 1.5rem 1rem 2rem;
    }

    .admin-grid-card {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 760px;
    }
}


.admin-form-card {
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid #e4e7ec;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.admin-form-header {
    margin-bottom: 1.25rem;
}

    .admin-form-header h3 {
        margin: 0 0 0.35rem;
    }

    .admin-form-header p {
        margin: 0;
        color: #667085;
    }

.admin-form-grid-spacious {
    gap: 1.15rem 1.5rem;
}

.admin-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

    .admin-form-field label {
        font-size: 0.92rem;
        font-weight: 700;
        color: #344054;
    }

.admin-form-field-full {
    grid-column: 1 / -1;
}

.admin-form-input {
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    box-shadow: inset 0 1px 2px rgba(16, 24, 40, 0.03);
    padding: 0.75rem 0.9rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

    .admin-form-input:focus {
        border-color: #84a8ff;
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
        background: #ffffff;
    }

.admin-form-actions {
    margin-top: 1.25rem;
}

.admin-check-card {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem !important;
    min-height: 48px;
    padding: 0.85rem 1rem;
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    background: #f8fbff;
    font-weight: 600;
    color: #344054;
}

.admin-form-check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
}

    .admin-form-check-grid .admin-check-card {
        flex: 1 1 260px;
    }

.admin-field-grid-spacious {
    gap: 1rem 1.25rem;
}

.admin-form-textarea {
    min-height: 110px;
    resize: vertical;
}

.admin-check-card-full {
    width: 100%;
    align-items: flex-start;
}

.admin-permission-section-stack {
    display: grid;
    gap: 1rem;
}

.admin-form-group-subcard {
    margin-bottom: 0;
    padding: 1rem;
    background: #fbfcff;
    border-color: #e6ebf5;
}

.account-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
}

.account-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border: 1px solid #d7def0;
    border-radius: 999px;
    background: #fff;
    color: #33508a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .account-tab:hover {
        border-color: #9ab0e4;
        color: #23406f;
    }

    .account-tab.active {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        border-color: #1d4ed8;
        color: #fff;
        box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
    }

.lookup-panel {
    margin-top: 8px;
    border: 1px solid #dbe1ea;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.lookup-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    text-align: left;
    padding: 12px 14px;
    cursor: pointer;
}

    .lookup-item.active {
        border-color: #4f46e5;
        background: rgba(79, 70, 229, 0.08);
    }

    .lookup-item:hover {
        background: #f8fafc;
    }

    .lookup-item.disabled {
        cursor: not-allowed;
        opacity: 0.65;
    }

.lookup-item-title {
    font-weight: 600;
    color: #0f172a;
}

.lookup-item-subtitle,
.lookup-empty,
.lookup-note {
    color: #64748b;
    font-size: 0.92rem;
}

.lookup-empty,
.lookup-note,
.lookup-footer {
    padding: 12px 14px;
}

.selected-pill {
    display: inline-flex;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #312e81;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
}

.modal-card {
    width: min(720px, 100%);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    padding: 24px;
}

.workentry-preview-card {
    margin-top: 20px;
}

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

.preview-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .preview-item span {
        font-size: 0.85rem;
        color: #64748b;
    }

    .preview-item strong {
        font-size: 1rem;
        color: #0f172a;
    }

.preview-item-wide {
    grid-column: span 2;
}

.admin-alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    font-weight: 600;
}

.admin-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

@media (max-width: 900px) {
    .preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }

    .preview-item-wide {
        grid-column: span 1;
    }
}


/* Phase 4 drop-in work entry management */
.workentry-toolbar {
    margin-bottom: 1rem;
}

.workentry-toolbar-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.workentry-list-card {
    width: 100%;
}

.workentry-manage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.workentry-charges-card {
    margin-top: 1rem;
}

.table-responsive {
    overflow-x: auto;
}

.workentry-modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
}

.workentry-editor-modal {
    width: min(1100px, 100%);
    margin: 2rem auto;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.workentry-editor-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .workentry-editor-modal {
        width: min(96vw, 100%);
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }

    .workentry-editor-header {
        flex-direction: column;
        align-items: stretch;
    }
}

.admin-inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.45rem;
    font-size: 0.9rem;
    color: var(--muted-text, #53627d);
}

.admin-inline-checkbox input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* Uber delivery/payout workflow polish */


.uber-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.uber-section-header.compact {
    margin-bottom: 0.9rem;
}

.uber-section-header h3 {
    margin: 0;
}

.uber-section-header p {
    margin: 0.25rem 0 0;
    color: var(--muted-text, #53627d);
}

.uber-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.5rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.uber-status-badge.draft {
    background: #eef4ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.uber-status-badge.pending {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

.uber-status-badge.complete {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.uber-status-badge.deleted {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.uber-status-badge.default {
    background: #f8fafc;
    color: #475569;
    border-color: #e2e8f0;
}


.uber-inline-input-action {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.uber-icon-btn {
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    font-size: 1.1rem;
}

.uber-button-row,
.compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.uber-button-row .app-btn,
.compact-actions .app-btn {
    margin: 0;
}

.uber-template-strip {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #f8fafc;
}


@media (max-width: 760px) {
    .uber-section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .uber-status-badge {
        align-self: flex-start;
    }

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

/* =========================================================
   DP navigation icon/badge override
   Uses unique dp-* classes so Bootstrap/default nav styles do not
   stretch icon links into vertical oversized buttons.
   ========================================================= */


.dp-platform-badge {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px !important;
    line-height: 1 !important;
    overflow: hidden;
}


.dp-platform-badge {
    border-radius: 999px;
    color: #ffffff;
    font-size: 0.64rem !important;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

.dp-platform-amazon {
    background: linear-gradient(135deg, #00a8e1 0%, #146eb4 100%);
}

.dp-platform-uber {
    background: linear-gradient(135deg, #06c167 0%, #048848 100%);
}


@media (max-width: 640px) {
    

    .dp-platform-badge {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        flex-basis: 22px !important;
    }

    
}

/* R2.5 compact portal form/list treatment */
.account-shell.uber-list-page .account-page,
.account-shell.uber-payout-page .account-page,
.account-shell.uber-delivery-page .account-page {
    max-width: 1440px;
}

.account-shell.uber-list-page .account-header,
.account-shell.uber-payout-page .account-header,
.account-shell.uber-delivery-page .account-header {
    margin-bottom: 0.8rem;
}

.account-shell.uber-list-page .admin-toolbar,
.account-shell.uber-list-page .admin-grid-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.account-shell.uber-list-page .admin-toolbar {
    padding: 0.85rem 1rem;
    gap: 0.75rem;
}

.account-shell.uber-list-page .admin-inline-label {
    gap: 0.28rem;
}

.account-shell.uber-list-page .admin-inline-label span,
.account-shell.uber-payout-page .admin-form-field label,
.account-shell.uber-delivery-page .admin-form-field label {
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.account-shell.uber-list-page .admin-form-input,
.account-shell.uber-payout-page .admin-form-input,
.account-shell.uber-delivery-page .admin-form-input {
    min-height: 38px;
    padding: 0.48rem 0.68rem;
    border-radius: 10px;
}

.account-shell.uber-list-page textarea.admin-form-input,
.account-shell.uber-payout-page textarea.admin-form-input,
.account-shell.uber-delivery-page textarea.admin-form-input {
    min-height: 78px;
}

.account-shell.uber-list-page .admin-form-header {
    margin-bottom: 0.75rem;
}

.account-shell.uber-list-page .admin-table th,
.account-shell.uber-list-page .admin-table td {
    padding-top: 0.52rem;
    padding-bottom: 0.52rem;
}

.account-shell.uber-payout-page .admin-form-field,
.account-shell.uber-delivery-page .admin-form-field {
    gap: 0.28rem;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.admin-kpi-card {
    background: linear-gradient(135deg, #0f6cbd, #2563eb);
    color: #fff;
    border-radius: 16px;
    padding: .9rem 1rem;
    box-shadow: 0 14px 30px rgba(37, 99, 235, .18);
}

.admin-kpi-card span {
    display: block;
    font-size: .74rem;
    opacity: .82;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .25rem;
}

.admin-kpi-card strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.2;
}


.admin-modal-backdrop.centered {
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-modal-card.admin-modal-wide {
    max-width: 860px;
    width: min(860px, calc(100vw - 2rem));
}

.admin-badge.badge-neutral {
    background: #e2e8f0;
    color: #334155;
}

/* Global typography standardisation */
:root {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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


/* =========================================================
   SETTINGS PAGES ROADMAP
   Used by: Components/Pages/Settings/Profile.razor
            Components/Pages/Settings/Security.razor
            Components/Pages/Settings/Notifications.razor

   These classes were previously duplicated in the three scoped
   .razor.css files above. They are global because the same
   settings card/header/form pattern is shared across those pages.
   ========================================================= */

.portal-settings-page {
    width: min(100%, 1100px);
    margin: 0 auto;
    padding: 1.2rem;
}

.portal-page-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.portal-page-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: 1.45rem;
}

.portal-page-header p,
.portal-muted {
    margin: 0.25rem 0 0;
    color: #64748b;
}

.portal-breadcrumb {
    margin-bottom: 0.25rem;
    color: #2563eb;
    font-size: 0.78rem;
    font-weight: 850;
}

.portal-card {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.06);
}

.portal-card h2 {
    margin: 0 0 0.75rem;
    color: #0f172a;
    font-size: 1rem;
}

.portal-profile-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.portal-profile-card h2 {
    margin-bottom: 0.15rem;
}

.portal-profile-card p {
    margin: 0;
    color: #64748b;
}

.portal-profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eaf2ff;
    color: #1d4ed8;
    font-weight: 950;
}

.portal-badge {
    display: inline-flex;
    margin-top: 0.4rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 800;
}

.portal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.portal-field {
    display: grid;
    gap: 0.3rem;
}

.portal-field-wide {
    grid-column: 1 / -1;
}

.portal-field label {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 850;
}

.portal-field input {
    min-height: 38px;
    padding: 0.42rem 0.6rem;
    border: 1px solid #dbe4ef;
    border-radius: 11px;
    background: #f8fafc;
    color: #0f172a;
}

.portal-field small {
    color: #64748b;
}

.portal-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #eef2f7;
}

.portal-toggle-row:last-child {
    border-bottom: 0;
}

.portal-toggle-row p {
    margin: 0.15rem 0 0;
    color: #64748b;
}



/* Shared portal control styling
   Used by admin/settings/search/filter areas that still use plain form-control/form-select
   classes. This deliberately excludes .admin-form-input so existing date filters and
   full create/edit form fields keep their established sizing. */
.admin-page-shell :is(input.form-control, textarea.form-control, select.form-select):not(.admin-form-input),
.account-shell :is(input.form-control, textarea.form-control, select.form-select):not(.admin-form-input),
.portal-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea),
.portal-settings-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea),
.settings-card :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea),
.app-input,
.compact-input {
    min-height: 38px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.48rem 0.7rem;
    border: 1px solid #cfd8e3;
    border-radius: 11px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.88rem;
    line-height: 1.25;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.admin-page-shell :is(input.form-control, textarea.form-control, select.form-select):not(.admin-form-input):focus,
.account-shell :is(input.form-control, textarea.form-control, select.form-select):not(.admin-form-input):focus,
.portal-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea):focus,
.portal-settings-page :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea):focus,
.settings-card :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea):focus,
.app-input:focus,
.compact-input:focus {
    outline: none;
    border-color: #84a8ff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-filter-grid :is(input.form-control, textarea.form-control, select.form-select):not(.admin-form-input),
.admin-toolbar-left :is(input.form-control, textarea.form-control, select.form-select):not(.admin-form-input) {
    min-width: 0;
}

.admin-page-shell :is(input.form-control, select.form-select):not(.admin-form-input),
.account-shell :is(input.form-control, select.form-select):not(.admin-form-input) {
    height: 38px;
}

.admin-page-shell textarea.form-control:not(.admin-form-input),
.account-shell textarea.form-control:not(.admin-form-input) {
    min-height: 82px;
    height: auto;
    resize: vertical;
}

/* Shared status filter width
   Used by list/filter toolbars only. Keeps status dropdowns wide enough for longer values
   without changing date filters, payment filters, or create/edit form dropdowns. */
.admin-inline-label .status-filter-select,
select.status-filter-select {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
}

/* Release 2.9 invite redemption compact layout */
.register-invite-shell {
    min-height: 100dvh;
    align-items: flex-start;
    overflow-y: auto;
    padding: 1rem;
}

.register-invite-card {
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1.5rem 1.55rem;
    border-radius: 20px;
    scrollbar-gutter: stable;
}

.register-invite-card .register-flow-header {
    margin-bottom: 1rem;
}

.register-invite-card .register-flow-header h1 {
    font-size: 1.65rem;
    margin-bottom: 0.35rem;
}

.register-invite-card .register-flow-header p {
    line-height: 1.45;
}

.register-invite-card .register-flow-form {
    gap: 0.65rem;
}

.register-invite-card .register-flow-field {
    gap: 0.25rem;
}

.register-invite-card .register-flow-label {
    font-size: 0.86rem;
}

.register-invite-card .register-flow-input {
    height: 40px;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.94rem;
}

.register-invite-card .register-flow-btn {
    min-height: 40px;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.register-invite-card .register-existing-user-panel {
    margin-top: 0.8rem !important;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
}

.register-invite-card .register-existing-user-panel h2 {
    font-size: 1.05rem;
    margin: 0.25rem 0 0.7rem;
}

.register-invite-card .register-existing-user-panel p {
    margin-bottom: 0.55rem;
}

@media (max-height: 820px) {
    .register-invite-shell {
        padding: 0.65rem;
    }

    .register-invite-card {
        max-height: calc(100dvh - 1.3rem);
        padding: 1.15rem 1.25rem;
    }

    .register-invite-card .register-flow-header h1 {
        font-size: 1.45rem;
    }

    .register-invite-card .register-flow-header p {
        font-size: 0.9rem;
    }
}

/* Release 2.9 invite redemption compact field refinement */
.register-invite-card .register-flow-input {
    height: 34px;
    min-height: 34px;
    padding: 0.32rem 0.72rem;
    border-radius: 9px;
    font-size: 0.92rem;
    line-height: 1.25;
}

.register-invite-card .register-flow-label {
    margin-bottom: 0;
    font-size: 0.84rem;
    line-height: 1.15;
}

.register-invite-card .register-flow-field {
    gap: 0.18rem;
}

.register-invite-card .register-flow-form {
    gap: 0.48rem;
}

.register-invite-card .register-existing-user-panel {
    padding: 0.75rem 0.9rem;
}

.register-invite-card .register-existing-user-panel p {
    margin-bottom: 0.42rem;
}

.register-invite-card .register-flow-btn {
    min-height: 38px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/* Release 2.9 invite redemption viewport fit refinement */
.register-flow-shell.register-invite-shell {
    height: 100dvh;
    min-height: 0;
    align-items: stretch;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
    box-sizing: border-box;
}

.register-flow-card.register-invite-card {
    height: 100%;
    max-height: none;
    margin: 0 auto;
    overflow-y: auto;
    box-sizing: border-box;
    scrollbar-gutter: stable both-edges;
    scroll-padding: 1rem;
}

.register-invite-card .register-flow-form {
    padding-bottom: 0.25rem;
}

@media (max-height: 820px) {
    .register-flow-shell.register-invite-shell {
        padding: 0.75rem;
    }

    .register-flow-card.register-invite-card {
        height: 100%;
        max-height: none;
    }
}

/* Release 2.9 invite redemption alignment refinement */
.register-invite-card,
.register-invite-card *,
.register-invite-card *::before,
.register-invite-card *::after {
    box-sizing: border-box;
}

.register-invite-card .register-flow-field,
.register-invite-card .register-flow-form,
.register-invite-card .register-existing-user-panel,
.register-invite-card .register-flow-btn {
    width: 100%;
    max-width: 100%;
}

.register-invite-card .register-flow-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.register-invite-card .register-existing-user-panel {
    margin-left: 0;
    margin-right: 0;
}

/* =========================================================
   Release 2.9 portal UI alignment pass
   Company, settings grids and reference-data modals
   ========================================================= */
.company-page-shell,
.account-shell {
    min-height: calc(100vh - 72px);
    padding: 1.4rem 1.6rem 2.4rem;
    background: radial-gradient(circle at top left, rgba(255,255,255,.95), rgba(255,255,255,0) 34%), linear-gradient(135deg, #eef4fb 0%, #e7edf5 100%);
}

.company-page,
.account-page {
    width: min(100%, 1280px);
    max-width: 1280px;
    margin: 0 auto;
}

.company-header,
.account-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
    text-align: left;
}

.company-header h1,
.account-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
    font-weight: 850;
    letter-spacing: -0.035em;
}

.company-header p,
.account-header p {
    margin: .35rem 0 0;
    color: #64748b;
    line-height: 1.55;
}

.company-switcher {
    width: min(100%, 320px);
    display: grid;
    gap: .35rem;
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 18px;
    background: rgba(255,255,255,.74);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}

.company-switcher label,
.admin-form-field label,
.admin-form-field span,
.admin-inline-label span,
.portal-field label {
    color: #334155;
    font-size: .8rem;
    font-weight: 850;
}

.company-select:disabled {
    color: #475569;
    background: #f8fafc;
    cursor: not-allowed;
}

.company-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) repeat(2, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.company-hero-card,
.company-stat-card,
.company-detail-card,
.company-list-card,
.account-card,
.admin-grid-card,
.admin-editor-card,
.admin-toolbar,
.afp-modal-card,
.modal-card {
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .07);
}

.company-hero-card,
.company-stat-card {
    padding: 1.25rem;
}

.company-hero-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-avatar {
    width: 58px;
    height: 58px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    font-weight: 950;
    letter-spacing: .02em;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .25);
}

.company-eyebrow,
.company-stat-card span,
.company-detail-item span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.company-hero-card h2 {
    margin: .15rem 0;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 900;
}

.company-hero-card p,
.company-stat-card small,
.company-detail-item small,
.admin-list-header p,
.lookup-note {
    margin: .15rem 0 0;
    color: #64748b;
}

.company-stat-card {
    display: grid;
    align-content: center;
    gap: .2rem;
}

.company-stat-card strong {
    color: #0f172a;
    font-size: 1.8rem;
    line-height: 1;
}

.company-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.company-detail-item {
    padding: .95rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    display: grid;
    gap: .18rem;
}

.company-detail-item strong {
    color: #0f172a;
    font-size: 1rem;
}

.admin-list-header,
.settings-section-heading-row,
.admin-form-header,
.afp-modal-header,
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-list-header h2,
.settings-section-heading h2,
.admin-form-header h3,
.afp-modal-header h3,
.modal-header h2,
.account-card h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.admin-toolbar {
    margin-bottom: 1rem;
    padding: .85rem;
}

.admin-toolbar-wrap,
.settings-toolbar,
.settings-grid-actions,
.admin-row-actions,
.admin-table-actions,
.table-actions,
.admin-form-actions,
.account-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    flex-wrap: wrap;
}

.admin-toolbar-left {
    flex: 1 1 360px;
}

.admin-toolbar-right,
.settings-grid-actions,
.admin-row-actions,
.admin-table-actions,
.table-actions {
    justify-content: flex-end;
}

.admin-grid-card {
    overflow: hidden;
}

.admin-table {
    background: #fff;
}

.admin-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.admin-table tbody td {
    color: #0f172a;
    vertical-align: middle;
}

.table-responsive,
.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.status-pill,
.settings-status-pill,
.badge-active,
.badge-inactive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: .22rem .6rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 850;
    text-transform: capitalize;
}

.status-active,
.settings-status-pill.active,
.badge-active {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-pending {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.status-cancelled,
.status-expired,
.settings-status-pill.inactive,
.badge-inactive {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.admin-form-card,
.admin-editor-card {
    padding: 1rem;
    margin-bottom: 1rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.admin-form-grid.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-field,
.admin-inline-label {
    display: grid;
    gap: .35rem;
}

.admin-form-field-full {
    grid-column: 1 / -1;
}

.admin-form-input {
    min-height: 40px;
    border-radius: 12px;
    border-color: #cbd5e1;
    background: #fff;
}

.account-card {
    padding: 1.2rem;
}

.admin-section-host {
    margin-top: 1rem;
}

.admin-top-tabs {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    padding: .45rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    background: rgba(255,255,255,.76);
    box-shadow: 0 14px 32px rgba(15,23,42,.05);
}

.admin-tab {
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #1e293b;
    padding: .55rem .9rem;
    font-weight: 800;
}

.admin-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(37,99,235,.22);
}

.afp-modal-backdrop,
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .46);
    backdrop-filter: blur(4px);
    overflow-y: auto;
}

.afp-modal-card,
.modal-card {
    width: min(720px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.2rem;
}

.modal-card-wide,
.settings-modal {
    width: min(860px, calc(100vw - 2rem));
}

.app-btn-light {
    background: #f8fafc;
    color: #1e293b;
    border-color: #dbe4ef;
}

.app-btn-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.app-btn-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

@media (max-width: 900px) {
    .company-header,
    .account-header,
    .admin-list-header,
    .settings-section-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .company-switcher {
        width: 100%;
    }

    .company-overview-grid,
    .company-detail-grid,
    .admin-form-grid,
    .admin-form-grid.two-column {
        grid-template-columns: 1fr;
    }
}

/* Release 3.x Stage 1 - Tax years */
.admin-table tr.selected-row td {
    background: rgba(37, 99, 235, 0.06);
}
.admin-table tbody tr.selected-row {
    outline: 1px solid rgba(37, 99, 235, 0.18);
}

.table-primary-link {
    color: #0f4bd8;
    text-decoration: none;
}

.table-primary-link:hover {
    color: #0b38a3;
    text-decoration: underline;
}


.tax-year-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tax-year-field-span-two {
    grid-column: span 2;
}

.tax-year-readonly-input {
    background: #fff;
    color: #334155;
    cursor: default;
}

@media (max-width: 900px) {
    .tax-year-detail-grid {
        grid-template-columns: 1fr;
    }

    .tax-year-field-span-two {
        grid-column: span 1;
    }
}

.tax-year-summary-card {
    align-items: flex-start;
    gap: .45rem;
    min-width: 220px;
}

.tax-year-summary-card small {
    color: #64748b;
    font-weight: 700;
}

.tax-config-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.tax-config-tile {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    background: #fff;
    padding: 1rem;
    display: grid;
    gap: .35rem;
}

.tax-config-tile strong {
    color: #0f172a;
    font-size: .95rem;
}

.tax-config-tile span {
    color: #64748b;
    font-size: .86rem;
    line-height: 1.35;
}

/* Release 3.x Stage 1 - Tax year detail polished configuration shell */
.tax-year-page-header {
    margin-bottom: 1.15rem;
}

.tax-year-details-card,
.tax-year-config-card {
    box-shadow: 0 18px 46px rgba(15, 23, 42, .07);
}

.tax-year-card-header {
    align-items: flex-start;
    margin-bottom: 1.1rem;
}

.tax-year-save-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    white-space: nowrap;
}

.tax-year-detail-grid .settings-field label {
    color: #0f172a;
    font-size: .87rem;
    font-weight: 800;
}

.tax-year-readonly-input {
    background: #f8fafc;
    color: #334155;
    cursor: default;
}

.tax-year-config-card .admin-list-header {
    margin-bottom: 1rem;
}

.tax-config-accordion {
    display: grid;
    gap: .7rem;
}

.tax-config-row {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    background: #fff;
    padding: .9rem 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .9rem;
    text-align: left;
    color: inherit;
    opacity: 1;
}

.tax-config-row:disabled {
    cursor: default;
}

.tax-config-row-copy {
    display: grid;
    gap: .18rem;
}

.tax-config-row-copy strong {
    color: #0f172a;
    font-size: .95rem;
    font-weight: 900;
}

.tax-config-row-copy span {
    color: #64748b;
    font-size: .86rem;
    line-height: 1.35;
}

.tax-config-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.tax-config-icon-profile {
    color: #7c3aed;
    background: #f3e8ff;
}

.tax-config-icon-income {
    color: #15803d;
    background: #dcfce7;
}

.tax-config-icon-ni {
    color: #2563eb;
    background: #dbeafe;
}

.tax-config-icon-mileage {
    color: #ea580c;
    background: #ffedd5;
}

.tax-config-icon-category {
    color: #0f766e;
    background: #ccfbf1;
}

.tax-config-icon-rule {
    color: #db2777;
    background: #fce7f3;
}

.tax-config-icon-snapshot {
    color: #475569;
    background: #f1f5f9;
}

.tax-config-chevron {
    color: #64748b;
    font-size: 1.35rem;
    line-height: 1;
}

.tax-config-stage-badge {
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: .78rem;
    font-weight: 800;
    padding: .42rem .65rem;
    white-space: nowrap;
}

.tax-config-row-muted {
    background: rgba(248, 250, 252, .78);
}

.tax-year-stage-note {
    margin-top: 1rem;
    border: 1px solid rgba(37, 99, 235, .2);
    border-radius: 16px;
    background: rgba(239, 246, 255, .72);
    color: #1e40af;
    padding: .9rem 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .6rem;
    align-items: center;
}

.tax-year-stage-note strong {
    font-weight: 900;
}

.tax-year-stage-note span {
    color: #2563eb;
    font-size: .9rem;
}

@media (max-width: 900px) {
    .tax-year-card-header {
        align-items: stretch;
    }

    .tax-config-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .tax-config-chevron,
    .tax-config-stage-badge {
        grid-column: 2;
        justify-self: start;
    }

    .tax-year-stage-note {
        grid-template-columns: 1fr;
    }
}

/* Release 3.x Stage 2 tax configuration */
.tax-config-row:not(:disabled) {
    cursor: pointer;
}

.tax-config-row-active {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.04);
}

.tax-config-panel {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    padding: 16px;
    margin: -8px 0 12px;
    background: rgba(248, 250, 252, 0.72);
}

.tax-config-form-grid {
    display: grid;
    gap: 12px;
    align-items: end;
}

.tax-config-form-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tax-config-form-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tax-config-form-grid-six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.tax-form-span-two {
    grid-column: span 2;
}

.tax-form-span-four {
    grid-column: span 4;
}

.tax-check-field {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    font-weight: 700;
    color: #0f172a;
}

.tax-check-field input {
    width: 16px;
    height: 16px;
}

.tax-config-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 14px 0;
}

.tax-config-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    background: #fff;
}

.tax-config-table {
    width: 100%;
    margin: 0;
}

.tax-config-table th,
.tax-config-table td {
    white-space: nowrap;
}

.tax-config-table td:nth-child(3),
.tax-config-table td:nth-child(5) {
    white-space: normal;
}

.empty-cell {
    text-align: center;
    color: #64748b;
    padding: 18px !important;
}

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

.app-btn-sm {
    padding: 6px 10px;
    font-size: 0.82rem;
    border-radius: 10px;
}

.app-btn-danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
    background: #fff5f5;
}

.app-btn-danger:hover {
    background: #fee2e2;
}

@media (max-width: 1200px) {
    .tax-config-form-grid-six,
    .tax-config-form-grid-four,
    .tax-config-form-grid-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tax-form-span-four,
    .tax-form-span-two {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .tax-config-form-grid-six,
    .tax-config-form-grid-four,
    .tax-config-form-grid-three {
        grid-template-columns: 1fr;
    }

    .tax-form-span-four,
    .tax-form-span-two {
        grid-column: span 1;
    }

    .tax-config-form-actions {
        flex-direction: column;
    }
}

/* Release 3.x Stage 2 modal editing polish */
.tax-config-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
    color: #64748b;
    font-size: 0.92rem;
}

.tax-config-form-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tax-config-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
}

.tax-config-modal {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.tax-config-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.tax-config-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
    color: #0f172a;
}

.tax-config-modal-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.92rem;
}

.tax-config-modal-close {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.tax-config-modal-close:hover {
    background: #f8fafc;
    color: #0f172a;
}

.tax-config-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.tax-config-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(248, 250, 252, 0.76);
}

@media (max-width: 720px) {
    .tax-config-panel-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tax-config-form-grid-two {
        grid-template-columns: 1fr;
    }

    .tax-config-modal-backdrop {
        align-items: flex-start;
        padding: 16px;
    }

    .tax-config-modal {
        max-height: calc(100vh - 32px);
    }

    .tax-config-modal-footer {
        flex-direction: column-reverse;
    }
}

/* Release 3.x Stage 3 - user tax summary */
.tax-summary-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.tax-summary-kpi {
    padding: 1.1rem 1.25rem;
}

.tax-summary-kpi span {
    display: block;
    color: var(--muted-text, #64748b);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.tax-summary-kpi strong {
    color: var(--heading-text, #0f172a);
    font-size: 1.45rem;
    font-weight: 800;
}

.tax-summary-form-grid {
    margin-top: 0.75rem;
}

.tax-summary-save-method {
    justify-content: flex-end;
}

.tax-summary-grid {
    margin: 1rem 0;
}

.tax-summary-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.7rem 0;
    gap: 1rem;
}

.tax-summary-breakdown-row:last-child {
    border-bottom: 0;
}

.tax-summary-breakdown-row span {
    color: var(--muted-text, #64748b);
}

.tax-summary-breakdown-row strong {
    color: var(--heading-text, #0f172a);
}

.tax-summary-breakdown-row.total-row {
    border-top: 1px solid rgba(15, 23, 42, 0.12);
    margin-top: 0.4rem;
    padding-top: 1rem;
}

.compact-section-header {
    margin-bottom: 0.35rem;
}

.readonly-input {
    background: rgba(248, 250, 252, 0.95);
    cursor: default;
}

@media (max-width: 1100px) {
    .tax-summary-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .tax-summary-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* Release 3.x Stage 3 - tax summary selector/layout refinements */
.tax-summary-recommendation-reason {
    grid-column: 1 / -1;
}

/* Release 3.x Stage 3 - read-only vehicle expense method decision */
.tax-summary-vehicle-expenses {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    margin-top: 1rem;
    padding-top: 1rem;
}

.tax-summary-vehicle-expenses h3 {
    color: var(--heading-text, #0f172a);
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
}

.tax-summary-switch-method-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.85rem;
}

.tax-summary-method-current {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 999px;
    color: #047857;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
}

/* Release 3.x Stage 3 - vehicle method comparison preview */
.tax-summary-vehicle-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.tax-comparison-modal {
    width: min(860px, 100%);
}

.tax-comparison-summary {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 16px;
    background: rgba(239, 246, 255, 0.8);
    color: #1e3a8a;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
}

.tax-comparison-summary strong {
    color: #1d4ed8;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tax-comparison-table {
    table-layout: fixed;
}

.tax-comparison-table .tax-comparison-col-item {
    width: 44%;
}

.tax-comparison-table .tax-comparison-col-method {
    width: 28%;
}

.tax-comparison-table th,
.tax-comparison-table td {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.tax-comparison-table .comparison-label {
    text-align: left;
}

.tax-comparison-table .comparison-value {
    text-align: right;
}

.tax-comparison-table .comparison-money {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tax-comparison-table .comparison-result {
    white-space: nowrap;
}

.tax-comparison-table .total-row td {
    border-top: 1px solid rgba(15, 23, 42, 0.14);
    font-weight: 800;
}

@media (max-width: 640px) {
    .tax-comparison-table {
        min-width: 620px;
    }
}

/* Release 3.x Stage 3 - professional tax summary header and vehicle method panel */
.tax-summary-page-header {
    align-items: flex-start;
    text-align: left;
}

.tax-summary-title-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.portal-back-button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 13px;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.portal-back-button:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
    text-decoration: none;
}

.portal-back-button svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.tax-summary-vehicle-panel {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    margin-top: 1rem;
    padding-top: 1.2rem;
}

.tax-summary-vehicle-panel h3 {
    color: var(--heading-text, #0f172a);
    font-size: 1.15rem;
    font-weight: 850;
    margin: 0 0 1.25rem;
}

.tax-summary-vehicle-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(320px, 1.18fr);
    gap: 1.4rem;
    align-items: stretch;
}

.tax-summary-method-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 0.95rem;
    align-items: center;
    min-height: 112px;
    padding: 0.85rem 1.05rem;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
}

.tax-summary-method-card:last-of-type {
    border-right: 0;
}

.tax-summary-method-icon,
.tax-summary-recommendation-icon,
.tax-comparison-summary-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}

.tax-summary-method-icon {
    width: 48px;
    height: 48px;
}

.tax-summary-method-icon svg,
.tax-summary-recommendation-icon svg,
.tax-comparison-summary-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.tax-summary-method-label {
    display: block;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 750;
    margin-bottom: 0.25rem;
}

.tax-summary-method-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 850;
    margin-bottom: 0.45rem;
}

.tax-summary-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.28rem 0.56rem;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.tax-summary-pill-current {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.tax-summary-pill-recommended {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #047857;
}

.tax-summary-pill-muted {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.tax-summary-recommendation-card {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    min-height: 88px;
}

.tax-summary-recommendation-card span:not(.tax-summary-recommendation-icon) {
    display: block;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.tax-summary-recommendation-card strong {
    color: #0f172a;
    display: block;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1.45;
}

.tax-summary-recommendation-card.is-recommended,
.tax-comparison-summary.is-recommended {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #047857;
}

.tax-summary-recommendation-card.is-advisory,
.tax-comparison-summary.is-advisory {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.tax-summary-vehicle-actions {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.35rem;
}

.app-btn-with-icon,
.app-btn-stacked {
    gap: 0.65rem;
}

.app-btn-with-icon svg,
.app-btn-stacked svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex: 0 0 auto;
}

.app-btn-stacked {
    min-height: 48px;
    padding: 0.56rem 1rem;
    text-align: left;
}

.app-btn-stacked span {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.1;
}

.app-btn-stacked strong {
    font-size: 0.9rem;
    font-weight: 800;
}

.app-btn-stacked small {
    font-size: 0.76rem;
    font-weight: 700;
}

.app-btn-recommended {
    background: #f0fdf4;
    color: #047857;
    border-color: #86efac;
    box-shadow: 0 10px 24px rgba(16, 185, 129, 0.12);
}

.app-btn-recommended:hover {
    color: #047857;
    background: #dcfce7;
    border-color: #4ade80;
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.16);
}

.tax-comparison-summary {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    border-radius: 14px;
    padding: 0.85rem 0.95rem;
}

.tax-comparison-summary strong {
    display: block;
    margin-bottom: 0.2rem;
}

.tax-comparison-summary span:not(.tax-comparison-summary-icon) {
    color: #0f172a;
    line-height: 1.4;
}

.tax-comparison-summary-icon {
    width: 28px;
    height: 28px;
}

.tax-comparison-table th .tax-summary-pill {
    margin-left: 0.35rem;
    vertical-align: middle;
}

.tax-comparison-table .comparison-result .tax-summary-pill {
    min-width: 72px;
}

@media (max-width: 1100px) {
    .tax-summary-vehicle-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .tax-summary-method-card {
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.18);
        min-height: auto;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 720px) {
    .tax-summary-page-header,
    .tax-summary-title-row {
        flex-direction: column;
    }

    .tax-summary-page-header .modal-actions-top {
        width: 100%;
    }

    .tax-summary-page-header .modal-actions-top .app-btn {
        width: 100%;
    }

    .portal-back-button {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
}

/* Release 3.x Stage 4 - Tax Summary progress workflow and locked submitted states */
.tax-summary-card-header {
    align-items: flex-start;
    gap: 1rem;
}

.tax-summary-refresh-button svg,
.tax-summary-lock-pill svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tax-summary-stage-panel {
    border: 1px solid rgba(59, 130, 246, 0.14);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.9), rgba(255, 255, 255, 0.95));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
    margin: 1.1rem 0 1rem;
    padding: 1rem;
}

.tax-summary-stage-header,
.tax-summary-section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tax-summary-stage-header span:first-child {
    color: #475569;
    display: block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tax-summary-stage-header strong {
    color: #0f172a;
    display: block;
    font-size: 1rem;
    font-weight: 850;
    margin-top: 0.15rem;
}

.tax-summary-lock-pill {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 850;
    gap: 0.38rem;
    padding: 0.42rem 0.7rem;
    white-space: nowrap;
}

.tax-summary-stage-track {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
    position: relative;
}

.tax-summary-stage-step {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: #64748b;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 76px;
    padding: 0.75rem;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}

.tax-summary-stage-step:not(:disabled) {
    cursor: pointer;
}

.tax-summary-stage-step:not(:disabled):hover {
    border-color: #93c5fd;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.tax-summary-stage-step:disabled {
    cursor: default;
}

.tax-summary-stage-marker {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    color: #64748b;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.tax-summary-stage-content strong {
    color: #0f172a;
    display: block;
    font-size: 0.92rem;
    font-weight: 850;
}

.tax-summary-stage-content small {
    color: #64748b;
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    margin-top: 0.18rem;
}

.tax-summary-stage-step.is-completed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.tax-summary-stage-step.is-completed .tax-summary-stage-marker {
    background: #dcfce7;
    border-color: #86efac;
    color: #047857;
}

.tax-summary-stage-step.is-current {
    animation: taxStagePulse 0.38s ease;
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.13);
}

.tax-summary-stage-step.is-current .tax-summary-stage-marker {
    background: #dbeafe;
    border-color: #60a5fa;
    color: #1d4ed8;
}

.tax-summary-stage-step.is-current.is-locked {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.tax-summary-stage-step.is-current.is-locked .tax-summary-stage-marker {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.tax-summary-stage-step.is-available {
    border-color: #bfdbfe;
}

.tax-summary-stage-step.is-muted {
    opacity: 0.58;
}

.tax-summary-stage-help {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 650;
    margin: 0.85rem 0 0;
}

.tax-summary-section-title-row {
    margin-bottom: 1.25rem;
}

.tax-summary-section-title-row h3 {
    margin: 0;
}

.tax-summary-recommendation-card.is-locked,
.tax-comparison-summary.is-locked {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.tax-summary-recommendation-card.is-locked .tax-summary-recommendation-icon,
.tax-comparison-summary.is-locked .tax-comparison-summary-icon {
    background: #e2e8f0;
    color: #334155;
}

.app-btn-locked,
.app-btn-locked:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    opacity: 0.72;
    transform: none !important;
}

@keyframes taxStagePulse {
    0% { transform: scale(0.985); }
    60% { transform: scale(1.012); }
    100% { transform: scale(1); }
}

@media (max-width: 980px) {
    .tax-summary-stage-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .tax-summary-card-header,
    .tax-summary-stage-header,
    .tax-summary-section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .tax-summary-refresh-button {
        width: 100%;
    }

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

.tax-summary-stage-step[aria-disabled="true"] {
    cursor: default;
}

.tax-summary-stage-step[aria-disabled="false"] {
    cursor: pointer;
}

.tax-summary-stage-step[aria-disabled="false"]:hover {
    border-color: #93c5fd;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

/* Release 3.x Stage 4 correction - Summary Details split layout and timeline progress */
.tax-summary-details-card {
    padding: 1.05rem 1.15rem 1.15rem;
}

.tax-summary-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.2rem;
    margin-bottom: 1.1rem;
}

.tax-summary-card-header h2 {
    margin-bottom: 0.18rem;
}

.tax-summary-refresh-button {
    min-height: 42px;
    white-space: nowrap;
}

.tax-summary-details-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.95fr) minmax(460px, 1.35fr);
    gap: 1.15rem;
    align-items: stretch;
}

.tax-summary-meta-panel {
    display: grid;
    gap: 0.88rem;
    align-content: start;
    padding: 0.2rem 0;
}

.tax-summary-meta-row {
    display: grid;
    grid-template-columns: 44px minmax(110px, 0.42fr) minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
}

.tax-summary-meta-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eff6ff;
    color: #2563eb;
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.65);
}

.tax-summary-meta-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.tax-summary-meta-row label {
    color: #0f172a;
    font-size: 0.86rem;
    font-weight: 850;
    margin: 0;
}

.tax-summary-meta-row .app-input {
    min-height: 40px;
    font-weight: 650;
    background: #f8fafc;
}

.tax-summary-stage-panel {
    margin: 0;
    padding: 1rem 1rem 0.95rem;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(191, 219, 254, 0.9);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.045);
}

.tax-summary-stage-header {
    margin-bottom: 1.15rem;
}

.tax-summary-stage-timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    position: relative;
    gap: 0;
    padding: 0.15rem 0 0.1rem;
}

.tax-summary-stage-timeline::before {
    content: "";
    position: absolute;
    left: 12.5%;
    right: 12.5%;
    top: 23px;
    height: 2px;
    background: #cbd5e1;
    z-index: 0;
}

.tax-summary-stage-node {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 0.55rem;
    border: 0;
    background: transparent;
    color: #64748b;
    padding: 0;
    text-align: center;
    min-width: 0;
}

.tax-summary-stage-node::before {
    content: "";
    position: absolute;
    top: 23px;
    left: 0;
    width: 50%;
    height: 2px;
    background: transparent;
    z-index: -1;
}

.tax-summary-stage-node::after {
    content: "";
    position: absolute;
    top: 23px;
    left: 50%;
    width: 50%;
    height: 2px;
    background: transparent;
    z-index: -1;
}

.tax-summary-stage-node.is-completed::before,
.tax-summary-stage-node.is-completed::after,
.tax-summary-stage-node.is-current::before {
    background: #16a34a;
}

.tax-summary-stage-node:first-child::before,
.tax-summary-stage-node:last-child::after {
    display: none;
}

.tax-summary-stage-circle {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    color: #94a3b8;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.tax-summary-stage-circle span {
    width: 9px;
    height: 9px;
    display: block;
    border-radius: 999px;
    background: currentColor;
}

.tax-summary-stage-circle svg {
    width: 23px;
    height: 23px;
    fill: currentColor;
}

.tax-summary-stage-node.is-completed .tax-summary-stage-circle {
    background: #059669;
    border-color: #059669;
    color: #ffffff;
}

.tax-summary-stage-node.is-current .tax-summary-stage-circle {
    animation: taxStagePulse 0.38s ease;
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.13), 0 14px 28px rgba(37, 99, 235, 0.22);
}

.tax-summary-stage-node.is-current.is-locked .tax-summary-stage-circle {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.tax-summary-stage-node.is-available .tax-summary-stage-circle {
    background: #ffffff;
    border-color: #2563eb;
    color: #2563eb;
}

.tax-summary-stage-node.is-available:hover .tax-summary-stage-circle {
    transform: translateY(-2px);
    box-shadow: 0 0 0 7px rgba(37, 99, 235, 0.1), 0 14px 26px rgba(37, 99, 235, 0.16);
}

.tax-summary-stage-node.is-muted {
    opacity: 0.72;
}

.tax-summary-stage-node[aria-disabled="false"] {
    cursor: pointer;
}

.tax-summary-stage-node[aria-disabled="true"] {
    cursor: default;
}

.tax-summary-stage-text strong {
    color: #0f172a;
    display: block;
    font-size: 0.82rem;
    font-weight: 850;
    line-height: 1.2;
}

.tax-summary-stage-node.is-current .tax-summary-stage-text strong,
.tax-summary-stage-node.is-available .tax-summary-stage-text strong {
    color: #1d4ed8;
}

.tax-summary-stage-node.is-completed .tax-summary-stage-text strong {
    color: #047857;
}

.tax-summary-stage-text small {
    color: #64748b;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 0.18rem;
    min-height: 1.8em;
}

.tax-summary-stage-help {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 1rem 0 0;
    padding: 0.62rem 0.72rem;
    border: 1px solid #dbeafe;
    border-radius: 11px;
    background: #f8fbff;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 650;
}

.tax-summary-stage-help svg {
    width: 18px;
    height: 18px;
    fill: #2563eb;
    flex: 0 0 auto;
}

.tax-summary-vehicle-panel {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
}

@media (max-width: 1180px) {
    .tax-summary-details-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .tax-summary-meta-row {
        grid-template-columns: 40px 1fr;
    }

    .tax-summary-meta-row input {
        grid-column: 2;
    }

    .tax-summary-stage-timeline {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .tax-summary-stage-timeline::before,
    .tax-summary-stage-node::before,
    .tax-summary-stage-node::after {
        display: none;
    }

    .tax-summary-stage-node {
        grid-template-columns: 42px 1fr;
        justify-items: start;
        text-align: left;
    }

    .tax-summary-stage-circle {
        width: 42px;
        height: 42px;
    }
}

/* Tax Summary polish pass: reporting layout, workflow heading and locked vehicle panel */
.tax-summary-meta-panel {
    gap: 0;
    align-content: start;
    padding: 0.15rem 0;
}

.tax-summary-info-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.88rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.tax-summary-info-row:first-child {
    padding-top: 0;
}

.tax-summary-info-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tax-summary-info-row span:not(.tax-summary-meta-icon) {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.22rem;
}

.tax-summary-info-row strong {
    display: block;
    color: #0f172a;
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.3;
}

.tax-summary-stage-header {
    margin-bottom: 1rem;
}

.tax-summary-stage-header span:first-child {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
    text-transform: none;
    letter-spacing: 0;
}

.tax-summary-stage-node.is-current.is-locked .tax-summary-stage-text strong {
    color: #1d4ed8;
}

.tax-summary-recommendation-card {
    min-height: 74px;
    padding: 0.8rem 1rem;
    align-self: center;
}

.tax-summary-recommendation-card.is-locked span:not(.tax-summary-recommendation-icon) {
    color: #334155;
}

.tax-summary-recommendation-card.is-locked strong {
    font-size: 0.9rem;
    line-height: 1.35;
}

.tax-summary-vehicle-grid {
    align-items: center;
}

.tax-summary-vehicle-panel {
    padding-top: 1.05rem;
}

.tax-summary-vehicle-panel h3 {
    margin-bottom: 1rem;
}

@media (max-width: 720px) {
    .tax-summary-info-row {
        grid-template-columns: 40px minmax(0, 1fr);
    }
}


/* Tax Summary compact polish: remove section captions and tighten vehicle method spacing */
.tax-summary-card-header {
    margin-bottom: 0.85rem;
}

.tax-summary-card-header p {
    display: none;
}

.tax-summary-stage-help {
    display: none;
}

.tax-summary-stage-panel {
    padding-bottom: 0.82rem;
}

.tax-summary-vehicle-panel {
    margin-top: 0.95rem;
    padding-top: 0.85rem;
}

.tax-summary-vehicle-panel h3 {
    margin-bottom: 0.55rem;
}

.tax-summary-vehicle-grid {
    align-items: start;
    gap: 1rem;
}

.tax-summary-method-card {
    min-height: 84px;
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
}

.tax-summary-recommendation-card {
    min-height: 0;
    padding: 0.62rem 0.82rem;
    align-self: start;
}

.tax-summary-recommendation-card span:not(.tax-summary-recommendation-icon) {
    margin-bottom: 0.15rem;
}

.tax-summary-recommendation-card strong {
    line-height: 1.28;
}

.tax-summary-vehicle-actions {
    margin-top: 0.75rem;
}

.tax-summary-section-title-row {
    margin-bottom: 0;
}

/* Tax Summary compact follow-up: remove action toast spacing and tighten vehicle method block */
.tax-summary-vehicle-panel {
    margin-top: 0.8rem;
    padding-top: 0.72rem;
}

.tax-summary-vehicle-panel h3 {
    margin-bottom: 0.45rem;
}

.tax-summary-vehicle-grid {
    gap: 0.85rem;
    align-items: start;
}

.tax-summary-method-card {
    min-height: 68px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

.tax-summary-method-icon {
    width: 42px;
    height: 42px;
}

.tax-summary-method-icon svg {
    width: 21px;
    height: 21px;
}

.tax-summary-method-label {
    margin-bottom: 0.16rem;
}

.tax-summary-method-card strong {
    margin-bottom: 0.28rem;
}

.tax-summary-recommendation-card {
    min-height: 0;
    padding: 0.55rem 0.76rem;
    align-self: start;
}

.tax-summary-recommendation-card strong {
    line-height: 1.22;
}

.tax-summary-vehicle-actions {
    margin-top: 0.55rem;
}

/* Tax Summary header/subheading and compact summary details pass */
.tax-summary-page-header .tax-summary-title-row p {
    color: #64748b;
    font-size: 0.98rem;
    font-weight: 650;
    margin-top: 0.18rem;
}

.tax-summary-details-card {
    padding-top: 0.95rem;
    padding-bottom: 0.9rem;
}

.tax-summary-card-header {
    margin-bottom: 0.55rem;
}

.tax-summary-details-layout {
    gap: 1rem;
}

.tax-summary-meta-panel {
    padding: 0.05rem 0;
}

.tax-summary-info-row {
    padding: 0.72rem 0;
}

.tax-summary-info-row:first-child {
    padding-top: 0.1rem;
}

.tax-summary-info-row:last-child {
    padding-bottom: 0.1rem;
}

.tax-summary-meta-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.tax-summary-meta-icon svg {
    width: 20px;
    height: 20px;
}

.tax-summary-stage-panel {
    padding: 0.82rem 0.9rem 0.72rem;
}

.tax-summary-stage-header {
    margin-bottom: 0.72rem;
}

.tax-summary-stage-timeline {
    padding-top: 0;
}

.tax-summary-vehicle-panel {
    margin-top: 0.65rem;
    padding-top: 0.62rem;
}

.tax-summary-vehicle-grid {
    gap: 0.75rem;
}

.tax-summary-vehicle-actions {
    margin-top: 0.45rem;
}

/* Tax Summary final recommendation and spacing polish */
.tax-summary-page-header .tax-summary-title-row p strong {
    color: #334155;
    font-weight: 800;
}

.tax-summary-page-header .tax-summary-title-row p span {
    color: #64748b;
    font-weight: 500;
}

.tax-summary-recommendation-card {
    display: block;
    grid-template-columns: none;
}

.tax-summary-recommendation-card span,
.tax-summary-recommendation-card span:not(.tax-summary-recommendation-icon) {
    color: #1d4ed8;
    display: block;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.01em;
    margin-bottom: 0.22rem;
}

.tax-summary-recommendation-card.is-locked span,
.tax-summary-recommendation-card.is-locked span:not(.tax-summary-recommendation-icon) {
    color: #475569;
}

.tax-summary-recommendation-card strong {
    font-size: 0.92rem;
    line-height: 1.16;
}

.tax-summary-recommendation-card small {
    color: #0f172a;
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.18;
    margin-top: 0.18rem;
}

.tax-comparison-summary div small {
    color: #334155;
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 0.2rem;
}

.tax-summary-grid {
    row-gap: 0.75rem;
    margin: 0.75rem 0;
}

.tax-summary-grid .account-card {
    margin-bottom: 0;
}

/* Tax Summary income summary compact rows */
.tax-summary-grid {
    gap: 0.75rem !important;
    row-gap: 0.75rem !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.35rem !important;
}

.tax-summary-grid .company-list-card {
    margin-bottom: 0 !important;
}

.tax-summary-income-row > span {
    color: var(--heading-text, #0f172a);
}

.tax-summary-income-row > span > strong {
    color: var(--heading-text, #0f172a);
    font-weight: 800;
}

.tax-summary-income-row small {
    color: var(--muted-text, #64748b);
    font-size: 0.92rem;
    font-weight: 500;
}

/* Phase 4 - Tax Expense Framework */
.expense-category-toolbar {
    align-items: end;
    gap: 1rem;
}

.expense-category-toolbar .expense-category-filter {
    max-width: 220px;
    margin: 0;
}

.status-pill-button {
    border: 0;
    border-radius: 999px;
    padding: .35rem .75rem;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.status-pill-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .12);
}

.status-pill-active {
    background: #dcfce7;
    color: #166534;
}

.status-pill-inactive {
    background: #f1f5f9;
    color: #475569;
}

.grid-footer-count {
    border-top: 1px solid #e5e7eb;
    padding: .75rem 1rem 0;
    margin-top: .75rem;
    color: #64748b;
    font-weight: 700;
    font-size: .88rem;
}

.expense-category-modal {
    max-width: 620px;
}

.tax-expense-ledger-card {
    margin-top: 1.25rem;
}

.tax-ledger-table th,
.tax-ledger-table td {
    vertical-align: middle;
}

.tax-ledger-source-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .28rem .62rem;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.tax-ledger-source-pill.is-imported {
    background: #eff6ff;
    color: #1d4ed8;
}

.tax-ledger-source-pill.is-manual {
    background: #f8fafc;
    color: #475569;
}

.muted-text {
    color: #64748b;
}

.tax-ledger-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

.tax-expense-ledger-modal {
    max-width: 680px;
}

.tax-expense-ledger-modal .settings-form-grid-two {
    gap: 1rem;
}

/* Phase 4 Tax Summary Workspace replacement */
.tax-workspace-page .tax-summary-section-card {
    margin-top: 1rem;
}

.tax-company-user-pill {
    align-items: center;
    background: rgba(248, 250, 252, 0.94);
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 999px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
    padding: 0.32rem 0.7rem;
}

.tax-company-user-pill span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tax-company-user-pill strong {
    color: #0f172a;
    font-size: 0.82rem;
    font-weight: 850;
}

.tax-company-user-pill small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 650;
}

.tax-overview-grid .tax-summary-kpi small {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 650;
    margin-top: 0.28rem;
}

.tax-ledger-summary-card .compact-section-header,
.tax-estimate-card .compact-section-header {
    align-items: flex-start;
}

.tax-ledger-summary-table {
    min-width: 840px;
}

.tax-ledger-summary-table th,
.tax-ledger-summary-table td {
    vertical-align: middle;
}

.tax-ledger-summary-table .total-row td {
    border-top: 1px solid rgba(15, 23, 42, 0.14);
    font-weight: 800;
}

.tax-ledger-indicator-col {
    text-align: center !important;
    width: 44px;
}

.tax-ledger-indicator {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 900;
    height: 15px;
    justify-content: center;
    line-height: 1;
    width: 15px;
}

.tax-ledger-indicator.is-included {
    background: #16a34a;
    color: #16a34a;
}

.tax-ledger-indicator.is-excluded {
    background: #fee2e2;
    color: #dc2626;
    font-size: 0.72rem;
}

.tax-estimate-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
    gap: 1.2rem;
    align-items: stretch;
}

.tax-estimate-note {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: #475569;
    padding: 1rem;
}

.tax-estimate-note strong {
    color: #0f172a;
    display: block;
    font-weight: 850;
    margin-bottom: 0.55rem;
}

.tax-estimate-note p {
    margin: 0 0 0.65rem;
}

.tax-estimate-note p:last-child {
    margin-bottom: 0;
}

.tax-position-group {
    margin-bottom: 1.15rem;
}

.tax-position-group:last-of-type {
    margin-bottom: 0.85rem;
}

.tax-position-group-title {
    border-bottom: 1px solid #dbe4f0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 1.15rem 0 0.45rem;
    padding-bottom: 0.4rem;
    text-transform: none;
}

.tax-position-group:first-child .tax-position-group-title {
    margin-top: 0;
}

.tax-position-status-banner {
    align-items: center;
    border-radius: 16px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
}

.tax-position-status-banner span {
    font-weight: 850;
}

.tax-position-status-banner strong {
    font-size: 1.15rem;
    font-weight: 900;
}

.tax-position-status-banner.is-due {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.tax-position-status-banner.is-refund {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #047857;
}

.tax-position-status-banner.is-neutral {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.tax-ledger-modal-backdrop {
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tax-full-ledger-modal {
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    height: min(85vh, 860px);
    max-height: 85vh;
    max-width: 1180px;
    width: min(1180px, calc(100vw - 48px));
}

.tax-full-ledger-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    overflow: hidden;
}

.tax-ledger-modal-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.tax-ledger-filter-row {
    align-items: center;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.45fr) minmax(170px, 0.45fr) auto;
    gap: 0.75rem;
}

.tax-ledger-total-text {
    color: #475569;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
}

.tax-full-ledger-modal .admin-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.tax-full-ledger-modal .tax-ledger-table {
    min-width: 1080px;
}

.tax-ledger-table tr.is-manual-row {
    background: rgba(239, 246, 255, 0.48);
}

.tax-ledger-pagination {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    padding-top: 0.8rem;
}

.tax-ledger-pagination label,
.tax-ledger-page-size {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    line-height: 1;
    margin: 0;
    white-space: nowrap;
}

.tax-ledger-pagination select.app-input {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
}

.tax-ledger-pages {
    align-items: center;
    display: inline-flex;
    gap: 0.55rem;
    justify-content: center;
    white-space: nowrap;
}

.tax-ledger-page-range {
    justify-self: end;
    white-space: nowrap;
}

.tax-expense-ledger-modal .full-width {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .tax-estimate-grid {
        grid-template-columns: 1fr;
    }

    .tax-ledger-filter-row {
        grid-template-columns: 1fr;
    }

    .tax-ledger-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .tax-full-ledger-modal {
        height: min(90vh, 860px);
        max-height: 90vh;
        width: calc(100vw - 24px);
    }
}
