/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:        #1a2744;
    --navy-light:  #1e3059;
    --blue:        #2563eb;
    --blue-hover:  #1d4ed8;
    --blue-light:  #eff6ff;
    --text:        #111827;
    --text-muted:  #6b7280;
    --border:      #e5e7eb;
    --error-bg:    #fef2f2;
    --error-text:  #dc2626;
    --error-border:#fecaca;
    --success-bg:  #f0fdf4;
    --success-text:#16a34a;
    --success-bdr: #bbf7d0;
    --radius:      10px;
    --shadow:      0 4px 24px rgba(0,0,0,.08);
}

html { font-size: 16px; }

body.auth-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f3f4f6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    color: var(--text);
    line-height: 1.5;
}

/* ─── Container ─────────────────────────────────────────────────────────────── */
.auth-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* ─── Brand ─────────────────────────────────────────────────────────────────── */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.auth-brand-icon {
    width: 44px;
    height: 44px;
    background: var(--navy);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.auth-brand-icon svg { width: 24px; height: 24px; }

.auth-brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
}

.auth-brand-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Headings ──────────────────────────────────────────────────────────────── */
.auth-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* ─── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border-color: var(--error-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: var(--success-bdr);
}

.alert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ─── Form ──────────────────────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label-link {
    font-weight: 400;
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
}

.form-label-link:hover { text-decoration: underline; }

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    background: #fff;
}

.form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

.form-input::placeholder { color: #9ca3af; }

/* ─── Password Wrapper ──────────────────────────────────────────────────────── */
.input-password-wrapper { position: relative; }

.input-password-wrapper .form-input { padding-right: 42px; }

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    line-height: 0;
}

.toggle-password svg { width: 18px; height: 18px; }
.toggle-password:hover { color: var(--text); }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
    padding: 11px 20px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.btn-primary:hover  { background: var(--navy-light); }
.btn-primary:active { transform: scale(.98); }
.btn-full { width: 100%; }

/* ─── Password Strength ─────────────────────────────────────────────────────── */
.strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width .3s, background .3s;
}

.strength-label {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* ─── Policy Box ────────────────────────────────────────────────────────────── */
.policy-box {
    background: var(--blue-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 6px;
}

.policy-box strong { display: block; margin-bottom: 6px; }
.policy-box ul { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.policy-box ul li::before { content: "✓ "; }

/* ─── Links ─────────────────────────────────────────────────────────────────── */
.auth-links {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
}

.auth-links a { color: var(--blue); text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.auth-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .auth-card { padding: 28px 20px; }
    .auth-title { font-size: 20px; }
}
