/* =====================================================================
   공통 베이스 — 모든 테마가 CSS 변수만 바꿔서 재사용
   ===================================================================== */
@font-face {
  font-family: "Pretendard";
  src: url("../vendor/fonts/PretendardVariable.woff2") format("woff2-variations");
  font-weight: 45 920;
  font-display: swap;
}

:root {
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", "D2Coding", Menlo, Consolas, monospace;
  --fs: 14px;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e3e6eb;
  --border-strong: #cfd5dd;
  --text: #1c2430;
  --muted: #6b7684;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #e8efff;
  --danger: #dc2626;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  --row-h: 42px;
  --th-bg: var(--surface-2);
  --th-color: var(--muted);
  --focus: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);

  --tone-green: #0f9d58;  --tone-green-bg: #e6f6ee;
  --tone-blue: #1d64d8;   --tone-blue-bg: #e7efff;
  --tone-amber: #b26a00;  --tone-amber-bg: #fff3dc;
  --tone-red: #d32f2f;    --tone-red-bg: #fdeaea;
  --tone-rose: #c2185b;   --tone-rose-bg: #fde7f0;
  --tone-violet: #6d3fd1; --tone-violet-bg: #f0eafd;
  --tone-teal: #00897b;   --tone-teal-bg: #e0f4f1;
  --tone-gray: #5f6b7a;   --tone-gray-bg: #eef0f3;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--fs); line-height: 1.5;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
