﻿*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --af-primary: #0f766e;
    --af-primary-dark: #115e59;
    --af-primary-darker: #0c4a44;
    --af-primary-deeper: #134e4a;
    --af-primary-tint: #f0fdfa;
    --af-primary-ring: rgba(15, 118, 110, 0.12);
    --af-surface: #ffffff;
    --af-border: #e5e7eb;
    --af-border-input: #d1d5db;
    --af-text: #1f2937;
    --af-text-heading: #111827;
    --af-text-muted: #6b7280;
    --af-text-label: #374151;
    --af-radius: 10px;
    --af-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    --af-gradient-brand: linear-gradient(135deg, #0f766e 0%, #115e59 50%, #0c4a44 100%);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #f6f8f8 0%, #eef3f2 100%);
    background-attachment: fixed;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

/* Shell */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}

/* Brand block — teal gradient, white text */
.sidebar-brand {
    padding: 26px 24px 22px;
    background: var(--af-gradient-brand);
    color: #ffffff;
}

    .sidebar-brand h1 {
        margin: 0;
        font-size: 22px;
        color: #ffffff;
        font-weight: 700;
        letter-spacing: -0.3px;
    }

    .sidebar-brand small {
        color: rgba(255,255,255,0.72);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        font-weight: 600;
    }

.sidebar-nav {
    padding: 16px 0;
}

    .sidebar-nav a {
        display: block;
        padding: 11px 24px;
        color: #4b5563;
        text-decoration: none;
        font-weight: 500;
        border-left: 3px solid transparent;
        transition: background 0.15s, color 0.15s;
    }

        .sidebar-nav a:hover {
            background: #f9fafb;
            color: var(--af-primary);
        }

        .sidebar-nav a.active {
            background: linear-gradient(90deg, var(--af-primary-tint) 0%, #ffffff 100%);
            color: var(--af-primary);
            border-left-color: var(--af-primary);
            font-weight: 600;
        }

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.topbar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-date {
    color: var(--af-text-muted);
    font-size: 13px;
    white-space: nowrap;
}

a.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: 2px solid var(--af-primary);
    border-radius: 8px;
    background: transparent;
    color: var(--af-primary);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

    a.btn-logout:hover {
        background: var(--af-primary-tint);
        color: var(--af-primary-dark);
        border-color: var(--af-primary-dark);
    }

.btn-logout-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-logout-icon {
    flex-shrink: 0;
}

.btn-logout-text {
    line-height: 1;
}

.content {
    padding: 28px 32px;
    flex: 1;
}

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    position: relative;
    overflow: hidden;
}

    .stat-card.primary {
        background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
        border: 1px solid #e5e7eb;
        border-top: 3px solid #0f766e;
        color: #1f2937;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

        .stat-card.primary .stat-value {
            color: #0f766e; /* big teal number does the work */
            font-size: 26px;
        }

        .stat-card.primary .stat-label {
            color: #6b7280;
        }

        .stat-card.primary .stat-sub {
            color: #9ca3af;
        }

    .stat-card.warning {
        border-color: #fde68a;
        background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);
    }

        .stat-card.warning .stat-value {
            color: #b45309;
        }

.stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    font-weight: 700;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.stat-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

/* Page action header */
.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

    .page-actions h2 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        color: #374151;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

.employee-page-intro {
    margin-bottom: 20px;
}

    .employee-page-intro h2 {
        margin: 0 0 6px 0;
        font-size: 15px;
        font-weight: 600;
        color: var(--af-text-label);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .employee-page-intro p {
        margin: 0;
        color: var(--af-text-muted);
        font-size: 13px;
    }

.employee-search-panel {
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: var(--af-shadow);
    border-top: 3px solid var(--af-primary);
}

.employee-search-label {
    display: block;
    margin-bottom: 8px;
    color: var(--af-primary-dark);
    font-size: 13px;
    font-weight: 600;
}

.employee-search-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
}

.employee-search-input,
.employee-form-input,
.login-input {
    font-family: inherit;
}

.employee-search-input {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
    padding: 9px 12px;
    border: 1px solid var(--af-border-input);
    border-radius: 6px;
    font-size: 14px;
}

    .employee-search-input:focus,
    .employee-form-input:focus {
        outline: none;
        border-color: var(--af-primary);
        box-shadow: 0 0 0 3px var(--af-primary-ring);
    }

