/* ==========================================================
   DASHBOARD — MODERN ADVANCED (TLOD)
   Full file replacement
========================================================== */

:root {
    --dash-bg: #0b1220;
    --dash-card: rgba(255, 255, 255, 0.92);
    --dash-card-solid: #ffffff;

    --dash-text: #0f172a;
    --dash-muted: #64748b;

    --dash-border: rgba(15, 23, 42, 0.10);
    --dash-shadow: 0 18px 55px rgba(2, 8, 23, 0.12);

    --dash-primary: #2563eb;
    --dash-primary-2: #7c3aed;
    --dash-cyan: #22d3ee;
    --dash-pink: #fb7185;

    --dash-r: 18px;
    --dash-r-sm: 14px;

    --dash-ease: cubic-bezier(.2,.8,.2,1);
}

/* page wrapper */
.dash {
    display: block;
}

/* ==========================================================
   HERO
========================================================== */
.dash-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--dash-r) + 4px);
    border: 1px solid rgba(255,255,255,0.10);
    background: radial-gradient(1200px 600px at 20% 0%, rgba(37, 99, 235, 0.20), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(124, 58, 237, 0.18), transparent 55%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.00));
    box-shadow: var(--dash-shadow);
}

.dash-hero-inner {
    position: relative;
    z-index: 2;
    padding: 18px 18px 16px;
}

@media (min-width: 768px) {
    .dash-hero-inner { padding: 22px 22px 18px; }
}

.dash-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.dash-grid {
    position: absolute;
    inset: -1px;
    opacity: 0.25;
    background:
        linear-gradient(rgba(255,255,255,0.10) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.10) 1px, transparent 1px);
    background-size: 36px 36px;
    mask-image: radial-gradient(circle at 30% 0%, #000 40%, transparent 70%);
}

.dash-blob {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 999px;
    filter: blur(26px);
    opacity: 0.65;
    transform: translate3d(0,0,0);
    animation: dashFloat 10s var(--dash-ease) infinite;
}

.dash-blob-1 {
    left: -90px;
    top: -110px;
    background: radial-gradient(circle at 30% 30%, rgba(37,99,235,0.55), transparent 60%);
}

.dash-blob-2 {
    right: -120px;
    top: -90px;
    background: radial-gradient(circle at 30% 30%, rgba(124,58,237,0.50), transparent 60%);
    animation-duration: 12s;
}

.dash-blob-3 {
    right: 25%;
    bottom: -160px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle at 30% 30%, rgba(34,211,238,0.38), transparent 60%);
    animation-duration: 14s;
}

@keyframes dashFloat {
    0%   { transform: translate3d(0,0,0) scale(1); }
    50%  { transform: translate3d(10px, -8px, 0) scale(1.04); }
    100% { transform: translate3d(0,0,0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .dash-blob { animation: none; }
}

/* hero header layout */
.dash-hero-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 992px) {
    .dash-hero-head {
        grid-template-columns: 1.3fr 0.7fr;
        align-items: start;
        gap: 18px;
    }
}

.dash-kicker {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.55);
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 6px 10px;
    border-radius: 999px;
}

.dash-title {
    font-weight: 750;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.12;
    margin-top: 10px;
}

.dash-title-accent {
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

@media (min-width: 576px) {
    .dash-title { font-size: 26px; }
}

.dash-subtitle {
    margin-top: 8px;
    color: rgba(15, 23, 42, 0.62);
    font-size: 13px;
    line-height: 1.55;
    max-width: 760px;
}

.dash-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dash-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.70);
    color: rgba(15, 23, 42, 0.70);
    font-size: 12px;
}

.dash-pill-soft {
    background: rgba(255,255,255,0.55);
}

.dash-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary-2));
    box-shadow: 0 0 0 6px rgba(37,99,235,0.10);
}

/* right card inside hero */
.dash-hero-right {
    display: grid;
    gap: 12px;
}

.dash-hero-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--dash-r);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.72);
    padding: 12px;
    box-shadow: 0 10px 30px rgba(2, 8, 23, 0.10);
}

.dash-hero-badge-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary-2));
    color: #fff;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.25);
}

.dash-hero-badge-top {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
}

.dash-hero-badge-bottom {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.60);
}

.dash-mini {
    border-radius: var(--dash-r);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.66);
    padding: 12px;
}

.dash-mini-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 8px;
    border-radius: 12px;
}

.dash-mini-row:not(:last-child) {
    border-bottom: 1px dashed rgba(15, 23, 42, 0.12);
}

.dash-mini-label {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.60);
}

.dash-mini-value {
    font-weight: 750;
    color: #0f172a;
}

/* ==========================================================
   METRICS GRID
========================================================== */
.dash-metrics {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (min-width: 768px) {
    .dash-metrics { grid-template-columns: repeat(4, 1fr); gap: 12px; }
}

.dash-metric {
    position: relative;
    border-radius: var(--dash-r);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255, 255, 255, 0.78);
    padding: 12px;
    box-shadow: 0 10px 30px rgba(2, 8, 23, 0.10);
    transition: transform .18s var(--dash-ease), box-shadow .18s var(--dash-ease), border-color .18s var(--dash-ease);
    overflow: hidden;
}

