/* ============================================
   SmartWebApi - Authentication Pages
   ============================================ */

:root {
    --bg-primary: #0a0a14;
    --bg-card: #1a1a2e;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent: #a78bfa;
    --accent-hover: #8b5cf6;
    --gradient-1: linear-gradient(135deg, #a78bfa 0%, #ec4899 50%, #fb923c 100%);
    --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

.auth-body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    overflow: hidden;
    position: relative;
}

.auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: #a78bfa;
    top: -200px;
    right: -100px;
    animation: float 25s infinite ease-in-out;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -150px;
    left: -100px;
    animation: float 30s infinite ease-in-out reverse;
}

@@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(60px, -60px); }
}

.auth-container {
    width: 100%;
    max-width: 480px;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.6s ease;
}

@@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    display: inline-flex;
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: 16px;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.6rem;
    box-shadow: 0 10px 30px rgba(167, 139, 250, 0.4);
}

.auth-brand-text {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    margin-top: 0.8rem;
    color: var(--text-primary);
}

.text-accent { color: var(--accent) !important; }

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-floating-modern {
    margin-bottom: 1.2rem;
}

.form-floating-modern label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-floating-modern label i {
    color: var(--accent);
    margin-left: 0.3rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    transition: all 0.2s;
    font-family: 'Cairo', sans-serif;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder { color: var(--text-muted); opacity: 0.5; }

.password-toggle {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}

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

.form-check-input {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-label { color: var(--text-secondary); }

.link-modern {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.link-modern:hover { color: var(--accent-hover); }

.btn-auth-primary {
    background: var(--gradient-1);
    border: none;
    color: white;
    font-weight: 700;
    padding: 0.85rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(167, 139, 250, 0.3);
    cursor: pointer;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(167, 139, 250, 0.5);
    color: white;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: var(--bg-card);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
}

.demo-credentials {
    background: rgba(167, 139, 250, 0.08);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.credential-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
}

.credential-row code {
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    flex: 1;
    font-family: 'Space Grotesk', monospace;
}

.btn-fill {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-fill:hover { background: var(--accent); color: white; border-color: var(--accent); }

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

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 10px;
    padding: 0.8rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.text-danger { color: #fca5a5 !important; }
