/* ===============================
   PAAB Attendance System - Modern Login Theme v2
   Bright + High Contrast + Glass UI
=============================== */

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #EAF6FF 0%, #B9DFFF 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

/* Wrapper */
.login-container {
    width: 100%;
    max-width: 1100px;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.45);
    box-shadow: 0 18px 45px rgba(0,0,0,0.12);
}

/* ---------------- LEFT PANEL ---------------- */
.login-left {
    padding: 60px 40px;
    text-align: center;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255,255,255,0.45);
}

.logo-section {
    margin-bottom: 0 !important;
}

.logo-section img {
    width: 220px;
    height: auto;
    object-fit: contain;
    background: none;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.login-left h1 {
    margin-top: 0 !important;
    color: #0553A0;
    font-size: 26px;
    font-weight: 700;
}

.login-left p {
    color: #0553A0;
    margin-top: 4px !important;
    margin-bottom: 25px;
}

/* Support Block */
.support-info {
    background: rgba(255,255,255,0.28);
    padding: 18px;
    border-radius: 16px;
    margin-top: 20px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    font-size: 14px;
}

.support-info h3 {
    display: none;
}

/* ---------------- SUPPORT GRID ---------------- */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

.support-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    width: 100%;
}

.support-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.support-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.support-avatar--hr  { background: #dbeafe; color: #1d4ed8; }
.support-avatar--it  { background: #dcfce7; color: #15803d; }
.support-avatar--admin { background: #ede9fe; color: #6d28d9; }

.support-card-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 3px;
    color: #111827;
}

.support-badge {
    font-size: 11px;
    border-radius: 4px;
    padding: 1px 7px;
    font-weight: 500;
}

.support-badge--hr   { background: #dbeafe; color: #1d4ed8; }
.support-badge--it   { background: #dcfce7; color: #15803d; }
.support-badge--admin { background: #ede9fe; color: #6d28d9; }

.support-card-desc {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.5;
}

.support-link-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    text-decoration: none;
    border-radius: 6px;
    padding: 6px 10px;
    font-weight: 500;
    transition: opacity 0.15s;
}

.support-link-btn:hover { opacity: 0.8; }

.support-link-btn--hr   { background: #dbeafe; color: #1d4ed8; }
.support-link-btn--it   { background: #dcfce7; color: #15803d; }
.support-link-btn--admin { background: #ede9fe; color: #6d28d9; }

/* Support card color overrides */
.support-info .support-card-title { color: #111827 !important; }
.support-info .support-card-desc  { color: #6b7280 !important; }
.support-info .support-badge--hr,
.support-info .support-link-btn--hr   { color: #1d4ed8 !important; }
.support-info .support-badge--it,
.support-info .support-link-btn--it   { color: #15803d !important; }
.support-info .support-badge--admin,
.support-info .support-link-btn--admin { color: #6d28d9 !important; }

/* Admin card - centred, same width as others */
.support-card--admin {
    grid-column: 1 / -1;
    width: calc(50% - 6px);
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
}

.support-card--admin .support-card-header {
    flex-direction: column;
    align-items: center;
}

.support-card--admin .support-card-header div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.support-card--admin .support-link-btn--admin {
    justify-content: center;
}

/* ---------------- RIGHT PANEL ---------------- */
.login-right {
    padding: 60px 50px;
    background: white;
    position: relative;
}

.login-right .form-wrapper {
    max-width: 420px;
    margin: auto;
}

.login-right .input-group input {
    max-width: 350px;
    width: 100%;
}

.login-right .login-btn {
    max-width: 150px;
    width: 100%;
}

.form-header {
    margin-bottom: 35px;
}

.form-header h2 {
    color: #0553A0;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.input-group label {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.input-group {
    margin-bottom: 25px;
}

.input-group input {
    margin-top: 8px;
    width: 100%;
    padding: 14px 15px 14px 45px;
    border-radius: 12px;
    border: 2px solid #D3E3F3;
    font-size: 15px;
    background: #F8FBFF;
    transition: 0.2s;
}

.input-group input:focus {
    border-color: #249BD4;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(36,155,212,0.25);
}

.input-wrapper i { color: #7ba7cb; }

/* ---------------- BUTTON ---------------- */
.login-btn {
    width: 100%;
    padding: 10px;
    margin: 10px auto 0 auto;
    font-size: 16px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #249BD4 0%, #0553A0 100%);
    color: #fff;
    box-shadow: 0 10px 25px rgba(36,155,212,0.35);
    transition: 0.25s;
    display: block;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(36,155,212,0.45);
}

/* ---------------- FOOTER ---------------- */
.footer {
    margin-top: 20px;
    color: #6d6d6d;
    font-size: 13px;
    text-align: center;
}

/* ---------------- ADMIN ICON ---------------- */
.admin-icon-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    z-index: 10;
}

.admin-icon-btn i { color: #0553A0; font-size: 18px; }

.admin-icon-btn:hover {
    background: #e8f3ff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* ---------------- ERROR ---------------- */
.login-error-glow {
    color: #dc2626;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    margin-top: -6px;
    margin-bottom: 8px;
    text-shadow: 0 0 6px rgba(220,38,38,0.6), 0 0 12px rgba(220,38,38,0.4);
}

@keyframes errorFadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- OTP ---------------- */
#login_step2 { display: none; width: 100%; }

.otp-header { text-align: center; margin-bottom: 20px; }
.otp-header h3 { color: #1F4E79; margin-bottom: 4px; font-size: 20px; }
.otp-header p  { color: #666; font-size: 13px; margin: 0; }

.otp-input-wrapper { display: flex; justify-content: center; margin: 18px 0 10px; }

#otp_input {
    font-size: 30px;
    letter-spacing: 12px;
    text-align: center;
    width: 210px;
    padding: 10px 8px;
    border: 2px solid #2E75B6;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

#otp_input:focus    { border-color: #1F4E79; box-shadow: 0 0 0 3px rgba(30,78,121,0.12); }
#otp_input:disabled { background: #f5f5f5; color: #aaa; border-color: #ccc; }

#otp_timer  { text-align: center; font-size: 13px; color: #888; min-height: 18px; margin-bottom: 8px; }
#result_otp { min-height: 24px; margin-bottom: 8px; }

.otp-btn-row { display: flex; gap: 10px; margin-top: 8px; }
.otp-btn-row .login-btn { flex: 1; }

.btn-back {
    flex: 0 0 auto;
    background: none;
    border: 1.5px solid #2E75B6;
    color: #2E75B6;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
}

.btn-back:hover { background: #2E75B6; color: #fff; }

.otp-note { text-align: center; font-size: 11px; color: #aaa; margin-top: 12px; }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 900px) {
    .login-container {
        grid-template-columns: 1fr;
        width: 95%;
        margin: 0 auto;
    }

    .login-left, .login-right {
        padding: 40px 25px;
        text-align: center;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .support-card--admin {
        grid-column: 1;
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .form-header h2 {
        font-size: 22px;
        text-align: center;
    }

    .input-group input {
        font-size: 14px;
        padding: 12px 12px 12px 40px;
    }

    .input-wrapper i { left: 12px; }

    .login-btn {
        padding: 12px;
        font-size: 15px;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .support-card--admin {
        grid-column: 1;
        width: 100%;
        margin: 0;
    }
}

/* FAQ Document Card */
.faq-card {
    width: 78%;
    margin: 18px auto 24px auto;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(15, 76, 129, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0369a1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.faq-content {
    flex: 1;
}

.faq-title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

.faq-desc {
    margin: 3px 0 0 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
}

.faq-btn {
    padding: 8px 12px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9, #0056a6);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.faq-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.25);
    color: #ffffff;
    text-decoration: none;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    .faq-card {
        width: 90%;
        flex-direction: column;
        text-align: center;
    }

    .faq-btn {
        width: 100%;
        justify-content: center;
    }
}