@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-main: #060913;
    --bg-surface: rgba(13, 19, 36, 0.78);
    --bg-surface-hover: rgba(22, 32, 59, 0.88);
    --bg-input: rgba(18, 26, 48, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.45);
    --border-focus: #6366f1;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
    --primary-gradient-hover: linear-gradient(135deg, #4338ca 0%, #6d28d9 50%, #db2777 100%);
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --card-radius: 26px;
    --btn-radius: 14px;
    --input-radius: 14px;
    --shadow-card: 0 30px 80px -15px rgba(0, 0, 0, 0.85), 0 0 50px rgba(79, 70, 229, 0.22);
    --shadow-btn: 0 12px 28px -6px rgba(99, 102, 241, 0.55), 0 0 20px rgba(236, 72, 153, 0.25);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    background-color: var(--bg-main) !important;
    color: #e2e8f0 !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Outfit', sans-serif !important;
}

/* Next-Gen Animated Cyber-Aurora Canvas Background */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at 50% 10%, #151b36 0%, #080c18 60%, #04060d 100%);
    overflow: hidden;
    z-index: 1;
}

/* Interactive Canvas / Particle Overlay */
#auth-canvas-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Dynamic Glowing Mesh Orbs */
.cyber-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.65;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.orb-primary {
    width: 580px;
    height: 580px;
    background: radial-gradient(circle, #4f46e5 0%, rgba(79, 70, 229, 0) 70%);
    top: -180px;
    left: -120px;
    animation: orbFloat1 20s ease-in-out infinite alternate;
}

.orb-secondary {
    width: 650px;
    height: 650px;
    background: radial-gradient(circle, #ec4899 0%, rgba(236, 72, 153, 0) 70%);
    bottom: -200px;
    right: -150px;
    animation: orbFloat2 24s ease-in-out infinite alternate;
}

.orb-cyan {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
    top: 40%;
    left: 55%;
    animation: orbFloat3 18s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, 60px) scale(1.15); }
    100% { transform: translate(-50px, 90px) scale(0.9); }
}

@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-90px, -70px) scale(1.2); }
    100% { transform: translate(60px, -40px) scale(0.95); }
}

@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(0.95); }
    50% { transform: translate(-70px, 50px) scale(1.1); }
    100% { transform: translate(50px, -60px) scale(1.05); }
}

/* Ambient Cyber Grid */
.cyber-grid-overlay {
    position: absolute;
    inset: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 80%);
    pointer-events: none;
    z-index: 0;
}

/* Central Card Structure */
.auth-page-content {
    position: relative;
    z-index: 2;
    padding: 30px 16px;
}

.nextgen-auth-card {
    background: var(--bg-surface) !important;
    backdrop-filter: blur(32px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(32px) saturate(190%) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: var(--shadow-card) !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    animation: cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(32px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.nextgen-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.8);
}

.nextgen-card-body {
    padding: 42px 38px !important;
}

@media (max-width: 575.98px) {
    .nextgen-card-body {
        padding: 30px 22px !important;
    }
}

/* Brand Badge & Header */
.brand-hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 26px;
}

.brand-floating-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    backdrop-filter: blur(16px);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-floating-badge:hover {
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.3);
}

.brand-icon-box {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.5);
}

.brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    margin: 0;
}

.brand-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-dot-pulse {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.45); opacity: 0.45; }
}

/* Typography Hierarchy */
.auth-title-nextgen {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: -0.5px;
    margin-bottom: 6px !important;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 70%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-sub-nextgen {
    font-size: 14.5px !important;
    color: var(--text-secondary) !important;
    font-weight: 400;
    line-height: 1.5;
}

/* Quick Fill Admin Chips (For effortless testing) */
.quick-admin-chips {
    margin-top: 18px;
    padding: 12px 14px;
    background: rgba(30, 41, 59, 0.45);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chips-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #818cf8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chips-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-chip-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.admin-chip-btn:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: #6366f1;
    color: #ffffff;
    transform: translateY(-1px);
}

/* Form Fields & Controls */
.nextgen-input-group {
    position: relative;
    margin-bottom: 22px;
}

.nextgen-label {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    margin-bottom: 8px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-input-box {
    position: relative;
    display: flex;
    align-items: center;
}

.field-icon {
    position: absolute;
    left: 16px;
    color: #818cf8;
    font-size: 19px;
    pointer-events: none;
    transition: color 0.25s ease, transform 0.25s ease;
    z-index: 5;
}

.field-input-box:focus-within .field-icon {
    color: #c084fc;
    transform: scale(1.1);
}

.nextgen-input {
    width: 100% !important;
    background: var(--bg-input) !important;
    border: 1.5px solid var(--border-subtle) !important;
    border-radius: var(--input-radius) !important;
    padding: 14px 18px 14px 48px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.nextgen-input::placeholder {
    color: #64748b !important;
    font-weight: 400;
}

.nextgen-input:focus {
    background: rgba(26, 36, 66, 0.95) !important;
    border-color: var(--border-focus) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.25) !important;
    outline: none !important;
}

.nextgen-input.otp-field {
    letter-spacing: 8px !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    text-align: center !important;
    padding-left: 18px !important;
    font-family: 'Outfit', sans-serif !important;
}

/* Custom Styled Checkbox */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.nextgen-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.nextgen-checkbox .form-check-input {
    width: 19px !important;
    height: 19px !important;
    background-color: var(--bg-input) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    cursor: pointer;
    margin: 0 !important;
    transition: all 0.2s ease;
}

.nextgen-checkbox .form-check-input:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.6) !important;
}

.nextgen-checkbox .form-check-label {
    font-size: 13.5px !important;
    color: #cbd5e1 !important;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}

/* Next-Gen Action Button */
.nextgen-submit-btn {
    width: 100% !important;
    padding: 15px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    background: var(--primary-gradient) !important;
    background-size: 200% auto !important;
    border: none !important;
    border-radius: var(--btn-radius) !important;
    cursor: pointer !important;
    box-shadow: var(--shadow-btn) !important;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    position: relative;
    overflow: hidden;
}

.nextgen-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.nextgen-submit-btn:hover {
    background-position: right center !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 16px 36px -4px rgba(99, 102, 241, 0.65), 0 0 25px rgba(236, 72, 153, 0.35) !important;
}

.nextgen-submit-btn:hover::before {
    left: 140%;
}

.nextgen-submit-btn:active {
    transform: scale(0.98) !important;
}

/* Validation Errors */
label.error {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #f87171 !important;
    background: rgba(239, 68, 68, 0.14) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    margin-top: 8px !important;
    animation: shakeErr 0.35s ease-in-out;
}

.nextgen-input.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.25) !important;
}

@keyframes shakeErr {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Security Badges Footer */
.security-trust-bar {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 12px;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.trust-item i {
    color: #818cf8;
    font-size: 15px;
}

/* Footer Container */
.auth-page-footer {
    position: relative;
    z-index: 2;
    padding: 24px 16px 36px;
    text-align: center;
}

.footer-glass-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    background: rgba(13, 19, 36, 0.65);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 9999px;
    color: #94a3b8;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.footer-glass-pill a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s ease;
}

.footer-glass-pill a:hover {
    color: #c084fc;
    text-decoration: underline;
}
