/* ============================================================
   .uk-dashboard-sim — proposed canonical hero dashboard mockup (loaded only on /docs/ui-kit)
   ============================================================
   Replaces the live-dashboard hero mockup in `public/css/style.css`:

     .dashboard-sim                  -> .uk-dashboard-sim                  (card chrome — bg + border + radius + shadow)
     .dash-browser                   -> .uk-dashboard-sim-frame            (browser-style frame wrapper)
     (uses .browser-bar etc.)        -> .uk-dashboard-sim-header           (terminal-style header — dots + title)
     .dash-content                   -> .uk-dashboard-sim-content          (flex row: sidebar + main)
     .dash-sidebar                   -> .uk-dashboard-sim-sidebar          (mini left rail — 48 px)
     .sidebar-logo                   -> .uk-dashboard-sim-sidebar-logo
     .sidebar-nav                    -> .uk-dashboard-sim-sidebar-nav
     .nav-item                       -> .uk-dashboard-sim-sidebar-item     (incl. .is-active state)
     .dash-main                      -> .uk-dashboard-sim-main             (right pane — flex column)
     .dash-header-bar                -> .uk-dashboard-sim-bar              (title + status badge row)
     .header-title                   -> .uk-dashboard-sim-bar-title
     .header-badge                   -> .uk-dashboard-sim-bar-badge        (composes with .uk-badge semantic tone if you prefer)
     .resource-list                  -> .uk-dashboard-sim-resources        (list of monitored resources)
     .resource-row                   -> .uk-dashboard-sim-resource         (single row — fades in on --delay var)
     .resource-status                -> .uk-dashboard-sim-resource-status  (8-px dot — .is-success / .is-checking)
     .resource-name                  -> .uk-dashboard-sim-resource-name    (mono name)
     .resource-type                  -> .uk-dashboard-sim-resource-type    (uppercase tag)
     .resource-time                  -> .uk-dashboard-sim-resource-time    (mono RTT)
     .response-graph-container       -> .uk-dashboard-sim-graph
     .graph-header                   -> .uk-dashboard-sim-graph-header
     .graph-period                   -> .uk-dashboard-sim-graph-period
     .graph-area                     -> .uk-dashboard-sim-graph-area
     .response-graph                 -> .uk-dashboard-sim-graph-svg        (svg path with animated stroke draw)
     .graph-fill / .graph-line       -> .uk-dashboard-sim-graph-fill / -line
     .graph-cursor                   -> .uk-dashboard-sim-graph-cursor     (vertical scrubbing line)
     .uptime-row                     -> .uk-dashboard-sim-metrics
     .uptime-metric                  -> .uk-dashboard-sim-metric
     .metric-label                   -> .uk-dashboard-sim-metric-label
     .metric-value                   -> .uk-dashboard-sim-metric-value (incl. .is-mono variant)

   Composes with: nothing strict — the canonical owns the mockup inline so
   the landing-page hero stays self-contained. (We considered composing
   with `.uk-browser-mockup` for the frame but the legacy header is a
   terminal-style label-and-dots row, not the URL-bar variant in
   uk-browser-mockup.)

   All inner elements are decorative — `aria-hidden="true"` on the root.
   No JS needed: animations run via CSS keyframes + per-row `--delay`
   variable.

   Reduced motion: every animation skipped under
   `prefers-reduced-motion: reduce` — the mockup becomes a static
   "snapshot" view.
   ============================================================ */

/* ============================================
   Root — card chrome with hero shadow
   ============================================ */
.uk-dashboard-sim {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.uk-dashboard-sim-frame {
    overflow: hidden;
}

/* ============================================
   Header — terminal-style label bar (dots + title)
   ============================================ */
.uk-dashboard-sim-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.6875rem;
}

.uk-dashboard-sim-header-dots {
    display: flex;
    flex-shrink: 0;
    gap: 6px;
}

.uk-dashboard-sim-header-dots > span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.uk-dashboard-sim-header-dots > span:nth-child(1) { background: #ef4444; }
.uk-dashboard-sim-header-dots > span:nth-child(2) { background: #eab308; }
.uk-dashboard-sim-header-dots > span:nth-child(3) { background: #3d916f; }

.uk-dashboard-sim-header-title {
    flex: 1;
    text-align: center;
    color: var(--color-text-secondary);
}

/* ============================================
   Content — flex row (sidebar + main)
   ============================================ */
.uk-dashboard-sim-content {
    display: flex;
    min-height: 320px;
}

/* ============================================
   Sidebar — mini left rail
   ============================================
   48 px wide. Logo on top, vertical nav-items below. Active nav-item
   carries primary tint.
   ============================================ */
.uk-dashboard-sim-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    width: 48px;
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid var(--color-border);
}

.uk-dashboard-sim-sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: var(--space-sm);
    background: var(--color-primary);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: var(--font-md);
    font-weight: 700;
}

.uk-dashboard-sim-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.uk-dashboard-sim-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    transition: var(--transition-base);
}

.uk-dashboard-sim-sidebar-item.is-active,
.uk-dashboard-sim-sidebar-item[aria-current="true"] {
    background: rgba(var(--color-primary-rgb), 0.2);
    color: var(--color-primary);
}

.uk-dashboard-sim-sidebar-item > svg {
    width: var(--icon-sm);
    height: var(--icon-sm);
    stroke: currentColor;
}

/* ============================================
   Main — right pane (flex column)
   ============================================ */
.uk-dashboard-sim-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-md);
    padding: var(--space-md);
}

