/* Admin login — temple branding (maroon + saffron) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 15% 25%, rgba(255, 143, 0, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(255, 111, 0, 0.15) 0%, transparent 45%),
        linear-gradient(135deg, #5C1212 0%, #7B1F1F 50%, #8B2525 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

/* When the card is taller than the viewport (small phones, landscape,
   keyboard open), let the page scroll instead of clipping the card —
   body previously had overflow:hidden, which blocked scrolling entirely
   and cut off content above/below the vertically-centered card. */
@media (max-height: 700px), (max-width: 480px) {
    body {
        align-items: flex-start;
        padding: 16px;
    }
    .login-shell { margin: 0 auto; }
    .login-header { padding: 28px 24px 22px; }
    .temple-mark { width: 72px; height: 72px; margin-bottom: 12px; }
    .login-header h1 { font-size: 21px; }
    .login-body { padding: 24px 24px 20px; }
    .login-footer { padding: 14px 24px; }
}
body::before, body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    pointer-events: none;
}
body::before { width: 320px; height: 320px; top: -80px; right: -80px; }
body::after  { width: 220px; height: 220px; bottom: -60px; left: -60px; }

.login-shell {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}
.login-card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: card-in 0.45s ease-out;
}
@keyframes card-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-header {
    background: linear-gradient(135deg, #7B1F1F 0%, #9B3030 100%);
    color: #fff;
    padding: 44px 36px 36px;
    text-align: center;
    position: relative;
}
.login-header::after {
    content: '';
    position: absolute;
    left: 50%; bottom: 20px;
    transform: translateX(-50%);
    width: 64px; height: 4px;
    background: #FF6F00;
    border-radius: 2px;
}
.temple-mark {
    display: block;
    width: 96px;
    height: 96px;
    margin: 0 auto 16px;
    background: #fff;
    border: 3px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.login-header h1 {
    margin: 0 0 6px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.login-header .subtitle {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.9;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.login-body { padding: 36px 36px 32px; }

.flash {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid;
}
.flash-info    { background: #FFF3E0; border-color: #F0D9A8; color: #7B1F1F; }
.flash-success { background: #F0FDF4; border-color: #BBF7D0; color: #166534; }
.flash-danger, .flash-error { background: #FEF2F2; border-color: #FCA5A5; color: #991B1B; }
.flash-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }

.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #7B1F1F;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 7px;
}
.form-input {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    color: #1A1A1A;
    background: #FAF6F1;
    border: 2px solid #EEE4DA;
    border-radius: 12px;
    padding: 14px 16px;
    outline: none;
    transition: all 0.15s;
}
.form-input:focus {
    background: #fff;
    border-color: #7B1F1F;
    box-shadow: 0 0 0 4px rgba(123, 31, 31, 0.15);
}
.form-input::placeholder { color: #8A8275; }
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1A1A1A;
    -webkit-box-shadow: 0 0 0 1000px #FAF6F1 inset;
    box-shadow: 0 0 0 1000px #FAF6F1 inset;
    transition: background-color 600000s 0s, color 600000s 0s;
}

.pw-wrap { position: relative; }
.pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #4A4036;
    cursor: pointer;
    padding: 9px 11px;
    font-size: 18px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}
.pw-toggle:hover { color: #7B1F1F; background: rgba(123, 31, 31, 0.06); }

.btn-signin {
    width: 100%;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #fff;
    background: linear-gradient(135deg, #FF6F00 0%, #FF8F00 100%);
    border: none;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(255, 111, 0, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 6px;
}
.btn-signin:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255, 111, 0, 0.45); }
.btn-signin:active { transform: translateY(0); }

.forgot-link {
    display: block;
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 700;
    color: #FF6F00;
    text-decoration: none;
    transition: color 0.15s;
}
.forgot-link:hover { color: #E65100; text-decoration: underline; }

.login-footer {
    background: #FAF6F1;
    border-top: 1px solid #F0E8E0;
    padding: 16px 36px;
    text-align: center;
}
.login-footer p {
    margin: 0;
    font-size: 12px;
    color: #4A4036;
    line-height: 1.6;
}
.login-footer i { color: #FF8F00; margin-right: 4px; }

/* Lead/intro paragraph in forgot/reset pages */
.lead-text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Hint footer text (e.g., "Reset links expire after 10 minutes…") */
.hint-text {
    font-size: 12px;
    color: #4A4036;
    line-height: 1.6;
    text-align: center;
    margin: 16px 0 0;
}
.hint-text strong { color: #7B1F1F; font-weight: 700; }

/* Back to login link */
.back-link {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: #7B1F1F;
    text-decoration: none;
    transition: color 0.15s;
}
.back-link:hover { color: #FF6F00; text-decoration: underline; }

/* Password policy list (reset page) */
.policy-list {
    list-style: none;
    padding: 12px 14px;
    margin: 0 0 16px;
    background: #FAF6F1;
    border: 1px solid #F0E8E0;
    border-radius: 10px;
    font-size: 12px;
    color: #4A4036;
    line-height: 1.7;
}
.policy-list li::before {
    content: '✓';
    color: #FF8F00;
    font-weight: 700;
    margin-right: 8px;
}

/* Password strength bar */
.strength-track {
    margin-top: 8px;
    height: 4px;
    background: #EEE4DA;
    border-radius: 2px;
    overflow: hidden;
}
.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.25s, background 0.25s;
}
.strength-label {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    min-height: 14px;
}
