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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

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

.login-header img {
    height: 60px;
    margin-bottom: 1rem;
    object-fit: contain;
}

.login-header h1 {
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group .input-icon {
    position: relative;
}

.form-group .input-icon i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.form-group .input-icon input {
    padding-left: 2.5rem;
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: #1e3a8a;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
}

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

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

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

.alert {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #a00;
}

.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #060;
}

.alert-info {
    background-color: #eef;
    border: 1px solid #ccf;
    color: #006;
}

@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* ── Dark Mode Toggle Button ─────────────────────────────────────────────── */
.dark-mode-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #2563eb;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    z-index: 100;
}
.dark-mode-toggle:hover {
    background: #1d4ed8;
}

/* ── Dark Mode Overrides ─────────────────────────────────────────────────── */
body.dark-mode {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
}
body.dark-mode .login-container {
    background: #1e1e2e;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}
body.dark-mode .login-header h1 { color: #cdd6f4; }
body.dark-mode .login-header p  { color: #a6adc8; }
body.dark-mode .form-group label { color: #cdd6f4; }
body.dark-mode .form-group input {
    background: #313244;
    border-color: #45475a;
    color: #cdd6f4;
}
body.dark-mode .form-group input::placeholder { color: #6c7086; }
body.dark-mode .form-group input:focus { border-color: #2563eb; }
body.dark-mode .form-group .input-icon i { color: #6c7086; }
body.dark-mode .form-group input:disabled {
    background: #181825;
    color: #a6adc8;
}
body.dark-mode .alert-error   { background: #2d1b1b; border-color: #7f1d1d; color: #fca5a5; }
body.dark-mode .alert-success { background: #1a2e22; border-color: #14532d; color: #86efac; }
body.dark-mode .alert-info    { background: #1e2a3a; border-color: #1e40af; color: #93c5fd; }
body.dark-mode .dark-mode-toggle {
    background: rgba(30, 30, 46, 0.8);
    color: #cdd6f4;
    border: 1px solid #45475a;
}
body.dark-mode .dark-mode-toggle:hover { background: rgba(49, 50, 68, 0.9); }
