:root {
  color-scheme: light;
  --ink: #1f2733;
  --muted: #8791a0;
  --line: #d8dfe8;
  --paper: #ebeef3;
  --panel: #ffffff;
  --field: #fafbfd;
  --surface-subtle: #f4f7fa;
  --surface-header: #ecf0f5;
  --brand: #41618a;
  --brand-dark: #2f4666;
  --sidebar-start: #3a4658;
  --sidebar-end: #222a38;
  --sidebar-fg: #f4f7fb;
  --sidebar-sub: rgba(228, 235, 244, 0.74);
  --sidebar-active: rgba(255, 255, 255, 0.13);
  --sidebar-border: rgba(255, 255, 255, 0.12);
  --accent: #5c8c84;
  --accent-weak: #e2eeec;
  --warn: #c0603f;
  --info: #4e6e86;
  --gold: #a07a4c;
  --warn-line: #eba8a1;
  --shadow: 0 16px 34px rgba(31, 39, 51, 0.1);
  --soft-shadow: 0 1px 2px rgba(31, 39, 51, 0.04), 0 10px 22px -18px rgba(31, 39, 51, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.ods-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.ods-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 22px 16px;
  color: var(--sidebar-fg);
  background: linear-gradient(168deg, var(--sidebar-start) 0%, var(--sidebar-end) 100%);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.12);
}

.ods-brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 22px;
}

.ods-logo-frame {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(150deg, #ffffff, #edf1f6);
  box-shadow:
    0 4px 12px -4px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(120, 150, 190, 0.45);
}

.ods-sidebar .brand-logo {
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.ods-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding: 14px 8px 4px;
  border-top: 1px solid var(--sidebar-border);
}

.ods-user-card strong {
  color: var(--sidebar-fg);
  font-size: 13px;
}

.ods-user-card span {
  display: block;
  margin-top: 4px;
  color: var(--sidebar-sub);
  font-size: 11px;
}

.sidebar-logout {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--sidebar-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--sidebar-sub);
  cursor: pointer;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: var(--sidebar-active);
  color: var(--sidebar-fg);
  outline: 0;
}

.ods-main {
  min-width: 0;
}

.dashboard-content {
  width: 100%;
  margin: 0 auto;
  padding: 22px 26px 44px;
}

.ods-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(31, 39, 51, 0.42);
}

.login-shell {
  width: min(420px, calc(100% - 32px));
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.login-panel {
  width: 100%;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.login-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 0;
  padding: 16px 28px;
  border-bottom: 1px solid rgba(225, 230, 236, 0.9);
  background: rgba(235, 238, 243, 0.86);
  box-shadow: 0 1px 0 rgba(31, 39, 51, 0.03);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 21px;
}

h2 {
  font-size: 18px;
}

.ods-sidebar .eyebrow {
  margin: 2px 0 0;
  color: var(--sidebar-sub);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ods-sidebar h1 {
  color: var(--sidebar-fg);
  font-size: 17px;
  line-height: 1.2;
}

.brand-hanja {
  color: rgba(244, 247, 251, 0.72);
  font-weight: 800;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--brand);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  box-shadow: none;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.action-glyph {
  font-size: 11px;
  line-height: 1;
}

.global-search {
  display: flex;
  flex: 1 1 220px;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  min-width: 180px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.global-search svg {
  flex: 0 0 auto;
  color: #9aa4b2;
}

.global-search span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.global-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
}

.global-search input:focus {
  outline: 0;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  padding: 0 17px;
  box-shadow:
    0 6px 16px -6px rgba(65, 97, 138, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.notification-button {
  position: relative;
}

.notification-button::after {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--warn);
  content: "";
}

.dashboard-tab-panel[data-dashboard-panel="overview"] {
  display: grid;
  gap: 22px;
}

.overview-role-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
}

.role-segment {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.role-segment button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  min-width: 68px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  transition:
    background 200ms ease-in-out,
    color 200ms ease-in-out,
    transform 120ms ease-out;
}

.role-segment button:not(.is-active):not(:disabled):hover,
.role-segment button:not(.is-active):not(:disabled):focus-visible {
  background: var(--surface-subtle);
  color: var(--ink);
  outline: 0;
}

.role-segment button:active {
  transform: translateY(1px);
}

.role-segment button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.role-segment svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.icon-button svg,
.primary-action svg {
  stroke-width: 1.9;
}

.role-segment button.is-active {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: white;
}

.role-note {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--accent-weak);
  color: #4f6f45;
  font-size: 12px;
  font-weight: 800;
}

.sync-badge i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #6d8b3d;
}

