/* --- THEME: MIDNIGHT MESH (AURORA EDITION) --- */
:root {
    --bg-color: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.03); 
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --primary: #aeea01; /* Neon Lime */
    --primary-glow: rgba(174, 234, 1, 0.6);
    --neon-purple: #4c3d87;
    --neon-blue: #00D1FF;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-ui: "Nunito", sans-serif;
    --font-head: "Black Ops One", system-ui;
    --z-loader: 99999;
    --z-ui: 9999;
}

* { box-sizing: border-box; }

/* --- CUSTOM AURORA SCROLLBAR --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5); /* Match bg-color */
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
    box-shadow: 0 0 5px var(--primary-glow);
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
    box-shadow: 0 0 10px var(--primary-glow);
}

/* FireFox Support */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) rgba(15, 23, 42, 0.5);
}

body { 
    font-family: var(--font-ui); 
    background-color: var(--bg-color);
    /* Deep Base Gradient */
    background-image: radial-gradient(at 0% 100%, hsla(253,16%,7%,1) 0, transparent 50%), 
                      radial-gradient(at 50% 0%, #0f172a 0, transparent 50%);
    background-attachment: fixed; 
    color: var(--text-main);
    margin: 0; padding: 2rem 1rem; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    overflow-x: hidden; /* Critical for Aurora */
}

/* --- THE AURORA (Top Right Animation) --- */
body::before {
    content: '';
    position: fixed;
    top: -10vw;
    right: -10vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(99,102,241,0.4) 0%, rgba(168,85,247,0.2) 40%, rgba(0,0,0,0) 70%);
    filter: blur(60px);
    z-index: -1;
    animation: auroraShift 10s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes auroraShift {
    0% { transform: scale(1) translate(0,0); filter: hue-rotate(0deg) blur(60px); }
    50% { transform: scale(1.1) translate(-20px, 10px); filter: hue-rotate(30deg) blur(80px); }
    100% { transform: scale(1) translate(0,0); filter: hue-rotate(-20deg) blur(60px); }
}

/* --- LOADING (Legacy - kept for compatibility) --- */
#loading-state { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: #0f172a; z-index: var(--z-loader); 
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    transition: opacity 0.5s ease;
}
.ui-element { opacity: 0; transition: opacity 1s ease; z-index: var(--z-ui); }
.ui-visible { opacity: 1; }

