/* ================================================================
   KLS Auth — Login / Reset / MFA screens
   Shares the same design-token palette as kls-modern.css
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --kls-auth-navy: #0b1a30;
    --kls-auth-blue: #175cd3;
    --kls-auth-blue-hover: #154fb8;
    --kls-auth-gold: #fdb022;
    --kls-auth-ink: #101828;
    --kls-auth-muted: #475467;
    --kls-auth-border: #eaecf0;
    --kls-auth-soft-border: #f2f4f7;
    --kls-auth-bg: #f8f9fc;
    --kls-auth-surface: #ffffff;
    --kls-auth-input-border: #d0d5dd;
    --kls-auth-focus-ring: rgba(23, 92, 211, 0.18);
    --kls-auth-danger: #d92d20;
    --kls-auth-success: #027a48;
    --kls-auth-radius: 12px;
    --kls-auth-radius-sm: 8px;
}

/* ── Shell & background ─────────────────────────────────────────── */
html,
body.kls-auth-shell {
    min-height: 100%;
    margin: 0;
    background: var(--kls-auth-bg);
    color: var(--kls-auth-ink);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.kls-auth-shell .page-container,
.kls-auth-shell .page-content,
.kls-auth-shell .content-wrapper,
.kls-auth-shell .content {
    min-height: 100vh;
    background: var(--kls-auth-bg);
}

.kls-auth-shell .content {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

/* ── Auth Card ──────────────────────────────────────────────────── */
.kls-auth-shell .login-form.kls-auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0;
    padding: 36px 32px;
    border: 1px solid var(--kls-auth-border);
    border-radius: var(--kls-auth-radius);
    background: var(--kls-auth-surface);
    box-shadow:
        0 1px 3px rgba(16, 24, 40, 0.06),
        0 12px 32px -4px rgba(16, 24, 40, 0.08);
}

/* ── Brand block (logo + name) ──────────────────────────────────── */
.kls-auth-shell .kls-auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.kls-auth-shell .kls-auth-brand img {
    width: 44px;
    height: 44px;
    padding: 2px;
    border: 1px solid var(--kls-auth-border);
    border-radius: var(--kls-auth-radius-sm);
    background: var(--kls-auth-surface);
    object-fit: cover;
}

.kls-auth-shell .kls-auth-brand h1 {
    margin: 0;
    color: var(--kls-auth-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.kls-auth-shell .kls-auth-brand p {
    margin: 3px 0 0;
    color: var(--kls-auth-muted);
    font-size: 13px;
    font-weight: 400;
}

/* ── Title block ────────────────────────────────────────────────── */
.kls-auth-shell .kls-auth-title {
    margin-bottom: 22px;
}

.kls-auth-shell .kls-auth-title h2 {
    margin: 0;
    color: var(--kls-auth-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.kls-auth-shell .kls-auth-title p {
    margin: 6px 0 0;
    color: var(--kls-auth-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

/* ── Form controls ──────────────────────────────────────────────── */
.kls-auth-shell .form-group {
    margin-bottom: 16px;
}

.kls-auth-shell label {
    color: var(--kls-auth-ink);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.kls-auth-shell .form-control {
    height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--kls-auth-input-border);
    border-radius: var(--kls-auth-radius-sm);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    color: var(--kls-auth-ink);
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kls-auth-shell .form-control::placeholder {
    color: #98a2b3;
    font-weight: 400;
}

.kls-auth-shell .form-control:focus {
    border-color: var(--kls-auth-blue);
    box-shadow: 0 0 0 3px var(--kls-auth-focus-ring), 0 1px 2px rgba(16, 24, 40, 0.05);
    outline: none;
}

.kls-auth-shell .form-control-feedback {
    top: 2px;
    color: #98a2b3;
}

/* ── Has-feedback left icon offset ──────────────────────────────── */
.kls-auth-shell .has-feedback-left .form-control {
    padding-left: 40px;
}

/* ── Checkboxes & options row ───────────────────────────────────── */
.kls-auth-shell .checkbox-inline,
.kls-auth-shell .login-options,
.kls-auth-shell .login-options a {
    color: var(--kls-auth-muted);
    font-size: 13px;
    font-weight: 500;
}

.kls-auth-shell .login-options a:hover {
    color: var(--kls-auth-blue);
}

/* ── Links ──────────────────────────────────────────────────────── */
.kls-auth-shell a {
    color: var(--kls-auth-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.kls-auth-shell a:hover {
    color: var(--kls-auth-blue-hover);
}

/* ── Buttons ────────────────────────────────────────────────────── */
.kls-auth-shell .btn {
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--kls-auth-radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.kls-auth-shell .btn:active {
    transform: translateY(1px);
}

/* Primary / submit */
.kls-auth-shell .btn.bg-pink-400,
.kls-auth-shell .btn-primary,
.kls-auth-shell .kls-auth-primary {
    border-color: var(--kls-auth-blue) !important;
    background-color: var(--kls-auth-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.kls-auth-shell .btn.bg-pink-400:hover,
.kls-auth-shell .btn-primary:hover,
.kls-auth-shell .kls-auth-primary:hover {
    background-color: var(--kls-auth-blue-hover) !important;
    box-shadow: 0 2px 6px rgba(23, 92, 211, 0.2);
}

/* Secondary / back */
.kls-auth-shell .btn-default {
    border-color: var(--kls-auth-border);
    background: var(--kls-auth-surface);
    color: var(--kls-auth-ink);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.kls-auth-shell .btn-default:hover {
    background: var(--kls-auth-soft-border);
}

/* ── Alerts ─────────────────────────────────────────────────────── */
.kls-auth-shell .alert {
    border-radius: var(--kls-auth-radius-sm);
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
}

.kls-auth-shell .alert ul {
    margin-bottom: 0;
    padding-left: 18px;
}

.kls-auth-shell .alert-danger {
    background: #fef3f2;
    border-color: #fecdca;
    color: var(--kls-auth-danger);
}

.kls-auth-shell .alert-success {
    background: #ecfdf3;
    border-color: #abefc6;
    color: var(--kls-auth-success);
}

/* ── Divider ────────────────────────────────────────────────────── */
.kls-auth-shell .content-divider {
    margin: 22px 0 16px;
    border-top-color: var(--kls-auth-border);
}

.kls-auth-shell .kls-auth-secondary-action {
    margin-top: 12px;
}

/* ── OTP grid (MFA verify) ──────────────────────────────────────── */
.kls-auth-shell .kls-otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.kls-auth-shell .kls-otp-input {
    width: 100%;
    height: 52px;
    padding: 0;
    border: 1px solid var(--kls-auth-input-border);
    border-radius: var(--kls-auth-radius-sm);
    background: var(--kls-auth-surface);
    color: var(--kls-auth-ink);
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 52px;
    text-align: center;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kls-auth-shell .kls-otp-input:focus {
    border-color: var(--kls-auth-blue);
    outline: 0;
    box-shadow: 0 0 0 3px var(--kls-auth-focus-ring), 0 1px 2px rgba(16, 24, 40, 0.05);
}

/* ── Helper note text ───────────────────────────────────────────── */
.kls-auth-shell .kls-auth-note {
    margin: -4px 0 18px;
    color: var(--kls-auth-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ── Footer / powered-by ────────────────────────────────────────── */
.kls-auth-shell .kls-auth-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--kls-auth-muted);
    font-size: 12px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .kls-auth-shell .content {
        align-items: flex-start;
        padding-top: 24px;
    }

    .kls-auth-shell .login-form.kls-auth-card {
        padding: 24px 20px;
        border-radius: var(--kls-auth-radius-sm);
        box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
    }

    .kls-auth-shell .kls-auth-title h2 {
        font-size: 20px;
    }

    .kls-auth-shell .kls-otp-grid {
        gap: 6px;
    }

    .kls-auth-shell .kls-otp-input {
        height: 46px;
        font-size: 18px;
        line-height: 46px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .kls-auth-shell .content {
        padding: 32px 24px;
    }
}
