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

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, #2a0d0c 0%, #14090a 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.admin-auth-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 44px 34px;
    border-radius: 20px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5);
    border-top: 4px solid #ffd700;
}

.admin-shield {
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    background: #621a19;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    font-size: 30px;
    box-shadow: 0 6px 14px rgba(98, 26, 25, 0.35);
}

.admin-title {
    color: #621a19;
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.admin-subtitle {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 26px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.admin-label {
    display: block;
    text-align: left;
    font-size: 0.78rem;
    color: #666;
    margin: 14px 0 6px;
    font-weight: 600;
}

.admin-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 0.95rem;
}

.admin-input:focus {
    outline: none;
    border-color: #621a19;
}

.admin-btn {
    width: 100%;
    padding: 14px;
    margin-top: 22px;
    background: #621a19;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.admin-btn:hover { background: #7a2120; }
.admin-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.admin-error {
    background: #ffe5e5;
    color: #a30000;
    border: 1px solid #ffb3b3;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.82rem;
    margin-bottom: 6px;
    text-align: left;
}

.admin-note {
    margin-top: 26px;
    font-size: 0.72rem;
    color: #999;
    line-height: 1.5;
}

.admin-note i {
    color: #621a19;
    margin-right: 4px;
}

.hidden { display: none !important; }

/* ============================================================
   Session check overlay — habang chine-check kung existing na
   may session (Point 1)
   ============================================================ */
.session-check-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, #2a0d0c 0%, #14090a 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.session-check-overlay.hidden { display: none !important; }

.session-check-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid rgba(255, 215, 0, 0.25);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   Password show/hide toggle (Point 2)
   ============================================================ */
.admin-input-wrap {
    position: relative;
}

.admin-input-wrap .admin-input {
    padding-right: 42px;
}

.toggle-password-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
}

.toggle-password-btn:hover { color: #621a19; }
/* ============================================================
   OTP verification card
   ============================================================ */
.admin-otp-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 1.3rem;
    font-weight: 700;
}

#adminOtpResendWrap {
    margin-top: 16px;
}

#resendOtpLink {
    color: #621a19;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

#resendOtpLink:hover { text-decoration: underline; }

#resendOtpLink.disabled {
    color: #999;
    pointer-events: none;
    text-decoration: none;
}

.admin-back-btn {
    margin-top: 14px;
    background: none;
    border: none;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
}

.admin-back-btn:hover { color: #621a19; }