/* =====================================================
   Spector License Portal — Design System
   Adopts the Dolos / Forensic Intelligence design language:
   dark-navy base, glassmorphism cards, cyan-indigo accents,
   ambient orb effects, auth page, professional footer.
   Loaded after tailwind.build.css — overrides as needed.
   ===================================================== */

/* =====================================================
   1. DESIGN TOKENS
   ===================================================== */

:root {
    --bg-base: #0f172a;
    --bg-darker: #070a19;
    --text-primary: #f5f7ff;
    --text-secondary: rgba(245, 247, 255, 0.65);
    --text-tertiary: rgba(148, 163, 184, 0.9);
    --accent: #8f9dff;
    --accent-strong: #7a86ff;
    --accent-cyan: #22d3ee;
    --accent-cyan-light: #7dd3fc;
    --accent-cyan-mid: #38bdf8;
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-strong: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-bright: rgba(255, 255, 255, 0.25);
    --card-shadow: 0 18px 42px rgba(12, 18, 36, 0.35);
    --btn-shadow: 0 18px 38px rgba(56, 189, 248, 0.35);
    --font-sans: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Courier New', monospace;
}

body.light-mode {
    --bg-base: #eef2ff;
    --bg-darker: #e0e7ff;
    --text-primary: #0f172a;
    --text-secondary: rgba(30, 41, 59, 0.75);
    --text-tertiary: rgba(71, 85, 105, 0.9);
    --accent: #4c51bf;
    --accent-strong: #3730a3;
    --accent-cyan: #0284c7;
    --accent-cyan-light: #0ea5e9;
    --accent-cyan-mid: #0369a1;
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-strong: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(15, 23, 42, 0.1);
    --glass-border-bright: rgba(15, 23, 42, 0.18);
    --card-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
    --btn-shadow: 0 18px 38px rgba(2, 132, 199, 0.25);
}

/* Base body reset for dark-first design */
body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =====================================================
   2. AMBIENT BACKGROUND (orbs + grid)
   ===================================================== */

.portal-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.portal-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.75;
    animation: portalOrbPulse 18s infinite ease-in-out;
}

.portal-orb--1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(143, 157, 255, 0.25), transparent 65%);
    top: -120px;
    left: -160px;
}

.portal-orb--2 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22), transparent 60%);
    bottom: -140px;
    right: -140px;
    animation-delay: 6s;
}

.portal-orb--3 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(125, 211, 252, 0.2), transparent 60%);
    top: 40%;
    right: 15%;
    animation-delay: 11s;
}

.portal-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
    background-size: 120px 120px;
    opacity: 0.5;
    mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.55), transparent 70%);
    -webkit-mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,0.55), transparent 70%);
}

/* Ensure main content is above ambient */
main, .main-content, [role="main"] {
    position: relative;
    z-index: 1;
}

@keyframes portalOrbPulse {
    0%, 100% { transform: scale(0.8); opacity: 0.6; }
    50%       { transform: scale(1.06); opacity: 0.88; }
}

body.light-mode .portal-orb--1 {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 65%);
}
body.light-mode .portal-orb--2 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 60%);
}
body.light-mode .portal-orb--3 {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 60%);
}
body.light-mode .portal-grid {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

/* =====================================================
   3. GLASSMORPHISM CARD (.portal-card)
   ===================================================== */

.portal-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.portal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.06), transparent 55%);
    mix-blend-mode: screen;
    pointer-events: none;
    border-radius: inherit;
}

body.light-mode .portal-card {
    background: var(--glass-bg);
    border-color: var(--glass-border);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), var(--card-shadow);
}

/* =====================================================
   4. PRIMARY BUTTON (.portal-btn)
   ===================================================== */

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    border: none;
    color: #0f172a !important;
    border-radius: 18px;
    padding: 14px 22px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.portal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(56, 189, 248, 0.45);
    color: #0f172a !important;
    text-decoration: none;
}

.portal-btn:active {
    transform: translateY(0);
}

.portal-btn.portal-btn--secondary {
    background: rgba(15, 23, 42, 0.25);
    border: 1px solid var(--glass-border-bright);
    color: var(--text-primary) !important;
    box-shadow: none;
}

