/* =====================================================
   SLP / SLT AUTH PAGES — shared styles
   File: slp_auth.css

   Used by slp_forgot_password.php, slp_register.php,
   slp_mfa_setup.php and slp_mfa_manage.php.
   Colour tokens come from slp_dashboard_colors.css; every
   var() below has a fallback so these pages still render
   if that file is missing.
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background:
        radial-gradient(ellipse 900px 500px at 50% -80px, rgba(29,158,117,0.10), transparent 58%),
        var(--bg-body, #f1f5f9);
    color: var(--text-primary, #1e293b);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.5;
}

/* ── Brand lockup ── */
.brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 26px;
}
.brand-mark {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-primary, #0B3D6B) 0%, var(--color-primary-dark, #072a4d) 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 26px rgba(11,61,107,0.28);
    flex-shrink: 0;
}
.brand-mark svg { color: #fff; }
.brand-word {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-primary, #0B3D6B);
    line-height: 1.15;
}
.brand-sub {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted, #94a3b8);
    margin-top: 3px;
}

/* ── Card ── */
.auth-card {
    width: 100%;
    max-width: 520px;
    background: var(--bg-section, #ffffff);
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 18px;
    padding: 36px 36px 30px;
    box-shadow: 0 18px 44px rgba(18,40,78,0.09), 0 2px 8px rgba(18,40,78,0.05);
}
.auth-card--wide { max-width: 640px; }

.card-icon {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: rgba(29,158,117,0.11);
    color: var(--color-secondary-dark, #0F6E56);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}
.card-icon--ok    { background: rgba(16,185,129,0.12); color: #047857; }
.card-icon--warn  { background: rgba(245,158,11,0.14); color: #92400e; }

h1.card-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-primary, #0B3D6B);
    margin-bottom: 11px;
}
h2.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-primary, #0B3D6B);
    margin: 26px 0 12px;
}
p.lead {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary, #64748b);
    margin-bottom: 24px;
}

/* ── Alerts ── */
.alert {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 20px;
}
.alert.show { display: flex; }
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-error   { background: rgba(239,68,68,0.09);  border: 1px solid rgba(239,68,68,0.35);  color: #991b1b; }
.alert-ok      { background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.35); color: #065f46; }
.alert-info    { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.28); color: #1e40af; }
.alert-warn    { background: rgba(245,158,11,0.10); border: 1px solid rgba(245,158,11,0.40); color: #92400e; }
.alert div + div { margin-top: 4px; }

/* ── Fields ── */
.field { margin-bottom: 17px; }
.field > label,
.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--text-primary, #1e293b);
    background: #fff;
    border: 1.5px solid var(--border-color, #e2e8f0);
    border-radius: 10px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted, #94a3b8); }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--color-secondary, #1D9E75);
    box-shadow: 0 0 0 3px rgba(29,158,117,0.15);
}
.field input:disabled { background: #f8fafc; color: var(--text-muted, #94a3b8); }
.field-hint {
    font-size: 12.5px;
    color: var(--text-secondary, #64748b);
    margin-top: 6px;
    line-height: 1.5;
}
.field-row { display: flex; gap: 14px; }
.field-row > .field { flex: 1; min-width: 0; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 50px;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: filter 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:disabled { opacity: 0.62; cursor: not-allowed; box-shadow: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary, #0B3D6B) 0%, var(--color-primary-dark, #072a4d) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(11,61,107,0.26);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11,61,107,0.32); }
.btn-teal {
    background: linear-gradient(135deg, var(--color-secondary, #1D9E75) 0%, var(--color-secondary-dark, #0F6E56) 100%);
    color: #fff;
    box-shadow: 0 6px 18px rgba(29,158,117,0.28);
}
.btn-teal:hover:not(:disabled) { filter: brightness(1.10); transform: translateY(-1px); }
.btn-quiet {
    background: var(--bg-card, #f8fafc);
    border: 1.5px solid var(--border-color, #e2e8f0);
    color: var(--text-secondary, #64748b);
}
.btn-quiet:hover:not(:disabled) { background: #eef2f7; color: var(--color-primary, #0B3D6B); }
.btn-danger {
    background: #fff;
    border: 1.5px solid rgba(239,68,68,0.55);
    color: #b91c1c;
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.07); }
.btn + .btn { margin-top: 10px; }
.btn:active:not(:disabled) { transform: scale(0.99); }

/* ── Panels / steps ── */
.panel {
    background: var(--bg-card, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
    font-size: 13.5px;
    line-height: 1.65;
}
.panel ol, .panel ul { margin: 0; padding-left: 20px; }
.panel li { margin-bottom: 8px; }
.panel li:last-child { margin-bottom: 0; }
.panel strong { font-weight: 700; color: var(--color-primary, #0B3D6B); }

.step { display: none; }
.step.active { display: block; animation: stepIn 0.25s ease-out; }
@keyframes stepIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    background: var(--bg-card, #f8fafc);
    border: 1px solid var(--border-color, #e2e8f0);
    margin-bottom: 22px;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-dot--on  { background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,0.16); }
.status-dot--off { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,0.16); }
.status-text { font-size: 14px; }
.status-text strong { display: block; font-weight: 700; color: var(--text-primary, #1e293b); }
.status-text span { color: var(--text-secondary, #64748b); font-size: 13px; }

/* ── QR + secret ── */
.qr-wrap {
    display: flex;
    justify-content: center;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 12px;
    margin-bottom: 18px;
}
.qr-wrap img { max-width: 240px; width: 100%; height: auto; border-radius: 8px; }
.secret-box {
    text-align: center;
    padding: 14px 16px;
    background: var(--bg-card, #f8fafc);
    border: 1px dashed var(--border-color, #cbd5e1);
    border-radius: 10px;
    margin-bottom: 20px;
}
.secret-box .secret-label {
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    margin-bottom: 6px;
}
.secret-box code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-primary, #0B3D6B);
    word-break: break-all;
}

/* 6-digit code input */
input.code-input {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    min-height: 62px;
    font-variant-numeric: tabular-nums;
}

/* ── Footer bits ── */
.card-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    font-size: 13.5px;
    color: var(--text-secondary, #64748b);
    line-height: 1.7;
}
.card-foot a,
.link-quiet {
    color: var(--color-secondary-dark, #0F6E56);
    font-weight: 600;
    text-decoration: none;
}
.card-foot a:hover,
.link-quiet:hover { color: var(--color-secondary, #1D9E75); text-decoration: underline; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-secondary-dark, #0F6E56);
    text-decoration: none;
}
.back-link:hover { color: var(--color-secondary, #1D9E75); text-decoration: underline; }

.page-legal {
    max-width: 520px;
    text-align: center;
    margin-top: 22px;
    font-size: 11px;
    line-height: 1.65;
    color: var(--text-muted, #94a3b8);
}

.spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
    .auth-card { padding: 28px 22px 24px; border-radius: 14px; }
    h1.card-title { font-size: 21px; }
    .field-row { flex-direction: column; gap: 0; }
}