.employee-grid {
    width: 100%;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: var(--af-shadow);
}

    .employee-grid th {
        background: linear-gradient(180deg, var(--af-primary-tint) 0%, #f9fafb 100%);
        color: var(--af-primary-dark);
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 12px 16px;
        text-align: left;
        border-bottom: 2px solid var(--af-primary);
    }

    .employee-grid td {
        padding: 11px 16px;
        font-size: 13px;
        color: #1f2937;
        border-bottom: 1px solid #f3f4f6;
    }

    .employee-grid tr:last-child td {
        border-bottom: none;
    }

    .employee-grid tr:hover td {
        background: var(--af-primary-tint);
    }

    .employee-grid .btn-grid {
        padding: 6px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

/* Employee add/edit form card */
.employee-form-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--af-surface);
    border: 1px solid var(--af-border);
    border-radius: var(--af-radius);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.08);
}

.employee-form-header {
    background: var(--af-gradient-brand);
    color: #ffffff;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    padding: 16px 20px;
    letter-spacing: 0.3px;
}

.employee-form-body {
    padding: 28px 36px 24px;
    background: var(--af-surface);
}

.employee-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 24px;
}

    .employee-form-row label {
        flex: 0 0 130px;
        margin: 0;
        text-align: left;
        font-size: 13px;
        font-weight: 600;
        color: var(--af-text-label);
    }

.employee-form-input {
    flex: 1;
    max-width: 420px;
    padding: 9px 12px;
    border: 1px solid var(--af-border-input);
    border-radius: 6px;
    font-size: 14px;
    background: var(--af-surface);
    color: var(--af-text);
}

.employee-form-row .employee-form-input {
    display: block;
}

.employee-form-field {
    flex: 1;
    max-width: 420px;
}

    .employee-form-field .employee-form-input {
        width: 100%;
        max-width: none;
    }

    .employee-form-field .validator {
        margin-top: 4px;
    }

/* Add Employee — solid teal with plus icon */
a.btn-add-employee,
.btn-add-employee {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--af-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(15, 118, 110, 0.28);
    transition: background 0.15s, box-shadow 0.15s;
}

    a.btn-add-employee:hover,
    .btn-add-employee:hover {
        background: var(--af-primary-dark);
        color: #ffffff;
        box-shadow: 0 2px 8px rgba(15, 118, 110, 0.32);
    }

.btn-add-employee-inner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-add-employee-icon {
    flex-shrink: 0;
}

.employee-form-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: 0;
    background: var(--af-primary);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    padding: 14px 20px;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 -2px 8px rgba(15, 118, 110, 0.12);
}

    .employee-form-footer:hover {
        background: var(--af-primary-dark);
        box-shadow: 0 -2px 12px rgba(15, 118, 110, 0.2);
    }

.employee-form-footer--add::before {
    content: "+";
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
}

.employee-toolbar {
    max-width: 720px;
    margin: 0 auto 16px;
}

    .employee-toolbar .employee-page-intro {
        margin-bottom: 0;
    }

@media (max-width: 639px) {
    .employee-form-body {
        padding: 20px 16px;
    }

    .employee-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

        .employee-form-row label {
            flex: none;
        }

    .employee-form-input {
        max-width: none;
    }
}

.section-header {
    margin: 32px 0 14px 0;
}

    .section-header h2 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        color: #374151;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .section-header p {
        margin: 6px 0 0 0;
        color: #6b7280;
        font-size: 13px;
    }

/* Buttons */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, transform 0.05s;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: var(--af-primary);
    color: #ffffff;
    border-color: var(--af-primary);
    box-shadow: 0 1px 2px rgba(15, 118, 110, 0.25);
}

    .btn-primary:hover {
        background: var(--af-primary-dark);
        border-color: var(--af-primary-dark);
        box-shadow: 0 3px 8px rgba(15, 118, 110, 0.30);
    }

.btn-secondary {
    background: #ffffff;
    color: #1f2937;
    border-color: #d1d5db;
}

    .btn-secondary:hover {
        background: #f9fafb;
        border-color: #9ca3af;
    }

.btn-success {
    background: #047857;
    color: #ffffff;
    border-color: #047857;
    box-shadow: 0 1px 2px rgba(4,120,87,0.25);
}

    .btn-success:hover {
        background: #065f46;
        box-shadow: 0 3px 8px rgba(4,120,87,0.30);
    }

