/* ===== ADMIN LOGIN STYLES ===== */

/* Base and Variables */
:root {
    --primary-dark: #071a27;
    --primary-blue: #0e6b88;
    --accent-teal: #66d0e8;
    --accent-light: #8fe6ff;
    --text-light: #f6ded4;
    --text-lighter: #eaf6ff;
    --text-muted: #a8c5d6;
    --danger-red: #dc3545;
    --bg-input: rgba(0, 0, 0, 0.2);
    --success-green: #28a745;
    --warning-orange: #ffc107;
    --gradient-primary: linear-gradient(135deg, var(--accent-teal), var(--primary-blue));
    --gradient-dark: linear-gradient(180deg, var(--primary-blue), var(--primary-dark));
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    --radius-lg: 0.75rem;
    --shadow-strong: 0 10px 30px rgba(102, 208, 232, 0.25);
}

[data-theme="light"] {
    --primary-dark: #f3f4f6;
    --text-lighter: #111827;
    --text-muted: #6b7280;
    --text-light: #374151;
    --bg-input: #f9fafb;
    --gradient-dark: linear-gradient(180deg, #e5e7eb, #f3f4f6);
    --gradient-card: linear-gradient(145deg, #ffffff, #f9fafb);
    --shadow-strong: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    /* Adjust accent for light mode visibility */
    --accent-teal: #0e6b88;
    --accent-light: #0b5c75;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    color: var(--text-lighter);
    background: var(--primary-dark);
    overflow-y: auto;
    min-height: 100vh;
}

.login-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    z-index: -1;
}

.login-wrapper {
    max-width: 450px;
    width: 100%;
    padding: 1rem;
    margin: auto;
}

.login-box {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(143, 230, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-strong);
}

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

.logo-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1rem;
}

.login-header h1 {
    color: var(--accent-light);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Form Styles */
#loginForm {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

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

.input-group i {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.5rem;
    background: var(--bg-input);
    border: 1px solid rgba(143, 230, 255, 0.2);
    border-radius: 0.5rem;
    color: var(--text-lighter);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
    opacity: 1;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(102, 208, 232, 0.3);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

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

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox input[type="checkbox"] {
    accent-color: var(--accent-teal);
}

.forgot-link {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-link:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.login-footer a {
    color: var(--accent-teal);
    text-decoration: none;
    transition: color 0.3s;
}

.login-footer a:hover {
    text-decoration: underline;
    color: var(--accent-light);
}

/* Message & Loading */
.message {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
    display: none;
}

.message.active {
    display: block;
}

.message.success { 
    background-color: rgba(40, 167, 69, 0.2); 
    color: var(--success-green); 
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.message.error { 
    background-color: rgba(220, 53, 69, 0.2); 
    color: var(--danger-red); 
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.loading-state {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem;
}

.loading-state .spinner i {
    font-size: 2.5rem;
    color: var(--accent-teal);
    animation: spin 1s linear infinite;
}

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

.loading-state p {
    margin-top: 1rem;
    font-weight: 500;
}

/* ===== RESPONSIVE (PHONE VIEW) ===== */
@media (max-width: 576px) {
    .login-wrapper {
        padding: 0.5rem;
    }

    .login-box {
        padding: 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .form-control {
        font-size: 16px; /* Prevents auto-zoom on iOS inputs */
    }
}