svg { flex: none; }
.w-3 { width: 12px; } .h-3 { height: 12px; } .w-4 { width: 16px; } .h-4 { height: 16px; }
.w-5 { width: 20px; } .h-5 { height: 20px; } .w-6 { width: 24px; } .h-6 { height: 24px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
table { border-collapse: collapse; width: 100%; }

/* ---------------------------------------------------------- 유틸리티 */
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.muted { color: var(--muted); }
.small { font-size: .86em; }
.xs { font-size: .78em; }
.strong { font-weight: 650; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.center { text-align: center; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.up { color: var(--tone-green); } .down { color: var(--tone-red); }
.hide-sm { }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------- 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-weight: 550; cursor: pointer; white-space: nowrap; transition: .15s;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.08); color: var(--primary-ink); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { color: #fff; filter: brightness(1.08); }
.btn-sm { height: 30px; padding: 0 10px; font-size: .9em; }
.btn-icon { width: 36px; padding: 0; }

/* ---------------------------------------------------------- 카드 */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-title { font-weight: 700; font-size: 1.02em; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }
.card-flush { overflow: hidden; }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 200px; }
.chart-box.lg { height: 320px; }

/* ---------------------------------------------------------- 페이지 헤더 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 1.55em; font-weight: 750; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { display: flex; gap: 6px; color: var(--muted); font-size: .86em; margin-bottom: 6px; }
.crumbs a:hover { color: var(--primary); }

/* ---------------------------------------------------------- 툴바/필터 */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .fld { padding-left: 34px; }
.toolbar select.fld { width: auto; min-width: 120px; }

/* ---------------------------------------------------------- 테이블 */
.tbl-wrap { overflow-x: auto; }
.tbl th, .tbl td { padding: 0 14px; height: var(--row-h); border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl td.center, .tbl th.center { text-align: center; }
.tbl th { background: var(--th-bg); color: var(--th-color); font-weight: 600; font-size: .86em; position: sticky; top: 0; }
.tbl th a { display: inline-flex; align-items: center; gap: 4px; }
.tbl th a:hover { color: var(--primary); }
.tbl th.num a { justify-content: flex-end; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--primary) 4%, var(--surface)); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td.wrap-cell { white-space: normal; min-width: 180px; }
.tbl .link { color: var(--primary); font-weight: 600; }
.tbl .link:hover { text-decoration: underline; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border-strong); }
.tbl-compact th, .tbl-compact td { height: 36px; padding: 0 10px; }

/* ---------------------------------------------------------- 배지 */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .8em; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-green { color: var(--tone-green); background: var(--tone-green-bg); }
.tone-blue { color: var(--tone-blue); background: var(--tone-blue-bg); }
.tone-amber { color: var(--tone-amber); background: var(--tone-amber-bg); }
.tone-red { color: var(--tone-red); background: var(--tone-red-bg); }
.tone-rose { color: var(--tone-rose); background: var(--tone-rose-bg); }
.tone-violet { color: var(--tone-violet); background: var(--tone-violet-bg); }
.tone-teal { color: var(--tone-teal); background: var(--tone-teal-bg); }
.tone-gray { color: var(--tone-gray); background: var(--tone-gray-bg); }
.bool-yes { color: var(--tone-green); font-weight: 600; }
.bool-no { color: var(--muted); }

/* ---------------------------------------------------------- 폼 */
.fld {
  width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.fld { height: auto; padding: 10px 12px; resize: vertical; }
select.fld { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.fld:focus { border-color: var(--primary); box-shadow: var(--focus); }
.chk { width: 18px; height: 18px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field-label { font-weight: 600; font-size: .9em; }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-check { flex-direction: row; align-items: center; gap: 10px; padding-top: 26px; }
.field-err { color: var(--danger); font-size: .84em; }
.field.has-err .fld { border-color: var(--danger); }
.help { color: var(--muted); font-size: .82em; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 8px; }
.lines td { padding: 8px 6px; height: auto; }
.lines .fld { height: 34px; }
.lines td.amt { min-width: 120px; }

/* ---------------------------------------------------------- 상세 */
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv-item { padding: 14px 18px; border-bottom: 1px solid var(--border); min-width: 0; }
.kv-label { color: var(--muted); font-size: .82em; margin-bottom: 4px; }
.kv-value { font-weight: 550; word-break: break-all; }
.kv-item.full { grid-column: 1 / -1; }

/* ---------------------------------------------------------- 페이지네이션 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager-links { display: flex; gap: 4px; }
.pager-links a, .pager-links span { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.pager-links a:hover { border-color: var(--primary); color: var(--primary); }
.pager-links .cur { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pager-links .dis { opacity: .4; }

/* ---------------------------------------------------------- 알림 */
.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.alert-success { color: var(--tone-green); background: var(--tone-green-bg); border-color: color-mix(in srgb, var(--tone-green) 30%, transparent); }
.alert-error { color: var(--tone-red); background: var(--tone-red-bg); border-color: color-mix(in srgb, var(--tone-red) 30%, transparent); }
.alert-warning, .alert-info { color: var(--tone-amber); background: var(--tone-amber-bg); border-color: color-mix(in srgb, var(--tone-amber) 30%, transparent); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------- KPI 공통 */
.kpi-label { color: var(--muted); font-size: .86em; font-weight: 550; }
.kpi-value { font-size: 1.7em; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.kpi-foot { font-size: .82em; margin-top: 6px; color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--tone-gray-bg); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: .8em; flex: none; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: 0; }

/* ---------------------------------------------------------- 칸반 공통 */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.board-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 220px); min-height: 200px; }
.board-col-head { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.board-col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; min-height: 80px; transition: background .15s; }
.board-col-body.drag-over { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.deal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); }
.deal-card:active { cursor: grabbing; }
.deal-card.dragging { opacity: .45; }
.deal-card .t { font-weight: 600; line-height: 1.35; }
.deal-card .t:hover { color: var(--primary); }

/* ---------------------------------------------------------- 반응형 */
@media (max-width: 1100px) {
  .g-4, .g-5, .g-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-3, .span-4 { grid-column: 1 / -1; }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .g-2, .g-3, .g-4, .g-5, .g-6 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .form-grid, .kv { grid-template-columns: minmax(0, 1fr); }
  .hide-sm { display: none !important; }
  .page-title { font-size: 1.3em; }
}

/* ---------------------------------------------------------- 단계(Path) */
.stage-path { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; }
.stage-step { flex: 1; min-width: 90px; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 18px; background: var(--tone-gray-bg); color: var(--muted); font-weight: 600; font-size: .88em; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); }
.stage-step:first-child { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 999px 0 0 999px; }
.stage-step.done { background: color-mix(in srgb, var(--tone-green) 18%, var(--surface)); color: var(--tone-green); }
.stage-step.current { background: var(--primary); color: var(--primary-ink); }

/* ---------------------------------------------------------- 디자인 전환 */
.switcher { position: fixed; right: 18px; bottom: 18px; z-index: 90; font-family: var(--font); font-size: 13px; }
.switcher > button { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: #111827; color: #fff; font-weight: 650; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.switcher-menu { position: absolute; right: 0; bottom: 50px; width: 270px; background: #fff; color: #111827; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.25); padding: 8px; display: none; }
.switcher.open .switcher-menu { display: block; }
.switcher-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; }
.switcher-menu a:hover, .switcher-menu a.on { background: #f1f5f9; }
.switcher-menu .sw { display: flex; width: 34px; height: 22px; border-radius: 5px; overflow: hidden; flex: none; border: 1px solid #e5e7eb; }
.switcher-menu .sw i { flex: 1; }
.switcher-menu .cap { font-size: 11px; color: #6b7280; padding: 6px 10px 2px; font-weight: 700; letter-spacing: .04em; }
.switcher-menu .nm { font-weight: 650; line-height: 1.2; }
.switcher-menu .co { font-size: 11px; color: #6b7280; }
.nav-toggle { display: none; }

/* ---------------------------------------------------------- 데모 상단바 (전 시스템 공통) */
.demobar { position: sticky; top: 0; z-index: 100; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: #0f0f10; color: #e7e7e7; font-family: var(--font); font-size: 12.5px; }
.demobar a, .demobar button { color: inherit; }
.db-home { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.08); font-weight: 650; }
.db-home:hover { background: rgba(255,255,255,.16); }
.db-jump { position: relative; }
.db-cur { display: flex; align-items: center; gap: 8px; background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.db-cur:hover { background: rgba(255,255,255,.08); }
.db-cur b { letter-spacing: .06em; font-size: 11px; color: #fff; }
.db-cur span { color: #a3a3a3; }
.db-menu { display: none; position: absolute; left: 0; top: 34px; width: 300px; background: #fff; color: #111; border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.3); }
.db-jump.open .db-menu { display: block; }
.db-menu a, .db-menu .off { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.db-menu a:hover, .db-menu a.on { background: #f2f2f2; }
.db-menu .off { opacity: .45; }
.db-menu .sw { display: flex; width: 34px; height: 20px; border-radius: 5px; overflow: hidden; border: 1px solid #e5e5e5; flex: none; }
.db-menu .sw i { flex: 1; }
.db-menu .nm { display: block; font-weight: 650; }
.db-menu .co { display: block; font-size: 11px; color: #777; }
.db-palette { display: flex; align-items: center; gap: 6px; color: #a3a3a3; }
.db-chip { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); cursor: pointer; padding: 0; transition: transform .15s; }
.db-chip:hover { transform: scale(1.15); }
.db-chip.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.db-user { display: flex; align-items: center; gap: 6px; color: #a3a3a3; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.12); }
.db-out { display: flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer; color: #a3a3a3; padding: 4px 6px; border-radius: 6px; }
.db-out:hover { color: #fff; background: rgba(255,255,255,.08); }
.preset-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.preset { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--primary); color: var(--primary-ink); font-weight: 600; font-size: .9em; }
.preset-x { color: var(--muted); font-size: .9em; }
.preset-x:hover { color: var(--text); }

/* ---------------------------------------------------------- 목록 상단 요약·탭·기간 */
.hl-row { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.hl { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: .15s; }
a.hl:hover { border-color: var(--text); transform: translateY(-1px); }
.hl-label { font-size: .84em; color: var(--muted); font-weight: 600; }
.hl-value { font-size: 1.55em; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hl-sub { font-size: .8em; color: var(--muted); margin-top: 2px; }
.hl-accent .hl-value { color: var(--accent, var(--primary)); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--muted); font-weight: 600; }
.tab span { font-size: .78em; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent, var(--primary)); }
.tab.on span { background: var(--text); color: var(--bg); }
.period { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; }
.period a { padding: 5px 11px; border-radius: 999px; font-size: .86em; color: var(--muted); }
.period a.on { background: var(--text); color: var(--bg); }
.act-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; padding: 12px 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.act-cap { font-weight: 700; color: var(--muted); font-size: .86em; margin-right: 6px; }
.file-link { text-decoration: underline; }
.chk-multi, ul.chk-multi { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chk-multi label, ul.chk-multi label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.chk-multi input { accent-color: var(--primary); }
@media (max-width: 900px) { .hl-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .chk-multi, ul.chk-multi { grid-template-columns: repeat(2, 1fr); } }

/* ---------------------------------------------------------- 패션 ERP 공용 컴포넌트 */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.12); flex: none; }
.style-hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-bottom: 18px; }
.style-swatches { display: flex; gap: 10px; }
.sw-block { flex: 1; aspect-ratio: 3 / 2; display: flex; align-items: flex-end; padding: 12px; font-weight: 700; border-radius: var(--radius); }
.style-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.style-facts > div { background: var(--surface); padding: 14px 16px; }
.style-facts span { display: block; font-size: .82em; color: var(--muted); }
.style-facts b { font-size: 1.15em; }
.matrix td.mx a { display: block; padding: 6px 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.matrix td.mx.low { background: color-mix(in srgb, var(--tone-amber) 16%, var(--surface)) !important; }
.matrix td.mx.zero { background: color-mix(in srgb, var(--tone-red) 16%, var(--surface)) !important; }
.matrix td.mx.zero a { color: var(--tone-red); }
.mx-legend { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; border-radius: 2px; margin-left: 6px; }
.mx-legend.low { background: color-mix(in srgb, var(--tone-amber) 30%, transparent); }
.mx-legend.zero { background: color-mix(in srgb, var(--tone-red) 30%, transparent); }
.appr { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.appr-title { font-size: 1.5em; font-weight: 800; letter-spacing: -.03em; }
.appr-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .9em; margin: 10px 0 18px; }
.appr-meta b { color: var(--text); }
.appr-body { line-height: 1.8; padding: 18px; background: var(--surface-2); border-radius: var(--radius-sm); }
.appr-steps { list-style: none; margin: 0; padding: 16px 18px; display: flex; flex-direction: column; gap: 0; }
.appr-steps li { display: flex; gap: 12px; padding: 10px 0; position: relative; }
.appr-steps li + li::before { content: ""; position: absolute; left: 25px; top: -10px; height: 20px; border-left: 2px solid var(--border); }
.appr-steps .st { width: 52px; flex: none; text-align: center; font-size: .78em; font-weight: 700; padding: 5px 0; border-radius: 999px; background: var(--surface-2); color: var(--muted); height: fit-content; }
.appr-steps .done .st, .appr-steps .approved .st { background: color-mix(in srgb, var(--tone-green) 18%, var(--surface)); color: var(--tone-green); }
.appr-steps .rejected .st { background: color-mix(in srgb, var(--tone-red) 18%, var(--surface)); color: var(--tone-red); }
.appr-steps .current .st { background: var(--accent, var(--primary)); color: #fff; }
.appr-act { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.stepper { display: flex; gap: 6px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-weight: 600; }
.step .n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--border); font-size: .8em; }
.step.done { color: var(--tone-green); } .step.done .n { background: var(--tone-green); color: #fff; }
.step.current { background: var(--text); color: var(--bg); } .step.current .n { background: var(--accent, var(--primary)); color: #fff; }
.cal-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.cal { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 8px 10px; font-size: .8em; font-weight: 700; color: var(--muted); border-bottom: 1px solid var(--border); }
.cal-head div:first-child { color: var(--tone-red); }
.cal-day { min-height: 112px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); color: var(--muted); }
.cal-num { display: flex; justify-content: space-between; font-size: .85em; font-weight: 700; }
.cal-day.today .cal-num span { background: var(--accent, var(--primary)); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-add { opacity: 0; color: var(--muted); font-weight: 800; padding: 0 4px; }
.cal-day:hover .cal-add { opacity: 1; }
.cal-ev { display: block; font-size: .76em; padding: 3px 6px; border-radius: 4px; background: var(--surface-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--muted); }
.cal-ev:hover { filter: brightness(.95); }
.cat-meeting { border-left-color: var(--tone-blue); } .cat-shoot { border-left-color: var(--tone-violet); } .cat-launch { border-left-color: var(--tone-rose); }
.cat-deadline { border-left-color: var(--tone-red); } .cat-visit { border-left-color: var(--tone-teal); }
.todo-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.todo-col.late .card-title { color: var(--tone-red); }
.todo-chk { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--border-strong); background: var(--surface); cursor: pointer; display: grid; place-items: center; padding: 0; color: #fff; }
.todo-chk:hover { border-color: var(--text); }
.todo-chk.on { background: var(--tone-green); border-color: var(--tone-green); }
.is-done .todo-t { text-decoration: line-through; color: var(--muted); }
.aging { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.aging div { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.aging span { display: block; font-size: .8em; color: var(--muted); }
.aging b { font-size: 1.25em; }
.aging .bad b { color: var(--tone-red); }
.tbl.pnl td, .tbl.pnl th { font-size: .9em; }
.tbl.pnl tr.total td { border-top: 1px solid var(--text); }
.mb { margin-bottom: 16px; }
@media (max-width: 1000px) { .style-hero, .appr, .cal-wrap { grid-template-columns: 1fr; } .todo-cols { grid-template-columns: 1fr 1fr; } }
@media print { .demobar, .ed-mast, .page-actions, .ed-foot { display: none !important; } }
@media (max-width: 720px) {
  .demobar { gap: 6px; padding: 0 8px; }
  .db-home span, .db-out span, .db-palette > span { display: none; }
  .db-cur b { font-size: 10px; }
  .db-chip { width: 18px; height: 18px; }
  .hl-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .toolbar .period { overflow-x: auto; max-width: 100%; }
}

.bar.warn > i { background: var(--accent, #e4572e); }
.brand-hero { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius, 8px); background: var(--surface); }
.brand-hero > i { width: 46px; height: 46px; border-radius: 50%; background: var(--bc); flex: none; }
.brand-hero > div { flex: 1; min-width: 0; }
.brand-hero-name { font-size: 22px; font-weight: 700; margin: 2px 0; }
@media (max-width: 640px) { .brand-hero { flex-wrap: wrap; } }
