/* ===== Shared Auth Pages (Login / Register / Verify Code / TOTP Setup) ===== */

:root {
    --auth-bg: #0b0f1a;
    --auth-card-bg: rgba(255,255,255,0.06);
    --auth-card-border: rgba(255,255,255,0.10);
    --auth-input-bg: rgba(255,255,255,0.07);
    --auth-input-border: rgba(255,255,255,0.15);
    --auth-input-focus: #4f8cff;
    --auth-accent: #4f8cff;
    --auth-accent2: #6366f1;
    --auth-text: #e2e8f0;
    --auth-muted: #94a3b8;
}

/* ---- Page ---- */
.auth-page {
    min-height: 100vh;
    background: var(--auth-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--auth-text);
    overflow-x: hidden;
}

/* ---- Animated gradient mesh (brand panel) ---- */
.auth-brand {
    background: linear-gradient(-45deg, #0d6efd, #6610f2, #0b0f1a, #1e3a5f);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    position: relative;
}
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.auth-brand .brand-logo {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}
.auth-brand .brand-logo i { margin-right: .5rem; }
.auth-brand .brand-tagline {
    color: rgba(255,255,255,.75);
    font-size: 1.05rem;
    margin-top: .25rem;
}
.auth-brand .brand-features {
    list-style: none;
    padding: 0;
    margin: 2.5rem 0 0;
}
.auth-brand .brand-features li {
    color: rgba(255,255,255,.85);
    padding: .6rem 0;
    font-size: .95rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.auth-brand .brand-features li i {
    color: var(--auth-accent);
    width: 20px;
    text-align: center;
}
.auth-brand .brand-trust {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .85rem;
    color: rgba(255,255,255,.5);
}

/* ---- Glass card (form side) ---- */
.auth-card-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background: var(--auth-bg);
}
.auth-card {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-card-border);
    border-radius: 16px;
    padding: 2.5rem;
    backdrop-filter: blur(12px);
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}
.auth-card .card-header-gradient {
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent2));
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    margin-bottom: 1.75rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.15rem;
}

/* ---- Inputs ---- */
.auth-card .form-label { font-weight: 600; font-size: .875rem; color: var(--auth-text); }
.auth-card .input-group { position: relative; }
.auth-card .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-muted);
    z-index: 2;
    pointer-events: none;
}
.auth-card .form-control,
.auth-card .form-select {
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    color: var(--auth-text);
    padding: .65rem .75rem .65rem 2.5rem;
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
    background: var(--auth-input-bg);
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(79,140,255,.18);
    color: var(--auth-text);
}
.auth-card .form-control::placeholder { color: var(--auth-muted); }
.auth-card .form-select option { background: #1e293b; color: var(--auth-text); }

/* no-icon inputs (password strength, etc.) */
.auth-card .form-control.no-icon,
.auth-card .form-select.no-icon { padding-left: .75rem; }

/* ---- Button ---- */
.auth-btn {
    display: block;
    width: 100%;
    padding: .75rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent2));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
}
.auth-btn:hover { opacity: .92; transform: translateY(-1px); }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---- Links ---- */
.auth-link { color: var(--auth-accent); text-decoration: none; }
.auth-link:hover { text-decoration: underline; color: #6ea8ff; }
.auth-muted { color: var(--auth-muted); }

/* ---- Alerts ---- */
.auth-card .alert { border-radius: 8px; font-size: .9rem; }
.auth-card .alert-danger { background: rgba(220,53,69,.15); border: 1px solid rgba(220,53,69,.3); color: #f87171; }
.auth-card .alert-info   { background: rgba(13,110,253,.12); border: 1px solid rgba(13,110,253,.25); color: #93c5fd; }
.auth-card .alert-success { background: rgba(25,135,84,.15); border: 1px solid rgba(25,135,84,.3); color: #6ee7b7; }

/* ---- Password strength bar ---- */
.pw-strength { height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); margin-top: .35rem; overflow: hidden; }
.pw-strength-bar { height: 100%; width: 0; border-radius: 2px; transition: width .3s, background .3s; }

/* ---- MFA digit inputs ---- */
.mfa-digits { display: flex; gap: .5rem; justify-content: center; margin-bottom: 1.5rem; }
.mfa-digits input {
    width: 3rem; height: 3.5rem;
    text-align: center; font-size: 1.5rem; font-weight: 700;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-input-border);
    border-radius: 8px;
    color: var(--auth-text);
    transition: border-color .2s;
}
.mfa-digits input:focus {
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(79,140,255,.18);
    outline: none;
}

/* ---- Two-column layout (lg+) ---- */
.auth-split { display: flex; min-height: 100vh; width: 100%; }
.auth-split .auth-brand { flex: 1; min-width: 0; }
.auth-split .auth-card-wrap { flex: 1; min-width: 0; }

/* ---- Mobile (< lg) ---- */
@media (max-width: 991.98px) {
    .auth-split { flex-direction: column; }
    .auth-brand {
        padding: 2rem 1.5rem 1.5rem;
        text-align: center;
    }
    .auth-brand .brand-features { display: none; }
    .auth-brand .brand-trust { display: none; }
    .auth-card-wrap { padding: 1.5rem; }
    .auth-card { padding: 1.75rem; }
}
