@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ================================================
   ROOT FONT SIZE SCALING
   ================================================ */
html { font-size: 16px; }
@media (max-width: 1440px) { html { font-size: 15px; } }
@media (max-width: 1024px) { html { font-size: 14px; } }
@media (max-width: 768px)  { html { font-size: 13px; } }
@media (max-width: 480px)  { html { font-size: 14px; } }
@media (max-width: 320px)  { html { font-size: 13px; } }

/* ================================================
   CSS VARIABLES
   (DB-sourced values preserved — do not remove)
   ================================================ */
:root {
    --primary-color:      #4361ee;
    --primary-hover:      #3a56d4;
    --secondary-color:    #3f37c9;
    --accent-color:       #4cc9f0;
    --success-color:      #2ecc71;
    --error-color:        #e74c3c;
    --warning-color:      #f39c12;
    --text-primary:       #333;
    --text-secondary:     #6c757d;
    --text-muted:         #adb5bd;
    --bg-light:           #f8f9fa;
    --card-shadow:        0 0.625rem 1.875rem rgba(0,0,0,0.1);
    --transition-speed:   0.3s;
    --input-bg:           #ffffff;
    --input-bg-focus:     #fafbfc;
    --input-border:       #e2e8f0;
    --input-border-focus: #4361ee;

    /* Toast / Modal tokens */
    --toast-warning-color:  #f59e0b;
    --toast-warning-bg:     #fffbeb;
    --toast-warning-border: #fde68a;
    --sub-danger:           #ef4444;
    --sub-danger-soft:      rgba(239,68,68,0.08);
    --sub-danger-border:    rgba(239,68,68,0.18);

    /* Left panel */
    --panel-bg-start:   #1a2e4a;
    --panel-bg-mid:     #0f1e34;
    --panel-bg-end:     #08111e;
    --panel-text:       rgba(255,255,255,0.85);
    --panel-text-muted: rgba(255,255,255,0.55);
    --panel-border:     rgba(255,255,255,0.1);
}

/* ================================================
   RESET
   ================================================ */
*  { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { width: 100%; min-height: 100vh; overflow-x: hidden; background-color: var(--bg-light); }


/* ════════════════════════════════════════════════
   PRELOADER — Dark professional design
   ════════════════════════════════════════════════ */

/* Loader-specific palette (independent of page theme) */
:root {
    --loader-bg-1:     #080c18;
    --loader-bg-2:     #0e1528;
    --loader-bg-3:     #0a1020;
    --loader-arc-1:    #6366f1;   /* indigo */
    --loader-arc-2:    #8b5cf6;   /* violet */
    --loader-arc-3:    #06b6d4;   /* cyan */
    --loader-arc-4:    #10b981;   /* emerald */
    --loader-glow:     rgba(99, 102, 241, 0.35);
    --loader-glow-2:   rgba(6, 182, 212, 0.2);
    --loader-track:    rgba(255, 255, 255, 0.06);
    --loader-bar-1:    #6366f1;
    --loader-bar-2:    #06b6d4;
    --loader-bar-3:    #10b981;
}

#login_loader-wrapper {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Rich dark radial gradient */
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(99,102,241,0.12) 0%, transparent 65%),
        radial-gradient(ellipse 60% 50% at 80% 100%,  rgba(6,182,212,0.1)   0%, transparent 60%),
        radial-gradient(ellipse 50% 40% at 10% 60%,   rgba(139,92,246,0.08) 0%, transparent 55%),
        linear-gradient(160deg, var(--loader-bg-1) 0%, var(--loader-bg-2) 50%, var(--loader-bg-3) 100%);
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.45s ease-in-out;
}

/* Subtle animated grid overlay */
#login_loader-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    animation: loader-grid-drift 20s linear infinite;
    pointer-events: none;
}
@keyframes loader-grid-drift {
    0%   { transform: translateY(0); }
    100% { transform: translateY(3.5rem); }
}

/* Floating ambient orbs */
#login_loader-wrapper::after {
    content: '';
    position: absolute;
    width: 28rem; height: 28rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 65%);
    top: -8rem; left: -8rem;
    animation: loader-orb-drift 8s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes loader-orb-drift {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(3rem, 2rem) scale(1.1); }
}

/* ── Container ── */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* ── Spinner + glow rings ── */
.loading-spinner {
    position: relative;
    width: 5.5rem;
    height: 5.5rem;
}

/* Outer glow pulse ring */
.loading-spinner::before {
    content: '';
    position: absolute;
    inset: -0.75rem;
    border-radius: 50%;
    background: radial-gradient(circle, var(--loader-glow) 0%, transparent 70%);
    animation: loader-glow-pulse 2.4s ease-in-out infinite;
}

/* Inner accent ring */
.loading-spinner::after {
    content: '';
    position: absolute;
    inset: 0.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    animation: loader-ring-spin 4s linear infinite reverse;
}

