/* auth.css — shared by links/register.php and links/login.php.
   Adapted from login.css's card/input styling for visual consistency with the rest of
   the app's auth surfaces, with room for a two-column form (register has more fields). */
:root {
    --bg: #050b14;
    --card: rgba(13, 22, 39, 0.6);
    --card-hover: rgba(19, 31, 55, 0.8);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: rgba(255,255,255,0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

body {
    background-color: var(--bg);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.08), transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.08), transparent 35%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 35px 35px, 35px 35px;
    background-attachment: fixed;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
    box-sizing: border-box;
}

body::before {
    content: '';
    position: fixed;
    top: 50%; left: 50%;
    width: 800px; height: 800px;
    background: var(--accent);
    filter: blur(250px);
    opacity: 0.15;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.auth-container {
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 50px 40px;
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    text-align: center;
    z-index: 1;
    position: relative;
}

.brand-logo {
    margin: 0 auto 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px; height: 70px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.2);
    color: var(--accent);
    font-size: 1.8rem;
}

h2 { margin: 0 0 10px; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; }
p { color: var(--text-muted); margin: 0 0 30px; font-size: 0.95rem; font-weight: 600; }

.form-group { margin-bottom: 22px; text-align: left; position: relative; width: 100%; }
html[dir="rtl"] .form-group { text-align: right; }

label { display: block; color: var(--text-muted); font-size: 0.8rem; font-weight: 800; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

.input-icon-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.input-icon-wrapper > i.left-icon { position: absolute; left: 18px; color: var(--text-muted); font-size: 1.1rem; pointer-events: none; }
html[dir="rtl"] .input-icon-wrapper > i.left-icon { left: auto; right: 18px; }

.form-control {
    width: 100%;
    background: rgba(0,0,0,0.3);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 45px 16px 48px;
    box-sizing: border-box;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    transition: 0.3s;
    outline: none;
}
html[dir="rtl"] .form-control { padding: 16px 48px 16px 45px; }
.form-control:hover { border-color: rgba(139, 92, 246, 0.3); }
.form-control:focus { background: rgba(0,0,0,0.5); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15); }

.form-text { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; font-weight: 600; text-align: left; }
html[dir="rtl"] .form-text { text-align: right; }

.toggle-password-btn { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; outline: none; font-size: 1.1rem; border-radius: 6px; }
html[dir="rtl"] .toggle-password-btn { right: auto; left: 14px; }
.toggle-password-btn:hover { color: var(--text-main); background: rgba(255,255,255,0.1); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: var(--text-main);
    padding: 18px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    font-size: 1.05rem;
    width: 100%;
    margin-top: 10px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 30px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 15px 40px rgba(139, 92, 246, 0.6); filter: brightness(1.1); }

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px dashed rgba(239, 68, 68, 0.3);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    line-height: 1.4;
}
html[dir="rtl"] .alert-error { text-align: right; }

.auth-switch { margin: 25px 0 0; font-size: 0.9rem; }
.auth-switch a { color: var(--accent); font-weight: 800; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.back-home-btn {
    position: absolute;
    top: 30px; left: 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 12px;
    transition: 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10;
}
html[dir="rtl"] .back-home-btn { left: auto; right: 40px; }
.back-home-btn:hover { color: var(--text-main); background: var(--card-hover); border-color: rgba(139, 92, 246, 0.4); }

.aam-links-lang-switch {
    position: absolute;
    top: 30px; right: 40px;
    display: flex;
    gap: 6px;
    z-index: 10;
}
html[dir="rtl"] .aam-links-lang-switch { right: auto; left: 40px; }
.aam-links-lang-switch a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 8px;
}
.aam-links-lang-switch a.active { color: var(--accent); border-color: rgba(139, 92, 246, 0.4); }

@media (max-width: 600px) {
    body {
        flex-direction: column;
        gap: 15px;
    }
    .back-home-btn, .aam-links-lang-switch { position: static; margin-bottom: 0; }
    .aam-links-lang-switch { justify-content: center; }
    .auth-container { padding: 40px 25px; }
}