.overview-block {
  display: grid;
  gap: 12px;
}

.overview-section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 22px;
}

.overview-section-heading h2 {
  position: relative;
  padding-left: 13px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.overview-section-heading h2::before {
  position: absolute;
  left: 0;
  top: 3px;
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand);
  content: "";
}

.overview-section-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-metric-grid,
.overview-status-grid,
.overview-chart-grid,
.overview-detail-grid {
  display: grid;
  gap: 14px;
}

.today-metric-grid,
.monthly-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.overview-status-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.overview-chart-grid {
  grid-template-columns: minmax(0, 1.72fr) minmax(320px, 0.95fr);
}

.overview-detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.status-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 104px;
  padding: 14px 16px;
}

.today-metric-grid .metric-card {
  min-height: 126px;
}

.monthly-metric-grid .metric-card {
  min-height: 102px;
}

.metric-card > span,
.metric-card-head > span,
.status-card > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong,
.status-card strong {
  display: block;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.metric-card strong {
  margin-top: 10px;
}

.metric-card small,
.status-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metric-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--surface-header);
  color: var(--brand);
}

.metric-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
}

.metric-sparkline {
  display: block;
  width: 100%;
  height: 24px;
  margin: 6px 0 2px;
}

.metric-sparkline-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-sparkline-fill {
  opacity: 0.1;
}

.metric-sparkline-brand .metric-sparkline-line,
.metric-sparkline-brand .metric-sparkline-fill {
  stroke: var(--brand);
  fill: var(--brand);
}

.metric-sparkline-info .metric-sparkline-line,
.metric-sparkline-info .metric-sparkline-fill {
  stroke: var(--info);
  fill: var(--info);
}

.metric-sparkline-accent .metric-sparkline-line,
.metric-sparkline-accent .metric-sparkline-fill {
  stroke: var(--accent);
  fill: var(--accent);
}

.metric-sparkline-warn .metric-sparkline-line,
.metric-sparkline-warn .metric-sparkline-fill {
  stroke: var(--warn);
  fill: var(--warn);
}

.metric-card.is-empty {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.metric-card.is-empty strong {
  color: #526071;
}

.metric-card.is-empty .metric-icon {
  color: #6f7f92;
}

.metric-card.is-empty .metric-sparkline {
  opacity: 0.42;
}

.metric-card.is-empty small {
  color: #6f7f92;
}

.restricted-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: inherit;
  background: color-mix(in srgb, var(--panel) 74%, transparent);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.restricted-overlay svg {
  width: 16px;
  height: 16px;
}

.metric-card.is-restricted > :not(.restricted-overlay) {
  filter: blur(7px);
  opacity: 0.18;
}

.metric-card.is-restricted .restricted-overlay {
  display: flex;
}

.metric-card-profit.is-restricted .restricted-overlay {
  background: color-mix(in srgb, var(--brand-dark) 54%, transparent);
  color: white;
  opacity: 1;
}

.metric-card-profit.is-restricted .restricted-overlay span {
  opacity: 1;
}

.metric-card-profit {
  background: linear-gradient(135deg, #3e4e66, #566a86);
  color: white;
  box-shadow: 0 18px 34px rgba(46, 60, 82, 0.18);
}

.metric-card-profit span,
.metric-card-profit strong,
.metric-card-profit small,
.metric-card-profit .kpi-delta {
  color: white;
}

.metric-card-profit span,
.metric-card-profit small {
  opacity: 0.78;
}

.ratio-track {
  overflow: hidden;
  height: 8px;
  margin: 18px 0 9px;
  border-radius: 999px;
  background: var(--surface-header);
}

.ratio-track i {
  display: block;
  width: 41%;
  height: 100%;
  border-radius: inherit;
  background: var(--warn);
}

.status-card {
  display: grid;
  gap: 6px;
  min-height: 84px;
  padding: 13px 16px;
  border-left-width: 4px;
}

.status-card strong {
  font-size: 21px;
}

.status-warn strong {
  color: var(--warn);
}

.status-info strong {
  color: var(--info);
}

.status-accent strong {
  color: var(--accent);
}

.status-gold strong {
  color: var(--gold);
}

.status-blue strong {
  color: var(--brand);
}

.status-warn {
  border-left-color: var(--warn);
}

.status-info {
  border-left-color: var(--info);
}

.status-accent {
  border-left-color: var(--accent);
}

.status-gold {
  border-left-color: var(--gold);
}

.status-blue {
  border-left-color: var(--brand);
}

.overview-chart-panel {
  min-height: 420px;
}

.overview-chart-panel-large .trend-visual {
  min-height: 320px;
}

.chart-panel-header {
  align-items: flex-start;
}

.chart-header-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.dashboard-month-control {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.dashboard-month-control input,
.dashboard-month-control button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-month-control input {
  width: 132px;
  padding: 0 8px;
}

.dashboard-month-control button {
  padding: 0 10px;
  cursor: pointer;
  transition:
    border-color 160ms ease-in-out,
    color 160ms ease-in-out,
    transform 120ms ease-out;
}

.dashboard-month-control button:hover,
.dashboard-month-control button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.dashboard-month-control button:active {
  transform: translateY(1px);
}

.dashboard-month-control button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-line {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--brand);
}

.legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--warn);
}

