/* ========== login.css ========== */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #475569;
    --radius: 0.75rem;
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 30%),
        radial-gradient(circle at 90% 80%, rgba(22, 163, 74, 0.1) 0%, transparent 30%);
}

.login-wrapper {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--success));
}

.icon-wrapper i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 1rem;
    border-radius: 50%;
    display: inline-block;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: var(--radius) !important;
    padding: 0.875rem 1.25rem !important;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
    background: rgba(37, 99, 235, 0.1) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    border: none !important;
    padding: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: var(--radius) !important;
    transition: var(--transition) !important;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-muted-custom {
    color: var(--text-secondary) !important;
}

.form-check-input {
    accent-color: var(--primary);
}

.spinner {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

.hidden { display: none !important; }

/* Security badges */
.security-badge {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(22, 163, 74, 0.2);
    border: 1px solid rgba(22, 163, 74, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--success);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.security-badge.warning { background: rgba(245,158,11,0.2); border-color: rgba(245,158,11,0.3); color: var(--warning); }
.security-badge.insecure { background: rgba(220,38,38,0.2); border-color: rgba(220,38,38,0.3); color: var(--danger); }

.fingerprint-badge {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 20px;
    font-size: 0.7rem;
    color: #38bdf8;
    backdrop-filter: blur(5px);
    cursor: help;
    transition: var(--transition);
}
.fingerprint-badge:hover {
    background: rgba(14, 165, 233, 0.25);
    transform: translateY(-2px);
}

/* Alert box */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: none;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid transparent;
    animation: slideIn 0.3s ease;
}
.alert.show { display: flex; }
.alert-danger { background: rgba(239, 68, 68, 0.1); border-color: var(--danger); color: #fca5a5; }
.alert-success { background: rgba(34, 197, 94, 0.1); border-color: var(--success); color: #86efac; }
.alert-warning { background: rgba(245, 158, 11, 0.1); border-color: var(--warning); color: #fde68a; }
.alert-info { background: rgba(14, 165, 233, 0.1); border-color: #0ea5e9; color: #7dd3fc; }

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

/* Theme switcher */
.theme-switch {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 10000;
}
.theme-select {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    body { padding: 10px; }
    .login-card { padding: 2rem 1.5rem; }
    .security-badge { top: 5px; right: 5px; padding: 4px 8px; font-size: 0.7rem; }
    .fingerprint-badge { bottom: 5px; right: 5px; padding: 2px 8px; font-size: 0.6rem; }
}
