/* ─── login.css ──────────────────────────────────────────────────────────── */

.login-main {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 480px 1fr;
}

/* ── Brand panel ──────────────────────────────────────────────────────────── */
.login-brand {
    position: relative;
    background: linear-gradient(155deg, var(--teal) 0%, var(--teal-xl) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

.login-brand-inner {
    position: relative;
    z-index: 2;
}

.login-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 48px;
}
.login-brand-logo img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,.15);
}
.login-brand-logo span {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.4px;
}

.login-brand-headline {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -.6px;
}

.login-brand-sub {
    font-size: 15px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 320px;
}

.login-brand-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lb-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--r);
    padding: 14px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.lb-card svg {
    width: 18px;
    height: 18px;
    opacity: .85;
    flex-shrink: 0;
}

/* Orbs */
.lb-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}
.lb-orb-1 {
    width: 320px; height: 320px;
    background: rgba(217,112,61,.28);
    top: -60px; right: -80px;
}
.lb-orb-2 {
    width: 260px; height: 260px;
    background: rgba(255,255,255,.08);
    bottom: -60px; left: -60px;
}

/* ── Form panel ───────────────────────────────────────────────────────────── */
.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    background: var(--bg);
    overflow-y: auto;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
}
.login-mobile-logo img { width: 36px; height: 36px; border-radius: 8px; }
.login-mobile-logo span { font-size: 20px; font-weight: 700; color: var(--text); }

.login-heading {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.5px;
    margin-bottom: 6px;
}
.login-sub {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 32px;
}

/* Alert boxes */
.login-alert {
    display: none;
    align-items: center;
    gap: 10px;
    border-radius: var(--r);
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.login-alert.is-visible { display: flex; }
.login-alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-alert--error {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #DC2626;
}
.login-alert--success {
    background: #F0FDF4;
    border: 1px solid #86EFAC;
    color: #16A34A;
}

/* Google button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 24px;
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
    margin-bottom: 24px;
}
.btn-google:hover {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(46,124,133,.12);
}
.btn-google:disabled { opacity: .6; cursor: not-allowed; }

/* Divider */
.login-divider {
    position: relative;
    text-align: center;
    margin-bottom: 24px;
}
.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0; right: 0;
    height: 1px;
    background: var(--border);
}
.login-divider span {
    position: relative;
    background: var(--bg);
    padding: 0 14px;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Form fields */
.form-field {
    margin-bottom: 18px;
}
.form-field label,
.field-label-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}
.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
}
.forgot-link {
    font-size: 12px;
    color: var(--teal);
    font-weight: 500;
    text-decoration: none;
    transition: opacity var(--t);
}
.forgot-link:hover { opacity: .75; }

.form-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.form-field input::placeholder { color: var(--muted); opacity: .7; }
.form-field input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(46,124,133,.12);
}

/* Password wrapper */
.pass-wrap {
    position: relative;
}
.pass-wrap input { padding-inline-end: 48px; }
.pass-toggle {
    position: absolute;
    inset-inline-end: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
}
.pass-toggle:hover { color: var(--teal); }
.pass-toggle svg { width: 18px; height: 18px; }

/* Spinner (shared by submit + google buttons) */
.btn-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
.btn-google .btn-spinner {
    border-color: rgba(0,0,0,.15);
    border-top-color: var(--teal);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Submit */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: var(--r);
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background var(--t) var(--ease), transform var(--t) var(--ease),
                box-shadow var(--t) var(--ease);
    margin-top: 8px;
    margin-bottom: 24px;
}
.btn-submit:hover:not(:disabled) {
    background: var(--teal-d);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46,124,133,.3);
}
.btn-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Footer note */
.login-footer-note {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}
.login-footer-note a {
    color: var(--teal);
    font-weight: 600;
    margin-inline-start: 4px;
    text-decoration: none;
}
.login-footer-note a:hover { text-decoration: underline; }

/* Lang toggle */
.login-lang {
    text-align: center;
    margin-top: 20px;
}
.login-lang a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 16px;
    transition: color var(--t), border-color var(--t);
}
.login-lang a:hover { color: var(--teal); border-color: var(--teal); }

/* ── RTL ──────────────────────────────────────────────────────────────────── */
[dir="rtl"] .login-brand-headline { letter-spacing: 0; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .login-main { grid-template-columns: 1fr; }
    .login-brand { display: none; }
    .login-mobile-logo { display: flex; }
    .login-panel { padding: 48px 24px; min-height: 100dvh; }
    .login-box { max-width: 100%; }
}
