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

:root {
    /* --- VORTEX CORE TOKENS (v25.3) --- */
    --p-bg: #010409;
    --p-bg-accent: #0d1117;
    --p-accent: #00f2ff;
    --p-accent-rgb: 0, 242, 255;
    --p-accent-glow: rgba(0, 242, 255, 0.4);
    --p-accent-muted: rgba(0, 242, 255, 0.08);
    
    --p-card: rgba(13, 20, 30, 0.45);
    --p-card-hover: rgba(13, 20, 30, 0.65);
    --p-border: rgba(0, 242, 255, 0.15);
    --p-border-hover: rgba(0, 242, 255, 0.4);
    
    --p-text: #e6edf3;
    --p-text-muted: #8b949e;
    --p-text-header: #ffffff;
    
    --p-green: #238636;
    --p-green-glow: rgba(35, 134, 54, 0.3);
    --p-red: #da3633;
    --p-red-glow: rgba(218, 54, 51, 0.3);
    --p-gold: #d29922;
    --p-gold-glow: rgba(210, 153, 34, 0.3);
    
    --p-glass-blur: blur(20px);
    --p-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --p-radius: 20px;

    /* Bubble Default Colors */
    --bubble-color-1: #00f2ff;
    --bubble-color-2: #0055ff;
}

/* --- THEME OVERRIDES --- */
body.theme-vip, body.theme-premier, body.theme-godmode {
    --p-bg: #050505; --p-bg-accent: #0a0a0a; --p-accent: #d4af37;
    --p-accent-rgb: 212, 175, 55; --p-accent-glow: rgba(212, 175, 55, 0.4);
    --p-accent-muted: rgba(212, 175, 55, 0.08); --p-border: rgba(212, 175, 55, 0.2);
    --p-border-hover: rgba(212, 175, 55, 0.5);
    --portal-bubble-1: rgba(212, 175, 55, 0.15);
    --portal-bubble-2: rgba(180, 150, 40, 0.15);
    --bubble-color-1: #ffe066;
    --bubble-color-2: #d4af37;
}

body.theme-advance {
    --p-bg: #080000; --p-bg-accent: #150000; --p-accent: #ff003c;
    --p-accent-rgb: 255, 0, 60; --p-accent-glow: rgba(255, 0, 60, 0.4);
    --p-accent-muted: rgba(255, 0, 60, 0.08); --p-border: rgba(255, 0, 60, 0.2);
    --p-border-hover: rgba(255, 0, 60, 0.5);
    --portal-bubble-1: rgba(255, 60, 60, 0.15);
    --portal-bubble-2: rgba(178, 34, 34, 0.15);
    --bubble-color-1: #ff4d4d;
    --bubble-color-2: #ff003c;
}

body.theme-junior {
    --p-bg: #010409; --p-bg-accent: #0d1117; --p-accent: #3498db;
    --p-accent-rgb: 52, 152, 219; --p-accent-glow: rgba(52, 152, 219, 0.4);
    --p-accent-muted: rgba(52, 152, 219, 0.08); --p-border: rgba(52, 152, 219, 0.2);
    --p-border-hover: rgba(52, 152, 219, 0.5);
    --portal-bubble-1: rgba(0, 242, 255, 0.15);
    --portal-bubble-2: rgba(52, 152, 219, 0.15);
    --bubble-color-1: #4facfe;
    --bubble-color-2: #3498db;
}

body.theme-standard {
    --p-bg: #010409; --p-bg-accent: #0d1117; --p-accent: #5d9cec;
    --p-accent-rgb: 93, 156, 236; --p-accent-glow: rgba(93, 156, 236, 0.4);
    --p-accent-muted: rgba(93, 156, 236, 0.08); --p-border: rgba(93, 156, 236, 0.2);
    --p-border-hover: rgba(93, 156, 236, 0.5);
    --portal-bubble-1: rgba(93, 156, 236, 0.15);
    --portal-bubble-2: rgba(74, 137, 220, 0.15);
    --bubble-color-1: #70a1ff;
    --bubble-color-2: #5d9cec;
}

