/* ============================================
   SwiftAuth — Auth Pages (Login / Register)
   ============================================ */

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

:root {
    --bg: #0B0F1A;
    --surface: #111827;
    --border: #1A2332;
    --border-light: #243044;
    --teal: #00E5A0;
    --blue: #00A3FF;
    --text: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #506878;
    --glow-teal: rgba(0, 229, 160, 0.15);
    --danger: #EF4444;
    --radius: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* --- Auth Container --- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--teal), var(--blue));
    border-radius: 16px 16px 0 0;
}

/* --- Header --- */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    text-decoration: none;
    color: inherit;
    margin-bottom: 24px;
}

.logo-swift { font-weight: 300; }
.logo-auth { font-weight: 800; }

.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* --- Alert --- */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

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

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
}

.alert-success {
    background: rgba(0, 229, 160, 0.1);
    border: 1px solid rgba(0, 229, 160, 0.2);
    color: #6EE7B7;
}

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

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--glow-teal);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* --- Button --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal), var(--blue));
    color: #0B0F1A;
    box-shadow: 0 0 24px rgba(0, 229, 160, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 0 40px rgba(0, 229, 160, 0.35);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* --- Footer --- */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* --- 2FA Toggle --- */
.two-factor-toggle {
    display: block;
    margin: 16px auto 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.two-factor-toggle:hover {
    color: var(--teal);
}

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