/* ======= Modern Login Stylesheet ======= */
@import url('/fonts/fonts.css');

:root {
    --bg-darker: #09090b;
    --bg-dark: #121217;
    --bg-panel: #18181b;
    --bg-hover: #27272a;
    --bg-glass: rgba(24, 24, 27, 0.75);
    
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    
    --accent-primary: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --border-color: #27272a;
    --border-hover: #3f3f46;
}

/* ===== LIGHT THEME OVERRIDES ===== */
[data-theme="light"] {
    --bg-darker: #f8fafc;
    --bg-dark: #ffffff;
    --bg-panel: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.95);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
}

[data-theme="light"] body {
    background-color: var(--bg-darker);
    color: var(--text-primary);
}

[data-theme="light"] .login-container {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08), 0 2px 10px rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .input-wrapper input {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .input-wrapper input:focus {
    background-color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="light"] .input-wrapper i {
    color: #94a3b8;
}

[data-theme="light"] .theme-pill-btn {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #0f172a;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Dynamic background glows */
body::before {
    content: '';
    position: absolute;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: 15%;
    left: 20%;
    z-index: 0;
    filter: blur(50px);
    animation: floatGlow 12s ease-in-out infinite alternate;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(0, 0, 0, 0) 70%);
    bottom: 15%;
    right: 20%;
    z-index: 0;
    filter: blur(50px);
    animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -40px) scale(1.1); }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

.brand-logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.brand-logo-link:hover {
    transform: translateY(-2px);
    opacity: 0.95;
}

.brand-header .logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.brand-logo-link:hover .logo i {
    filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.9));
}

.brand-header .logo i {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

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

.form-group {
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

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

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background-color: rgba(9, 9, 11, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background-color: rgba(9, 9, 11, 0.9);
}

.input-wrapper input:focus + i,
.input-wrapper input:focus ~ i {
    color: var(--accent-primary);
}

.alert-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    display: none;
    align-items: center;
    gap: 8px;
    animation: shake 0.3s ease;
}

.alert-message.error {
    background-color: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-danger);
    display: flex;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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