.dashboard-container { width: 100%; max-width: 900px; padding-bottom: 5rem; animation: fadeInUp 0.8s ease-out; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- CARDS & UI --- */
.card { 
    background: var(--glass-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: var(--glass-border); border-radius: 1.5rem; padding: 2.5rem; 
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3); margin-bottom: 2rem; 
}
.hidden { display: none !important; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: 1px; }

#brand-logo { 
    position: absolute; top: 20px; left: 20px; height: 40px; width: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

/* --- TIMELINE (VELOCITY EDITION) --- */
.timeline { 
    display: flex; justify-content: space-between; margin-bottom: 3rem; 
    position: relative; padding: 20px 10px; overflow: hidden;
}

/* Base Track */
.timeline::before { 
    content: ''; position: absolute; top: 42px; left: 50px; right: 50px; height: 4px; 
    background: rgba(255, 255, 255, 0.05); z-index: 0; border-radius: 4px;
}

/* Shooting Light Arrow */
.timeline::after {
    content: ''; position: absolute; top: 42px; left: 0; width: 200px; height: 4px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 90%, #fff 100%);
    z-index: 0; opacity: 0; filter: drop-shadow(0 0 10px var(--primary));
    animation: shootLight 4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes shootLight {
    0% { transform: translateX(-200px); opacity: 0; }
    10% { opacity: 1; } 90% { opacity: 1; }
    100% { transform: translateX(1000px); opacity: 0; }
}

.step { position: relative; z-index: 1; text-align: center; flex: 1; }
.nav-pills { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 2rem; 
    flex-wrap: wrap; 
}
.step-circle { 
    width: 50px; height: 50px; background: rgba(15, 23, 42, 0.9); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    font-weight: 800; font-family: var(--font-head); color: var(--text-muted); 
    margin: 0 auto 1rem auto; border: 2px solid rgba(255, 255, 255, 0.1); 
    transition: all 0.4s ease; box-shadow: 0 0 15px rgba(0,0,0,0.5); 
    position: relative; z-index: 2;
}
.step-text { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; }

/* ACTIVE (Past) */
.step.active .step-circle { 
    background: var(--primary); color: #000; border-color: #fff; 
    box-shadow: 0 0 20px var(--primary-glow), inset 0 0 10px rgba(255,255,255,0.5); 
}
.step.active .step-text { color: #fff; text-shadow: 0 0 10px var(--primary); }

/* CURRENT (Pulsing) */
.step.current .step-circle { 
    background: #0f172a; color: var(--primary); border-color: var(--primary);
    animation: neonPulse 2s infinite;
}
.step.current .step-text { color: var(--primary); font-weight: 800; }

@keyframes neonPulse {
    0% { box-shadow: 0 0 0 0 rgba(174, 234, 1, 0.4); border-color: var(--primary); }
    70% { box-shadow: 0 0 0 15px rgba(174, 234, 1, 0); border-color: #fff; }
    100% { box-shadow: 0 0 0 0 rgba(174, 234, 1, 0); border-color: var(--primary); }
}

/* --- BUTTONS --- */
.btn-neon, .nav-btn.active, #cookie-ack {
    background: var(--primary) !important; color: #000 !important; font-weight: 700;
    padding: 0.8rem 1.5rem; border-radius: 99px; border: none; cursor: pointer;
    box-shadow: 0 0 15px var(--primary-glow); transition: transform 0.2s;
    text-decoration: none; display: inline-block;
}
.btn-neon:hover { transform: scale(1.05); box-shadow: 0 0 25px var(--primary-glow); }

.nav-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: var(--text-muted); padding: 0.8rem 1.5rem; border-radius: 99px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.mini-btn { padding: 0.4rem 0.8rem; font-size: 0.8rem; border-radius: 8px; border: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.2); color: #ccc; cursor: pointer; }

/* --- CHAT --- */
#chat-widget-container { position: fixed; bottom: 30px; right: 30px; z-index: var(--z-ui); display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
#chat-toggle { width: 65px; height: 65px; background: var(--primary); color: #000; border-radius: 50%; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.5); cursor: pointer; font-size: 1.8rem; transition: transform 0.3s; }
#chat-window { width: 380px; height: 550px; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(20px); border-radius: 20px; display: flex; flex-direction: column; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.1); overflow: hidden; transition: all 0.5s ease; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.chat-header { background: linear-gradient(135deg, var(--primary), #84cc16); padding: 15px 20px; color: #000; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
#chat-messages { flex: 1; padding: 20px; overflow-y: auto; }
.message-row { display: flex; gap: 10px; margin-bottom: 10px; }
.user-row { flex-direction: row-reverse; }
.chat-message { padding: 10px 15px; border-radius: 12px; background: rgba(255,255,255,0.1); color: white; max-width: 80%; }
.user-message { background: var(--primary); color: #000; }

/* --- MODAL --- */
#modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 10000; display: none; justify-content: center; align-items: center; }
.modal-content { background: #1e293b; border: 1px solid rgba(255,255,255,0.1); padding: 2rem; border-radius: 20px; max-width: 500px; width: 90%; max-height: 85vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 15px; right: 15px; color: white; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.modal-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.modal-label { color: var(--text-muted); }
.modal-value { color: white; font-weight: 600; font-family: monospace; }

#settings-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 20000;
}

#settings-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.settings-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#settings-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(174, 234, 1, 0.05);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

#settings-btn:hover .settings-icon {
    transform: rotate(90deg) scale(1.1);
}

#settings-btn:active {
    transform: scale(0.95);
}

/* --- ACTION CARD ALIGNMENT --- */
#action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#action-card h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    letter-spacing: 1px;
}

/* Agreement Box */
#agreement-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 2rem auto;
    text-align: left;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

/* Button Widths */
#sign-btn, #action-btn {
    min-width: 250px;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}
/* Settings rotation legacy removed */
.chat-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    font-size: 11px;
    margin-bottom: 5px;
}

/* --- GLOBAL BOOT PRELOADER --- */
#boot-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 100000;
    display: flex; justify-content: center; align-items: center;
    font-family: 'Courier New', monospace;
    transition: opacity 0.5s ease;
}
.terminal-loader { width: 300px; }
.terminal-text { 
    color: white; font-size: 0.9rem; margin-bottom: 20px; line-height: 1.5; 
    text-shadow: 0 0 5px var(--primary);
}
.progress-bar { 
    width: 100%; height: 4px; background: rgba(255,255,255,0.1); 
    border-radius: 2px; overflow: hidden; 
}
.progress-fill { 
    height: 100%; background: var(--primary); 
    box-shadow: 0 0 10px var(--primary);
    width: 0%; animation: bootLoad 2.5s ease-in-out forwards; 
}
@keyframes bootLoad { 
    0% { width: 0%; } 
    20% { width: 10%; } 
    50% { width: 60%; } 
    80% { width: 80%; } 
    100% { width: 100%; } 
}

