/*
 * GDK Digital - Shared CSS for auth pages.
 *
 * Used by: login.html, register.html, forgot-password.html, reset-password.html,
 * verify-email.html, resend-verification.html.
 *
 * Created 2026-05-13 (BATCH 14 of autonomous fix sprint, T-048). Pages should
 * load this BEFORE their page-specific style block, so that page-specific
 * overrides win. Per-page inline CSS can then be reduced to only the bits that
 * actually differ.
 *
 * Tokens align with website/css/style.css design system.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container,
.login-container,
.container {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.logo {
    text-align: center;
    margin-bottom: 32px;
}
.logo h1 {
    color: #f8fafc;
    font-size: 24px;
    font-weight: 600;
}
.logo span { color: #3b82f6; }

.subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-top: 8px;
}

.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

label {
    display: block;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}
label .optional {
    color: #64748b;
    font-weight: 400;
}

input {
    width: 100%;
    padding: 12px 16px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #f8fafc;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus {
    outline: none;
    border-color: var(--product-color, #3b82f6);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--product-color, #3b82f6) 20%, transparent);
}
input::placeholder { color: #64748b; }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 48px; }

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.toggle-password:hover { color: #94a3b8; }
.toggle-password:focus {
    outline: none;
    color: var(--product-color, #3b82f6);
}

.btn {
    width: 100%;
    padding: 14px;
    background: var(--product-color, #3b82f6);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover {
    background: color-mix(in srgb, var(--product-color, #3b82f6) 85%, black);
}
.btn:disabled {
    background: #475569;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
}
.btn-secondary:hover {
    background: #334155;
    color: #f8fafc;
}

.message,
.error {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}
.message.error,
.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #fca5a5;
}
.message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #86efac;
}
.message.show,
.error.show { display: block; }

.links {
    text-align: center;
    margin-top: 24px;
    color: #94a3b8;
    font-size: 14px;
}
.links a {
    color: #3b82f6;
    text-decoration: none;
}
.links a:hover { text-decoration: underline; }

.password-requirements {
    color: #64748b;
    font-size: 12px;
    margin-top: 8px;
}
.password-requirements li {
    margin-left: 16px;
    margin-bottom: 4px;
}

.terms {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 16px;
    text-align: center;
}
.terms a {
    color: #3b82f6;
    text-decoration: none;
}
.terms a:hover { text-decoration: underline; }

.description {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.remember-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    cursor: pointer;
}
.remember-row input[type="checkbox"] { width: auto; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    width: 64px;
    height: 64px;
    border: 4px solid #334155;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 24px;
}
