/* ============================================================
   SKYN3T Carousel · Mock: Dashboard
   ------------------------------------------------------------
   Full "Dashboard · CRM" mock adapted from the /crm/ landing.
   Includes traffic-dots header, 4 KPI cards, line chart
   (ingresos mensuales), donut chart (pipeline por etapa) with
   legend, and activity list. Scoped under .skc-dash-mock.
   ============================================================ */

.skc-dash-mock {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, rgba(33, 153, 234, 0.06), rgba(13, 17, 23, 0.95));
    color: #c9d1d9;
    font-family: ui-sans-serif, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    overflow: hidden;
}

.skc-dash-mock * { box-sizing: border-box; }

/* Window chrome row */
.skc-dash-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11.5px;
    color: #c9d1d9;
    flex-shrink: 0;
}

.skc-dash-dots { display: flex; gap: 4px; }
.skc-dash-dots span {
    width: 7px; height: 7px; border-radius: 9999px;
    background: rgba(255, 255, 255, 0.12);
}

/* KPI row */
.skc-dash-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    flex-shrink: 0;
}

.skc-dash-kpi {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 7px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    overflow: hidden;
}

.skc-dash-kpi::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #2199ea, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.skc-dash-kpi.is-active::before { opacity: 0.7; }

.skc-dash-kpi-ic {
    width: 16px; height: 16px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px;
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    color: #fff;
    margin-bottom: 1px;
}

.skc-dash-kpi-ic.is-rev { background: rgba(33, 153, 234, 0.15); color: #67c0f3; }
.skc-dash-kpi-ic.is-lead { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.skc-dash-kpi-ic.is-conv { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.skc-dash-kpi-ic.is-contact { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.skc-dash-kpi-v {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.skc-dash-kpi-l {
    font-size: 9.5px;
    color: #8b949e;
    line-height: 1.2;
}

/* Charts row */
.skc-dash-charts {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 6px;
    flex-shrink: 0;
    min-height: 0;
}

.skc-dash-dcard {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 7px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.skc-dash-dcard-h {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.skc-dash-dcard-t {
    font-size: 10.5px;
    color: #e6edf3;
    font-weight: 600;
    letter-spacing: -0.005em;
}

.skc-dash-dcard-s {
    font-size: 9px;
    color: #8b949e;
    margin-top: 1px;
}

.skc-dash-dcard-val {
    font-size: 11.5px;
    color: #fff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Line chart */
.skc-dash-line-chart {
    width: 100%;
    height: 52px;
    display: block;
}

.skc-dash-line-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.skc-dash-mock.is-animating .skc-dash-line-path {
    animation: skcDashDrawLine 1.6s cubic-bezier(.4,.1,.3,1) forwards;
}

.skc-dash-mock.is-animating .skc-dash-line-area {
    animation: skcDashChartFadeIn 0.6s ease 1.3s forwards;
}

.skc-dash-mock.is-animating .skc-dash-line-mark {
    animation: skcDashChartFadeIn 0.3s ease 1.5s forwards;
}

.skc-dash-mock.is-animating .skc-dash-line-mark-ring {
    animation: skcDashRingPulse 1.6s ease 1.6s infinite;
}

@keyframes skcDashDrawLine { to { stroke-dashoffset: 0; } }
@keyframes skcDashChartFadeIn { to { opacity: 1; } }
@keyframes skcDashRingPulse {
    0% { r: 4; opacity: 0.8; }
    100% { r: 10; opacity: 0; }
}

.skc-dash-line-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 2px;
    font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 8.5px;
    color: #6b7280;
    letter-spacing: 0.06em;
}

/* Donut chart */
.skc-dash-donut-wrap {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
}

.skc-dash-donut {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
}

.skc-dash-dseg {
    transition: stroke-dasharray 1s cubic-bezier(.3,.8,.3,1);
}

.skc-dash-donut-total {
    fill: #fff;
    font-size: 11px;
    font-weight: 700;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
}

.skc-dash-donut-label {
    fill: #8b949e;
    font-size: 5.5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.skc-dash-donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 9.5px;
    color: #c9d1d9;
    min-width: 0;
}

.skc-dash-donut-legend li {
    display: flex;
    align-items: center;
    gap: 5px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.skc-dash-donut-legend li em {
    margin-left: auto;
    font-style: normal;
    color: #8b949e;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8.5px;
    font-variant-numeric: tabular-nums;
}

.skc-dash-donut-legend .sw {
    width: 6px; height: 6px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Activity list */
.skc-dash-activity {
    min-height: 0;
    flex: 1;
}

.skc-dash-act-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skc-dash-act-list li {
    display: grid;
    grid-template-columns: 18px 1fr auto;
    gap: 7px;
    align-items: center;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    opacity: 0;
    transform: translateX(-6px);
}

.skc-dash-mock.is-animating .skc-dash-act-list li {
    animation: skcDashActIn 0.4s cubic-bezier(.2,.8,.2,1) forwards;
}

.skc-dash-mock.is-animating .skc-dash-act-list li:nth-child(1) { animation-delay: 1.8s; }
.skc-dash-mock.is-animating .skc-dash-act-list li:nth-child(2) { animation-delay: 2.05s; }
.skc-dash-mock.is-animating .skc-dash-act-list li:nth-child(3) { animation-delay: 2.3s; }
.skc-dash-mock.is-animating .skc-dash-act-list li:nth-child(4) { animation-delay: 2.55s; }

@keyframes skcDashActIn {
    to { opacity: 1; transform: translateX(0); }
}

.skc-dash-act-ic {
    width: 18px; height: 18px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: #fff;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.skc-dash-act-ic.is-call { background: rgba(33,153,234,.18); color: #67c0f3; }
.skc-dash-act-ic.is-visit { background: rgba(245,158,11,.18); color: #f59e0b; }
.skc-dash-act-ic.is-sign { background: rgba(52,211,153,.18); color: #34d399; }
.skc-dash-act-ic.is-send { background: rgba(139,92,246,.18); color: #a78bfa; }

.skc-dash-act-txt {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.skc-dash-act-txt b {
    font-size: 10.5px;
    font-weight: 500;
    color: #e6edf3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.skc-dash-act-txt em {
    font-style: normal;
    font-size: 9px;
    color: #8b949e;
    line-height: 1.3;
}

.skc-dash-act-tag {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.08em;
    color: #8b949e;
    padding: 2px 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.skc-dash-act-tag.is-ok {
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.25);
    background: rgba(52, 211, 153, 0.06);
}

@media (prefers-reduced-motion: reduce) {
    .skc-dash-mock.is-animating .skc-dash-line-path,
    .skc-dash-mock.is-animating .skc-dash-line-area,
    .skc-dash-mock.is-animating .skc-dash-line-mark,
    .skc-dash-mock.is-animating .skc-dash-line-mark-ring { animation: none; opacity: 1; stroke-dashoffset: 0; }
    .skc-dash-mock.is-animating .skc-dash-act-list li { animation: none; opacity: 1; transform: none; }
    .skc-dash-dseg { transition: none; }
}
