/* Shared look for the /demos sample apps: a light product UI, one accent, sample data. */
:root {
  --bg: #F3F5F9; --panel: #FFFFFF; --panel-2: #F8FAFD; --ink: #0B1220; --text: #3B4457; --muted: #6B7386;
  --line: #E3E7EF; --line-2: #D5DBE6; --accent: #3B82F6; --accent-2: #22D3EE; --accent-ink: #1D4ED8; --accent-soft: #E8F0FF;
  --grad: linear-gradient(120deg, #3B82F6 0%, #22D3EE 100%); --ok: #16A34A; --ok-soft: #DCFCE7; --warn: #B45309; --warn-soft: #FEF3C7; --bad: #B91C1C; --bad-soft: #FEE2E2;
  --dark: #0A0F1A; --r: 12px; --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
b, strong { color: var(--ink); font-weight: 600; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 13px; font-weight: 600; }
p { margin: 0; }
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Demo ribbon */
.ribbon { background: var(--dark); color: #B9C2D4; font-size: 12px; padding: 7px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ribbon b { color: #F3F5FA; font-weight: 600; }
.ribbon .wm { display: inline-flex; align-items: center; gap: 8px; color: #F3F5FA; font-weight: 700; letter-spacing: -0.02em; }
.ribbon .wm i { width: 8px; height: 8px; border-radius: 2px; background: var(--grad); display: inline-block; }
.ribbon a { color: #22D3EE; font-weight: 600; }
.ribbon .tag { background: rgba(255,255,255,.1); border-radius: 999px; padding: 2px 9px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #F3F5FA; }

/* App chrome */
.app { flex: 1; display: grid; grid-template-columns: 220px 1fr; min-height: 0; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.side .brand i { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); display: inline-block; }
.side .brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: 0; }
.side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 13.5px; }
.side a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.side a i { width: 16px; height: 16px; border-radius: 4px; background: var(--line-2); display: inline-block; flex: none; }
.side a.on i { background: var(--accent); }
.side .sp { flex: 1; }
.side .user { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.side .user i { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #CBD5E1, #94A3B8); display: inline-block; }
.main { padding: 22px 26px 40px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.topbar .crumbs { font-size: 12.5px; color: var(--muted); }
.topbar .crumbs b { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; font-size: 13px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.input { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13.5px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); min-width: 260px; }
.input span { color: var(--muted); }

/* Cards, stats, tables */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.card > h2, .card > h3 { margin-bottom: 10px; }
.card .hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card .hd h2, .card .hd h3 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.stat .v { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat .d { font-size: 11.5px; margin-top: 6px; font-weight: 600; }
.up { color: var(--ok); } .down { color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); border-color: transparent; color: #166534; }
.pill.warn { background: var(--warn-soft); border-color: transparent; color: #92400E; }
.pill.bad { background: var(--bad-soft); border-color: transparent; color: #991B1B; }
.pill.blue { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cols-73 { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 14px; }
.cols-64 { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: 14px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.list li:last-child { border-bottom: 0; }
.list li .v { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.note { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); }
.chips span.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Aerial figure with overlays */
.aer { position: relative; border-radius: var(--r); overflow: hidden; background: #1f2a1f; border: 1px solid var(--line); }
.aer img { width: 100%; display: block; }
.aer svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.aer .lab { position: absolute; font-size: 11.5px; font-weight: 600; color: #fff; background: rgba(11,18,32,.82); border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 5px 8px; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.aer .lab b { color: #22D3EE; font-weight: 700; }
.aer .lab.warn b { color: #FBBF24; }
.aer .credit { position: absolute; right: 8px; bottom: 6px; font-size: 10px; color: rgba(255,255,255,.75); background: rgba(0,0,0,.35); padding: 2px 6px; border-radius: 4px; }
.pin { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(0,0,0,.4); transform: translate(-50%, -50%); }
.pin.hot { background: #F59E0B; }

/* Kanban */
.board { display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; }
.col h3 { display: flex; justify-content: space-between; padding: 4px 4px 6px; }
.col h3 span { color: var(--muted); font-weight: 600; }
.kc { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font-size: 12.5px; display: grid; gap: 4px; }
.kc b { font-size: 13px; }
.kc .m { color: var(--muted); font-size: 11.5px; }
.kc .score { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.kc .score .bar { flex: 1; height: 5px; }

/* Image gallery */
.gal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gal figure { margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.gal img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.gal figcaption { padding: 7px 9px; font-size: 12px; display: flex; justify-content: space-between; gap: 8px; }
.gal figcaption b { font-size: 12px; }

/* Small screens: the demos are desktop apps, but keep them readable. */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .side .brand { padding: 4px 8px; }
  .side .brand small, .side .sp, .side .user { display: none; }
  .grid2, .grid3, .cols-73, .cols-64 { grid-template-columns: 1fr; }
  .gal { grid-template-columns: repeat(2, 1fr); }
  .main { padding: 16px; }
}
