#dashboard-wrapper {
    --bg:      #07090f;
    --surface: #0c111c;
    --surface2:#111827;
    --border:  #1a2540;
    --border2: #243050;
    --text:    #dde4f0;
    --muted:   #4a5a7a;
    --cyan:    #00d4ff;
    --green:   #00e87a;
    --red:     #ff3d5e;
    --amber:   #ffaa00;

    background: var(--bg);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    position: relative;
    padding-bottom: 60px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 100px; /* Space for navbar */
    margin-bottom: 2rem;
}

/* Subtle dot-grid background */
#dashboard-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(26,37,64,0.7) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: 0;
}

/* Noise texture */
#dashboard-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

#dashboard-wrapper .mono { font-family: 'Chivo Mono', monospace; }

/* Animations */
@keyframes flash-up {
    0%   { background: rgba(0,232,122,0.12); }
    100% { background: transparent; }
}
@keyframes flash-down {
    0%   { background: rgba(255,61,94,0.12); }
    100% { background: transparent; }
}
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(0, 212, 255, 0); }
}

#dashboard-wrapper .flash-up   { animation: flash-up   0.9s ease-out; }
#dashboard-wrapper .flash-down { animation: flash-down 0.9s ease-out; }

/* Header */
#dashboard-wrapper header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(7, 9, 15, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

#dashboard-wrapper .header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#dashboard-wrapper .logo-mark {
    width: 36px; height: 36px;
    background: rgba(0,212,255,0.07);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

#dashboard-wrapper .brand-name {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text);
    margin: 0;
}
#dashboard-wrapper .brand-sub {
    font-family: 'Chivo Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.12em;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 1px;
}

#dashboard-wrapper .status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
}

#dashboard-wrapper .live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    animation: pulse-dot 2s infinite;
    flex-shrink: 0;
}
#dashboard-wrapper .live-dot.offline {
    background: var(--red);
    animation: none;
}

/* Main layout */
#dashboard-wrapper main {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 0;
}

#dashboard-wrapper section { margin-bottom: 40px; }

#dashboard-wrapper .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
#dashboard-wrapper .section-left { display: flex; align-items: center; gap: 10px; }

#dashboard-wrapper .section-index {
    font-family: 'Chivo Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
}

#dashboard-wrapper .section-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

#dashboard-wrapper .section-tag {
    font-family: 'Chivo Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 5px;
    background: var(--surface);
    border: 1px solid var(--border);
}
#dashboard-wrapper .section-tag.amber {
    color: var(--amber);
    background: rgba(255,170,0,0.05);
    border-color: rgba(255,170,0,0.2);
}

/* Card grid */
#dashboard-wrapper .card-grid {
    display: grid;
    gap: 12px;
}
#dashboard-wrapper .grid-4 { grid-template-columns: repeat(2, 1fr); }
#dashboard-wrapper .grid-3 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px) {
    #dashboard-wrapper .grid-4 { grid-template-columns: repeat(3, 1fr); }
    #dashboard-wrapper .grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
    #dashboard-wrapper .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1100px) {
    #dashboard-wrapper .grid-3 { grid-template-columns: repeat(6, 1fr); }
}

/* Asset Card */
#dashboard-wrapper .dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.15s;
    animation: fade-in-up 0.4s ease-out both;
    text-align: left;
}
#dashboard-wrapper .dash-card:hover {
    border-color: rgba(0,212,255,0.22);
    transform: translateY(-1px);
}

/* Decorative corner accent */
#dashboard-wrapper .dash-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 28px; height: 28px;
    border-top: 1px solid rgba(0,212,255,0.12);
    border-right: 1px solid rgba(0,212,255,0.12);
    border-radius: 0 12px 0 0;
    pointer-events: none;
}

#dashboard-wrapper .dash-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

#dashboard-wrapper .dash-card-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    margin: 0;
}
#dashboard-wrapper .dash-card-sub {
    font-family: 'Chivo Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
    letter-spacing: 0.06em;
}

#dashboard-wrapper .change-pill {
    font-family: 'Chivo Mono', monospace;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 7px;
    border-radius: 5px;
    white-space: nowrap;
    flex-shrink: 0;
}
#dashboard-wrapper .pill-up   { background: rgba(0,232,122,0.1); color: var(--green); border: 1px solid rgba(0,232,122,0.2); }
#dashboard-wrapper .pill-down { background: rgba(255,61,94,0.1);  color: var(--red);   border: 1px solid rgba(255,61,94,0.2); }

#dashboard-wrapper .dash-card-price {
    font-family: 'Chivo Mono', monospace;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.03em;
    margin-top: 14px;
    line-height: 1;
    transition: color 0.3s;
}

/* Sparkline */
#dashboard-wrapper .sparkline {
    height: 38px;
    margin-top: 12px;
}
#dashboard-wrapper .sparkline svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#dashboard-wrapper .dash-card-footer {
    font-family: 'Chivo Mono', monospace;
    font-size: 9px;
    color: var(--muted);
    margin-top: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Clock */
#dashboard-wrapper #clock {
    font-family: 'Chivo Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

/* Stagger card animations */
#dashboard-wrapper .dash-card:nth-child(1)  { animation-delay: 0.0s; }
#dashboard-wrapper .dash-card:nth-child(2)  { animation-delay: 0.05s; }
#dashboard-wrapper .dash-card:nth-child(3)  { animation-delay: 0.10s; }
#dashboard-wrapper .dash-card:nth-child(4)  { animation-delay: 0.15s; }
#dashboard-wrapper .dash-card:nth-child(5)  { animation-delay: 0.20s; }
#dashboard-wrapper .dash-card:nth-child(6)  { animation-delay: 0.25s; }
