/* Shared application finish. Uses the existing layout and semantic status tokens. */
:root {
  --bg: #edf1f4;
  --surface-2: #f4f6f8;
  --ink: #30383e;
  --muted: #626d75;
  --line: #e1e6ea;
  --accent: #5059d6;
  --accent-fill: #5059d6;
  --accent-soft: #eef0ff;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow: 0 2px 4px rgba(24, 42, 78, .025), 0 8px 24px rgba(24, 42, 78, .045);
  --shadow-lg: 0 20px 60px rgba(24, 42, 78, .18);
}

body { line-height: 1.5; }
.screen-title { letter-spacing: -.035em; }
.side-brand { letter-spacing: -.045em; padding-top: 10px; padding-bottom: 26px; }
.tab { min-height: 44px; }
.tab.active .tab-ic { color: var(--accent); }
.topbar { background: var(--bg); }
.stats { gap: 18px; }
.stats b { font-variant-numeric: tabular-nums; }
.ui-hero { padding: 24px; gap: 10px; }
.ui-hero-v { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.04em; }
.ui-hero-s { max-width: 88ch; line-height: 1.6; }
.ui-hero.tone-bad, .ui-hero.tone-warn, .ui-hero.tone-ok { background: var(--card); }
.ui-hero.tone-bad { border-left: 4px solid var(--bad); }
.ui-hero.tone-warn { border-left: 4px solid var(--warn); }
.ui-hero.tone-ok { border-left: 4px solid var(--ok); }
.ui-list, .ui-fold, .gl-card, .today-list { box-shadow: var(--shadow); }
.ui-row { min-height: 56px; padding-top: 12px; padding-bottom: 12px; }
.ui-row-s { margin-top: 3px; }
.today-item { padding-top: 14px; padding-bottom: 14px; }
.today-check input { width: 20px; height: 20px; accent-color: var(--accent-fill); }
.today-note { border-radius: var(--r-sm); }
.search, .select, .btn, .btn-primary { min-height: 44px; }
.btn, .btn-primary, .btn-sm { font-weight: 600; }
.btn-primary { box-shadow: 0 3px 8px rgba(33, 89, 209, .12); }
.modal-card, .usheet { border: 1px solid var(--line); }
.usheet-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tscroll { border-radius: var(--r); }
table th { font-weight: 600; }
input, select, textarea { color: var(--ink); }

.overview-widgets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.overview-widget {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}
.overview-widget dt { color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.overview-widget dd { margin: 8px 0 0; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; font-weight: 700; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.overview-widget small { display: block; margin-top: 8px; color: var(--muted); font-size: var(--fs-small); }
.overview-widget.is-urgent dd { color: var(--bad); }
.overview-widget.needs-answer dd { color: var(--warn); }

@media (min-width: 1025px) {
  :root { --sidebar: 232px; --hdr-h: 64px; }
  .tabbar { padding-left: 16px; padding-right: 16px; gap: 5px; }
  .tab { padding: 11px 14px; border-radius: 12px; }
  .tab.active { box-shadow: inset 3px 0 0 var(--accent); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .overview-widgets { gap: 12px; }
  .overview-widget { padding: 16px; }
}
@media (max-width: 767px) {
  :root { --hdr-h: 56px; --bar-h: 64px; }
  .topbar { border-bottom: 0; }
  .screen-title { font-size: 25px; }
  .tabbar { background: var(--card); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tabbar .tab.active .tab-ic { background: var(--accent-soft); border-radius: 8px; width: 36px; }
  .ui-hero { padding: 18px; }
  .overview-widgets { gap: 8px; margin: 12px 0; }
  .overview-widget { padding: 14px 10px; border-radius: 16px; }
  .overview-widget dt { font-size: 12px; }
  .overview-widget dd { font-size: 28px; }
  .overview-widget small { font-size: 11px; line-height: 1.4; }
  .today-note { width: 100% !important; margin-top: 8px; }
  .today-store .st-note { min-width: 0 !important; flex-basis: 100% !important; }
}

@media (forced-colors: active) {
  .tab.active, .ui-hero, .overview-widget { border: 1px solid CanvasText; }
}

/* Goflow reference: charcoal navigation, white cards, light gray workspace. */
@media (min-width: 768px) {
  .tabbar { background: #293239; border-color: #39434b; }
  .tabbar .side-brand { color: #ffffff; }
  .tabbar .tab { color: #c6ced4; }
  .tabbar .tab:hover, .tabbar .tab.active { background: #39434b; color: #ffffff; }
  .tabbar .tab.active .tab-ic { color: #bcc2ff; }
  .tabbar .side-foot { border-color: #46515a; }
  .tabbar .side-foot .btn { background: #293239; color: #e5e9ed; border-color: #56616b; }
}
