:root {
  --bg: #eef1f5;
  --bg-soft: #e6ebf2;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --text: #162032;
  --muted: #67758d;
  --line: rgba(151, 168, 194, 0.28);
  --accent: #3668ff;
  --accent-2: #8b5cf6;
  --mint: #19b895;
  --pink: #f04fb3;
  --shadow: 0 20px 60px rgba(35, 48, 74, 0.10);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f3f5f8 0%, #ebeef3 100%);
}
.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .25s ease; }
.sidebar {
  padding: 24px 18px;
  border-right: 1px solid rgba(17,24,39,0.06);
  background: #1f2937;
  color: #eef4ff;
  position: sticky;
  top: 0;
  height: 100vh;
  transition: width .25s ease, padding .25s ease;
  overflow: hidden;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand-badge {
  width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, #4d78ff, #8b5cf6 60%, #f04fb3);
  display:flex; align-items:center; justify-content:center; font-weight:800;
  box-shadow: 0 10px 28px rgba(77,120,255,0.35);
}
.brand-title { font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: rgba(238,244,255,0.7); }
.side-nav { display: grid; gap: 8px; }
.side-nav a {
  color: #d7e2f5; text-decoration: none; padding: 12px 14px; border-radius: 14px;
  transition: 0.2s ease; border: 1px solid transparent;
}
.side-nav a:hover, .side-nav a.active {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: white;
}
.sidebar-foot { position: absolute; left: 18px; right: 18px; bottom: 24px; }
.sidebar-note {
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 14px; font-size: 13px; color: rgba(238,244,255,0.82);
  background: rgba(255,255,255,0.04);
}
.content-area { padding: 28px; min-width: 0; }
.topbar { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom: 22px; color:#182234; }
.topbar-title { margin: 0; font-size: 34px; }
.topbar-sub { margin: 8px 0 0; color: var(--muted); }
.topbar-chip {
  background: rgba(255,255,255,0.78); color: var(--text); padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(17,24,39,0.08); white-space: nowrap;
}
.main { display:grid; gap:20px; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 20px;
}
.glass-card {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
}
.hero {
  display:grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 20px; overflow: hidden;
  background:
    radial-gradient(circle at right top, rgba(139,92,246,0.18), transparent 32%),
    radial-gradient(circle at left bottom, rgba(54,104,255,0.14), transparent 34%),
    var(--panel);
}
.eyebrow { margin:0 0 10px; font-size:12px; letter-spacing:.18em; color: var(--accent); font-weight:700; }
.hero-title { margin:0; font-size: 32px; line-height: 1.15; }
.hero-subtitle { margin: 12px 0 0; color: var(--muted); max-width: 56ch; }
.chip-row { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.chip { background:#eef3ff; color:#3350a6; padding:8px 12px; border-radius:999px; font-size:13px; font-weight:600; }
.hero-side { position:relative; min-height: 180px; }
.hero-orb { position:absolute; border-radius:999px; filter: blur(10px); opacity:.9; }
.orb-1 { width:140px; height:140px; right: 12px; top: 0; background: radial-gradient(circle, rgba(54,104,255,.65), rgba(54,104,255,0)); }
.orb-2 { width:180px; height:180px; right: 90px; bottom: -20px; background: radial-gradient(circle, rgba(240,79,179,.55), rgba(240,79,179,0)); }
.hero-metric {
  position:absolute; right: 22px; bottom: 10px; z-index:2;
  background: rgba(255,255,255,0.78); border:1px solid rgba(255,255,255,0.7);
  border-radius: 22px; padding: 18px 20px; min-width: 200px; backdrop-filter: blur(8px);
}
.metric-label { font-size: 12px; color: var(--muted); }
.metric-value { margin-top:8px; font-size: 24px; font-weight: 800; }
.filter-form { display:flex; gap:16px; align-items:end; flex-wrap:wrap; }
.filter-form label { display:block; font-size:12px; color: var(--muted); margin-bottom: 6px; }
.filter-form input, .filter-form select {
  height: 46px; min-width: 180px; border-radius: 14px; border:1px solid #d8e2f0; padding: 0 14px;
  background:#fff; color:var(--text);
}
.filter-form button {
  height: 46px; border:0; border-radius: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color:white; padding:0 18px; font-weight:700; cursor:pointer; box-shadow: 0 12px 28px rgba(54,104,255,0.24);
}
.cards { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.cards-compact { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat-card { position:relative; overflow:hidden; }
.stat-card::after {
  content:""; position:absolute; inset:auto -24px -24px auto; width:120px; height:120px; border-radius:999px;
  background: radial-gradient(circle, rgba(54,104,255,0.12), transparent 62%);
}
.stat-top { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.stat-label { color:var(--muted); font-size:13px; }
.pill { background:#edf2ff; color:#3e58a6; border-radius:999px; padding:6px 10px; font-size:11px; font-weight:700; }
.stat-value { margin-top: 14px; font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.stat-sub { margin-top: 10px; color: var(--muted); font-size: 13px; }
.dashboard-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:20px; }
.dashboard-grid-main { grid-template-columns: 1.25fr 1fr; }
.viz-card { padding-bottom: 18px; }
.card-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.card-head h3 { margin: 0; font-size: 18px; }
.muted { color: var(--muted); font-size: 13px; }
.bars { display:grid; gap: 14px; }
.bar-row { display:grid; gap:8px; }
.bar-meta { display:flex; justify-content:space-between; gap:12px; align-items:flex-end; }
.bar-label { font-size: 13px; color: var(--muted); }
.bar-value { font-size: 14px; font-weight: 700; }
.bar-track, .rank-track { height: 12px; border-radius: 999px; background: #edf2fa; overflow:hidden; }
.bar-fill, .rank-fill { height:100%; border-radius:999px; }
.bars-blue .bar-fill, .tone-blue .rank-fill { background: linear-gradient(90deg, #4d78ff, #77a1ff); }
.bars-violet .bar-fill, .tone-violet .rank-fill { background: linear-gradient(90deg, #8b5cf6, #b993ff); }
.bars-mint .bar-fill, .tone-mint .rank-fill { background: linear-gradient(90deg, #19b895, #7ce6c9); }
.bars-pink .bar-fill, .tone-pink .rank-fill { background: linear-gradient(90deg, #f04fb3, #ff93cf); }
.stacked-chart { display:grid; gap: 14px; }
.stack-item { display:grid; gap: 8px; }
.stack-head { display:flex; justify-content:space-between; gap:12px; font-size: 14px; }
.stack-outer { height: 16px; border-radius: 999px; background:#edf2fa; overflow:hidden; display:flex; min-width: 15%; }
.stack-seg { height:100%; }
.stack-seg.ec, .legend-dot.ec { background:#4d78ff; }
.stack-seg.shop, .legend-dot.shop { background:#f04fb3; }
.stack-seg.ws, .legend-dot.ws { background:#19b895; }
.legend-row { display:flex; gap:18px; flex-wrap:wrap; margin-top: 16px; color: var(--muted); font-size:13px; }
.legend-dot { display:inline-block; width:10px; height:10px; border-radius:999px; margin-right:8px; }
.rank-list { display:grid; gap: 14px; }
.rank-item { display:grid; grid-template-columns: 40px 1fr; gap: 12px; align-items:center; }
.rank-num {
  width:40px; height:40px; border-radius:14px; display:flex; align-items:center; justify-content:center;
  background:#f3f6fd; font-weight: 800; color:#3c4a68;
}
.rank-top { display:flex; justify-content:space-between; gap:12px; margin-bottom:8px; align-items:flex-end; }
.rank-label {
  color: var(--text); font-weight:600; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; overflow:hidden;
}
.table-card { overflow:hidden; }
.table-wrap { overflow:auto; max-height: 560px; border-radius: 18px; border:1px solid #edf2fa; }
table { width:100%; border-collapse:collapse; background:white; }
th, td { padding: 12px 14px; border-bottom:1px solid #eef2f8; text-align:left; white-space:nowrap; }
th { background: #f7faff; position: sticky; top: 0; z-index: 1; }
tr:hover td { background:#fbfdff; }
.two-col { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
.empty { text-align:center; color: var(--muted); }
.big-empty { padding: 56px 24px; font-size: 16px; }
@media (max-width: 1280px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid-main { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .sidebar-foot { position: static; margin-top: 18px; }
  .content-area { padding: 18px; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { min-height: 130px; }
  .topbar { flex-direction: column; }
}
@media (max-width: 720px) {
  .cards, .cards-compact, .dashboard-grid, .two-col { grid-template-columns: 1fr; }
  .topbar-title { font-size: 28px; }
  .hero-title { font-size: 28px; }
  .filter-form input, .filter-form select { min-width: 100%; width: 100%; }
}

.topbar-main { display:flex; gap:14px; align-items:flex-start; }
.sidebar-toggle {
  width: 42px; height: 42px; border-radius: 14px; border: 1px solid rgba(17,24,39,0.08);
  background: rgba(255,255,255,0.9); color: #182234; cursor: pointer; font-size: 18px; flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(35,48,74,0.08);
}
.app-shell.sidebar-collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.app-shell.sidebar-collapsed .sidebar { padding-left: 10px; padding-right: 10px; }
.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .side-nav span,
.app-shell.sidebar-collapsed .sidebar-foot { display: none; }
.app-shell.sidebar-collapsed .sidebar-brand,
.app-shell.sidebar-collapsed .side-nav a { justify-content: center; }
.flash-stack { display:grid; gap:10px; margin-bottom: 18px; }
.flash { padding: 13px 16px; border-radius: 16px; border:1px solid; box-shadow: var(--shadow); background:#fff; }
.flash.success { border-color: rgba(25,184,149,.18); background:#ecfdf8; color:#0f6b59; }
.flash.error { border-color: rgba(239,68,68,.18); background:#fff1f2; color:#9f1239; }
.master-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 20px; }
.master-card { display:grid; gap: 14px; }
.master-card h3 { margin:0; font-size: 18px; }
.master-meta { color: var(--muted); font-size: 13px; }
.master-actions { display:flex; gap:10px; flex-wrap:wrap; }
.btn, .btn-secondary, .btn-danger, .btn-ghost {
  display:inline-flex; align-items:center; justify-content:center; gap:8px; height: 42px; padding: 0 14px; border-radius: 14px;
  text-decoration:none; font-weight:700; cursor:pointer; border:1px solid transparent;
}
.btn { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color:white; box-shadow: 0 12px 28px rgba(54,104,255,0.2); }
.btn-secondary { background: #fff; color: var(--text); border-color:#dce5f0; }
.btn-danger { background: #fff1f2; color: #9f1239; border-color: #fecdd3; }
.btn-ghost { background: transparent; color: var(--muted); border-color: #dce5f0; }
.page-actions { display:flex; justify-content:space-between; gap:16px; align-items:center; flex-wrap:wrap; }
.page-actions .left, .page-actions .right { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.form-grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.field { display:grid; gap:8px; }
.field label { font-size: 13px; color: var(--muted); font-weight:600; }
.field input, .field select, .field textarea {
  height: 46px; border-radius: 14px; border:1px solid #d8e2f0; padding: 0 14px; background:#fff; color:var(--text); width:100%;
}
.field textarea { min-height: 120px; padding-top: 12px; resize: vertical; }
.field.wide { grid-column: 1 / -1; }
.help { font-size: 12px; color: var(--muted); }
.kv-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:14px; }
.kv { background:#f8fbff; border:1px solid #edf2fa; border-radius:18px; padding:14px; }
.kv .label { color: var(--muted); font-size: 12px; }
.kv .value { margin-top: 6px; font-weight: 800; font-size: 20px; }
.inline-form { display:inline; }
.note-box { background:#f8fbff; border:1px dashed #d8e2f0; border-radius:18px; padding:16px; color: var(--muted); }
.small-table td, .small-table th { padding: 10px 12px; }
@media (max-width: 1180px) {
  .master-grid, .kv-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .form-grid, .master-grid, .kv-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar-toggle { width: 100%; }
}


.section-headline h3 { margin: 0; font-size: 22px; }
.section-headline p { margin: 6px 0 0; color: var(--muted); }
.month-spotlight {
  background:
    radial-gradient(circle at right top, rgba(54,104,255,0.12), transparent 28%),
    radial-gradient(circle at left bottom, rgba(25,184,149,0.10), transparent 32%),
    var(--panel);
}
.month-spotlight-head {
  display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:18px; flex-wrap:wrap;
}
.month-spotlight-head h3 { margin: 0; font-size: 28px; }
.month-spotlight-sub { margin: 10px 0 0; color: var(--muted); }
.month-badge {
  min-width: 120px; text-align:center; padding: 14px 18px; border-radius: 18px; font-weight: 800; font-size: 20px;
  background: linear-gradient(135deg, #3668ff, #8b5cf6); color: #fff; box-shadow: 0 16px 30px rgba(54,104,255,.2);
}
.month-kpi-grid { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:16px; }
.month-kpi-card {
  background: rgba(255,255,255,0.82); border:1px solid rgba(151,168,194,.22); border-radius: 20px; padding: 18px;
}
.month-kpi-label { color: var(--muted); font-size: 13px; }
.month-kpi-value { margin-top: 10px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.month-kpi-sub { margin-top: 8px; font-size: 13px; color: var(--muted); }
.month-kpi-sub.up { color: #0f766e; }
.month-kpi-sub.down { color: #b42318; }
.month-focus-tabs { display:flex; flex-wrap:wrap; gap:10px; margin-bottom: 18px; }
.month-focus-tab {
  border:1px solid #d7e1f0; background:#fff; color:var(--text); border-radius:999px; padding:10px 16px;
  font-weight:700; cursor:pointer; transition:all .18s ease;
}
.month-focus-tab.is-active {
  background: linear-gradient(135deg, #3668ff, #8b5cf6); color:#fff; border-color: transparent;
  box-shadow: 0 12px 24px rgba(54,104,255,.18);
}
.month-focus-panel[hidden] { display:none; }
.badge.subtle { background:#eef4ff; color:#3668ff; }
.month-strip-wrap { display:grid; gap:14px; }
.month-strip {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap:16px;
}
.month-mini-card {
  background: rgba(255,255,255,0.92); border:1px solid #e3ebf5; border-radius: 20px; padding: 16px;
  box-shadow: 0 14px 30px rgba(35,48,74,0.06);
}
.month-mini-card.current { border-color: rgba(54,104,255,.4); box-shadow: 0 18px 32px rgba(54,104,255,.12); }
.month-mini-top { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom: 14px; }
.month-mini-stats { display:grid; gap:12px; margin:0; }
.month-mini-stats div { display:flex; justify-content:space-between; gap:10px; align-items:flex-end; }
.month-mini-stats dt { color: var(--muted); font-size: 12px; }
.month-mini-stats dd { margin:0; font-weight:700; }
.month-detail-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 1180px) {
  .month-kpi-grid, .month-detail-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .month-kpi-grid, .month-detail-grid { grid-template-columns: 1fr; }
  .month-spotlight-head h3 { font-size: 24px; }
}

.trend-card { display:grid; gap:16px; }
.trend-card-table { padding: 18px; }
.trend-card .card-head { align-items:flex-start; }
.trend-card .card-head h3 { line-height: 1.35; }
.trend-table-wrap { max-height: none; overflow: auto; }
.trend-table { min-width: 980px; }
.trend-table th,
.trend-table td { vertical-align: middle; }
.trend-table thead th { text-align: center; }
.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
}
.trend-name-col,
.trend-row-name {
  min-width: 220px;
  max-width: 280px;
  text-align: left;
}
.trend-row-name {
  font-weight: 800;
  line-height: 1.45;
  box-shadow: 1px 0 0 #eef2f8;
}
.trend-month-col {
  min-width: 130px;
}
.trend-total-col,
.trend-total-cell {
  min-width: 130px;
  text-align: right;
  font-weight: 800;
}
.trend-value-cell {
  min-width: 130px;
  text-align: right;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.trend-value-amount {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.trend-value-cell.is-zero .trend-value-amount {
  color: #94a3b8;
}
.section-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:20px; align-items:start; }
.section-grid .full-span { grid-column: 1 / -1; }
.single-col { display:grid; grid-template-columns: minmax(0, 1fr); gap:20px; }
@media (max-width: 980px) {
  .section-grid { grid-template-columns: 1fr; }
  .trend-table { min-width: 820px; }
  .trend-name-col,
  .trend-row-name { min-width: 180px; }
}



.line-card { display:grid; gap: 14px; }
.line-legend { display:flex; gap:18px; flex-wrap:wrap; color: var(--muted); font-size:13px; }
.line-chart-wrap {
  width:100%; min-height: 320px; border:1px solid #edf2fa; border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); padding: 16px 16px 10px;
}
.line-chart { width:100%; height: 300px; display:block; }
.grid-line { stroke: #e8eef8; stroke-width: 1; }
.axis-line, .axis-base { stroke: #c9d6ea; stroke-width: 1.2; }
.line-series { fill:none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.line-series-sales { stroke: #4d78ff; }
.line-series-orders { stroke: #19b895; }
.line-point { stroke: #fff; stroke-width: 2.5; }
.line-point-sales { fill: #4d78ff; }
.line-point-orders { fill: #19b895; }
.line-axis-labels { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.line-axis-labels > div { display:grid; gap:4px; }
.line-axis-labels .right { text-align:right; }
.line-xlabels {
  display:grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap:8px;
  color: var(--muted); font-size: 12px;
}
.line-xlabel {
  text-align:center; white-space: nowrap; overflow:hidden; text-overflow:ellipsis;
}
@media (max-width: 720px) {
  .line-chart-wrap { min-height: 280px; }
  .line-chart { height: 260px; }
  .line-axis-labels { grid-template-columns: 1fr; display:grid; }
  .line-axis-labels .right { text-align:left; }
}


.line-legend-note { margin-left:auto; font-size:12px; }
.line-chart-wrap { position:relative; overflow:hidden; }
.chart-hitbox { fill: transparent; cursor: pointer; }
.chart-hitbox:focus { outline: none; fill: rgba(77, 120, 255, 0.06); }
.hover-guide { stroke: rgba(77, 120, 255, 0.35); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0; pointer-events: none; }
.line-chart-tooltip {
  position:absolute; top:14px; left:14px; z-index:3; pointer-events:none;
  background: rgba(15, 23, 42, 0.92); color:#fff; border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.24); min-width: 150px; font-size: 12px;
}
.line-chart-tooltip strong { display:block; font-size:13px; margin-bottom:6px; }
.line-chart-tooltip .tooltip-row { display:flex; justify-content:space-between; gap:12px; }
.line-hover-readout {
  display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  padding: 12px 14px; border: 1px solid #edf2fa; border-radius: 16px; background: #fbfdff;
}
.line-hover-readout > div { display:grid; gap:4px; }
.daily-calendar-card { display:grid; gap:16px; }
.calendar-month-stack { display:grid; gap:18px; }
.calendar-month-block {
  border:1px solid #edf2fa; border-radius: 18px; padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.calendar-month-head { display:flex; justify-content:space-between; align-items:end; gap:12px; margin-bottom:10px; }
.calendar-month-head h4 { margin:0; font-size:18px; }
.calendar-weekdays, .calendar-grid { display:grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap:8px; }
.calendar-weekdays { margin-bottom:8px; color: var(--muted); font-size:12px; font-weight:700; }
.calendar-weekdays span { text-align:center; }
.calendar-empty { min-height: 96px; }
.calendar-day {
  min-height: 96px; border:1px solid #e6edf8; border-radius: 16px; padding: 10px;
  background: #fff; display:grid; gap:8px; align-content:start;
}
.calendar-day.is-zero { background:#f8fafc; }
.calendar-day-top { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.calendar-day-number { font-size:18px; font-weight:800; }
.calendar-day-weekday { color: var(--muted); font-size:12px; }
.calendar-day-sales { font-size:15px; font-weight:800; letter-spacing:-0.01em; }
.calendar-day-orders { font-size:12px; color: var(--muted); }
@media (max-width: 900px) {
  .line-hover-readout { grid-template-columns: 1fr; }
  .calendar-weekdays, .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calendar-empty { display:none; }
}


.trend-row-primary {
  font-weight: 700;
  line-height: 1.35;
}


.trend-link-button {
  display:block; width:100%; border:0; background:transparent; padding:0; text-align:left; cursor:pointer;
  color:inherit; font:inherit;
}
.trend-link-button:hover .trend-row-primary,
.trend-link-button:focus-visible .trend-row-primary { color:#3668ff; text-decoration: underline; }
.trend-link-button:focus-visible { outline: 2px solid rgba(54,104,255,.28); outline-offset: 4px; border-radius: 10px; }
.trend-pagination {
  display:flex; justify-content:flex-end; align-items:center; gap:12px; flex-wrap:wrap;
}
.page-btn {
  min-width: 88px; height: 40px; border:1px solid #d7e1f0; border-radius: 999px; background:#fff; cursor:pointer; font-weight:700;
}
.page-btn:disabled { opacity:.45; cursor:not-allowed; }
.page-status { color: var(--muted); font-size: 13px; }
.ranking-modal {
  position: fixed; inset: 0; z-index: 1200; display:grid; place-items:center; padding: 24px;
}
.ranking-modal[hidden] { display:none; }
.ranking-modal-backdrop {
  position:absolute; inset:0; background: rgba(15, 23, 42, .46); backdrop-filter: blur(3px);
}
.ranking-modal-dialog {
  position:relative; z-index:1; width:min(980px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
  overflow:hidden; border-radius: 24px; border:1px solid #e5edf9; background:#fff; box-shadow: 0 30px 80px rgba(15,23,42,.22);
  display:grid; grid-template-rows: auto minmax(0,1fr);
}
.ranking-modal-head {
  display:flex; justify-content:space-between; gap:16px; align-items:flex-start; padding:20px 22px 14px; border-bottom:1px solid #eef2f8;
}
.ranking-modal-head h3 { margin:4px 0 0; }
.ranking-modal-close {
  width:40px; height:40px; border-radius: 999px; border:1px solid #d7e1f0; background:#fff; cursor:pointer; font-size:24px; line-height:1;
}
.ranking-modal-body { padding: 18px 22px 22px; overflow:auto; }
.ranking-modal-table { min-width: 700px; }
.ranking-modal-table th:nth-child(1), .ranking-modal-table td:nth-child(1),
.ranking-modal-table th:nth-child(3), .ranking-modal-table td:nth-child(3),
.ranking-modal-table th:nth-child(4), .ranking-modal-table td:nth-child(4),
.ranking-modal-table th:nth-child(5), .ranking-modal-table td:nth-child(5) { text-align:right; }
@media (max-width: 720px) {
  .ranking-modal { padding: 12px; }
  .ranking-modal-head, .ranking-modal-body { padding-left: 14px; padding-right: 14px; }
}

.trend-row-secondary {
  margin-top: 4px;
  font-size: 12px;
  color: #7c8798;
  font-weight: 500;
  line-height: 1.3;
}

.import-form { display:grid; gap:16px; margin-top:16px; }
.import-form code { background:#f3f6fd; padding:2px 6px; border-radius:8px; }
input[type=file] { padding: 10px 12px; height: auto; }

.sync-card { display: grid; gap: 18px; }
.sync-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.sync-form label { display: grid; gap: 8px; min-width: 180px; }
.sync-form input { height: 42px; border-radius: 12px; border: 1px solid #d8dce5; padding: 0 12px; background: #fff; }
.section-head h3 { margin: 0; }
.section-sub { margin: 6px 0 0; color: #677081; }

.topbar-actions { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.topbar-user {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(17,24,39,0.08);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text);
  font-weight: 600;
}
.topbar-logout { height: 42px; cursor: pointer; }

.login-page {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:100vh;
  padding: 24px;
}
.login-shell { width: 100%; max-width: 460px; }
.login-card {
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.login-brand {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:88px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #1f2937;
  color: #fff;
  font-weight: 700;
  margin-bottom: 18px;
}
.login-title { margin: 0 0 8px; font-size: 30px; }
.login-sub { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.login-form { display:grid; gap: 16px; }
.login-form .form-row { display:grid; gap:8px; }
.login-form .form-row span { font-size: 13px; color: var(--muted); font-weight: 600; }
.login-form input {
  height: 48px;
  border-radius: 14px;
  border: 1px solid #d8e2f0;
  padding: 0 14px;
  background: #fff;
}
.login-submit { width: 100%; height: 48px; cursor:pointer; }

.trend-value-meta{font-size:12px;color:var(--muted);line-height:1.4;}
.ranking-modal-tabs{margin-bottom:12px;flex-wrap:wrap;}

.topbar-user { display:inline-flex; align-items:center; gap:8px; padding: 10px 12px; border-radius: 999px; background:#fff; border:1px solid rgba(17,24,39,0.08); font-weight:700; }
.topbar-role { font-size: 11px; color: var(--muted); font-weight:700; background:#eef3ff; padding:4px 8px; border-radius:999px; }
.status-pill { display:inline-flex; align-items:center; justify-content:center; height: 28px; padding:0 10px; border-radius:999px; font-size:12px; font-weight:800; }
.status-pill.ok { background:#ecfdf8; color:#0f6b59; border:1px solid rgba(25,184,149,.18); }
.status-pill.stop { background:#fff1f2; color:#9f1239; border:1px solid rgba(239,68,68,.18); }
.inline-controls { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.inline-controls input, .inline-controls select { height:38px; border-radius:12px; border:1px solid #d8e2f0; padding:0 10px; background:#fff; color:var(--text); }
.btn.compact, .btn-secondary.compact { height:38px; padding:0 10px; border-radius:12px; }
.user-action-stack { display:grid; gap:8px; }
button[disabled], select[disabled] { opacity:.5; cursor:not-allowed; }