body.theme-private {
    --p-bg: #050505; --p-bg-accent: #0a0a0a; --p-accent: #B76E79;
    --p-accent-rgb: 183, 110, 121; --p-accent-glow: rgba(183, 110, 121, 0.4);
    --p-accent-muted: rgba(183, 110, 121, 0.08); --p-border: rgba(183, 110, 121, 0.2);
    --p-border-hover: rgba(183, 110, 121, 0.5);
    --portal-bubble-1: rgba(183, 110, 121, 0.15);
    --portal-bubble-2: rgba(120, 50, 70, 0.15);
    --bubble-color-1: #f3d1c9;
    --bubble-color-2: #B76E79;
}

/* VORTEX BUSINESS (Deep Corporate Navy) */
body.theme-business {
    --p-bg: #0c3266;
    --p-bg-accent: #051a3d;
    --p-accent: #3e87c3;
    --p-accent-rgb: 62, 135, 195;
    --p-accent-glow: rgba(62, 135, 195, 0.4);
    --p-accent-muted: rgba(62, 135, 195, 0.08);
    --p-border: rgba(62, 135, 195, 0.2);
    --p-border-hover: rgba(62, 135, 195, 0.5);
    --portal-bubble-1: rgba(29, 78, 216, 0.15);
    --portal-bubble-2: rgba(30, 64, 175, 0.15);
    --bubble-color-1: #4a90e2;
    --bubble-color-2: #0c3266;
}

/* VORTEX PARTNER (Electric Blue & Dark Space) */
body.theme-partner {
    --p-bg: #050a30;
    --p-bg-accent: #00041a;
    --p-accent: #003bc2;
    --p-accent-rgb: 0, 59, 194;
    --p-accent-glow: rgba(0, 59, 194, 0.4);
    --p-accent-muted: rgba(0, 59, 194, 0.08);
    --p-border: rgba(0, 59, 194, 0.2);
    --p-border-hover: rgba(0, 59, 194, 0.5);
    --portal-bubble-1: rgba(46, 204, 113, 0.15);
    --portal-bubble-2: rgba(39, 174, 96, 0.15);
    --bubble-color-1: #55efc4;
    --bubble-color-2: #2ecc71;
}

/* VORTEX ENTERPRISE (Sleek Dark) */
body.theme-enterprise {
    --p-bg: #111111;
    --p-bg-accent: #1a1a1a;
    --p-accent: #e0e0e0;
    --p-accent-rgb: 224, 224, 224;
    --p-accent-glow: rgba(224, 224, 224, 0.4);
    --p-accent-muted: rgba(224, 224, 224, 0.08);
    --p-border: rgba(224, 224, 224, 0.2);
    --p-border-hover: rgba(224, 224, 224, 0.5);
    --portal-bubble-1: rgba(100, 100, 100, 0.15);
    --portal-bubble-2: rgba(80, 80, 80, 0.15);
    --bubble-color-1: #cccccc;
    --bubble-color-2: #aaaaaa;
}

/* VORTEX FEDERAL (Authoritative Gold/Black) */
body.theme-federal {
    --p-bg: #000000;
    --p-bg-accent: #0a0a0a;
    --p-accent: #cca300;
    --p-accent-rgb: 204, 163, 0;
    --p-accent-glow: rgba(204, 163, 0, 0.4);
    --p-accent-muted: rgba(204, 163, 0, 0.08);
    --p-border: rgba(204, 163, 0, 0.2);
    --p-border-hover: rgba(204, 163, 0, 0.5);
    --portal-bubble-1: rgba(204, 163, 0, 0.15);
    --portal-bubble-2: rgba(150, 120, 0, 0.15);
    --bubble-color-1: #ffd633;
    --bubble-color-2: #cca300;
}

/* VORTEX DEVELOPER (Terminal Green) */
body.theme-developer {
    --p-bg: #0d1117;
    --p-bg-accent: #161b22;
    --p-accent: #39d353;
    --p-accent-rgb: 57, 211, 83;
    --p-accent-glow: rgba(57, 211, 83, 0.4);
    --p-accent-muted: rgba(57, 211, 83, 0.08);
    --p-border: rgba(57, 211, 83, 0.2);
    --p-border-hover: rgba(57, 211, 83, 0.5);
    --portal-bubble-1: rgba(57, 211, 83, 0.15);
    --portal-bubble-2: rgba(38, 166, 65, 0.15);
    --bubble-color-1: #0e4429;
    --bubble-color-2: #39d353;
}