/* Title bar (title + status badge) */
.uk-dashboard-sim-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.uk-dashboard-sim-bar-title {
    color: var(--color-text);
    font-size: var(--font-md);
    font-weight: 600;
}

.uk-dashboard-sim-bar-badge {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.625rem;
    font-weight: 500;
}

.uk-dashboard-sim-bar-badge.is-operational {
    background: rgba(var(--color-success-rgb), 0.15);
    color: var(--color-success);
}

/* ============================================
   Resources — list of rows
   ============================================
   Each row fades in via `uk-dashboard-sim-resource-fade-in`; the
   `--delay` variable on the row staggers the entrance so the rows
   appear sequentially as if the dashboard is loading data.
   ============================================ */
.uk-dashboard-sim-resources {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
}

.uk-dashboard-sim-resource {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-card);
    border-radius: var(--radius-sm);
    font-size: var(--font-xs);
    opacity: 0;
    animation: uk-dashboard-sim-resource-fade-in 0.5s ease-out forwards;
    animation-delay: var(--delay, 0s);
}

@keyframes uk-dashboard-sim-resource-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.uk-dashboard-sim-resource-status {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.uk-dashboard-sim-resource-status.is-success {
    background: var(--color-success);
    box-shadow: 0 0 6px rgba(var(--color-success-rgb), 0.5);
}

.uk-dashboard-sim-resource-status.is-checking {
    background: var(--color-primary);
    animation: uk-dashboard-sim-checking-pulse 1.2s ease-in-out infinite;
}

@keyframes uk-dashboard-sim-checking-pulse {
    0%, 100% { opacity: 1;   transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.8); }
}

.uk-dashboard-sim-resource-name {
    flex: 1;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.uk-dashboard-sim-resource-type {
    color: var(--color-text-muted);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.uk-dashboard-sim-resource-time {
    min-width: 40px;
    color: var(--color-success);
    font-family: var(--font-mono);
    text-align: right;
}

/* ============================================
   Graph — response-time chart
   ============================================
   SVG path animates the line draw via stroke-dashoffset; the cursor
   sweeps left-to-right via translateX. Both run continuously to give
   the dashboard a "live" feel.
   ============================================ */
.uk-dashboard-sim-graph {
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
}

.uk-dashboard-sim-graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    color: var(--color-text-muted);
    font-size: 0.6875rem;
}

.uk-dashboard-sim-graph-period {
    font-family: var(--font-mono);
    font-size: 0.625rem;
}

.uk-dashboard-sim-graph-area {
    position: relative;
    height: 60px;
    overflow: hidden;
}

.uk-dashboard-sim-graph-svg {
    width: 100%;
    height: 100%;
}

.uk-dashboard-sim-graph-fill {
    fill: url(#uk-dashboard-sim-graph-gradient);
}

.uk-dashboard-sim-graph-line {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: uk-dashboard-sim-graph-draw 4s ease-out 0.5s forwards;
}

@keyframes uk-dashboard-sim-graph-draw {
    to { stroke-dashoffset: 0; }
}

.uk-dashboard-sim-graph-cursor {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-primary);
    box-shadow: 0 0 8px var(--color-primary-glow);
    opacity: 0.8;
    animation: uk-dashboard-sim-graph-cursor 6s ease-in-out 1.5s infinite;
}

@keyframes uk-dashboard-sim-graph-cursor {
    0%   { left: 0%;   opacity: 0; }
    10%  { opacity: 0.8; }
    90%  { opacity: 0.8; }
    100% { left: 100%; opacity: 0; }
}

/* ============================================
   Metrics — uptime + response display
   ============================================
   Bottom row of headline numbers. The `.is-tick` digit periodically
   pulses to suggest live data updates without actually changing
   the digit value.
   ============================================ */
.uk-dashboard-sim-metrics {
    display: flex;
    gap: var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.uk-dashboard-sim-metric {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
}

.uk-dashboard-sim-metric-label {
    color: var(--color-text-muted);
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.uk-dashboard-sim-metric-value {
    display: flex;
    align-items: baseline;
    color: var(--color-text);
    font-size: var(--font-lg);
    font-weight: 700;
}

.uk-dashboard-sim-metric-value.is-mono {
    font-family: var(--font-mono);
}

.uk-dashboard-sim-metric-value .digit {
    display: inline-block;
}

.uk-dashboard-sim-metric-value .digit.is-tick {
    animation: uk-dashboard-sim-digit-tick 4s ease-in-out infinite;
}

.uk-dashboard-sim-metric-value .digit.is-tick:nth-of-type(2) {
    animation-delay: 2s;
}

@keyframes uk-dashboard-sim-digit-tick {
    0%, 90%, 100% { opacity: 1; transform: translateY(0); }
    93%           { opacity: 0; transform: translateY(-3px); }
    96%           { opacity: 1; transform: translateY(0); }
}

.uk-dashboard-sim-metric-value .dot,
.uk-dashboard-sim-metric-value .percent {
    color: var(--color-text-muted);
    font-size: var(--font-sm);
    font-weight: 400;
}

/* ============================================
   Reduced motion — freeze every animation
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .uk-dashboard-sim-resource,
    .uk-dashboard-sim-resource-status.is-checking,
    .uk-dashboard-sim-graph-line,
    .uk-dashboard-sim-graph-cursor,
    .uk-dashboard-sim-metric-value .digit.is-tick {
        animation: none;
    }

    .uk-dashboard-sim-resource {
        opacity: 1;
        transform: none;
    }

    .uk-dashboard-sim-graph-line {
        stroke-dashoffset: 0;
    }

    .uk-dashboard-sim-graph-cursor {
        opacity: 0;
    }
}