.btn:disabled, .btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Bank grid */
.bank-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.bank-column {
    flex: 1 1 280px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Bank card */
.bank-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: 3px solid #0f766e;
    border-radius: 10px;
    padding: 18px 20px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}

    .bank-card:hover {
        box-shadow: 0 6px 18px rgba(15,118,110,0.10);
        transform: translateY(-2px);
    }

    .bank-card.manual {
        border-top-color: #f59e0b;
    }

        .bank-card.manual:hover {
            box-shadow: 0 6px 18px rgba(245,158,11,0.14);
        }

.bank-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f4;
}

    .bank-card-header h3 {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        color: #0f3a36;
    }

    .bank-card-header .bank-total {
        font-size: 13px;
        font-weight: 700;
        color: #0f766e;
        background: #f0fdfa;
        padding: 4px 10px;
        border-radius: 999px;
        font-variant-numeric: tabular-nums;
    }

.bank-card.manual .bank-card-header h3 {
    color: #7c2d12;
}

.manual-badge {
    display: inline-block;
    font-size: 9px;
    background: #fef3c7;
    color: #92400e;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.6px;
    vertical-align: middle;
}

/* Account rows with zebra */
.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 8px;
    border-radius: 6px;
}

    .account-row:nth-child(odd) {
        background: #fafbfb;
    }

.account-info {
    flex: 1;
    min-width: 0;
}

.account-name {
    font-weight: 500;
    color: #1f2937;
}

.account-mask {
    color: #94a3b8;
    font-size: 12px;
    margin-left: 6px;
    font-weight: normal;
    letter-spacing: 0.5px;
}

.account-balance {
    text-align: right;
}

.balance-current {
    font-weight: 700;
    color: #0f766e;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.balance-available {
    color: #6b7280;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* Manual input rows */
.input-row {
    padding: 10px 8px;
    border-radius: 6px;
}

    .input-row:nth-child(odd) {
        background: #fffbf3;
    }

    .input-row label {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        color: #1f2937;
        font-weight: 500;
        font-size: 13px;
    }

    .input-row .input-mask {
        color: #94a3b8;
        font-size: 12px;
        font-weight: normal;
        letter-spacing: 0.5px;
    }

.stale-pill {
    display: inline-block;
    font-size: 9px;
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.input-row input[type='text'] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .input-row input[type='text']:focus {
        outline: none;
        border-color: #0f766e;
        box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
    }

.validator {
    color: #dc2626;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

/* Footer actions */
.footer-actions {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    border-left: 3px solid transparent;
}

    .alert.alert-success {
        background: #ecfdf5;
        color: #065f46;
        border-color: #047857;
    }

    .alert.alert-error {
        background: #fef2f2;
        color: #991b1b;
        border-color: #dc2626;
    }

    .alert.alert-info {
        background: #eff6ff;
        color: #1e40af;
        border-color: #2563eb;
    }

/* Preview modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 30, 0.55);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 820px;
    height: calc(100vh - 64px);
    max-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.30);
    overflow: hidden;
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #111827;
    }

    .modal-header .modal-subtitle {
        font-size: 12px;
        color: #6b7280;
        margin-top: 2px;
    }

.modal-body {
    padding: 0;
    flex: 1 1 auto;
    min-height: 0; /* lets flex child shrink so iframe height: 100% works */
    overflow: hidden; /* was: auto */
    background: #f9fafb;
}

    .modal-body iframe {
        width: 100%;
        height: 100%; /* was: 600px */
        border: 0;
        background: #ffffff;
        display: block;
    }

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #ffffff;
}

    .modal-footer .recipient-info {
        font-size: 12px;
        color: #6b7280;
    }

    .modal-footer .footer-buttons {
        display: flex;
        gap: 10px;
    }

/* Login page — split-screen layout (fits viewport, no page scroll) */
html.login-html,
html.login-html body.login-page--split {
    height: 100%;
    min-height: 0;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
    background: #ffffff;
    background-attachment: scroll;
}

.login-page--split {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.login-page--split #form1 {
    width: 100%;
    height: 100%;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
}

.login-split {
    display: flex;
    height: 100%;
    max-height: 100dvh;
    width: 100%;
    overflow: hidden;
}

.login-split-brand {
    flex: 1 1 50%;
    min-height: 0;
    background: linear-gradient(165deg, #042f2e 0%, #0f4c47 35%, #115e59 70%, #134e4a 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    position: relative;
    overflow: hidden;
}

    .login-split-brand::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(45, 212, 191, 0.12) 0%, transparent 60%);
        pointer-events: none;
    }

