/* Optimized Admin Login CSS */
* {        
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow: hidden;
    transition: none;
    background: var(--bg-image) center center/cover no-repeat;
}

/* Light Mode Styles */
body.light-mode {
    background: var(--bg-image) center center/cover no-repeat;
}

body.light-mode .login-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

body.light-mode .form-label {
    color: #374151;
}

body.light-mode .form-input {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(16, 185, 129, 0.4);
    color: #1f2937;
}

body.light-mode .form-input::placeholder {
    color: #6b7280;
}

body.light-mode .form-input:focus {
    background: rgba(255, 255, 255, 1);
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

body.light-mode .input-icon {
    color: #9ca3af;
}

body.light-mode .form-input:focus + .input-icon {
    color: #10b981;
}

body.light-mode .password-toggle {
    color: #9ca3af;
}

body.light-mode .password-toggle:hover {
    color: #10b981;
}

body.light-mode .welcome-text {
    color: #1f2937;
}

body.light-mode .subwelcome-text {
    color: #6b7280;
}

body.light-mode .error-message {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #dc2626;
    border: 1px solid #fecaca;
}

body.light-mode .success-message {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

body.light-mode .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

body.light-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(16, 185, 129, 0.5);
}

/* Dark Mode Styles */
body.dark-mode {
    background: var(--bg-image) center center/cover no-repeat;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: none;
    font-size: 20px;
    color: white;
}

/* Background overlay */
.background-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.55);
}
body.light-mode .background-overlay {
    background: rgba(255, 255, 255, 0.5);
}

/* Dark Mode Theme Variables */
:root {
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(15, 15, 30, 0.95); /* Increased opacity */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #10b981;
    --input-bg: rgba(255, 255, 255, 0.05);
    --input-border: rgba(255, 255, 255, 0.2);
}

/* Login Container */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border-color);
}

.welcome-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subwelcome-text {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

/* Form Styles */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid var(--input-border);
    border-radius: 16px;
    font-size: 16px;
    font-weight: 500;
    background: var(--input-bg);
    color: var(--text-primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.form-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    width: 20px;
    height: 20px;
}

.form-input:focus + .input-icon {
    color: var(--accent-color);
}

.password-toggle {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 5px;
    font-size: 18px;
}

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

/* Login Button */
.login-button {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
}

.login-button.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Error Message */
.error-message {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Success Message */
.success-message {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}