/* --- GLOBAL STYLES --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body {
    font-family: 'Outfit', sans-serif;
    background: var(--p-bg);
    background-image: 
        radial-gradient(circle at 20% 20%, var(--portal-bubble-1, rgba(0, 25, 165, 0.15)) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, var(--portal-bubble-2, rgba(0, 210, 255, 0.15)) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--p-text);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, #0c1017 0%, #010409 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.auth-box {
    width: 95%;
    max-width: 440px;
    padding: 50px 40px;
    text-align: center;
    background: rgba(13, 20, 30, 0.6);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 242, 255, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 50px rgba(0, 242, 255, 0.05);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--p-accent), transparent);
}

.auth-logo {
    max-width: 140px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(0, 242, 255, 0.35));
}

/* --- REACTIVE DASHBOARD GRID --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.card-span-12 { grid-column: span 12; }
.card-span-8 { grid-column: span 8; }
.card-span-4 { grid-column: span 4; }

@media (max-width: 1200px) {
    .card-span-8, .card-span-4 { grid-column: span 12; }
}

/* --- PREMIUM CARDS (Frosted Glass) --- */
.v-card {
    background: var(--p-card);
    backdrop-filter: var(--p-glass-blur);
    border: 1px solid var(--p-border);
    border-radius: var(--p-radius);
    padding: 28px;
    transition: var(--p-transition);
    position: relative;
}

.v-card:hover {
    background: var(--p-card-hover);
    border-color: var(--p-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.v-card.highlight::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--p-accent), transparent);
    border-radius: var(--p-radius) var(--p-radius) 0 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.card-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--p-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* --- HUD TILES --- */
.hud-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.hud-tile {
    text-align: center;
    padding: 24px;
}

.hud-label {
    font-size: 0.65rem;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.hud-value {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
}

/* --- NAVIGATION --- */
.nexus-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    margin: 20px 0 40px 0;
    border: 1px solid var(--p-border);
    border-radius: 20px;
    backdrop-filter: var(--p-glass-blur);
    background: rgba(13, 20, 30, 0.4);
    position: sticky;
    top: 20px;
    z-index: 1000;
}

.nav-logo img {
    height: 38px;
    filter: drop-shadow(0 0 10px var(--p-accent-glow));
}

body.theme-business .nav-logo img,
body.theme-partner .nav-logo img {
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.25));
}


/* --- CHAT ENGINE --- */
#chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--p-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 10px 30px var(--p-accent-glow);
    transition: var(--p-transition);
}

#chat-bubble:hover { transform: scale(1.1) rotate(5deg); }

#chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: fadeIn 0.4s ease forwards;
}

.chat-msg {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease forwards;
}

.chat-msg-agent {
    align-self: flex-start;
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--p-border);
}

.chat-msg-user {
    align-self: flex-end;
    background: var(--p-accent);
    color: #000;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

.chat-msg-meta {
    font-size: 0.6rem;
    margin-top: 5px;
    opacity: 0.6;
}

@media (max-width: 500px) {
    #chat-window { width: calc(100% - 40px); right: 20px; height: 70%; }
}

/* --- VAULT & FORMS --- */
.input-group { margin-bottom: 24px; text-align: left; }
.input-group label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--p-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

input, select {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--p-border);
    padding: 16px;
    border-radius: 14px;
    color: #fff;
    font-family: inherit;
    transition: var(--p-transition);
}

input:focus, select:focus {
    border-color: var(--p-accent);
    background: rgba(var(--p-accent-rgb), 0.05);
    box-shadow: 0 0 15px rgba(var(--p-accent-rgb), 0.15);
}

.btn {
    padding: 14px 28px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--p-transition);
    border: none;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


/* UPGRADE LOOMING CARD */
#upgrade-card-zone {
    margin: 30px 24px;
    display: none;
}

.upgrade-looming-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(0, 0, 0, 0.4)) !important;
    position: relative;
    overflow: hidden;
    border-left: 5px solid var(--p-gold) !important;
}

.rocket-wrap {
    font-size: 50px;
    animation: float-rocket 3s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
}

@keyframes float-rocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.pulse-gold {
    animation: pulse-gold 2s infinite;
}

.btn-primary { background: var(--p-accent); color: #000; }
.btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 10px 20px var(--p-accent-muted); }

.btn-ghost { background: transparent; border: 1px solid var(--p-border); color: var(--p-text-muted); }
.btn-ghost:hover { border-color: var(--p-accent); color: var(--p-accent); }

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 11000;
}

