:root {
  --bg: #f8fafc; --fg: #1f2937; --muted: #6b7280; --line: #e5e7eb;
  --primary: #2563eb; --primary-soft: #dbeafe;
  --green: #10b981; --red: #ef4444; --amber: #f59e0b;
  --purple: #8b5cf6; --teal: #14b8a6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }

.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }
.left { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); }
.brand-name { font-weight: 600; font-size: 15px; }
.brand-name small { color: var(--muted); font-weight: 400; margin-left: 6px; font-size: 12px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 18px 14px; font-size: 14px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; white-space: nowrap; }
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.right { display: flex; align-items: center; gap: 12px; }
.period-picker { background: #f3f4f6; border: 1px solid var(--line); padding: 6px 12px; border-radius: 8px; font-size: 12px; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #d1fae5; color: #047857; font-size: 12px; font-weight: 500; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.wrap { max-width: 1280px; margin: 0 auto; padding: 24px; }
.mock-ribbon { background: linear-gradient(90deg, #fef3c7, #fde68a); color: #92400e; padding: 8px 16px; border-radius: 8px; font-size: 12px; font-weight: 500; display: inline-block; margin-bottom: 16px; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.page-head p { font-size: 13px; color: var(--muted); margin-top: 4px; }
.btn { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--fg); }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }

.hero { background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 60%, #f0f9ff 100%); border: 1px solid var(--line); border-radius: 16px; padding: 32px 40px; margin-bottom: 20px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; overflow: hidden; }
.hero-text { min-width: 0; }
.hero-eyebrow { display: inline-block; padding: 4px 12px; background: rgba(37,99,235,0.1); color: var(--primary); border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .04em; margin-bottom: 14px; }
.hero-title { font-size: 56px; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; padding-bottom: 4px; background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #06b6d4 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; margin-bottom: 10px; }
.hero-sub { font-size: 17px; color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat .v { font-size: 20px; font-weight: 700; color: var(--fg); }
.hero-stat .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.hero-mascot { width: 260px; height: 260px; border-radius: 20px; object-fit: cover; box-shadow: 0 20px 50px -20px rgba(37,99,235,0.4); flex-shrink: 0; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding: 24px; }
  .hero-mascot { width: 180px; height: 180px; margin: 0 auto; order: -1; }
  .hero-title { font-size: 40px; }
  .hero-stats { justify-content: center; }
}

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.kpi-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kpi-value small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; margin-top: 6px; padding: 2px 8px; border-radius: 4px; }
.kpi-delta.up { background: #d1fae5; color: #047857; }
.kpi-delta.down { background: #fee2e2; color: #b91c1c; }
.kpi-delta.flat { background: #f3f4f6; color: var(--muted); }
.kpi-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }

.section-title { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin: 6px 0 10px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 14px; font-weight: 600; }
.panel-head .tabs { display: flex; gap: 4px; }
.tab { padding: 4px 12px; border-radius: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.tab.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.panel-body { padding: 20px; }
.panel-body.flush { padding: 0; }

.chart-mock { height: 220px; background: linear-gradient(180deg, rgba(37,99,235,0.08), transparent); border-radius: 8px; position: relative; overflow: hidden; }
.chart-mock svg { width: 100%; height: 100%; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; font-weight: 600; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); background: #fafafa; }
td { padding: 12px; border-bottom: 1px solid #f3f4f6; }
tr:hover td { background: #fafafa; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.sku { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.pos { color: var(--green); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: #d1fae5; color: #047857; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.purple { background: #ede9fe; color: #6d28d9; }
.badge.teal { background: #ccfbf1; color: #0f766e; }

.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) {
  .two-col, .three-col, .kpi-grid { grid-template-columns: 1fr; }
}

.bar-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f3f4f6; }
.bar-row:last-child { border-bottom: none; }
.bar-name { font-size: 13px; font-weight: 500; }
.bar-track { height: 6px; background: var(--primary-soft); border-radius: 3px; margin-top: 6px; }
.bar-track .fill { height: 100%; background: var(--primary); border-radius: 3px; }
.bar-meta { text-align: right; min-width: 120px; }
.bar-meta .val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-meta .sub { font-size: 11px; color: var(--muted); }

.src-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; background: #f3f4f6; color: var(--muted); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.src-tag.sheets { background: #d1fae5; color: #047857; }
.src-tag.mf { background: #ede9fe; color: #6d28d9; }
.src-tag.freee { background: #fef3c7; color: #92400e; }

.footer-note { margin-top: 24px; padding: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.footer-note a { color: var(--primary); text-decoration: underline; }