.chart-snapshot-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 18px;
}

.chart-snapshot-row div {
  display: grid;
  gap: 5px;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--surface-subtle);
}

.chart-snapshot-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.chart-snapshot-row strong {
  color: var(--ink);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.chart-snapshot-row .is-profit {
  background: linear-gradient(135deg, #3e4e66, #566a86);
}

.chart-snapshot-row .is-profit span,
.chart-snapshot-row .is-profit strong {
  color: white;
}

.chart-snapshot-row .is-profit span {
  opacity: 0.78;
}

.composition-panel {
  display: grid;
  align-content: start;
}

.category-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  margin: 10px auto 26px;
  border-radius: 50%;
  background: var(
    --category-share-donut,
    conic-gradient(
      var(--brand) 0deg 135deg,
      var(--accent) 135deg 220deg,
      var(--gold) 220deg 290deg,
      var(--info) 290deg 330deg,
      var(--warn) 330deg 360deg
    )
  );
}

.category-donut::after {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: var(--panel);
  content: "";
}

.category-donut-center {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  max-width: calc(100% - 44px);
  text-align: center;
}

.category-donut-center span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.category-donut-center strong {
  color: var(--ink);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.12;
  white-space: nowrap;
}

.kpi-grid,
.work-grid {
  display: grid;
  gap: 14px;
}

.kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 14px;
}

.work-grid {
  grid-template-columns: 1.15fr 1fr;
}

.summary-grid {
  margin-bottom: 14px;
}

.kpi-card,
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.kpi-card {
  min-height: 126px;
  padding: 20px;
}

.kpi-card span,
.panel-header span {
  color: var(--muted);
  font-size: 13px;
}

.kpi-card strong {
  display: block;
  margin-top: 14px;
  font-size: 25px;
  letter-spacing: -0.2px;
  font-variant-numeric: tabular-nums;
}