@keyframes loader-glow-pulse {
    0%,100% { opacity: 0.6; transform: scale(1); }
    50%      { opacity: 1;   transform: scale(1.15); }
}
@keyframes loader-ring-spin {
    100% { transform: rotate(360deg); }
}

/* Track ring behind the spinner */
.loading-spinner .spinner-track {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--loader-track);
}

.circular {
    position: relative;
    z-index: 1;
    animation: loader-rotate 1.8s linear infinite;
    height: 100%;
    transform-origin: center center;
    width: 100%;
}
.path {
    stroke-dasharray: 89, 200;
    stroke-dashoffset: 0;
    stroke-linecap: round;
    fill: none;
    stroke-width: 3.5;
    animation:
        loader-dash  1.5s ease-in-out infinite,
        loader-color 5s  ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(99,102,241,0.8));
}

@keyframes loader-rotate { 100% { transform: rotate(360deg); } }

@keyframes loader-dash {
    0%   { stroke-dasharray: 1,  200; stroke-dashoffset: 0; }
    50%  { stroke-dasharray: 89, 200; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 89, 200; stroke-dashoffset: -124; }
}

/* Rich multi-stop color cycle: indigo → violet → cyan → emerald */
@keyframes loader-color {
    0%   { stroke: var(--loader-arc-1); filter: drop-shadow(0 0 7px rgba(99,102,241,0.9)); }
    25%  { stroke: var(--loader-arc-2); filter: drop-shadow(0 0 7px rgba(139,92,246,0.9)); }
    50%  { stroke: var(--loader-arc-3); filter: drop-shadow(0 0 7px rgba(6,182,212,0.9)); }
    75%  { stroke: var(--loader-arc-4); filter: drop-shadow(0 0 7px rgba(16,185,129,0.9)); }
    100% { stroke: var(--loader-arc-1); filter: drop-shadow(0 0 7px rgba(99,102,241,0.9)); }
}

/* ── Title ── */
.loading-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0;
    /* Animated shimmer gradient */
    background: linear-gradient(
        100deg,
        #a5b4fc 0%,
        #e0e7ff 20%,
        #67e8f9 40%,
        #a5b4fc 60%,
        #c4b5fd 80%,
        #a5b4fc 100%
    );
    background-size: 250% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: loader-shimmer 3s linear infinite;
}
@keyframes loader-shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 250% center; }
}

.dot-animation {
    display: inline-block;
    animation: loader-dots 1.6s ease-in-out infinite;
    -webkit-text-fill-color: transparent;
    background: linear-gradient(90deg, #a5b4fc, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
}
@keyframes loader-dots {
    0%,30% { opacity: 0; transform: translateY(0); }
    60%     { opacity: 1; transform: translateY(-2px); }
    100%    { opacity: 1; transform: translateY(0); }
}

/* ── Tagline beneath title ── */
.loader-tagline {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: -0.75rem;
}

/* ── Progress bar ── */
.progress-bar {
    width: 10rem;
    height: 3px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 3px;
    /* Gradient shifts through the same arc palette */
    background: linear-gradient(
        90deg,
        var(--loader-bar-1),
        var(--loader-bar-2),
        var(--loader-bar-3),
        var(--loader-bar-2),
        var(--loader-bar-1)
    );
    background-size: 300% 100%;
    animation:
        loader-fill        2.8s ease-in-out infinite,
        loader-bar-shift   3s   linear     infinite;
    box-shadow: 0 0 8px rgba(99,102,241,0.6);
}
@keyframes loader-fill {
    0%   { width: 0%; }
    60%  { width: 75%; }
    100% { width: 100%; }
}
@keyframes loader-bar-shift {
    0%   { background-position: 0%   50%; }
    100% { background-position: 300% 50%; }
}


/* ================================================
   MAIN LOGIN CONTAINER
   ================================================ */
.login-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        rgba(var(--background-color), 0.1),
        rgba(var(--background-color), 1)
    ), url('./../../uploads/wallpaper/wallpaper.jpg') no-repeat center center;
    background-size: cover;
    position: relative;
    padding: 1.5rem;
}


/* ================================================
   CARD WRAPPER
   ================================================ */
.login-content-wrapper {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    width: 100%;
    max-width: 50rem;           /* wider on large screens */
    background: #fff;
    border-radius: 1.25rem;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.05),
        0 1.25rem 3.75rem rgba(0,0,0,0.18);
    overflow: hidden;
}


/* ================================================
   MOBILE-ONLY COMPACT HEADER
   Hidden on tablet & desktop, shown on mobile
   ================================================ */
.mobile-header {
    display: none;              /* shown only in mobile media query */
}


/* ================================================
   LEFT INFO PANEL  — dark gradient
   ================================================ */