.dash-metric::after {
    content: "";
    position: absolute;
    inset: -2px;
    background: radial-gradient(420px 160px at 20% 0%, rgba(37,99,235,0.18), transparent 60%),
    radial-gradient(420px 160px at 90% 10%, rgba(124,58,237,0.14), transparent 60%);
    opacity: 0;
    transition: opacity .18s var(--dash-ease);
    pointer-events: none;
}

.dash-metric:hover {
    transform: translateY(-3px);
    border-color: rgba(37,99,235,0.25);
    box-shadow: 0 16px 44px rgba(2, 8, 23, 0.16);
}

.dash-metric:hover::after { opacity: 1; }

.dash-metric-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.dash-metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.dash-metric-name {
    font-size: 12px;
    color: rgba(15, 23, 42, 0.62);
    font-weight: 650;
}

.dash-metric-value {
    position: relative;
    z-index: 1;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.dash-metric-hint {
    position: relative;
    z-index: 1;
    margin-top: 6px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
}

/* ==========================================================
   TWO COLUMN BLOCKS
========================================================== */
.dash-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 992px) {
    .dash-grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        align-items: start;
    }
}

.dash-block {
    border-radius: calc(var(--dash-r) + 2px);
    box-shadow: 0 16px 45px rgba(2, 8, 23, 0.10);
    border: 1px solid rgba(15, 23, 42, 0.10);
}

.dash-block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.dash-block-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.dash-block-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.60);
}

/* ==========================================================
   ACTIONS
========================================================== */
.dash-actions {
    display: grid;
    gap: 10px;
}

.dash-action {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: var(--dash-r);
    text-decoration: none !important;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.86);
    transition: transform .18s var(--dash-ease), box-shadow .18s var(--dash-ease), border-color .18s var(--dash-ease);
    overflow: hidden;
}

.dash-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 160px at 10% 0%, rgba(37,99,235,0.18), transparent 55%),
    radial-gradient(500px 160px at 90% 10%, rgba(124,58,237,0.14), transparent 55%);
    opacity: 0;
    transition: opacity .18s var(--dash-ease);
    pointer-events: none;
}

.dash-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(2, 8, 23, 0.14);
    border-color: rgba(37, 99, 235, 0.25);
}

.dash-action:hover::before { opacity: 1; }

.dash-action:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.18), 0 18px 48px rgba(2, 8, 23, 0.14);
}

.dash-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.dash-action-body {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.dash-action-title {
    font-weight: 800;
    color: #0f172a;
    font-size: 13px;
    line-height: 1.2;
}

.dash-action-desc {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.60);
}

.dash-action-arrow {
    position: relative;
    z-index: 1;
    font-weight: 900;
    color: rgba(15, 23, 42, 0.55);
}

.dash-action-primary {
    border-color: rgba(37,99,235,0.20);
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.84));
}

.dash-action-soft {
    background: rgba(255,255,255,0.78);
}

/* ==========================================================
   SECTIONS
========================================================== */
.dash-sections {
    display: grid;
    gap: 10px;
}

.dash-section {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--dash-r);
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.84);
    text-decoration: none !important;
    transition: transform .18s var(--dash-ease), box-shadow .18s var(--dash-ease), border-color .18s var(--dash-ease);
}

.dash-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(2, 8, 23, 0.14);
    border-color: rgba(124,58,237,0.22);
}

.dash-section-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    flex: 0 0 auto;
}

.dash-section-body {
    flex: 1 1 auto;
    min-width: 0;
}

.dash-section-title {
    font-size: 13px;
    font-weight: 850;
    color: #0f172a;
}

.dash-section-text {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.60);
}

.dash-section-go {
    align-self: center;
    font-size: 12px;
    font-weight: 800;
    color: rgba(37, 99, 235, 0.85);
}

.dash-section-split {
    display: flex;
    align-items: flex-start;
}

.dash-section-links {
    margin-top: 8px;
    display: grid;
    gap: 6px;
}

.dash-section-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    background: rgba(255,255,255,0.72);
    color: rgba(37, 99, 235, 0.95);
    font-size: 12px;
    font-weight: 750;
    text-decoration: none !important;
    transition: transform .18s var(--dash-ease), border-color .18s var(--dash-ease), box-shadow .18s var(--dash-ease);
}

.dash-section-link:hover {
    transform: translateY(-2px);
    border-color: rgba(37,99,235,0.25);
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.12);
}

/* ==========================================================
   TIP CARD
========================================================== */
.dash-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-radius: calc(var(--dash-r) + 2px);
    border: 1px solid rgba(15, 23, 42, 0.10);
    box-shadow: 0 16px 45px rgba(2, 8, 23, 0.10);
}

.dash-tip-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(124,58,237,0.14));
    border: 1px solid rgba(15, 23, 42, 0.10);
}

.dash-tip-title {
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}

.dash-tip-text {
    margin-top: 3px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.62);
    line-height: 1.55;
}

/* ==========================================================
   APPEAR ANIMATION (IntersectionObserver)
========================================================== */
[data-anim] {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s var(--dash-ease), transform .45s var(--dash-ease);
}

[data-anim].is-in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-anim] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==========================================================
   MOBILE POLISH
========================================================== */
@media (max-width: 575.98px) {
    .dash-hero-inner { padding: 14px; }
    .dash-title { font-size: 20px; }
    .dash-metric-value { font-size: 22px; }
}