.modal-content { width: 90%; max-width: 500px; animation: fadeIn 0.4s ease forwards; }

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    cursor: pointer;
    font-size: 1.5rem;
    opacity: 0.5;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* --- LOCKDOWN & MANDATE PROTOCOLS --- */




/* --- PHASE 2.5: VORTEX CARD & ASSET INTEL --- */

.vortex-virtual-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1.58 / 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
}

.card-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #d4af37 0%, #f9e29c 100%);
    border-radius: 6px;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.card-number {
    font-size: 1.2rem;
    letter-spacing: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    margin-top: 20px;
}

.card-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--p-accent);
    font-weight: 800;
}

.asset-intel-tile {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--p-border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.asset-intel-tile:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--p-accent);
}

.asset-icon {
    font-size: 1.5rem;
    color: var(--p-accent);
}

body.is-mandate-protected #main-dashboard-grid {
    filter: blur(5px);
    pointer-events: none;
}

/* --- VORTEX PRIVATE: ROYAL AESTHETIC --- */
body.is-private-ui {
    --p-bg: #050505;
    --p-accent: #B76E79; /* Rose Gold */
    --p-accent-rgb: 183, 110, 121;
    --p-glass: rgba(75, 0, 130, 0.08); /* Deep Purple Tint */
    --p-glass-heavy: rgba(75, 0, 130, 0.15);
    background: radial-gradient(circle at top right, #1a0033, #050505),
                radial-gradient(circle at bottom left, rgba(183,110,121,0.05) 0%, transparent 50%);
}

body.is-private-ui h1#portal-main-title {
    color: #fff;
    text-shadow: 0 0 20px rgba(183, 110, 121, 0.3), 0 0 40px rgba(183, 110, 121, 0.1);
    letter-spacing: 2px;
}

body.is-private-ui h1#portal-main-title span {
    color: var(--p-accent);
}

body.is-private-ui .v-card {
    border-color: rgba(183, 110, 121, 0.15);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(183, 110, 121, 0.05);
}

body.is-private-ui .hud-tile.highlight {
    background: linear-gradient(135deg, #4B0082 0%, #050505 100%);
    border-color: var(--p-accent);
}

body.is-private-ui #chat-msg-header {
    background: var(--p-accent) !important;
    color: #000 !important;
    font-weight: 900;
}

body.is-private-ui .chat-bubble.agent {
    border-left: 2px solid var(--p-accent);
}

body.is-private-ui .badge-p {
    background: var(--p-accent);
    color: #000;
}

.concierge-tile {
    background: linear-gradient(135deg, rgba(183, 110, 121, 0.05) 0%, transparent 100%);
    border: 1px solid rgba(183, 110, 121, 0.3);
    border-left: 4px solid var(--p-accent);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.concierge-tile::after {
    content: 'CONCIERGE';
    position: absolute;
    right: -10px;
    bottom: -5px;
    font-size: 3rem;
    font-weight: 900;
    opacity: 0.03;
    letter-spacing: 1px;
    pointer-events: none;
}

/* ---- SOLID 3D CARRIER BUBBLES ---- */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    box-shadow: inset -15px -15px 30px rgba(0,0,0,0.5), 0 20px 40px rgba(0,0,0,0.4);
    z-index: -1;
    pointer-events: none;
    animation: orb-float 20s infinite ease-in-out alternate;
    opacity: 0.12; /* Keep it subtle so it doesn't distract from the dashboard text */
    mix-blend-mode: screen;
}

.orb-1 {
    width: 300px; height: 300px;
    background: radial-gradient(circle at 30% 30%, var(--bubble-color-1, #00f2ff) 0%, var(--bubble-color-2, #0055ff) 100%);
    top: 15%; left: 5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 450px; height: 450px;
    background: radial-gradient(circle at 30% 30%, var(--bubble-color-1, #00f2ff) 0%, var(--bubble-color-2, #0055ff) 100%);
    top: 50%; right: -5%;
    animation-delay: -5s;
}

.orb-3 {
    width: 220px; height: 220px;
    background: radial-gradient(circle at 30% 30%, var(--bubble-color-1, #00f2ff) 0%, var(--bubble-color-2, #0055ff) 100%);
    bottom: 5%; left: 20%;
    animation-delay: -10s;
}

@keyframes orb-float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(40px, -40px) scale(1.08) rotate(180deg); }
    100% { transform: translate(-30px, 30px) scale(0.92) rotate(360deg); }
}