.login-split-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 480px;
    width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.login-split-logo-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 32px;
    flex-shrink: 0;
}

.login-split-logo-mark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2dd4bf 0%, #0d9488 100%);
    color: #042f2e;
    font-size: 34px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(45, 212, 191, 0.35);
    flex-shrink: 0;
}

.login-split-logo-title {
    display: block;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.1;
}

.login-split-logo-sub {
    display: block;
    font-size: 17px;
    font-weight: 500;
    color: rgba(167, 243, 232, 0.9);
    margin-top: 6px;
    letter-spacing: 0.02em;
}

.login-split-headline {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.4px;
    flex-shrink: 0;
}

.login-split-tagline {
    margin: 0 0 28px;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(204, 251, 241, 0.78);
    max-width: 440px;
    flex-shrink: 0;
}

.login-split-chart {
    position: relative;
    margin: 0 0 28px;
    padding: 0;
    flex-shrink: 0;
}

.login-split-chart-svg {
    width: 100%;
    max-width: 400px;
    max-height: 150px;
    height: auto;
    display: block;
}

.login-split-chart-badge {
    position: absolute;
    top: 8%;
    right: 8%;
    background: rgba(15, 118, 110, 0.9);
    border: 1px solid rgba(94, 234, 212, 0.4);
    color: #5eead4;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.login-split-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 20px;
    flex-shrink: 0;
}

    .login-split-features li {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
        color: rgba(204, 251, 241, 0.9);
    }

.login-split-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #5eead4;
    flex-shrink: 0;
}

.login-split-panel {
    flex: 1 1 50%;
    min-height: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 56px;
    overflow: hidden;
}