.login-info-section {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        160deg,
        var(--panel-bg-start) 0%,
        var(--panel-bg-mid)   55%,
        var(--panel-bg-end)   100%
    );
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* Decorative orbs */
.login-info-section__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.login-info-section__orb--1 {
    width: 20rem; height: 20rem;
    background: radial-gradient(circle, rgba(76,201,240,0.1) 0%, transparent 70%);
    top: -5rem; right: -6rem;
}
.login-info-section__orb--2 {
    width: 14rem; height: 14rem;
    background: radial-gradient(circle, rgba(67,97,238,0.14) 0%, transparent 70%);
    bottom: 1rem; left: -4rem;
}
.login-info-section__orb--3 {
    width: 8rem; height: 8rem;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    top: 50%; left: 50%; transform: translate(-50%, -50%);
}

/* School crest */
.school-crest-container {
    margin-bottom: 1.25rem;
    padding: 0.3125rem;
    position: relative;
    z-index: 1;
}
.school-crest {
    width: 6.5rem;
    height: 6.5rem;
    object-fit: contain;
    background: rgba(255,255,255,1);
    padding: 0.625rem;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 0.5rem 1.5rem rgba(0,0,0,0.35);
    transition: all 0.3s ease;
    border-radius: 0.875rem;
}
.school-crest:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.2),
        0 0.75rem 2rem rgba(0,0,0,0.4);
}

/* School name */
.school-name-section {
    text-align: center;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1;
}
.school-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.35;
    word-wrap: break-word;
}
.school-tagline {
    color: var(--panel-text-muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin: 0;
}
.app-name {
    color: var(--accent-color);
    font-weight: 600;
}

/* Support section */
.company-info {
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
}
.support-heading {
    color: var(--panel-text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0 0 0.75rem;
}
.support-heading i { margin-right: 0.375rem; }

.company-support {
    margin-top: 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--panel-border);
}
.support-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--panel-text-muted);
    gap: 0.625rem;
}
.support-item i {
    color: var(--accent-color);
    min-width: 1rem;
    text-align: center;
    flex-shrink: 0;
}
.support-item a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
    word-break: break-all;
}
.support-item a:hover {
    color: var(--accent-color);
}


/* ================================================
   RIGHT SIDE — LOGIN FORM
   ================================================ */
.container.login {
    flex: 0 0 58%;
    width: 100%;
    max-width: none;
    position: relative;
    animation: slideInRight 0.6s ease;
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.forms { width: 100%; }

.form {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    padding: 2.25rem 2.5rem 2rem;
    transition: all var(--transition-speed) ease;
}

/* Form header */
.form-header {
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
}
.product-name {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    position: relative;
    display: inline-block;
}
.product-name::after {
    content: '';
    position: absolute;
    bottom: -0.375rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}
.form .title {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0.5rem 0 0.25rem;
    display: block;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.4;
}

/* ── Inputs ── */
.input-field {
    position: relative;
    height: 3.625rem;
    margin-bottom: 1rem;
}
.input-field input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    border-radius: 0.75rem;
    padding: 0 1.125rem 0 3.25rem;
    font-size: 0.9rem;           /* safe default — overridden to 1rem on mobile */
    font-weight: 400;
    border: 2px solid var(--input-border);
    background-color: var(--input-bg);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: var(--text-primary);
}
.input-field label {
    position: absolute;
    top: 50%;
    left: 3.25rem;
    transform: translateY(-50%);
    font-size: 0.875rem;
    font-weight: 400;
    pointer-events: none;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    background: transparent;
}
.input-field input:focus,
.input-field input:valid {
    border-color: var(--input-border-focus);
    background-color: var(--input-bg-focus);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.08), 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}
.input-field input:focus ~ label,
.input-field input:valid ~ label,
.input-field input.has-content ~ label {
    top: -0.125rem;
    left: 1.125rem;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--input-bg-focus);
    padding: 0.125rem 0.5rem;
    color: var(--primary-color);
    border-radius: 0.25rem;
    z-index: 1;
}
.input-field i.icon {
    position: absolute;
    left: 1.0625rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: all 0.3s ease;
    z-index: 2;
}
.input-field input:focus ~ i.icon,
.input-field input:valid ~ i.icon {
    color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}
.input-field i.showHidePw {
    position: absolute;
    right: 1.0625rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.375rem;
    border-radius: 0.375rem;
}
.input-field i.showHidePw:hover {
    color: var(--primary-color);
    background-color: rgba(67,97,238,0.08);
}

/* Caps lock */
.caps-lock-warn {
    display: none;
    color: var(--error-color);
    font-size: 0.8rem;
    margin: -0.5rem 0 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(231,76,60,0.08);
    align-items: center;
    border-left: 3px solid var(--error-color);
}
.caps-lock-warn i { margin-right: 0.5rem; }

/* Checkbox & forgot */
.checkbox-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.checkbox-content { display: flex; align-items: center; }
.checkbox-content input {
    margin-right: 0.625rem;
    accent-color: var(--primary-color);
    width: 1.0625rem;
    height: 1.0625rem;
    cursor: pointer;
}
.checkbox-content label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
}
.forgot-link {
    color: var(--primary-color);
    font-size: 0.8125rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
}
.forgot-link:hover {
    color: var(--primary-hover);
    background-color: rgba(67,97,238,0.08);
}