/* --- RESPONSIVE DESIGN (MOBILE) --- */
@media (max-width: 768px) {
    /* 1. Global Container */
    body {
        padding: 1rem 0.5rem;
    }
    .dashboard-container {
        width: 100%;
        padding-bottom: 7rem; /* Extra space for chat toggle */
    }

    /* 2. Timeline Vertical Stacking */
    .timeline {
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 20px;
        gap: 20px;
    }
    .timeline::before, .timeline::after {
        display: none;
    }
    .step {
        flex: 0 0 auto;
        width: 80px;
    }
    .step-circle {
        width: 40px; height: 40px; font-size: 0.8rem;
    }
    .step-text {
        font-size: 0.6rem;
    }

    /* 3. Cards & Text */
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 1rem;
    }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    
    /* 4. Chat Widget */
    #chat-window {
        width: 90%;
        height: 60vh;
        right: 5%;
        bottom: 90px;
    }
    #chat-widget-container {
        bottom: 20px; right: 20px;
    }

    /* 5. Forms (Entry Page) */
    .row {
        flex-direction: column;
        gap: 0;
    }
    .col { width: 100%; }
    
    /* 6. Action Area */
    #agreement-box {
        width: 100%;
        padding: 15px;
    }
    #sign-btn, #action-btn {
        width: 100%;
    }

    /* 7. Catalog Grid */
    #view-store > div:nth-child(2) {
        grid-template-columns: 1fr !important;
    }
}

/* --- MESSAGE LIST (INBOX STYLE) --- */
.message-list {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 600px; /* Adjusted for 7 items */
    overflow-y: scroll; /* Keep functionality but hide UI */
    padding-right: 0;
    scrollbar-width: none; /* Firefox */
}

.message-list::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Edge */
}

/* --- ADMIN SPECIFIC OVERRIDES --- */
#sent-messages-list, #client-actions-list {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    overflow-x: hidden !important; /* Force hide horizontal */
}
#sent-messages-list::-webkit-scrollbar, #client-actions-list::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.message-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.message-item:hover {
    background: rgba(255,255,255,0.05);
}

.message-header {
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.message-meta {
    display: flex; align-items: center; gap: 12px;
}

.message-status {
    width: 8px; height: 8px; border-radius: 50%;
    background: #334155; /* Read state */
}

.message-subject {
    font-weight: 600; font-size: 0.95rem; color: white;
}

.msg-status-badge {
    padding: 2px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 1px; color: #000;
}

.message-date {
    font-size: 0.75rem; color: var(--text-muted); font-family: monospace;
}

.message-body {
    padding: 0 15px 15px 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
    display: none; /* Hidden by default */
    padding-top: 15px;
    animation: slideDown 0.3s ease-out;
}

.message-item.open .message-body {
    display: block;
}

.message-item.open {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.1);
}

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

/* --- INBOX PAGINATION --- */
.inbox-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

@media (max-width: 768px) {
    .inbox-pagination {
        gap: 10px;
    }
    .inbox-pagination span {
        font-size: 0.7rem;
    }
}

/* --- MESSAGE ACTIONS --- */
.message-actions {
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    display: flex; 
    flex-direction: column; 
    gap: 15px;
}

.reaction-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    width: 40px; height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}

.reaction-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.1);
    border-color: var(--primary);
}

.approval-box {
    display: flex; align-items: center; justify-content: space-between; 
    background: rgba(174, 234, 1, 0.05); 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid rgba(174, 234, 1, 0.2);
}

