/**
 * auth-pages.css — Auth Flow Page Styles
 * ============================================================
 * Shared styles for: forgot_password, reset_password, change_password.
 * Single centered card layout with gradient background.
 * Depends on: 1-tokens.css (must be loaded first)
 * Dark mode: uses --color-surface and --color-* tokens
 * ============================================================
 */

/* --------------------------------------------------------
 * BODY — gradient background (same feel as login)
 * -------------------------------------------------------- */
body {
    font-family: var(--font-family-base, 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif);
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

/* --------------------------------------------------------
 * AUTH CARD
 * -------------------------------------------------------- */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 100%;
}

.card-header {
    background: var(--gradient-primary);
    color: var(--color-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0 !important;
    padding: 28px;
    text-align: center;
    border: none;
}

.card-header i {
    font-size: 40px;
    display: block;
    margin-bottom: var(--space-4);
}

.card-header h4 {
    margin: 0;
    font-weight: var(--font-bold);
    font-size: var(--text-4xl);
}

.card-header p {
    margin: var(--space-2) 0 0;
    font-size: var(--text-md);
    opacity: 0.85;
}

.card-body {
    padding: 28px;
    background: var(--color-surface);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* --------------------------------------------------------
 * FORM CONTROLS
 * -------------------------------------------------------- */
.form-label {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

.form-control {
    border-radius: var(--radius-lg);
    padding: 11px var(--space-6);
    border: 2px solid var(--border-color);
    font-size: var(--text-base);
    transition: var(--transition-base);
}

.form-control:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.input-group-text {
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text-secondary);
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* --------------------------------------------------------
 * SUBMIT BUTTON
 * -------------------------------------------------------- */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    padding: 12px var(--space-9);
    font-weight: var(--font-semibold);
    transition: var(--transition-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
    background: var(--gradient-primary);
}

/* --------------------------------------------------------
 * ALERTS
 * -------------------------------------------------------- */
.alert {
    border-radius: var(--radius-lg);
    font-size: var(--text-lg);
}

/* --------------------------------------------------------
 * BACK LINK
 * -------------------------------------------------------- */
.back-link {
    text-align: center;
    margin-top: var(--space-7);
    font-size: var(--text-md);
}

.back-link a {
    color: var(--color-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
    transition: var(--transition-fast);
}

.back-link a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------
 * CARD HEADER LOGO
 * -------------------------------------------------------- */
.card-header .logo {
    max-height: 56px;
    max-width: 160px;
    margin: 0 auto var(--space-4);
    display: block;
}

/* --------------------------------------------------------
 * PASSWORD STRENGTH BAR
 * -------------------------------------------------------- */
.strength-bar {
    height: 5px;
    border-radius: 3px;
    background: var(--border-color);
    margin-top: var(--space-2);
    overflow: hidden;
}

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

.strength-label {
    font-size: var(--text-2xs);
    color: var(--color-gray-400);
    margin-top: 2px;
}

/* --------------------------------------------------------
 * CODE INPUT — 6-digit reset code field
 * -------------------------------------------------------- */
.code-input {
    font-size: 28px;
    font-weight: var(--font-bold);
    letter-spacing: 10px;
    text-align: center;
}

/* --------------------------------------------------------
 * PASSWORD WRAPPER — input with show/hide toggle
 * -------------------------------------------------------- */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 40px;
}

.password-wrapper .toggle {
    position: absolute;
    right: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.password-wrapper .toggle:hover {
    color: var(--color-primary);
}

/* --------------------------------------------------------
 * DEV CREDIT
 * -------------------------------------------------------- */
.dev-credit {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.dev-credit strong {
    color: rgba(255, 255, 255, 0.9);
}