.portal-btn.portal-btn--secondary:hover {
    background: rgba(143, 157, 255, 0.12);
    border-color: rgba(143, 157, 255, 0.45);
    box-shadow: 0 12px 30px rgba(143, 157, 255, 0.2);
}

body.light-mode .portal-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    box-shadow: var(--btn-shadow);
}

body.light-mode .portal-btn:hover {
    color: #ffffff !important;
}

body.light-mode .portal-btn.portal-btn--secondary {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.15);
    color: var(--text-primary) !important;
}

/* =====================================================
   5. AUTH PAGE (login, register, forgot-password)
   ===================================================== */

.auth-page {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 48px);
    overflow: hidden;
}

.auth-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.auth-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    filter: blur(90px);
    opacity: 0.75;
    animation: portalOrbPulse 18s infinite ease-in-out;
}

.auth-glow--left {
    background: radial-gradient(circle, rgba(129, 140, 248, 0.35), transparent 65%);
    top: -80px;
    left: -120px;
}

.auth-glow--right {
    background: radial-gradient(circle, rgba(56, 189, 248, 0.3), transparent 60%);
    bottom: -100px;
    right: -120px;
    animation-delay: 6s;
}

.auth-card {
    position: relative;
    width: min(440px, 94vw);
    padding: clamp(32px, 4vw, 48px);
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    gap: clamp(22px, 3vw, 30px);
    z-index: 2;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 35px 90px rgba(5, 10, 24, 0.55);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.18), transparent 45%, rgba(56, 189, 248, 0.15));
    border-radius: inherit;
    opacity: 0.8;
    pointer-events: none;
}

.auth-card > * {
    position: relative;
    z-index: 2;
}

body.light-mode .auth-card {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.14);
}

body.light-mode .auth-card::before {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), transparent 45%, rgba(14, 165, 233, 0.06));
}

.auth-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
}

.auth-mark-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: invert(1) drop-shadow(0 8px 20px rgba(56, 189, 248, 0.3));
}

body.light-mode .auth-mark {
    color: rgba(15, 23, 42, 0.65);
}

body.light-mode .auth-mark-logo {
    filter: drop-shadow(0 8px 20px rgba(14, 165, 233, 0.3));
}

.auth-mark-text {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
}

.auth-mark-text strong {
    color: var(--text-primary);
}

.auth-mark-text em {
    font-style: normal;
    color: var(--text-secondary);
    margin-left: 4px;
}

.auth-title {
    font-size: clamp(1.65rem, 2vw + 1rem, 2.1rem);
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.15;
}

.auth-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Auth form fields */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

body.light-mode .auth-label {
    color: rgba(15, 23, 42, 0.8);
}

.auth-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    outline: none;
}

.auth-input:focus {
    border-color: rgba(129, 140, 248, 0.55);
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.25);
    background: rgba(15, 23, 42, 0.72);
}

.auth-input::placeholder {
    color: rgba(148, 163, 184, 0.55);
}

body.light-mode .auth-input {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
}

body.light-mode .auth-input:focus {
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
    background: #ffffff;
}

body.light-mode .auth-input::placeholder {
    color: rgba(100, 116, 139, 0.55);
}

/* Password toggle wrapper */
.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .auth-input {
    padding-right: 48px;
}

.auth-eye-btn {
    position: absolute;
    inset-y: 0;
    right: 0;
    padding: 0 14px;
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    color: rgba(148, 163, 184, 0.65);
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-eye-btn:hover {
    color: var(--text-primary);
}

/* Auth button */
.auth-button {
    width: 100%;
    border-radius: 18px;
    padding: 14px 18px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.9), rgba(56, 189, 248, 0.85));
    color: #0f172a;
    box-shadow: 0 18px 38px rgba(56, 189, 248, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(56, 189, 248, 0.45);
}

.auth-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

body.light-mode .auth-button {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(14, 165, 233, 0.85));
    color: #ffffff;
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 18px 38px rgba(79, 70, 229, 0.25);
}

/* Turnstile container */
.auth-turnstile {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.75));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
}