/* Sign-in button */
.input-field.button { margin-bottom: 0; height: 3.25rem; }
.login-btn {
    width: 100%;
    height: 100%;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(67,97,238,0.35);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.02em;
}
.login-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67,97,238,0.45);
}
.login-btn:active { transform: translateY(0); }
.btn-text { margin-right: 0.5rem; }
.login-btn i { transition: transform 0.3s ease; }
.login-btn:hover i { transform: translateX(4px); }

/* Ripple */
.ripple {
    position: absolute;
    width: 1.25rem; height: 1.25rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    animation: ripple-animation 0.5s ease-out;
    pointer-events: none;
}
@keyframes ripple-animation { to { transform: scale(5); opacity: 0; } }


/* ================================================
   CONNECTION ALERT
   ================================================ */
.con-alert-wrapper {
    position: fixed;
    top: 1.25rem; right: 1.25rem;
    z-index: 999;
    animation: slide_in 0.5s ease forwards;
    max-width: 21.875rem;
    width: 100%;
}
.con-alert-wrapper .toast {
    background: #fff;
    padding: 1.25rem;
    border-radius: 0.625rem;
    border-left: 4px solid var(--success-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: fade_in 0.5s ease forwards;
}
.toast.offline { border-color: var(--warning-color); }
.toast .content { display: flex; align-items: center; }
.content .icon {
    width: 2.5rem; height: 2.5rem;
    background: var(--success-color);
    color: #fff;
    font-size: 1.25rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.toast.offline .content .icon { background: var(--warning-color); }
.content .details { margin-left: 0.9375rem; }
.details span { font-size: 1.125rem; font-weight: 600; }
.details p { color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.3125rem; }
.toast .close-icon {
    width: 1.875rem; height: 1.875rem;
    background: #f2f2f2;
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}
.toast .close-icon:hover { background: #e5e5e5; }
.hide-alert { display: none; }
@keyframes slide_in  { 0% { transform: translateX(120%); } 100% { transform: translateX(0); } }
@keyframes fade_in   { 0% { opacity: 0; }                 100% { opacity: 1; } }
.con-alert-wrapper.hide { animation: slide_out 0.5s ease forwards; }
@keyframes slide_out { 0% { transform: translateX(0); } 100% { transform: translateX(120%); } }


/* ================================================
   AUTOFILL
   ================================================ */
.input-field input:-webkit-autofill,
.input-field input:-webkit-autofill:hover,
.input-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px var(--input-bg-focus) inset;
    transition: background-color 5000s ease-in-out 0s;
    border-radius: 0.75rem;
}
.input-field input:-webkit-autofill ~ label {
    top: -0.125rem; left: 1.125rem;
    font-size: 0.6875rem; font-weight: 600;
    background: var(--input-bg-focus);
    padding: 0.125rem 0.5rem;
    color: var(--primary-color);
    border-radius: 0.25rem;
    z-index: 1;
}
@keyframes onAutoFillStart  { from { content: ''; } to { content: ''; } }
@keyframes onAutoFillCancel { from { content: ''; } to { content: ''; } }
input:-webkit-autofill     { animation-name: onAutoFillStart; transition: background-color 50000s ease-in-out 0s; }
input:not(:-webkit-autofill){ animation-name: onAutoFillCancel; }


/* ================================================
   ICON ANIMATIONS
   ================================================ */
.animated-icon,.pulse-icon,.rotate-icon,.bounce-icon,.glow-icon,.shake-icon,.swing-icon,.fade-icon {
    display: inline-block;
    margin-right: 0.375rem;
    font-size: 0.875rem;
}
.success-icon  { color: var(--success-color); }
.warning-icon  { color: var(--warning-color); }
.error-icon    { color: var(--error-color); }
.primary-icon  { color: var(--primary-color); }
.accent-icon   { color: var(--accent-color); }


/* ════════════════════════════════════════════════
   SESSION EXPIRED TOAST
   ════════════════════════════════════════════════ */
.pp-toast-wrapper {
    position: fixed;
    top: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10500;
    width: min(26rem, calc(100vw - 2rem));
    pointer-events: none;
}
.pp-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: var(--toast-warning-bg);
    border: 1px solid var(--toast-warning-border);
    border-left: 4px solid var(--toast-warning-color);
    border-radius: 0.875rem;
    padding: 1rem 1.125rem 1.25rem;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.07),
        0 10px 24px -3px rgba(0,0,0,0.1);
    pointer-events: all;
    position: relative;
    overflow: hidden;
}
.pp-toast__icon-wrap {
    position: relative;
    flex-shrink: 0;
    width: 2.25rem; height: 2.25rem;
    display: flex; align-items: center; justify-content: center;
    margin-top: 0.0625rem;
}
.pp-toast__icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(245,158,11,0.15);
    animation: toast-ring-pulse 2s ease-in-out infinite;
}
@keyframes toast-ring-pulse {
    0%,100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0.5; }
}
.pp-toast__icon-wrap i {
    font-size: 1.125rem;
    color: var(--toast-warning-color);
    position: relative; z-index: 1;
}
.pp-toast__body { flex: 1; min-width: 0; }
.pp-toast__title {
    font-size: 0.9rem; font-weight: 700;
    color: #92400e; margin-bottom: 0.2rem; line-height: 1.2;
}
.pp-toast__msg {
    font-size: 0.8125rem;
    color: #b45309;
    line-height: 1.45; margin: 0;
}
.pp-toast__close {
    flex-shrink: 0;
    width: 1.625rem; height: 1.625rem;
    background: rgba(245,158,11,0.12);
    border: none; border-radius: 50%;
    color: #b45309; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    margin-top: 0.0625rem; line-height: 1;
}
.pp-toast__close:hover { background: rgba(245,158,11,0.25); transform: scale(1.1); }
.pp-toast__progress {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px; width: 100%;
    background: var(--toast-warning-color);
    border-radius: 0 0 0.875rem 0.875rem;
    transform-origin: left;
}


