:root {
        --primary: #0066ff;
        --primary-hover: #0052cc;
        --secondary: #64748b;
        --dark: #0f172a;
        --light: #f8fafc;
        --border-color: #cbd5e1;
        --border-light: #e2e8f0;
        --white: #ffffff;
        --text-main: #475569;
        --text-dark: #0f172a;
        --text-muted: #94a3b8;
        --success: #10b981;
        --danger: #ef4444;
        --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        --shadow-card: 0 20px 50px -12px rgba(15, 23, 42, 0.04), 0 4px 20px -2px rgba(15, 23, 42, 0.02);
    }

    .checkbox-label {
        display: flex;
        gap: 5px;
    }

    .staytics-login-page * {

        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    .staytics-login-page {
        font-family: var(--font-sans);
        background-color: #fafbfc;
        color: var(--text-main);
        /* min-height: 100vh; */
        overflow-x: hidden;
    }

    .login-split-container {
        display: flex;
        width: 100%;
        /* min-height: 100vh; */
    }

    /* Left Brand Side */
    .brand-side {
        width: 45%;
        background: radial-gradient(circle at 10% 15%, rgba(219, 234, 254, 0.4) 0%, rgba(255, 255, 255, 1) 100%);
        padding: 210px 72px 60px 80px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        border-right: 1px solid var(--border-light);
    }

    .brand-top {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .welcome-badge {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        color: var(--primary);
        font-weight: 700;
        font-size: 15px;
        letter-spacing: -0.01em;
    }

    .welcome-badge-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        background-color: var(--primary);
        border-radius: 6px;
        color: var(--white);
    }

    .brand-heading-group {
        display: flex;
        flex-direction: column;
        gap: 16px;
        max-width: 440px;
    }

    .brand-title {
        font-size: 42px;
        font-weight: 800;
        color: var(--text-dark);
        line-height: 1.2;
        letter-spacing: -0.03em;
    }

    .brand-desc {
        font-size: 15px;
        line-height: 1.6;
        color: #64748b;
        font-weight: 500;
    }

    .features-list {
        display: flex;
        flex-direction: column;
        gap: 28px;
        margin-top: 24px;
        max-width: 420px;
    }

    .feature-item {
        display: flex;
        align-items: center;
        gap: 18px;
    }

    .feature-icon-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background-color: #eef2ff;
        border-radius: 50%;
        color: var(--primary);
        flex-shrink: 0;
    }

    .feature-info {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .feature-title {
        font-size: 16px;
        font-weight: 700;
        color: var(--text-dark);
        letter-spacing: -0.01em;
    }

    .feature-desc {
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
    }

    .brand-illustration {
        position: relative;
        /* The asset is 1254×1254. We cap it at 220px tall so it never
           dominates the left panel; the aspect-ratio keeps the width
           in sync without hard-coding a second dimension. */
        aspect-ratio: 1 / 1;
        height: 220px;
        max-width: 220px;
        width: 100%;
        margin-top: 40px;
        display: flex;
        align-items: flex-end;
        justify-content: flex-start;
    }

    .brand-illustration img {
        display: block;
        width: 100%;
        height: 100%;
        /* "contain" keeps the whole illustration visible; switch to
           "cover" if you'd rather fill the box and crop edges. */
        object-fit: contain;
        object-position: left bottom;
    }

    /* Right Form Side */
    .form-side {
        width: 55%;
        background-color: #fafbfc;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 40px 80px;
    }

    .login-card {
        width: 100%;
        max-width: 580px;
        background: var(--white);
        border: 1px solid rgba(226, 232, 240, 0.7);
        border-radius: 20px;
        padding: 72px 64px;
        box-shadow: var(--shadow-card);
        position: relative;
    }

    /* Auth-tab panes: only one is visible at a time. The HTML `hidden`
       attribute already does the job, but we reinforce it explicitly so
       custom display rules on ancestors never accidentally reveal the
       inactive pane. */
    .auth-pane {
        animation: authPaneIn .25s ease both;
    }
    .auth-pane[hidden] {
        display: none !important;
    }
    @keyframes authPaneIn {
        from { opacity: 0; transform: translateY(6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .card-header {
        margin-bottom: 48px;
    }

    .card-title {
        font-size: 32px;
        font-weight: 800;
        color: var(--text-dark);
        margin-bottom: 12px;
        letter-spacing: -0.02em;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .card-subtitle {
        font-size: 14.5px;
        color: #64748b;
        font-weight: 500;
    }

    .register-link {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
        margin-left: 4px;
        transition: color 0.15s ease;
    }

    .register-link:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

    .alert-msg {
        display: flex;
        background-color: rgba(244, 63, 94, 0.05);
        border: 1px solid rgba(244, 63, 94, 0.15);
        color: var(--danger);
        padding: 14px 18px;
        border-radius: 10px;
        font-size: 13.5px;
        font-weight: 500;
        margin-bottom: 30px;
        align-items: center;
        gap: 10px;
    }

    .alert-msg a {
        color: inherit;
        text-decoration: underline;
        font-weight: 600;
    }

    .alert-msg a:hover {
        text-decoration: none;
        opacity: 0.85;
    }

    .alert-msg strong {
        font-weight: 700;
    }

    /* The empty placeholder slot is rendered hidden by default and only
       shown when there is an actual error message. */
    .alert-msg[hidden],
    .alert-msg.is-empty {
        display: none !important;
    }

    .alert-msg.alert-success {
        background-color: rgba(16, 185, 129, 0.05);
        border-color: rgba(16, 185, 129, 0.15);
        color: var(--success);
    }

    .alert-msg.alert-info {
        background-color: rgba(0, 102, 255, 0.05);
        border-color: rgba(0, 102, 255, 0.15);
        color: var(--primary);
    }

    .form-group {
        margin-bottom: 28px;
    }

    .form-label {
        display: block;
        font-size: 14px;
        font-weight: 700;
        color: var(--text-dark);
        margin-bottom: 12px;
    }

    .asterisk {
        color: #ef4444;
        margin-left: 4px;
    }

    /* ── Password Strength Meter ── */
    .pwd-strength-wrapper {
        margin-bottom: 28px;
    }

    .pwd-strength-track {
        display: flex;
        gap: 6px;
        margin-bottom: 8px;
    }

    .pwd-strength-segment {
        flex: 1;
        height: 6px;
        background: #e2e8f0;
        border-radius: 3px;
        transition: background 0.35s ease;
    }

    .pwd-strength-hint {
        font-size: 12px;
        font-weight: 600;
        color: #94a3b8;
        margin: 0;
        transition: color 0.35s ease;
    }

    /* Level 1 – Weak */
    .pwd-strength-segment.lit.weak  { background: #ef4444; }
    .pwd-strength-hint.weak        { color: #ef4444; }

    /* Level 2 – Fair */
    .pwd-strength-segment.lit.fair  { background: #f59e0b; }
    .pwd-strength-hint.fair        { color: #f59e0b; }

    /* Level 3 – Strong */
    .pwd-strength-segment.lit.strong { background: #16a34a; }
    .pwd-strength-hint.strong      { color: #16a34a; }

    /* ── Confirm Password ── */
    .field-sub-hint {
        font-size: 12px;
        font-weight: 600;
        margin: 6px 0 0;
        transition: color 0.25s ease;
    }
    .field-sub-hint.match    { color: #16a34a; }
    .field-sub-hint.mismatch { color: #ef4444; }

    .input-icon-right[data-tick] {
        pointer-events: none;
    }

    .input-wrapper.has-tick .input-icon-right[data-tick] {
        display: flex !important;
    }

    .input-wrapper.has-error .form-input {
        border-color: #ef4444;
    }

    .input-wrapper.has-tick.has-error .form-input {
        border-color: #ef4444;
    }

    .input-wrapper.has-tick:not(.has-error) .form-input {
        border-color: #16a34a;
    }

    .input-wrapper {
        position: relative;
        display: flex;
        align-items: center;
    }

    .input-icon-left {
        position: absolute;
        left: 18px;
        color: #94a3b8;
        pointer-events: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .input-icon-right {
        position: absolute;
        right: 18px;
        color: #94a3b8;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.15s ease;
    }

    .input-icon-right:hover {
        color: var(--text-dark);
    }

    .form-input {
        width: 100%;
        padding: 16px 20px 16px 52px;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        background: var(--white);
        color: var(--text-dark);
        font-size: 14.5px;
        font-weight: 500;
        transition: all 0.2s ease;
        outline: none;
    }

    .form-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.08);
    }

    .form-input::placeholder {
        color: #94a3b8;
        font-weight: 400;
    }

    .form-input.has-error {
        border-color: var(--danger);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, .08);
    }

    .form-options {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 36px;
        font-size: 14px;
    }

    .remember-me {
        display: flex;
        align-items: center;
        gap: 10px;
        cursor: pointer;
        font-weight: 600;
        color: #64748b;
        user-select: none;
    }

    .checkbox-input {
        appearance: none;
        width: 20px;
        height: 20px;
        border: 1.5px solid #cbd5e1;
        border-radius: 5px;
        outline: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        background: var(--white);
    }

    .checkbox-input:checked {
        background-color: var(--primary);
        border-color: var(--primary);
    }

    .checkbox-input:checked::before {
        content: '';
        width: 4px;
        height: 8px;
        border: solid white;
        border-width: 0 2px 2px 0;
        transform: rotate(45deg);
        margin-bottom: 2px;
    }

    .forgot-link {
        color: var(--primary);
        font-weight: 600;
        text-decoration: none;
        transition: color 0.15s ease;
    }

    .forgot-link:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

    .btn-submit {
        width: 100%;
        padding: 16px 24px;
        border: none;
        border-radius: 10px;
        background: var(--primary);
        color: var(--white);
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 14px rgba(0, 102, 255, 0.12);
    }

    .btn-submit:hover {
        background: var(--primary-hover);
        box-shadow: 0 6px 20px rgba(0, 102, 255, 0.22);
    }

    .btn-submit:active {
        transform: scale(0.99);
    }

    .btn-submit[disabled] {
        opacity: 0.8;
        cursor: not-allowed;
    }

    /* Responsive */
    @media (max-width: 1200px) {
        .brand-side {
            padding: 60px 48px;
        }

        .form-side {
            padding: 40px 48px;
        }

        .login-card {
            padding: 56px 44px;
        }
    }

    @media (max-width: 1024px) {
        .login-split-container {
            flex-direction: column;
        }

        .brand-side {
            width: 100%;
            padding: 60px 40px;
            border-right: none;
            border-bottom: 1px solid var(--border-light);
        }

        .brand-desc {
            max-width: 100%;
        }

        .features-list {
            margin-top: 24px;
        }

        .brand-illustration {
            display: none;
        }

        .form-side {
            width: 100%;
            padding: 60px 24px;
            min-height: auto;
        }

        .login-card {
            padding: 48px 32px;
            max-width: 540px;
        }
    }   

    @media (max-width: 640px) {

        .brand-side {
            padding: 40px 24px;
            padding-top: 100px;
        }

        .brand-title {
            font-size: 32px;
        }

        .form-side {
            padding: 30px 16px;
        }

        .login-card {
            border-radius: 16px;
            padding: 36px 20px;
        }

        .card-title {
            font-size: 26px;
        }
    }