.login-split-form-wrap {
    width: 100%;
    max-width: 420px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-split-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f0fdfa;
    color: var(--af-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.login-split-welcome {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 700;
    color: var(--af-text-heading);
    letter-spacing: -0.4px;
    flex-shrink: 0;
}

.login-split-welcome-sub {
    margin: 0 0 32px;
    font-size: 15px;
    color: var(--af-text-muted);
    line-height: 1.55;
    flex-shrink: 0;
}

.login-page--split .login-field {
    margin-bottom: 20px;
}

.login-page--split .login-actions {
    margin-top: 28px;
}

.login-page--split .login-input {
    padding: 12px 12px 12px 42px;
    font-size: 15px;
}

.login-page--split .login-field label {
    font-size: 14px;
    margin-bottom: 8px;
}

.login-input-icon-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 1;
}

.login-input--icon {
    padding-left: 42px !important;
}

.login-input-icon-wrap.login-password-wrap .login-input-password {
    padding-right: 44px;
}

.login-submit--split {
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    background: var(--af-gradient-brand) !important;
    border: none;
}

    .login-submit--split:hover {
        filter: brightness(1.05);
    }

.login-split-footer {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid var(--af-border);
    font-size: 12px;
    color: var(--af-text-muted);
    text-align: center;
    line-height: 1.6;
    flex-shrink: 0;
}

.login-split-footer-links {
    display: inline;
    margin-top: 0;
    margin-left: 4px;
}

    .login-split-footer-links a {
        color: var(--af-primary);
        text-decoration: none;
    }

        .login-split-footer-links a:hover {
            text-decoration: underline;
        }

.login-split-footer-dot {
    margin: 0 6px;
    color: #d1d5db;
}

.login-message {
    margin-bottom: 10px;
    flex-shrink: 0;
}

/* Desktop: scale brand content to fit only on genuinely short windows */
@media (min-width: 901px) and (max-height: 820px) {
    .login-split-brand,
    .login-split-panel {
        padding: 32px 40px;
    }

    .login-split-logo-row {
        margin-bottom: 20px;
    }

    .login-split-logo-mark {
        width: 56px;
        height: 56px;
        font-size: 30px;
    }

    .login-split-logo-title {
        font-size: 32px;
    }

    .login-split-logo-sub {
        font-size: 15px;
    }

    .login-split-headline {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .login-split-tagline {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .login-split-chart {
        margin-bottom: 20px;
    }

    .login-split-chart-svg {
        max-height: 110px;
    }

    .login-split-welcome {
        font-size: 26px;
    }

    .login-split-welcome-sub {
        margin-bottom: 24px;
    }

    .login-page--split .login-field {
        margin-bottom: 16px;
    }

    .login-split-footer {
        margin-top: 24px;
    }
}

@media (min-width: 901px) and (max-height: 680px) {
    .login-split-tagline,
    .login-split-chart,
    .login-split-features {
        display: none;
    }

    .login-split-headline {
        font-size: 22px;
        margin-bottom: 0;
    }
}

/* Tablet / mobile: stack with readable form spacing */
@media (max-width: 900px) {
    .login-split {
        flex-direction: column;
    }

    .login-split-brand {
        flex: 0 0 auto;
        padding: 28px 24px;
    }

    .login-split-logo-row {
        margin-bottom: 16px;
        justify-content: center;
    }

    .login-split-logo-mark {
        width: 52px;
        height: 52px;
        font-size: 28px;
    }

    .login-split-logo-title {
        font-size: 30px;
    }

    .login-split-logo-sub {
        font-size: 15px;
    }

    .login-split-headline {
        font-size: 20px;
        text-align: center;
        margin-bottom: 0;
    }

    .login-split-tagline,
    .login-split-chart,
    .login-split-features {
        display: none;
    }

    .login-split-brand-inner {
        max-width: none;
        align-items: center;
        text-align: center;
    }

    .login-split-panel {
        flex: 1 1 auto;
        min-height: 0;
        padding: 32px 24px 28px;
    }

    .login-split-form-wrap {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .login-split-brand {
        padding: 20px 16px;
    }

    .login-split-panel {
        padding: 24px 16px;
    }

    .login-split-welcome {
        font-size: 26px;
    }

    .login-submit {
        min-height: 48px;
    }

    .login-input {
        font-size: 16px;
    }
}

.login-field {
    display: block;
    width: 100%;
    margin-bottom: 18px;
}

    .login-field label {
        display: block;
        width: 100%;
        margin-bottom: 6px;
        color: #1f2937;
        font-weight: 500;
        font-size: 13px;
    }

.login-field .login-input,
.login-input {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

    .login-input:focus {
        outline: none;
        border-color: var(--af-primary);
        box-shadow: 0 0 0 3px var(--af-primary-ring);
    }

.login-password-wrap {
    position: relative;
}

.login-input-password {
    padding-right: 44px;
}

.login-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--af-text-muted);
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

    .login-password-toggle:hover {
        color: var(--af-primary);
        background: var(--af-primary-tint);
    }

    .login-password-toggle .icon-eye-hide {
        display: none;
    }

    .login-password-toggle.is-visible .icon-eye-show {
        display: none;
    }

    .login-password-toggle.is-visible .icon-eye-hide {
        display: block;
    }

.login-actions {
    display: block;
    width: 100%;
    margin-top: 24px;
}

.login-submit,
a.login-submit-link {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 11px 18px;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
}

.login-submit-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-icon-unlock {
    flex-shrink: 0;
}

/* ── Reminder banner ───────────────────────────── */
.reminder-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #78350f;
    font-size: 14px;
    box-shadow: 0 1px 3px rgba(245,158,11,0.10);
}

    .reminder-banner strong {
        color: #92400e;
        font-weight: 700;
        margin-right: 4px;
    }

    .reminder-banner .reminder-text {
        flex: 1;
    }

    .reminder-banner .reminder-icon {
        width: 22px;
        height: 22px;
        color: #b45309;
        flex-shrink: 0;
    }

    .reminder-banner .reminder-action {
        color: #0f766e;
        font-weight: 600;
        text-decoration: none;
        font-size: 13px;
        padding: 6px 12px;
        border: 1px solid #0f766e;
        border-radius: 6px;
        white-space: nowrap;
        transition: background 0.15s, color 0.15s;
    }

        .reminder-banner .reminder-action:hover {
            background: #0f766e;
            color: #ffffff;
        }

/* ── Sub-tabs ──────────────────────────────────── */
.sub-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    color: #6b7280;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    user-select: none;
}

    .sub-tab:hover {
        color: #0f766e;
    }

    .sub-tab.active {
        color: #0f766e;
        border-bottom-color: #0f766e;
    }

.badge-count {
    background: #f59e0b;
    color: #ffffff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0;
}

.sub-tab.active .badge-count {
    background: #0f766e;
}

.sub-tab-pane {
    display: none;
}

    .sub-tab-pane.active {
        display: block;
    }

.saved-today-pill {
    display: inline-block;
    font-size: 11px;
    background: #d1fae5;
    color: #065f46;
    padding: 2px 9px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.prev-value-pill {
    display: inline-block;
    font-size: 11px;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 9px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.2px;
}