/* ════════════════════════════════════════════════
   SUBSCRIPTION EXPIRED MODAL
   ════════════════════════════════════════════════ */
.pp-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 20, 35, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000; padding: 1rem;
}
.pp-modal {
    background: #ffffff;
    border-radius: 1.5rem;
    width: min(30rem, calc(100vw - 2rem));
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.05),
        0 24px 64px rgba(0,0,0,0.2);
    overflow: hidden; position: relative;
}
.pp-modal__topbar {
    height: 4px;
    background: linear-gradient(90deg, var(--sub-danger), #f97316, #fbbf24);
}
.pp-modal > *:not(.pp-modal__topbar) { padding-left: 2rem; padding-right: 2rem; }
.pp-modal__icon-wrap {
    position: relative;
    width: 5rem; height: 5rem;
    margin: 2rem auto 1.5rem;
    display: flex; align-items: center; justify-content: center;
}
.pp-modal__icon-halo {
    position: absolute; inset: 0; border-radius: 50%;
    background: var(--sub-danger-soft);
    animation: modal-halo 2.5s ease-in-out infinite;
}
.pp-modal__icon-halo--2 { animation-delay: 0.8s; background: rgba(239,68,68,0.05); }
@keyframes modal-halo {
    0%,100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.3); opacity: 0; }
}
.pp-modal__icon-circle {
    position: relative; z-index: 1;
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    background: var(--sub-danger-soft);
    border: 1.5px solid var(--sub-danger-border);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(239,68,68,0.15);
}
.pp-modal__icon-circle i { font-size: 1.625rem; color: var(--sub-danger); }
.pp-modal__content { text-align: center; padding-bottom: 1.5rem; }
.pp-modal__badge {
    display: inline-flex; align-items: center;
    background: var(--sub-danger-soft);
    border: 1px solid var(--sub-danger-border);
    color: var(--sub-danger);
    font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; border-radius: 100px;
    padding: 0.25rem 0.75rem; margin-bottom: 0.875rem;
}
.pp-modal__title {
    font-size: 1.625rem; font-weight: 800;
    color: #111827; line-height: 1.25; margin-bottom: 0.75rem;
}
.pp-modal__msg { font-size: 0.9rem; color: #6b7280; line-height: 1.65; max-width: 22rem; margin: 0 auto; }
.pp-modal__contacts { display: flex; flex-direction: column; gap: 0.625rem; padding-bottom: 1.5rem; }
.pp-contact-card {
    display: flex; align-items: center; gap: 0.875rem;
    background: #f9fafb; border: 1px solid #f3f4f6;
    border-radius: 0.875rem; padding: 0.875rem 1rem;
    text-decoration: none; color: inherit;
    transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pp-contact-card:hover {
    background: #f3f4f6; border-color: #e5e7eb;
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pp-contact-card__icon {
    width: 2.5rem; height: 2.5rem; flex-shrink: 0;
    border-radius: 0.625rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.pp-contact-card__icon--phone    { background: rgba(67,97,238,0.08);  color: var(--primary-color); }
.pp-contact-card__icon--whatsapp { background: rgba(37,211,102,0.1);  color: #25d366; }
.pp-contact-card__icon--email    { background: rgba(249,115,22,0.08); color: #f97316; }
.pp-contact-card__info { flex: 1; min-width: 0; }
.pp-contact-card__label {
    display: block; font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase;
    color: #9ca3af; margin-bottom: 0.15rem;
}
.pp-contact-card__value {
    display: block; font-size: 0.875rem; font-weight: 600;
    color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pp-contact-card__arrow { font-size: 0.7rem; color: #d1d5db; transition: color 0.2s, transform 0.2s; }
.pp-contact-card:hover .pp-contact-card__arrow { color: #9ca3af; transform: translateX(2px); }
.pp-modal__btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: calc(100% - 4rem);
    margin: 0 2rem 2rem;
    height: 3rem;
    border: none; border-radius: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff; font-size: 0.9375rem; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(67,97,238,0.3);
    transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.pp-modal__btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67,97,238,0.4);
}
.pp-modal__btn:active { transform: translateY(0); }
.pp-modal__btn i { font-size: 1.125rem; }


/* ════════════════════════════════════════════════
   RESPONSIVE — TABLET  (480px – 1024px)
   Keep side-by-side layout, just scale down
   ════════════════════════════════════════════════ */
@media (min-width: 480px) and (max-width: 1024px) {
    .login-container { padding: 1.25rem; }

    .login-content-wrapper {
        flex-direction: row;        /* preserve side-by-side */
        max-width: 48rem;
    }

    .login-info-section {
        flex: 0 0 40%;
        padding: 1.75rem 1.5rem;
    }

    .container.login { flex: 0 0 60%; }

    .school-crest   { width: 5rem; height: 5rem; }
    .school-name    { font-size: 1.05rem; }
    .support-item   { font-size: 0.7rem; }

    .form { padding: 1.75rem 1.5rem 1.5rem; }

    .mobile-header { display: none; }
}


/* ════════════════════════════════════════════════
   RESPONSIVE — MOBILE  (< 480px)
   Single column; compact header replaces left panel
   ════════════════════════════════════════════════ */
@media (max-width: 479px) {
    .login-container {
        padding: 0;
        align-items: stretch;
        justify-content: flex-start;
    }

    .login-content-wrapper {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        max-width: 100%;
    }

    /* Hide the full left panel on mobile */
    .login-info-section { display: none; }

    /* Show compact branded header instead */
    .mobile-header {
        display: flex;
        align-items: center;
        gap: 0.875rem;
        order: 1;
        padding: 1rem 1.25rem;
        background: linear-gradient(
            135deg,
            var(--panel-bg-start),
            var(--panel-bg-end)
        );
        flex-shrink: 0;
    }
    .mobile-logo {
        width: 2.875rem;
        height: 2.875rem;
        object-fit: contain;
        border-radius: 0.625rem;
        background: rgba(255,255,255,0.08);
        padding: 0.25rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.35);
        flex-shrink: 0;
    }
    .mobile-header__text {}
    .mobile-school-name {
        font-size: 0.9375rem;
        font-weight: 700;
        color: #fff;
        margin: 0 0 0.1rem;
        line-height: 1.2;
    }
    .mobile-tagline {
        font-size: 0.7rem;
        color: rgba(255,255,255,0.55);
        margin: 0;
    }
    .mobile-tagline strong { color: var(--accent-color); }

    /* Form panel */
    .container.login {
        order: 2;
        flex: 1;
    }
    .form {
        padding: 1.5rem 1.25rem 1.25rem;
        border-radius: 0;
    }
    .form-header { margin-bottom: 1.25rem; }
    .form .title  { font-size: 1.375rem; }

    /* CRITICAL: prevents iOS Safari from zooming into focused inputs */
    .input-field input {
        font-size: 1rem;
    }

    /* Taller touch targets */
    .input-field        { height: 3.75rem; margin-bottom: 0.875rem; }
    .input-field.button { height: 3.25rem; margin-bottom: 0; }

    /* Bigger checkbox tap target */
    .checkbox-content input { width: 1.25rem; height: 1.25rem; }

    /* Toast on small screens */
    .pp-toast-wrapper { top: 0.5rem; width: calc(100vw - 1.5rem); }
    .pp-toast { border-radius: 0.75rem; padding: 0.875rem 1rem 1.125rem; }

    /* Modal on small screens */
    .pp-modal                              { border-radius: 1.25rem; }
    .pp-modal__icon-wrap                   { margin-top: 1.75rem; }
    .pp-modal__title                       { font-size: 1.25rem; }
    .pp-modal__msg                         { font-size: 0.85rem; }
    .pp-modal > *:not(.pp-modal__topbar)   { padding-left: 1.25rem; padding-right: 1.25rem; }
    .pp-modal__btn                         { width: calc(100% - 2.5rem); margin: 0 1.25rem 1.5rem; font-size: 0.9rem; }
}


/* ════════════════════════════════════════════════
   RESPONSIVE — VERY SMALL  (< 360px)
   ════════════════════════════════════════════════ */
@media (max-width: 359px) {
    .form { padding: 1.25rem 1rem; }
    .form .title { font-size: 1.25rem; }
    .mobile-school-name { font-size: 0.875rem; }
    .input-field i.icon { left: 0.875rem; }
    .input-field input  { padding-left: 3rem; }
}


/* ════════════════════════════════════════════════
   DESKTOP LARGE  (> 1280px)
   ════════════════════════════════════════════════ */
@media (min-width: 1280px) {
    .login-content-wrapper { max-width: 50rem; }
    .form { padding: 2.5rem 3rem 2.25rem; }
    .input-field        { height: 3.75rem; }
    .input-field.button { height: 3.375rem; }
    .form .title        { font-size: 1.75rem; }
}


/* ════════════════════════════════════════════════
   REDUCED MOTION
   ════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    #login_loader-wrapper::before,
    #login_loader-wrapper::after  { animation: none; }
    .path                         { animation: loader-dash 1.5s ease-in-out infinite; }
    .progress-fill                { animation: loader-fill 2.5s ease-in-out infinite; }
    .loading-title                { animation: none; }
    .loading-spinner::before,
    .loading-spinner::after       { animation: none; }
    .login-info-section__orb,
    .pp-toast__icon-ring,
    .pp-modal__icon-halo,
    .ppd__icon-glow               { animation: none; }
    .login-btn:hover,
    .school-crest:hover           { transform: none; }
}


/* ══════════════════════════════════════════════════════════════════
   PP NOTIFY — slide-in toast notifications
   Replaces all SweetAlert calls in login.js
   ══════════════════════════════════════════════════════════════════ */

/* Stacking container — top-right, stacks downward */
#ppn-wrap {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 10600;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: min(22rem, calc(100vw - 2rem));
    pointer-events: none;
}

/* Individual toast */
.ppn {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem 1.125rem;
    border-radius: 0.875rem;
    border: 1px solid transparent;
    border-left-width: 4px;
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.08),
        0 10px 28px -4px rgba(0,0,0,0.12);
    position: relative;
    overflow: hidden;
    pointer-events: all;
    /* entrance/exit via translate + opacity */
    transform: translateX(calc(100% + 1.5rem));
    opacity: 0;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity   0.3s ease;
}
.ppn--in  { transform: translateX(0); opacity: 1; }
.ppn--out { transform: translateX(calc(100% + 1.5rem)); opacity: 0; transition-timing-function: ease-in; }

/* ── Type skins ── */
.ppn--error {
    background: #fff5f5;
    border-color: #feb2b2;
    border-left-color: #ef4444;
}
.ppn--success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #22c55e;
}
.ppn--warning {
    background: #fffbeb;
    border-color: #fde68a;
    border-left-color: #f59e0b;
}
.ppn--info {
    background: #eff6ff;
    border-color: #bfdbfe;
    border-left-color: #3b82f6;
}

/* Icon circle */
.ppn__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9375rem;
    margin-top: 0.0625rem;
}
.ppn--error   .ppn__icon { background: rgba(239,68,68,0.1);   color: #ef4444; }
.ppn--success .ppn__icon { background: rgba(34,197,94,0.1);   color: #22c55e; }
.ppn--warning .ppn__icon { background: rgba(245,158,11,0.1);  color: #f59e0b; }
.ppn--info    .ppn__icon { background: rgba(59,130,246,0.1);  color: #3b82f6; }

/* Body */
.ppn__body { flex: 1; min-width: 0; }
.ppn__title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.2rem;
}
.ppn--error   .ppn__title { color: #991b1b; }
.ppn--success .ppn__title { color: #14532d; }
.ppn--warning .ppn__title { color: #92400e; }
.ppn--info    .ppn__title { color: #1e40af; }

.ppn__msg {
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0;
}
.ppn--error   .ppn__msg { color: #b91c1c; }
.ppn--success .ppn__msg { color: #166534; }
.ppn--warning .ppn__msg { color: #b45309; }
.ppn--info    .ppn__msg { color: #1d4ed8; }

/* Dismiss button */
.ppn__close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    background: rgba(0,0,0,0.06);
    color: #6b7280;
    margin-top: 0.0625rem;
    line-height: 1;
    padding: 0;
}
.ppn__close:hover { background: rgba(0,0,0,0.12); transform: scale(1.1); }

/* Auto-dismiss progress bar */
.ppn__bar {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    width: 100%;
    border-radius: 0 0 0.875rem 0.875rem;
    animation: ppn-bar linear forwards;
}
.ppn--error   .ppn__bar { background: #ef4444; }
.ppn--success .ppn__bar { background: #22c55e; }
.ppn--warning .ppn__bar { background: #f59e0b; }
.ppn--info    .ppn__bar { background: #3b82f6; }

@keyframes ppn-bar {
    from { width: 100%; }
    to   { width: 0%; }
}

/* Mobile: stretch to full width at bottom */
@media (max-width: 479px) {
    #ppn-wrap {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
    .ppn { border-radius: 0.75rem; }
    /* Enter from bottom on mobile */
    .ppn {
        transform: translateY(calc(100% + 1rem));
    }
    .ppn--in  { transform: translateY(0); }
    .ppn--out { transform: translateY(calc(100% + 1rem)); }
}


/* ══════════════════════════════════════════════════════════════════
   PP DIALOG — OTP verification modal
   ══════════════════════════════════════════════════════════════════ */

/* Backdrop */
.ppd-bd {
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 24, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10700;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.ppd-bd--in  { opacity: 1; }
.ppd-bd--out { opacity: 0; }

/* Modal box */
.ppd {
    background: #fff;
    border-radius: 1.375rem;
    width: min(30rem, calc(100vw - 2rem));
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.06),
        0 24px 64px rgba(0,0,0,0.22);
    overflow: hidden;
    transform: scale(0.9) translateY(1.5rem);
    opacity: 0;
    transition:
        transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity   0.28s ease;
}
.ppd--in  { transform: scale(1) translateY(0); opacity: 1; }
.ppd--out { transform: scale(0.9) translateY(1.5rem); opacity: 0; transition-timing-function: ease-in; }

/* Accent stripe */
.ppd__stripe {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* Header row */
.ppd__head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.75rem 0;
}
.ppd__icon-wrap {
    position: relative;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
}
.ppd__icon-glow {
    position: absolute;
    inset: -0.375rem;
    border-radius: 50%;
    background: rgba(67,97,238,0.12);
    animation: ppd-glow 2.5s ease-in-out infinite;
}
@keyframes ppd-glow {
    0%,100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.2); opacity: 0.5; }
}
.ppd__icon-circle {
    position: relative;
    z-index: 1;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(67,97,238,0.1);
    border: 1.5px solid rgba(67,97,238,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-color);
}
.ppd__title {
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}
.ppd__sub {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* Body */
.ppd__body { padding: 1.25rem 1.75rem; }

/* Timer row */
.ppd__timer-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    border-radius: 0.875rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
}
.ppd__ring-wrap {
    position: relative;
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ppd__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.ppd__ring-track { stroke: #e5e7eb; }
.ppd__ring-arc   {
    stroke: var(--primary-color);
    transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
}
.ppd__ring-arc--danger { stroke: #ef4444; }

.ppd__ring-num {
    position: relative;
    z-index: 1;
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    transition: color 0.4s ease;
}
.ppd__ring-num--danger { color: #ef4444; }

.ppd__timer-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.ppd__timer-text strong {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #374151;
}
.ppd__timer-text span {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* OTP input field */
.ppd__field-wrap {}
.ppd__label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 0.5rem;
}
.ppd__label i { color: var(--primary-color); }

.ppd__input {
    width: 100%;
    height: 3.25rem;
    border: 2px solid var(--input-border);
    border-radius: 0.75rem;
    padding: 0 1.125rem;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-align: center;
    color: #111827;
    background: var(--input-bg);
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.ppd__input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}
.ppd__input--err {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}
.ppd__hint {
    font-size: 0.75rem;
    margin: 0.375rem 0 0;
    min-height: 1rem;
    color: transparent;
    transition: color 0.2s;
}
.ppd__hint--err { color: #ef4444; }

/* Footer */
.ppd__foot {
    display: flex;
    gap: 0.75rem;
    padding: 0 1.75rem 1.75rem;
}
.ppd__btn {
    flex: 1;
    height: 2.875rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.25s ease;
}
.ppd__btn--ghost {
    background: #f3f4f6;
    color: #374151;
    border: 1.5px solid #e5e7eb;
}
.ppd__btn--ghost:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}
.ppd__btn--primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 12px rgba(67,97,238,0.3);
}
.ppd__btn--primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--secondary-color));
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(67,97,238,0.38);
}
.ppd__btn--primary:active { transform: translateY(0); }

/* Mobile dialog */
@media (max-width: 479px) {
    .ppd-bd { align-items: flex-end; padding: 0; }
    .ppd {
        border-radius: 1.25rem 1.25rem 0 0;
        width: 100%;
        transform: translateY(100%);
    }
    .ppd--in  { transform: translateY(0); }
    .ppd--out { transform: translateY(100%); }
    .ppd__head   { padding: 1.25rem 1.25rem 0; }
    .ppd__body   { padding: 1rem 1.25rem; }
    .ppd__foot   { padding: 0 1.25rem 1.25rem; }
    .ppd__input  { font-size: 1.125rem; }
}


/* ══════════════════════════════════════════════════════════════════
   LOCKOUT BANNER
   ══════════════════════════════════════════════════════════════════ */
.pp-lockout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #fff5f5, #fff1f1);
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    animation: pplock-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pplock-in {
    from { opacity: 0; transform: translateY(-0.5rem) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pp-lockout__icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: rgba(239,68,68,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-size: 0.875rem;
}
.pp-lockout__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.pp-lockout__text strong {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #991b1b;
}
.pp-lockout__text span {
    font-size: 0.75rem;
    color: #b91c1c;
}
.pp-lockout__text b {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}


/* ══════════════════════════════════════════════════════════════════
   LOGIN BUTTON — extra states
   ══════════════════════════════════════════════════════════════════ */
.login-btn--busy {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover)) !important;
    opacity: 0.8;
    cursor: wait !important;
    transform: none !important;
}
.login-btn--busy::after {
    content: '';
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
    margin-left: 0.5rem;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

.login-btn--locked {
    background: linear-gradient(135deg, #9ca3af, #6b7280) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.9;
}