body.light-mode .auth-turnstile {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Auth toggle links (register / forgot) */
.auth-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .auth-footer {
    border-top-color: rgba(15, 23, 42, 0.1);
}

.auth-footer-line {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-footer-link {
    color: rgba(129, 140, 248, 0.9);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer-link:hover {
    color: rgba(129, 140, 248, 1);
    text-decoration: underline;
}

body.light-mode .auth-footer-link {
    color: rgba(79, 70, 229, 0.9);
}

body.light-mode .auth-footer-link:hover {
    color: rgba(79, 70, 229, 1);
}

/* Auth security badges */
.auth-security {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-security-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.auth-security-item svg {
    flex-shrink: 0;
    color: #22c55e;
    width: 16px;
    height: 16px;
}

/* Resend verification box */
.auth-resend {
    padding: 14px 16px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.1);
}

.auth-resend p {
    font-size: 0.88rem;
    color: rgba(251, 191, 36, 0.9);
    margin: 0 0 10px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(148, 163, 184, 0.75);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

body.light-mode .auth-divider::before,
body.light-mode .auth-divider::after {
    background: rgba(15, 23, 42, 0.12);
}

@media (max-width: 640px) {
    .auth-card {
        border-radius: 22px;
        padding: clamp(24px, 6vw, 32px);
        gap: 20px;
    }
    .auth-title {
        font-size: clamp(1.45rem, 4vw, 1.85rem);
    }
}

/* =====================================================
   6. LOADING PAGE ANIMATION
   ===================================================== */

.portal-loading-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
    padding: clamp(32px, 4vw, 56px);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 35px 90px rgba(5, 10, 24, 0.5);
    min-width: 320px;
    max-width: 440px;
}

.portal-loading-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), transparent 45%, rgba(56, 189, 248, 0.12));
    border-radius: inherit;
    pointer-events: none;
}

body.light-mode .portal-loading-wrap {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.14);
}

.portal-loading-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: invert(1) drop-shadow(0 8px 20px rgba(56, 189, 248, 0.4));
    position: relative;
    z-index: 1;
}

body.light-mode .portal-loading-logo {
    filter: drop-shadow(0 8px 20px rgba(14, 165, 233, 0.35));
}

/* Orbital spinner */
.portal-spinner {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.portal-spinner::before,
.portal-spinner::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.portal-spinner::before {
    inset: 0;
    border: 3px solid rgba(56, 189, 248, 0.18);
}

.portal-spinner::after {
    inset: 0;
    border: 3px solid transparent;
    border-top-color: #22d3ee;
    border-right-color: rgba(129, 140, 248, 0.7);
    animation: portalSpin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 18px rgba(34, 211, 238, 0.35);
}

@keyframes portalSpin {
    to { transform: rotate(360deg); }
}

/* Inner orbit ring */
.portal-spinner-inner {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: rgba(143, 157, 255, 0.6);
    animation: portalSpin 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite reverse;
}

.portal-loading-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    position: relative;
    z-index: 1;
}

.portal-loading-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    max-width: 300px;
    margin: -10px 0 0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.portal-loading-status {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    position: relative;
    z-index: 1;
}

/* =====================================================
   7. PROFESSIONAL FOOTER (pf-*)
   Ported from forensicintelligence_chat footer-professional.css
   ===================================================== */

.pf-footer {
    margin-top: auto;
    padding-top: 38px;
    border-top: 1px solid var(--glass-border-bright);
    background: linear-gradient(165deg,
        rgba(10, 16, 34, 0.72),
        rgba(10, 16, 34, 0.52));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: pfFadeIn 0.5s ease-out;
    position: relative;
    z-index: 10;
}

.pf-shell {
    width: min(1400px, 95vw);
    margin: 0 auto;
    padding: 20px 16px 14px;
}

