/* PDQ OS — Modern Luminous Glassmorphism Admin Login (PDQ Brand Palette) */

* {
    box-sizing: border-box;
}

html,
body.glass-auth-body {
    height: 100%;
    margin: 0;
    padding: 0;
    background: #F1F5F9;
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #0F172A;
    overflow-x: hidden;
}

.glass-login-viewport {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #F0F5FA 0%, #E8F0F8 45%, #EEF6F0 100%);
}

/* Ambient Background Mesh Spheres in PDQ Brand Colors */
.glass-bg-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(75px);
    opacity: 0.65;
}

/* PDQ Brand Navy Orb */
.orb-navy {
    width: 650px;
    height: 650px;
    top: -180px;
    left: -140px;
    background: radial-gradient(circle, rgba(17, 41, 75, 0.16) 0%, rgba(37, 99, 235, 0.08) 50%, transparent 70%);
    animation: orbFloat1 22s ease-in-out infinite alternate;
}

/* PDQ Fern Green Orb */
.orb-green {
    width: 600px;
    height: 600px;
    bottom: -150px;
    right: -100px;
    background: radial-gradient(circle, rgba(78, 125, 38, 0.14) 0%, rgba(34, 197, 94, 0.06) 50%, transparent 70%);
    animation: orbFloat2 26s ease-in-out infinite alternate;
}

/* Accent Blue/Cyan Orb */
.orb-accent {
    width: 480px;
    height: 480px;
    top: 35%;
    right: 15%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.10) 0%, rgba(14, 165, 233, 0.05) 50%, transparent 70%);
    animation: orbFloat3 20s ease-in-out infinite alternate;
}

.mesh-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(17, 41, 75, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 41, 75, 0.035) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 25%, transparent 80%);
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 45px) scale(1.1); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -40px) scale(1.08); }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-30px, 50px) scale(1.12); }
}

@keyframes glassEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Luminous Frosted Glass Card */
.glass-login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-top: 1px solid #FFFFFF;
    border-radius: 24px;
    padding: 2.35rem 2.25rem 2rem;
    box-shadow:
        0 24px 60px rgba(17, 41, 75, 0.12),
        0 6px 18px rgba(17, 41, 75, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    animation: glassEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Glass Header Branding */
.glass-card-header {
    margin-bottom: 1.5rem;
}

.glass-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.9rem;
}

.glass-brand-logo {
    height: 80px;
    max-height: 80px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.2s ease;
}

.glass-brand-logo:hover {
    transform: scale(1.02);
}

/* PDQ Brand Admin Badge */
.glass-admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.85rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(78, 125, 38, 0.1);
    border: 1px solid rgba(78, 125, 38, 0.25);
    color: #3D661B;
}

.glass-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4E7D26;
    box-shadow: 0 0 8px rgba(78, 125, 38, 0.6);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0% { box-shadow: 0 0 0 0 rgba(78, 125, 38, 0.6); }
    70% { box-shadow: 0 0 0 6px rgba(78, 125, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(78, 125, 38, 0); }
}

/* Headings */
.glass-title {
    font-size: 1.65rem;
    font-weight: 750;
    color: #11294B;
    letter-spacing: -0.025em;
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.glass-subtitle {
    font-size: 0.88rem;
    color: #64748B;
    margin: 0 0 1.5rem;
    line-height: 1.45;
}

/* Form Fields */
.glass-field {
    margin-bottom: 1.15rem;
}

.glass-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 650;
    color: #334155;
    margin-bottom: 0.4rem;
}

.glass-input-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.glass-input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
    z-index: 2;
    transition: color 0.2s ease;
}

.glass-input {
    width: 100%;
    height: 48px;
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 11px !important;
    color: #0F172A !important;
    padding: 0 2.75rem 0 2.65rem !important;
    font-size: 0.925rem;
    outline: none;
    box-shadow: 0 1px 2px rgba(17, 41, 75, 0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-input::placeholder {
    color: #94A3B8 !important;
}

.glass-input:focus {
    border-color: #2563EB !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16), 0 2px 6px rgba(37, 99, 235, 0.06) !important;
}

.glass-input-wrapper:focus-within .glass-input-icon {
    color: #11294B;
}

/* Password Toggle */
.glass-password-toggle {
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2.1rem;
    height: 2.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 999px;
    color: #64748B;
    cursor: pointer;
    padding: 0;
    font-size: 1.05rem;
    z-index: 3;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.glass-password-toggle:hover {
    color: #11294B;
    background: rgba(17, 41, 75, 0.06);
}

.glass-password-toggle.is-on {
    color: #2563EB;
}

/* Checkbox Row */
.glass-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    margin-bottom: 1.35rem;
}

.glass-checkbox {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 4px;
    background-color: #FFFFFF;
    border: 1px solid #CBD5E1;
    cursor: pointer;
}

.glass-checkbox:checked {
    background-color: #4E7D26;
    border-color: #4E7D26;
}

.glass-checkbox-label {
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin-left: 0.45rem;
}

/* Submit Button in PDQ Brand Gradient */
.btn-glass-submit {
    width: 100%;
    height: 50px;
    border-radius: 11px;
    border: none;
    background: linear-gradient(135deg, #11294B 0%, #1A3E70 55%, #2563EB 100%);
    color: #FFFFFF;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 8px 22px rgba(17, 41, 75, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-glass-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(17, 41, 75, 0.36);
    filter: brightness(1.06);
    color: #FFFFFF;
}

.btn-glass-submit:active:not(:disabled) {
    transform: translateY(1px);
}

.btn-glass-submit:disabled {
    opacity: 0.75;
    cursor: wait;
}

/* Alerts */
.glass-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border-radius: 11px;
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 1.15rem;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.25);
    color: #DC2626;
}

.glass-alert-success {
    background: rgba(78, 125, 38, 0.08);
    border-color: rgba(78, 125, 38, 0.25);
    color: #15803D;
}

/* Two Factor OTP */
.glass-otp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
    margin: 0.5rem 0 1.25rem;
}

.glass-otp-digit {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-width: 3.1rem;
    height: 50px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 750;
    color: #11294B;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    caret-color: #4E7D26;
    outline: none;
    box-shadow: 0 1px 2px rgba(17, 41, 75, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.glass-otp-digit:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.glass-otp-digit.is-invalid {
    border-color: #DC2626;
}

.glass-2fa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(17, 41, 75, 0.08);
}

.glass-link {
    color: #2563EB;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.glass-link:hover {
    color: #1D4ED8;
    text-decoration: underline;
}

/* Footer */
.glass-card-footer {
    margin-top: 1.75rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(17, 41, 75, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: #64748B;
}

.glass-footer-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #475569;
    font-weight: 550;
}

.glass-footer-status i {
    color: #4E7D26;
}

@media (max-width: 480px) {
    .glass-login-card {
        padding: 1.85rem 1.25rem 1.5rem;
        border-radius: 18px;
    }
    .glass-title {
        font-size: 1.45rem;
    }
    .glass-brand-logo {
        height: 60px;
    }
    .glass-otp-digit {
        height: 44px;
        font-size: 1.1rem;
    }
}
