/* ============================================================
   VERAPTA TEAM — AUTH STYLES
   ============================================================ */

:root {
    --red: #dc2626;
    --red-dark: #b91c1c;
    --black: #000000;
    --white: #ffffff;
    --bg-main: #ffffff;
    --bg-alt: #f7f8fa;
    --text-heading: #111827;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
}

[data-theme="dark"] {
    --bg-main: #0a0a0a;
    --bg-alt: #161616;
    --text-heading: #f9fafb;
    --text-main: #d1d5db;
    --text-muted: #9ca3af;
    --border-color: #374151;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Auth layout */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
}

.auth-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.auth-card-wide {
    max-width: 600px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.auth-brand img {
    height: 32px;
    width: auto;
}

.auth-brand span {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--red);
}

.auth-2fa-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.auth-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Alerts */
.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.auth-alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

[data-theme="dark"] .auth-alert-danger {
    background: rgba(220,38,38,0.1);
    border-color: rgba(220,38,38,0.3);
    color: #fca5a5;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-alt);
    color: var(--text-main);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s ease;
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: var(--red);
}

.input-with-toggle {
    position: relative;
}

.input-with-toggle input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    font-size: 1rem;
}

.toggle-password:hover { opacity: 1; }

/* Checkbox */
.form-check { flex-direction: row; align-items: center; }

.check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.check-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--red);
}

/* Auth button */
.auth-btn {
    padding: 14px 24px;
    background: var(--red);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    text-align: center;
}

.auth-btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.auth-btn:disabled {
    background: #d1d5db;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.auth-footer a {
    color: var(--red);
    text-decoration: none;
    font-weight: 500;
}

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

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

.strength-bar.weak    { background: #ef4444; }
.strength-bar.fair    { background: #f59e0b; }
.strength-bar.good    { background: #3b82f6; }
.strength-bar.strong  { background: #10b981; }

.strength-label {
    font-size: 0.75rem;
    margin-top: 4px;
    font-weight: 600;
}

.strength-weak   { color: #ef4444; }
.strength-fair   { color: #f59e0b; }
.strength-good   { color: #3b82f6; }
.strength-strong { color: #10b981; }

/* Password rules */
.password-rules {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0;
}

.password-rules li { padding-left: 18px; position: relative; }
.password-rules li::before { content: '○'; position: absolute; left: 0; }

.rule-pass { color: #10b981; }
.rule-pass::before { content: '✓' !important; }
.rule-fail { color: #ef4444; }
.rule-fail::before { content: '×' !important; }

/* 2FA Setup */
.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1.5rem;
}

.setup-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-num {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--red);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.step-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.qr-wrapper {
    background: #ffffff;
    padding: 12px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.qr-code { display: block; width: 160px; height: 160px; }

.manual-key {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.manual-key code {
    display: block;
    margin-top: 4px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-heading);
    letter-spacing: 2px;
    word-break: break-all;
}

.backup-codes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.backup-code {
    padding: 8px 6px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: monospace;
    text-align: center;
    color: var(--text-heading);
    letter-spacing: 1px;
}

.btn-copy-codes {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn-copy-codes:hover {
    border-color: var(--red);
    color: var(--red);
}

/* Shared with main site */
#cursor-spotlight {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(
        350px circle at var(--x, 50%) var(--y, 50%),
        rgba(185,28,28,0.12) 0%,
        rgba(185,28,28,0.04) 40%,
        transparent 100%
    );
}

#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
    background: transparent;
}

.auth-body .auth-container { z-index: 10; }

@media (max-width: 480px) {
    .auth-card { padding: 1.75rem 1.25rem; }
    .backup-codes-grid { grid-template-columns: repeat(2, 1fr); }
    .setup-step { flex-direction: column; }
}