/* ============================================
   PREMIUM LOGIN PAGE — matches index.php HTML
   ============================================ */

/* ---- Body / Page ---- */
body.login-page {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Outfit', sans-serif;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

/* ---- School Photo Background with Professional Glass Overlay ---- */
.animated-bg {
    position: fixed;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(15, 23, 42, 0.65) 0%, rgba(15, 23, 42, 0.82) 100%),
        url('../img/bg_login.jpg') center center / cover no-repeat;
    z-index: 0;
}

[data-theme="dark"] .animated-bg {
    background: 
        linear-gradient(135deg, rgba(10, 15, 29, 0.80) 0%, rgba(15, 23, 42, 0.92) 100%),
        url('../img/bg_login.jpg') center center / cover no-repeat;
}

.animated-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 35%, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

/* ---- Glass Container ---- */
.glass-container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* ---- Login Card ---- */
.login-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 2.5rem 2.5rem 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255,255,255,0.08),
        inset 0 1px 0 rgba(255,255,255,0.12);
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               cardFloat 6s ease-in-out infinite 1s;
}

@keyframes cardEntrance {
    0%   { opacity: 0; transform: translateY(40px) scale(0.93); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* ---- Login Header ---- */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.premium-text {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffffff 30%, #7eb8e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.3rem;
    text-shadow: none;
}

.subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
    letter-spacing: 0.5px;
}

/* ---- Input Group / Wrapper ---- */
.login-form .input-group {
    margin-bottom: 1.2rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 0 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-wrapper:focus-within {
    border-color: #4299E1;
    background: rgba(66, 153, 225, 0.1);
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.18), 0 0 20px rgba(66, 153, 225, 0.15);
    transform: translateY(-2px);
}

.input-wrapper > i:first-child {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.95rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: color 0.3s;
}

.input-wrapper:focus-within > i:first-child {
    color: #4299E1;
}

.input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 0.95rem;
    padding: 1rem 0;
    font-family: inherit;
    min-width: 0;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

/* ---- Password Toggle ---- */
.toggle-password {
    color: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.toggle-password:hover {
    color: #4299E1;
}

/* ---- Premium Submit Button ---- */
.btn-premium {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #2C5364 0%, #4299E1 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    cursor: pointer;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 24px rgba(66, 153, 225, 0.35);
    font-family: inherit;
    text-transform: uppercase;
}

.btn-premium::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-premium:hover::after { transform: translateX(100%); }

.btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 36px rgba(66, 153, 225, 0.5);
}

.btn-premium:active {
    transform: translateY(-1px) scale(0.99);
}

.btn-premium i { font-size: 1rem; }

/* ---- Error Message ---- */
.error-msg {
    background: rgba(197, 48, 48, 0.2);
    border: 1px solid rgba(197, 48, 48, 0.45);
    color: #fed7d7;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin-top: 1.2rem;
    text-align: center;
    font-size: 0.88rem;
    backdrop-filter: blur(8px);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-8px); }
    40%       { transform: translateX(8px); }
    60%       { transform: translateX(-5px); }
    80%       { transform: translateX(5px); }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem 2.5rem;
        border-radius: 22px;
        margin: 0.5rem;
    }
    .premium-text { font-size: 1.8rem; }
}

/* ---- Light Mode Overrides for Login Page ---- */
html[data-theme="light"] .animated-bg {
    background: linear-gradient(-45deg, #f8fafc, #e2e8f0, #cbd5e0, #f1f5f9, #e2e8f0);
}

html[data-theme="light"] .login-card {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0,0,0,0.05);
}

html[data-theme="light"] .premium-text {
    background: linear-gradient(135deg, #1e3a8a 30%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

html[data-theme="light"] .subtitle {
    color: #475569 !important;
}

html[data-theme="light"] .login-footer p {
    color: #64748b !important;
}

html[data-theme="light"] .input-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

html[data-theme="light"] .input-wrapper input {
    color: #1e293b;
}

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

html[data-theme="light"] .input-wrapper > i:first-child,
html[data-theme="light"] .toggle-password {
    color: #64748b;
}

html[data-theme="light"] .form-label {
    color: #334155;
}

html[data-theme="light"] .btn-premium {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

html[data-theme="light"] .error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #b91c1c;
}