@media (max-width: 600px) {
    .approval-box {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* --- COOLDOWN BUTTON STATE (P-08) --- */
.btn-cooldown {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    position: relative !important;
    pointer-events: none !important;
    animation: aurora-btn-pulse 1.5s infinite alternate ease-in-out !important;
}

.cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 0 0 10px var(--primary-glow);
    z-index: 10;
}

.cooldown-bg-text {
    opacity: 0.15;
    transition: opacity 0.3s ease;
}

@keyframes aurora-btn-pulse {
    0% {
        box-shadow: 0 0 5px rgba(174, 234, 1, 0.1);
    }
    100% {
        box-shadow: 0 0 15px rgba(174, 234, 1, 0.5);
    }
}

/* --- VELOCITY CONTRACTS: SIGNATURE COMPONENT (P-13) --- */
.contract-viewer {
    max-height: 450px;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    font-family: var(--font-ui);
    color: var(--text-main);
    line-height: 1.6;
}

.contract-viewer h1, .contract-viewer h2, .contract-viewer h3 {
    font-family: var(--font-head);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contract-viewer hr {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.signature-section {
    background: var(--glass-bg);
    border: var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.signature-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.signature-tab-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.signature-tab-btn.active {
    background: var(--primary);
    color: #0f172a;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.signature-pad-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.signature-pad {
    background: rgba(15, 23, 42, 0.8);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 100%;
    height: 200px;
    display: block;
    cursor: crosshair;
    touch-action: none;
    transition: border-color 0.3s ease;
}

.signature-pad.drawing {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(174, 234, 1, 0.15) inset;
}

.signature-text-input {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    padding: 12px;
    border-radius: 8px;
    width: 100%;
    font-size: 1.5rem;
    font-family: 'Dancing Script', 'Reenie Beanie', 'Georgia', cursive, serif;
    margin-bottom: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.signature-text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.signature-pad-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.signature-preview {
    max-width: 200px;
    max-height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 5px;
    display: none;
}

/* --- VELOCITY PULSE TAB UI --- */
.pulse-dashboard {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.pulse-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .pulse-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.pulse-heartbeat {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    transition: all 0.5s ease;
    flex-shrink: 0;
}

.pulse-heartbeat.connected {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    animation: heartbeat-ping 1.5s infinite ease-in-out;
}

.pulse-heartbeat.idle {
    background: #475569;
    box-shadow: none;
}

.pulse-heartbeat.reconnecting {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
    animation: heartbeat-ping 1s infinite ease-in-out;
}

@keyframes heartbeat-ping {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* SKELETON ANIMATION */
.skeleton-pulse {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* SATISFACTION STARS */
.pulse-star {
    background: none;
    border: none;
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.pulse-star.hovered, .pulse-star.active {
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary-glow);
    transform: scale(1.15);
}

.pulse-star:disabled {
    cursor: not-allowed;
}

.pulse-star:active {
    transform: scale(0.9);
}

/* VERTICAL PULSE TIMELINE */
.pulse-timeline {
    position: relative;
    padding-left: 2rem;
}

.pulse-timeline::before {
    content: '';
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 7.5px;
    width: 2px;
    background: rgba(255, 255, 255, 0.05);
}

.pulse-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.pulse-timeline-item:last-child {
    margin-bottom: 0;
}

.pulse-timeline-node {
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
    transition: all 0.4s ease;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.pulse-timeline-item.completed .pulse-timeline-node {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.pulse-timeline-item.active .pulse-timeline-node {
    background: #0f172a;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    animation: timeline-node-ping 2s infinite ease-in-out;
}

@keyframes timeline-node-ping {
    0% { border-color: var(--primary); box-shadow: 0 0 5px var(--primary-glow); }
    50% { border-color: #fff; box-shadow: 0 0 15px var(--primary-glow); }
    100% { border-color: var(--primary); box-shadow: 0 0 5px var(--primary-glow); }
}

.pulse-timeline-item.pending .pulse-timeline-node {
    background: #1e293b;
    border-color: rgba(255,255,255,0.08);
}

.pulse-timeline-content {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.pulse-timeline-item.active .pulse-timeline-content {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(174, 234, 1, 0.15);
}

.pulse-timeline-title {
    font-weight: bold;
    color: white;
    font-size: 0.95rem;
}

.pulse-timeline-item.active .pulse-timeline-title {
    color: var(--primary);
}

.pulse-timeline-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-top: 5px;
}

/* --- WELCOME REALMS PORTAL --- */
#welcome-portal-overlay {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.welcome-portal-container {
    animation: portalScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes portalScaleIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.realm-info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.realm-info-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}

#info-velocity:hover {
    border-color: rgba(174, 234, 1, 0.3) !important;
    box-shadow: 0 0 20px rgba(174, 234, 1, 0.15);
}

#info-super:hover {
    border-color: rgba(188, 19, 254, 0.3) !important;
    box-shadow: 0 0 20px rgba(188, 19, 254, 0.15);
}

#info-hub:hover {
    border-color: rgba(0, 212, 255, 0.3) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.realm-info-card.selected {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--card-border-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--card-glow-color) !important;
}

#info-velocity.selected {
    --card-border-color: rgba(174, 234, 1, 0.5);
    --card-glow-color: rgba(174, 234, 1, 0.25);
}

#info-super.selected {
    --card-border-color: rgba(188, 19, 254, 0.5);
    --card-glow-color: rgba(188, 19, 254, 0.25);
}

#info-hub.selected {
    --card-border-color: rgba(0, 212, 255, 0.5);
    --card-glow-color: rgba(0, 212, 255, 0.25);
}

@media (max-width: 900px) {
    .welcome-portal-container {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 20px !important;
        overflow-y: auto;
        max-height: 90vh;
    }
    #realms-canvas {
        height: 250px !important;
        width: 100% !important;
    }
}

/* Velocity Mailbox & Staff Provisioning Enhancements */
.slack-tab-info-btn:hover,
.slack-tab-info-btn:focus {
    opacity: 1 !important;
    color: #00D4FF !important;
    background: rgba(0, 212, 255, 0.15) !important;
    transform: scale(1.15);
}

.cf-staff-chip {
    transition: all 0.2s ease;
}

.cf-staff-chip:hover {
    border-color: rgba(0, 212, 255, 0.5) !important;
    background: rgba(0, 212, 255, 0.12) !important;
}