/* ─────────────────────────────────────────────────────────────────────────────
   Auth Layout
   ───────────────────────────────────────────────────────────────────────────── */

.auth-body {
    min-height: 100vh;
    background: linear-gradient(160deg, #0c1e33 0%, #1a3a5c 55%, #1d4a72 100%);
    display: flex;
    flex-direction: column;
}

.auth-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.auth-brand-bar {
    padding: 20px 32px;
    flex-shrink: 0;
}

.auth-brand-logo {
    font-size: 21px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    opacity: 0.9;
}
.auth-brand-logo:hover { color: #fff; opacity: 1; }
.auth-brand-logo i { font-size: 19px; }

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.auth-footer {
    flex-shrink: 0;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.auth-footer-inner {
    padding: 14px 32px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
}

/* ── Card ──────────────────────────────────────────────────────────────────── */

.auth-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.12);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.auth-card-top {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid #f0f0f5;
}

.auth-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1a3a5c, #2d6ea8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 26px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(26,58,92,0.35);
}

.auth-card-icon.danger {
    background: linear-gradient(135deg, #842029, #dc3545);
    box-shadow: 0 4px 16px rgba(220,53,69,0.35);
}

.auth-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.auth-card-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0;
    line-height: 1.5;
}

.auth-card-body {
    padding: 28px 32px 32px;
}

/* ── Form fields ───────────────────────────────────────────────────────────── */

.auth-form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .form-control {
    padding-right: 44px;
}

.auth-input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
    font-size: 15px;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}
.auth-input-icon:hover { color: #555; }

.auth-btn-primary {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #1a3a5c, #2d6ea8);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.auth-btn-primary:hover { opacity: 0.9; color: #fff; }
.auth-btn-primary:active { transform: scale(0.99); }

.auth-btn-danger {
    width: 100%;
    padding: 11px;
    font-size: 14px;
    font-weight: 600;
    background: linear-gradient(135deg, #842029, #dc3545);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.auth-btn-danger:hover { opacity: 0.9; color: #fff; }

.auth-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #1a3a5c;
    text-decoration: none;
    margin-top: 10px;
}
.auth-link:hover { color: #2d6ea8; text-decoration: underline; }

/* ── 2FA code inputs ───────────────────────────────────────────────────────── */

.auth-code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
}

.auth-code-input {
    width: 52px;
    height: 62px;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
    background: #fafafa;
}
.auth-code-input:focus {
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26,58,92,0.15);
    background: #fff;
}
.auth-code-input.filled {
    border-color: #28a745;
    background: #f0faf3;
    color: #155724;
}

/* ── Password strength ─────────────────────────────────────────────────────── */

.auth-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #eee;
    margin: 6px 0 4px;
    overflow: hidden;
}
.auth-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    width: 0;
}
.auth-strength-text {
    font-size: 11.5px;
    font-weight: 600;
    min-height: 16px;
    display: block;
}

/* ── Validation summary ────────────────────────────────────────────────────── */

.auth-validation {
    background: #fff3f3;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #842029;
}
.auth-validation ul {
    margin: 0;
    padding-left: 18px;
}

/* ── Dark mode ─────────────────────────────────────────────────────────────── */

[data-theme="dark"] .auth-body {
    background: linear-gradient(160deg, #060e18 0%, #0d1e30 55%, #102338 100%);
}

[data-theme="dark"] .auth-card {
    background: #1e1e2e;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.3);
}

[data-theme="dark"] .auth-card-top {
    border-color: #2d2d4e;
}

[data-theme="dark"] .auth-card-title { color: #e0e0e0; }
[data-theme="dark"] .auth-card-subtitle { color: #7a7a9a; }
[data-theme="dark"] .auth-form-label { color: #a0a0c0; }

[data-theme="dark"] .auth-card-body .form-control {
    background-color: #252535;
    border-color: #3d3d5e;
    color: #e0e0e0;
}
[data-theme="dark"] .auth-card-body .form-control::placeholder { color: #5a5a7a; }
[data-theme="dark"] .auth-card-body .form-control:focus {
    background-color: #2a2a40;
    border-color: #5a7abf;
    color: #e0e0e0;
    box-shadow: 0 0 0 0.25rem rgba(90,122,191,0.2);
}

[data-theme="dark"] .auth-code-input {
    background: #252535;
    border-color: #3d3d5e;
    color: #e0e0e0;
}
[data-theme="dark"] .auth-code-input:focus {
    border-color: #5a7abf;
    background: #2a2a40;
    box-shadow: 0 0 0 3px rgba(90,122,191,0.2);
}
[data-theme="dark"] .auth-code-input.filled {
    border-color: #28a745;
    background: #1a2e20;
    color: #6ddb8a;
}

[data-theme="dark"] .auth-input-icon { color: #5a5a7a; }
[data-theme="dark"] .auth-input-icon:hover { color: #a0a0c0; }

[data-theme="dark"] .auth-link { color: #7aabf0; }
[data-theme="dark"] .auth-link:hover { color: #a0c4ff; }

[data-theme="dark"] .auth-validation {
    background: #2e1520;
    border-color: #5a2030;
    color: #f08090;
}

[data-theme="dark"] .auth-strength-bar { background: #2d2d4e; }