/* Top Section: Brand + CTA */
.pf-top {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.pf-brand-block,
.pf-cta-card {
    border: 1px solid var(--glass-border-bright);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 16px;
}

.pf-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.pf-brand:hover {
    text-decoration: none;
    color: var(--text-primary);
}

.pf-brand-logo {
    height: 36px;
    width: auto;
    filter: invert(1);
}

.pf-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pf-brand-tag {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.pf-description {
    margin: 10px 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 62ch;
}

.pf-highlight {
    margin: 8px 0 0;
    font-size: 0.84rem;
    color: var(--accent-strong);
    font-weight: 700;
}

.pf-facts {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.pf-facts li {
    color: rgba(245, 247, 255, 0.45);
    font-size: 0.82rem;
    margin: 0 0 5px;
}

.pf-facts a {
    color: var(--accent);
    text-decoration: none;
}

.pf-facts a:hover {
    text-decoration: underline;
}

/* CTA Card */
.pf-cta-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pf-cta-card h3 {
    margin: 0;
    font-size: 1.03rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pf-cta-card p {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.pf-cta-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-cta-btn {
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, #22d3ee, #38bdf8);
    color: #0f172a !important;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 24px rgba(56, 189, 248, 0.3);
}

.pf-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(56, 189, 248, 0.42);
    color: #0f172a !important;
    text-decoration: none;
}

/* 5-Column Link Grid */
.pf-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.pf-col {
    border: 1px solid var(--glass-border-bright);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 14px;
}

.pf-col h3 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pf-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-links li {
    margin: 0 0 6px;
}

.pf-links a {
    color: var(--text-secondary);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pf-links a:hover {
    color: var(--text-primary);
}

.pf-meta-label {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(245, 247, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pf-meta-text {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

/* Bottom Bar */
.pf-bottom {
    border-top: 1px solid var(--glass-border-bright);
    padding: 10px 0 16px;
    color: rgba(245, 247, 255, 0.45);
    font-size: 0.8rem;
}

.pf-bottom-inner {
    width: min(1400px, 95vw);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.pf-bottom-links {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pf-bottom-links a {
    color: rgba(245, 247, 255, 0.45);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.pf-bottom-links a:hover {
    color: var(--text-primary);
}

/* Responsive footer */
@media (max-width: 1120px) {
    .pf-top { grid-template-columns: 1fr; }
    .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .pf-grid { grid-template-columns: 1fr; }
    .pf-bottom-inner { flex-direction: column; align-items: flex-start; }
}

/* Light mode footer */
body.light-mode .pf-footer {
    background: linear-gradient(165deg,
        rgba(240, 245, 255, 0.92),
        rgba(235, 240, 252, 0.88));
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .pf-brand-block,
body.light-mode .pf-cta-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .pf-col {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .pf-brand,
body.light-mode .pf-cta-card h3,
body.light-mode .pf-col h3 {
    color: var(--text-primary);
}

body.light-mode .pf-brand-logo {
    filter: none;
}

body.light-mode .pf-brand-tag,
body.light-mode .pf-description,
body.light-mode .pf-cta-card p,
body.light-mode .pf-links a,
body.light-mode .pf-meta-text {
    color: rgba(30, 41, 59, 0.75);
}

body.light-mode .pf-highlight {
    color: var(--accent-strong);
}

body.light-mode .pf-facts li {
    color: rgba(0, 0, 0, 0.42);
}

body.light-mode .pf-facts a {
    color: var(--accent);
}

body.light-mode .pf-links a:hover {
    color: var(--text-primary);
}

body.light-mode .pf-meta-label {
    color: rgba(0, 0, 0, 0.42);
}

body.light-mode .pf-bottom {
    border-top-color: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.45);
}

body.light-mode .pf-bottom-links a {
    color: rgba(0, 0, 0, 0.45);
}

body.light-mode .pf-bottom-links a:hover {
    color: var(--text-primary);
}

body.light-mode .pf-cta-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
}

@keyframes pfFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   8. SCROLLBAR
   ===================================================== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    border: 2px solid rgba(15, 23, 42, 0.3);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.32);
}

body.light-mode ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
}
body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.18);
    border-color: rgba(255, 255, 255, 0.5);
}
body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* =====================================================
   9. HERO EYEBROW BADGE
   ===================================================== */

.portal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.25);
    color: #67e8f9;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.light-mode .portal-eyebrow {
    background: rgba(2, 132, 199, 0.1);
    border-color: rgba(2, 132, 199, 0.25);
    color: #0284c7;
}