.kpi-card.profit {
  background: linear-gradient(135deg, #3e4e66, #566a86);
  color: white;
}

.kpi-card.profit span {
  color: rgba(255, 255, 255, 0.78);
}

.panel {
  padding: 22px;
}

.panel.wide {
  grid-column: 1 / -1;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.ranking-list li,
.stage-row {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}

.ranking-list li:first-child,
.stage-row:first-of-type {
  border-top: 0;
}

.share-list {
  display: grid;
  gap: 14px;
}

.share-row div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.category-composition-list .share-row,
.source-share-list .source-share-row {
  display: grid;
  gap: 7px;
}

.category-composition-list .share-row div,
.source-share-list .source-share-row div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.category-composition-list .category-share-row {
  gap: 5px;
  padding: 2px 0;
}

.category-composition-list .category-share-row div {
  grid-template-columns: 10px minmax(0, 1fr) auto;
  margin-bottom: 0;
}

.category-share-row span {
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-share-row strong {
  color: #6f7f92;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.share-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #9aa4b2;
}

.category-share-row[data-category="dosirak"] .share-swatch {
  background: var(--brand);
}

.category-share-row[data-category="salad"] .share-swatch {
  background: var(--accent);
}

.category-share-row[data-category="sandwich"] .share-swatch {
  background: var(--gold);
}

.category-share-row[data-category="deopbap"] .share-swatch {
  background: var(--info);
}

.category-share-row[data-category="side"] .share-swatch {
  background: var(--warn);
}

.category-composition-list .share-row em {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--accent-weak);
}

progress::-webkit-progress-bar {
  background: var(--accent-weak);
}

progress::-webkit-progress-value {
  background: var(--accent);
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.entry-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.entry-form input,
.entry-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.entry-form button {
  align-self: end;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.entry-form button.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--ink);
}

.import-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 132px;
  gap: 12px;
  align-items: end;
  margin-top: 10px;
}

.platform-import-form {
  grid-template-columns: minmax(220px, 1fr) 150px 90px 132px;
}

.import-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.import-form input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 8px 10px;
}

.import-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  padding: 0 10px;
}

.import-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.template-link {
  align-self: end;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.import-result {
  display: grid;
  gap: 6px;
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.import-result strong {
  color: var(--accent);
}

.import-result ul {
  margin: 2px 0 0;
  padding-left: 18px;
}

.form-wide {
  grid-column: span 2;
}

.form-status {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.report-header,
.ledger-header {
  align-items: flex-start;
}

.report-controls,
.ledger-controls {
  display: flex;
  align-items: end;
  gap: 8px;
}

.report-controls label,
.ledger-controls label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.report-controls input,
.report-controls button,
.ledger-controls input,
.ledger-controls button {
  min-height: 38px;
  border-radius: 8px;
  font: inherit;
}

.report-controls input,
.ledger-controls input {
  width: 132px;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  padding: 0 10px;
}

.ledger-controls input[type="search"] {
  width: 180px;
}

.report-controls button,
.ledger-controls button {
  border: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
}

.report-board,
.ledger-board,
.master-board,
.review-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.report-block,
.ledger-block,
.master-block,
.review-block {
  min-width: 0;
}

.report-block h3,
.ledger-block h3,
.master-block h3,
.review-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  border-top: 0;
  background: var(--surface-header);
  color: var(--muted);
  font-weight: 700;
}

.small-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0 14px;
}

.review-table code {
  color: var(--muted);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
}

.number-cell {
  text-align: right;
}

.ledger-table {
  min-width: 760px;
}

.master-table {
  min-width: 560px;
}

.master-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.master-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.master-form input,
.master-form select,
.master-form button {
  min-height: 38px;
  border-radius: 8px;
  font: inherit;
}

.master-form input,
.master-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--ink);
  padding: 0 10px;
}

.master-form button {
  align-self: end;
  border: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 0 14px;
}

.master-form button.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface-subtle);
  color: var(--ink);
}

.master-form .check-label {
  align-content: end;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.master-form .check-label input {
  width: auto;
  min-height: auto;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 0 10px;
}

.row-actions .danger-button {
  border-color: var(--warn-line);
  color: var(--warn);
}

.stage-row strong {
  color: var(--accent);
}

.stage-row.muted strong {
  color: var(--warn);
}

footer {
  padding: 20px 16px 24px;
  color: black;
  font-family: "Malgun Gothic", sans-serif;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 820px) {
  .kpi-grid,
  .work-grid,
  .entry-form,
  .report-board,
  .ledger-board,
  .master-board,
  .review-board,
  .master-form {
    grid-template-columns: 1fr;
  }

  .report-header,
  .report-controls,
  .ledger-header,
  .ledger-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .report-controls input,
  .report-controls button,
  .ledger-controls input,
  .ledger-controls button {
    width: 100%;
  }

  .form-wide {
    grid-column: auto;
  }

  .kpi-card {
    min-height: 96px;
  }
}
