@charset "UTF-8";



@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-400-korean.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-500-korean.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-600-korean.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-700-korean.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans KR";
  src: url("./fonts/NotoSansKR-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --ink: #17191c;
  --ink2: #2a2d32;
  --muted: #7d8189;
  --muted2: #5d626a;
  --faint: #9a9ea5;
  --line: rgba(23,25,28,0.07);
  --line2: rgba(23,25,28,0.09);
  --line3: rgba(23,25,28,0.14);
  --card: #ffffff;
  --accent: #3f658c;
  --accent-dark: #27425c;
  --accent-soft: #5980a6;
  --accent-bg: #eef2f7;
  --danger: #96555b;
  --danger-bg: #fbeeee;
  --good: #3f6b52;
  --good-bg: #eaf1ec;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
button { all: unset; cursor: pointer; box-sizing: border-box; font-family: inherit; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
button { font-family: inherit; }
::selection { background: rgba(89,128,166,0.24); }

.fade { animation: fade .34s cubic-bezier(.16,1,.3,1) both; }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

[contenteditable="true"] {
  outline: 1px dashed rgba(89,128,166,0.75);
  outline-offset: 2px;
  border-radius: 3px;
  min-width: 18px;
  cursor: text;
}
[contenteditable="true"]:hover { background: rgba(89,128,166,0.06); }
[contenteditable="true"]:focus { outline: 2px solid #5980a6; background: #fff; }

.ph { color: var(--faint) !important; font-style: italic; }


.shell { display: flex; min-height: 100dvh; }

.sidebar {
  position: sticky; top: 0; align-self: flex-start; height: 100dvh;
  width: 236px; flex: 0 0 236px; padding: 22px 14px;
  display: flex; flex-direction: column; gap: 26px;
  transition: width 0.18s ease, flex-basis 0.18s ease, padding 0.18s ease;
  overflow: hidden;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.sidebar-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: #fff;
  display: grid; place-content: center; font-size: 12px; font-weight: 600; flex: 0 0 auto;
}
.sidebar-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }


.sidebar-collapse-btn {
  cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 10px; margin-top: -14px; border-radius: 9px; border: 0; background: transparent;
  font-size: 12px; color: var(--muted2);
}
.sidebar-collapse-btn:hover { background: rgba(23,25,28,0.05); }
.sidebar-collapse-ico { flex: 0 0 auto; width: 14px; text-align: center; font-weight: 700; }
.sidebar-collapse-label { white-space: nowrap; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn {
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; font-size: 13.5px; background: transparent; color: #5d626a; font-weight: 500;
  width: 100%; border: 0;
}
.nav-btn:hover { background: rgba(23,25,28,0.05); }
.nav-btn.active { background: var(--ink); color: #fff; font-weight: 600; }
.nav-btn .badge { font-size: 11.5px; color: #9a9ea5; }
.nav-btn.active .badge { color: rgba(255,255,255,0.6); }

.nav-btn .nav-short { display: none; }


.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sidebar-foot .k { font-size: 11.5px; color: var(--muted); }
.sidebar-foot .v { font-size: 14px; font-weight: 600; margin-top: 2px; }
.sidebar-foot .p { font-size: 12px; color: var(--muted); margin-top: 6px; }


.sidebar.collapsed { width: 68px; flex: 0 0 68px; padding: 22px 8px; }
.sidebar.collapsed .sidebar-brand { justify-content: center; padding: 0; }
.sidebar.collapsed .sidebar-name { display: none; }
.sidebar.collapsed .sidebar-collapse-btn { justify-content: center; }
.sidebar.collapsed .sidebar-collapse-label { display: none; }
.sidebar.collapsed .nav-btn { justify-content: center; padding: 10px 4px; }
.sidebar.collapsed .nav-btn .nav-full, .sidebar.collapsed .nav-btn .badge { display: none; }
.sidebar.collapsed .nav-btn .nav-short { display: inline; font-size: 11px; }
.sidebar.collapsed .sidebar-foot { display: none; }

.rep-box { padding: 14px 14px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.rep-box .k { font-weight: 600; color: #42464d; margin-bottom: 8px; font-size: 11.5px; }
.rep-summary-rows { display: flex; flex-direction: column; gap: 6px; max-height: 132px; overflow-y: auto; }
.rep-summary-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #42464d; }
.rep-summary-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 500; flex: 0 0 auto; }
.rep-summary-row.tesla-sep { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.dash-pay-rows { max-height: 230px; padding-right: 2px; }
.rep-summary-total {
  display: flex; justify-content: space-between; margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700;
}
.rep-summary-total span:last-child { font-variant-numeric: tabular-nums; }

.bottom-nav {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10;
  grid-template-columns: repeat(5,1fr); gap: 2px; padding: 6px; border-radius: 16px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(14px);
  border: 1px solid var(--line2); box-shadow: 0 8px 26px rgba(23,25,28,0.12);
}
.bottom-nav .nav-btn {
  min-height: 46px; display: grid; place-content: center; border-radius: 11px;
  font-size: 12px; text-align: center; padding: 0;
}

main { flex: 1; min-width: 0; padding-bottom: 0; }

.container { max-width: none; margin: 0 auto; padding: 28px 24px 0; }
.container.wide { max-width: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 600; }
.page-head p { margin: 6px 0 0; font-size: 14px; color: var(--muted); max-width: 65ch; }
.page-head .today { font-size: 12.5px; color: var(--faint); }

@media screen and (max-width: 899.98px) {
  .sidebar { display: none; }
  .bottom-nav { display: grid; }
  
  main { padding-bottom: 132px; }
}


.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 16px; }
.hint { font-size: 12px; color: var(--faint); }

.btn { cursor: pointer; min-height: 38px; padding: 9px 18px; border-radius: 10px; font-size: 13.5px; font-weight: 600; border: 1px solid transparent; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a2d32; }
.btn-outline { background: #fff; border: 1px solid var(--line3); color: var(--ink); }
.btn-outline:hover { background: #f0f0ef; }
.btn-edit { background: #fff; border: 1px solid var(--line3); color: var(--ink); }
.btn-edit.on { background: var(--accent-soft); color: #fff; border-color: var(--accent-soft); }
.btn-edit:hover { opacity: 0.85; }
.btn-soft { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.btn-soft:hover { opacity: 0.85; }
.btn-soft.on { background: var(--accent-soft); color: #fff; }

.btn-ghost { background: var(--line2); color: var(--muted2); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--line3); }

.btn-lg { min-height: 38px; padding: 9px 18px; font-size: 13.5px; }
.btn-md { min-height: 34px; padding: 7px 15px; font-size: 12.5px; }
.btn-sm { min-height: 30px; padding: 6px 12px; font-size: 11.5px; border-radius: 8px; }
.orders-page .btn.btn-lg { min-height: 38px; padding: 9px 18px; font-size: 13.5px; }
.orders-page .btn.btn-sm { min-height: 30px; padding: 6px 12px; font-size: 11.5px; }

.pill { cursor: pointer; min-height: 34px; padding: 7px 14px; border-radius: 999px; font-size: 13px; background: #fff; color: #42464d; border: 0; }
.pill:hover { opacity: 0.85; }
.pill.active { background: var(--ink); color: #fff; }

.tab { cursor: pointer; min-height: 36px; padding: 8px 15px; border-radius: 999px; font-size: 13px; font-weight: 500; background: #fff; color: #42464d; border: 1px solid rgba(23,25,28,0.09); }
.tab:hover { opacity: 0.85; }
.tab.active { background: var(--ink); color: #fff; font-weight: 600; }

.pay-tab-rows { display: flex; flex-direction: column; gap: 8px; }
.pay-tabs-wrap { display: flex; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.pay-tabs-wrap > .pay-tab-rows { flex: 1 1 520px; min-width: 0; }
.pay-brand-totals { display: grid; gap: 6px; margin-left: auto; min-width: 280px; }
.pay-brand-total { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pay-brand-total .k { font-size: 12.5px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.pay-brand-total .k .due { font-size: 11px; font-weight: 500; color: var(--muted); }
.pay-brand-total .v { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.pay-brand-total.brand-hyundai { border-color: #bfdbfe; background: #f5f8ff; }
.pay-brand-total.brand-hyundai .k { color: #1d4ed8; }
.pay-brand-total.brand-kia { border-color: #fecaca; background: #fff6f6; }
.pay-brand-total.brand-kia .k { color: #dc2626; }
.pay-brand-total.brand-all { border-color: var(--ink); background: var(--ink); }
.pay-brand-total.brand-all .k, .pay-brand-total.brand-all .v { color: #fff; }
.pay-brand-total.brand-all .k .due { color: rgba(255,255,255,0.62); }
.pay-brand-total.brand-all .v { font-size: 19px; }
.pay-brand-total.brand-direct { border-color: #c9dccf; background: #f3f8f4; }
.pay-brand-total.brand-direct .k { color: #2f6b4a; }
@media (max-width: 720px) { .pay-brand-totals { margin-left: 0; width: 100%; min-width: 0; } }
.pay-tab-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pay-tab-row-label { display: flex; align-items: baseline; gap: 6px; font-weight: 700; font-size: 13px; padding-right: 2px; white-space: nowrap; }
.pay-tab-row-label .due { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.pay-tab-row-label.brand-hyundai { color: #1d4ed8; }
.pay-tab-row-label.brand-kia { color: #dc2626; }
.tab.tab-hyundai { color: #1d4ed8; border-color: #bfdbfe; }
.tab.tab-hyundai.active { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.tab.tab-kia { color: #dc2626; border-color: #fecaca; }
.tab.tab-kia.active { background: #dc2626; border-color: #dc2626; color: #fff; }

.filterbar-date { display: flex; align-items: center; gap: 7px; padding: 7px 12px; background: #fff; border: 1px solid var(--line3); border-radius: 10px; }
.filterbar-date input { all: unset; font-family: inherit; font-size: 12.5px; width: 112px; cursor: pointer; }
.filterbar-date .sep { color: #c3c6ca; }
.select-box, .search-box, .text-box { all: unset; box-sizing: border-box; cursor: pointer; font-family: inherit; font-size: 12.5px; padding: 9px 12px; background: #fff; border: 1px solid var(--line3); border-radius: 10px; }

.select-box { white-space: nowrap; flex: 0 0 auto; }
.select-box:disabled { opacity: 0.5; cursor: not-allowed; }
.text-box { cursor: text; }

.search-box { flex: 1; min-width: 180px; max-width: 360px; padding: 9px 14px; cursor: text; }

.select-on-dark { background: transparent; border-color: rgba(255,255,255,0.35); color: #fff; }
.select-on-dark option { color: var(--ink); background: #fff; }


.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 14px; }
.kpi-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.kpi-card .label { font-size: 12.5px; color: var(--muted); }
.kpi-card .value-row { display: flex; align-items: baseline; gap: 5px; margin-top: 10px; }
.kpi-card .value { font-size: 34px; line-height: 1; font-weight: 600; letter-spacing: -0.035em; }
.kpi-card .unit { font-size: 12.5px; color: var(--muted); }
.kpi-card .sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.dash-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,1fr); gap: 20px; margin-top: 20px; }
@media screen and (max-width: 899.98px) { .dash-grid { grid-template-columns: minmax(0,1fr); } }
.dash-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.progress-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px 18px 12px; min-width: 0; }
.progress-panel .head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; }
.progress-panel .head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.progress-panel .head button { cursor: pointer; font-size: 12.5px; color: var(--accent); }
.progress-panel .head button:hover { color: var(--accent-dark); }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.progress-row .car { font-size: 14.5px; font-weight: 600; }
.progress-row .meta { font-size: 12.5px; color: var(--muted); }
.progress-row .right { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.chip { flex: 0 0 auto; white-space: nowrap; font-size: 13px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.progress-row .date { white-space: nowrap; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.rep-panel .sub { font-size: 12px; color: var(--faint); margin-bottom: 16px; }

.rep-bars { display: flex; flex-direction: column; gap: 10px; max-height: 230px; overflow-y: auto; padding-right: 2px; }
.rep-bar-row { display: flex; align-items: center; gap: 10px; }
.rep-bar-row .name { flex: 0 0 62px; font-size: 12.5px; color: #42464d; white-space: nowrap; }
.rep-bar-row .track { flex: 1; min-width: 0; display: flex; height: 8px; background: rgba(23,25,28,0.05); border-radius: 4px; }
.rep-bar-row .fill { border-radius: 4px; }
.rep-bar-row .count { flex: 0 0 30px; text-align: right; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.rep-bar-row.cust { margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); }
.rep-bar-row.cust .name, .rep-bar-row.cust .count { color: var(--muted); }



.orders-page .toolbar { gap: 8px; }
.orders-page .btn { min-height: 33px; padding: 7px 14px; font-size: 12.5px; }
.orders-page .pill { min-height: 29px; padding: 6px 12px; font-size: 12px; }
.orders-page .filterbar-date { padding: 6px 10px; }
.orders-page .filterbar-date input { font-size: 12px; width: 100px; }
.orders-page .select-box, .orders-page .search-box { font-size: 12px; padding: 7px 10px; }
.orders-page .search-box { padding: 7px 12px; min-width: 150px; max-width: 260px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.order-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(296px,1fr)); gap: 14px; }

.order-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; min-width: 0; min-height: 430px; display: flex; flex-direction: column; overflow: hidden; }
.order-card .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 16px; }

.order-card.selected { outline: 2px solid var(--accent-dark, #2563eb); outline-offset: -2px; }
#orderGrid .order-card[data-act="toggle-select"] { cursor: pointer; }
.order-select-check { flex: 0 0 auto; display: flex; align-items: center; padding-top: 2px; }
.order-select-check input { width: 18px; height: 18px; pointer-events: none; }
.order-card .body { padding: 0 16px 16px; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.order-card h3 { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -0.02em; }

.order-card .order-note { font: inherit; letter-spacing: inherit; }
.order-card .in-date { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.order-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 5px; }


.icon-btn {
  cursor: pointer; height: 26px; min-width: 26px; display: inline-flex; align-items: center;
  border-radius: 7px; border: 1px solid transparent; font-size: 12px; background: transparent;
  color: rgba(255,255,255,0.82);
  overflow: hidden; transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.icon-btn-ico { flex: 0 0 auto; width: 26px; height: 26px; display: grid; place-content: center; }
.icon-btn-label {
  display: inline-block; max-width: 0; padding-right: 0; opacity: 0; overflow: hidden;
  white-space: nowrap; font-size: 10.5px; font-weight: 600;
  transition: max-width 0.38s cubic-bezier(0.16,1,0.3,1), padding-right 0.38s cubic-bezier(0.16,1,0.3,1), opacity 0.22s ease;
}
.icon-btn:hover .icon-btn-label, .icon-btn:focus-visible .icon-btn-label {
  max-width: 52px; padding-right: 9px; opacity: 1;
}
.icon-btn.del:hover, .icon-btn.del:focus-visible { background: var(--danger-bg); border-color: var(--danger-bg); color: var(--danger); }
.icon-btn.dup .icon-btn-ico { font-size: 11px; }
.icon-btn.dup:hover, .icon-btn.dup:focus-visible { background: #f0f0ef; border-color: #f0f0ef; color: #5d626a; }
.icon-btn.edit .icon-btn-ico { font-size: 10px; }
.icon-btn.edit:hover, .icon-btn.edit:focus-visible { background: #f0f0ef; border-color: #f0f0ef; color: #42464d; }

.badge-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.badge { font-size: 10.5px; padding: 3px 7px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.badge.rec { background: var(--good-bg); color: var(--good); }
.badge.fee { background: var(--danger-bg); color: var(--danger); }
.badge.check { background: #fef3c7; color: #92610a; }
.badge.order { background: var(--accent-bg); color: var(--accent); }
.badge.settled { background: #f0f0ef; color: #7d8189; }

.badge.docon { background: var(--good); color: #fff; font-weight: 700; }
.badge.docoff { background: #eceeef; color: #9a9ea5; }
.price-check-note { margin-top: 4px; font-size: 10.5px; color: #92610a; font-weight: 400; }
.pay-tbody.settled { opacity: 0.55; }
.pay-tbody.bulk-pick { cursor: pointer; }
.pay-tbody.selected td { background: var(--accent-bg); }
.deposit-row.settled { opacity: 0.55; }
.ledger-row-wrap.settled { opacity: 0.5; }


.spec-dl { margin: 10px 0 0; display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 6px 10px; font-size: 12.5px; }

.spec-dl dt { color: var(--muted, #8a8f96); font-weight: 600; font-size: 11px; margin: 0; align-self: start; padding-top: 1px; }
.spec-dl dd { margin: 0; color: #1a1c1f; font-weight: 600; }
.spec-dl dd.hl {
  background: #fde047; color: #3d3200; font-weight: 700; border-radius: 3px;
  padding: 1px 6px; margin: -1px -6px; width: fit-content;
}

.spec-dl dt.section-start, .spec-dl dd.section-start { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.spec-dl dt.section-start { padding-top: 9px; }

.spec-dl dt.pay-row { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); align-self: start; }
.spec-dl dd.pay-row { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); font-weight: 700; font-size: 13.5px; color: var(--accent-dark, #1d4ed8); }


.vin-line { min-height: 1.4em; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--ink); letter-spacing: 0.3px; word-break: break-all; }
.memo-box { margin-top: 9px; padding: 9px 11px; border-radius: 9px; background: var(--bg); font-size: 11.5px; color: #42464d; line-height: 1.5; }


.order-bottom { margin-top: auto; padding-bottom: 12px; }
.order-bottom .spec-dl { margin-top: 0; }
.order-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.order-footer .out { color: var(--accent); font-weight: 600; }


.drawer-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(23,25,28,0.35); display: flex; justify-content: flex-end; }

.confirm-box { z-index: 45; background: #fff; border-radius: 14px; padding: 22px; max-width: 360px; width: 100%; box-shadow: 0 8px 30px rgba(23,25,28,0.16); }
.confirm-box p { margin: 0 0 18px; font-size: 14px; color: var(--ink); line-height: 1.55; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 9px; }

.drawer-panel { width: 540px; max-width: 100%; height: 100%; background: #fff; box-shadow: -8px 0 30px rgba(23,25,28,0.16); display: flex; flex-direction: column; }
@media screen and (max-width: 899.98px) { .drawer-panel { width: 100%; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid rgba(23,25,28,0.08); }
.drawer-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; letter-spacing: -0.02em; }
.drawer-close { cursor: pointer; width: 26px; height: 26px; display: grid; place-content: center; border-radius: 7px; font-size: 15px; color: #5d626a; background: transparent; border: 0; }
.drawer-close:hover { background: #f0f0ef; }



.drawer-form { flex: 1; min-height: 0; overflow: auto; padding: 14px 16px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px 9px; align-content: start; }

.field { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: #5d626a; }
.field.full { grid-column: 1 / -1; }

.field-pair { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 9px; }
.field-pair.cols-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }

.field-pay-amt { grid-row: 1 / span 2; }

.field-pair .field-switches-row { grid-column: 1 / span 3; grid-row: 2; border: 0; padding: 0; align-items: center; }

@media screen and (max-width: 899.98px) {
  .field-pair.cols-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .field-pay-amt { grid-row: auto; }
  .field-pair .field-switches-row { grid-column: 1 / -1; grid-row: auto; }
}
.field input:not([type="checkbox"]), .field select, .field textarea {
  all: unset; box-sizing: border-box; width: 100%; font-family: inherit; font-size: 12.5px; color: var(--ink);
  padding: 5px 8px; border: 1px solid var(--line3); border-radius: 7px;
}
.field select { cursor: pointer; }
.field textarea { line-height: 1.45; resize: vertical; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.hl-check { display: flex; align-items: center; cursor: pointer; }
.hl-check-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.hl-check-body {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 999px; border: 1px solid var(--line3); background: #fff;
  font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1.4;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.hl-check-body::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line3); flex: none; }
.hl-check-input:checked + .hl-check-body { background: #fde047; border-color: #eab308; color: #3d3200; }
.hl-check-input:checked + .hl-check-body::before { background: #eab308; }
.hl-check-input:focus-visible + .hl-check-body { outline: 2px solid #eab308; outline-offset: 1px; }


.spec-box { grid-column: 1 / -1; background: var(--bg); border: 1px solid var(--line3); border-radius: 10px; padding: 8px; }
.spec-box-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 9px; }

.check-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 0; border-top: 1px solid rgba(23,25,28,0.08); border-bottom: 1px solid rgba(23,25,28,0.08); }
.check-row .lead { font-size: 13px; font-weight: 700; color: var(--ink); align-self: center; }
.check-row label { display: flex; align-items: center; gap: 6px; font-size: 12px; cursor: pointer; }
.check-row input { accent-color: var(--accent-soft); width: 14px; height: 14px; }

.pill-toggle { gap: 0; flex: none; }
.pill-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.pill-body {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: 999px; border: 1.5px solid var(--line3); background: #fff;
  font-size: 14px; font-weight: 700; color: var(--muted); line-height: 1.2;
  white-space: nowrap; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pill-body::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line3); flex: none; transition: background 0.15s; }
.pill-input:checked + .pill-body { background: var(--accent-soft); border-color: var(--accent-soft); color: #fff; }
.pill-input:checked + .pill-body::before { background: #fff; }
.pill-input:focus-visible + .pill-body { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

.pill-body.sm { padding: 4px 11px; font-size: 11.5px; gap: 5px; }
.pill-body.sm::before { width: 6px; height: 6px; }

.check-row.stack { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 14px; }
.check-row.stack .lead { grid-column: 1 / -1; }

.check-row.warn { background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 7px 10px; }
.check-row.warn label { color: #9a3412; }
.check-row.warn input { accent-color: #ea580c; }

.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid rgba(23,25,28,0.08); }
.drawer-foot .btn { min-height: 32px; padding: 7px 15px; font-size: 12.5px; }

.drawer-foot .drawer-warranty { margin-right: auto; background: var(--good); color: #fff; font-weight: 700; }
.drawer-foot .drawer-warranty:hover { background: #335a44; }


.a4wrap { padding: 22px 0 60px; }
.a4 {
  width: 210mm; max-width: 100%; min-height: 297mm; box-sizing: border-box; background: #fff;
  border: 1px solid rgba(23,25,28,0.09); box-shadow: 0 6px 30px rgba(23,25,28,0.07);
  padding: 12mm 13mm; display: flex; flex-direction: column;
}
.q-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.q-head h2 { margin: 0; font-size: 27px; font-weight: 600; letter-spacing: 0.24em; }
.q-head .en { font-size: 12px; color: var(--muted); margin-top: 6px; letter-spacing: 0.02em; }
.q-head .shop { text-align: right; font-size: 11.5px; color: #5d626a; line-height: 1.75; }
.q-head .shop .name { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }

.q-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 26px; margin-top: 12px; }
.q-meta-row { display: grid; grid-template-columns: 68px minmax(0,1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(23,25,28,0.09); font-size: 12.5px; }
.q-meta-row .k { color: #8a8e95; }
.q-meta-row .v { font-weight: 500; }

.q-h3 { margin: 11px 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; color: #42464d; }

.q-h3.tight { margin: auto 0 5px; }

.q-thead { display: grid; grid-template-columns: 76px minmax(0,1fr) 96px; gap: 12px; padding: 8px 10px; background: var(--ink); color: #fff; font-size: 11.5px; letter-spacing: 0.04em; }
.q-work-row { display: grid; grid-template-columns: 76px minmax(0,1fr) 96px; gap: 12px; padding: 6px 10px; border-bottom: 1px solid rgba(23,25,28,0.08); font-size: 12.5px; align-items: baseline; }
.q-work-row .k { color: #5d626a; }
.q-work-row .v { line-height: 1.55; }
.q-work-row .amt { text-align: right; font-variant-numeric: tabular-nums; color: #5d626a; }
.q-subtotal { display: flex; justify-content: space-between; padding: 7px 10px; background: var(--bg); font-size: 12.5px; font-weight: 600; }
.q-subtotal span:last-child { font-variant-numeric: tabular-nums; }

.q-opt-row { display: grid; grid-template-columns: minmax(0,1fr) 96px; gap: 12px; padding: 6px 10px; border-bottom: 1px solid rgba(23,25,28,0.08); font-size: 12.5px; }
.q-opt-row .amt { text-align: right; font-variant-numeric: tabular-nums; color: #5d626a; }

.q-sumbox { margin-top: 14px; border: 1px solid var(--line3); }
.q-sum-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 14px; border-bottom: 1px solid rgba(23,25,28,0.08); font-size: 12.5px; color: #42464d; }
.q-sum-row span:last-child { font-variant-numeric: tabular-nums; }
.q-cash-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 11px 14px; background: var(--ink); color: #fff; }
.q-cash-row .lbl { font-size: 13px; letter-spacing: 0.04em; }
.q-cash-row .amt { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

.q-notes { margin: 0; padding-left: 18px; font-size: 11px; color: #5d626a; line-height: 1.5; }

.q-foot { margin-top: 14px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 26px; }
.q-foot .bank { font-size: 11.5px; color: #5d626a; }
.q-foot .bank .line { font-size: 12.5px; color: var(--ink); font-weight: 500; margin-top: 6px; }
.q-foot .sign { font-size: 11.5px; color: #5d626a; text-align: right; }
.q-foot .sign .row { margin-top: 22px; display: flex; justify-content: flex-end; gap: 10px; align-items: baseline; }
.q-foot .sign .u { display: inline-block; width: 120px; border-bottom: 1px solid rgba(23,25,28,0.4); }


.q-page { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: flex-start; }
.q-side {
  width: 300px; max-width: 100%; flex: 0 0 300px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; align-self: flex-start;
}
.q-side-title { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.q-side-title small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; margin-top: 2px; }
.q-side-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #5d626a; }
.q-side-field .select-box { width: 100%; }
.q-side-field .search-box, .q-side-field .text-box { width: 100%; }
.q-side-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink); cursor: pointer; }
.q-side-subtitle { font-size: 11.5px; font-weight: 600; color: #8a8e95; margin-top: 4px; }
.q-ppf-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.q-ppf-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12px; color: #42464d; cursor: pointer; }
.q-ppf-item span:first-of-type { flex: 1; }
.q-ppf-item .amt { color: #8a8e95; font-variant-numeric: tabular-nums; }
.q-side-total { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 13px; font-weight: 600; }
.q-side-total .amt { font-size: 16px; font-variant-numeric: tabular-nums; }
.q-calc-empty { font-size: 12px; color: var(--muted); padding: 6px 0; }


.ins-thead, .ins-row { display: grid; grid-template-columns: 74px 104px minmax(0,1fr) 96px 18px; gap: 10px; align-items: center; }
.ins-thead { padding: 8px 10px; background: var(--ink); color: #fff; font-size: 11.5px; letter-spacing: 0.04em; }
.ins-row { padding: 6px 10px; border-bottom: 1px solid rgba(23,25,28,0.08); font-size: 12.5px; }
.ins-row .amt { text-align: right; font-variant-numeric: tabular-nums; color: #5d626a; }
.ins-del-btn { cursor: pointer; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--danger-bg); color: var(--danger); font-size: 12px; line-height: 1; }
.ins-empty { padding: 16px 10px; text-align: center; color: var(--faint); font-size: 12px; }

.ins-input { all: unset; box-sizing: border-box; width: 100%; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink); background: var(--bg); border: 1px solid var(--line3); border-radius: 6px; padding: 4px 8px; cursor: text; }
.ins-input[type="date"] { cursor: pointer; }

.ins-cell { all: unset; box-sizing: border-box; width: 100%; min-width: 0; font: inherit; font-size: 12.5px; color: var(--ink); border: 1px solid transparent; border-radius: 5px; padding: 2px 4px; margin: -3px -5px; cursor: text; }
.ins-cell.amt { text-align: right; font-variant-numeric: tabular-nums; color: #5d626a; }
.ins-cell:hover { border-color: var(--line3); }
.ins-cell:focus { border-color: var(--ink); background: var(--bg); }
.q-side-hint { margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.5; }

.a4.is-export .export-value { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink); padding: 4px 0; }
.a4.is-export .ins-row .export-value { padding: 0; font-weight: 400; overflow-wrap: anywhere; }
.a4.is-export .ins-row .export-value.amt { text-align: right; font-variant-numeric: tabular-nums; color: #5d626a; }
.a4.is-export .ins-thead, .a4.is-export .ins-row { grid-template-columns: 74px 104px minmax(0,1fr) 96px; }
.a4.is-export .ins-thead > span:nth-child(5) { display: none; }
.a4.is-export [contenteditable] { outline: 0 !important; background: none !important; }
.q-foot .sign .row .k { color: #8a8e95; width: 44px; flex: 0 0 auto; }
.q-foot .sign .row.ins-foot-row { margin-top: 6px; }
.q-foot .sign .row.ins-foot-row:first-child { margin-top: 0; }


.qc-price-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.qc-price-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.qc-price-name { flex: 1; min-width: 0; font-size: 11.5px; color: #42464d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qc-price-row .qc-price-input { width: 84px; flex: 0 0 auto; text-align: right; }
.qc-price-del { flex: 0 0 auto; width: 18px; height: 18px; padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.qc-price-del:hover { color: #c0392b; }


.printflow { padding: 24px 0 60px; }
.stack { display: flex; flex-direction: column; gap: 20px; }


.card-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 16px; align-items: start; }


.card-grid.wide {
  grid-template-columns: repeat(auto-fit,minmax(320px,1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  
  align-items: stretch;
}
.card-grid.pair { grid-template-columns: repeat(auto-fit,minmax(330px,1fr)); }

.card-col { display: flex; flex-direction: column; gap: 1px; background: var(--line); }

.card-col .table-card:last-child { flex: 1; }
.card-grid.wide .table-card { border: 0; border-radius: 0; }

.calc-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.calc-card-title { padding: 11px 15px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.calc-card-body { padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; }
.calc-input { all: unset; box-sizing: border-box; width: 100%; font-family: inherit; font-size: 14px; padding: 10px 13px; background: var(--bg); border: 1px solid var(--line3); border-radius: 10px; }
.calc-input:focus { border-color: var(--accent-soft); background: #fff; }
.calc-result { font-size: 13px; color: var(--muted); line-height: 1.5; }
.calc-result.ok { color: var(--good); font-weight: 500; }
.calc-result.ok strong { color: var(--accent-dark); font-size: 15px; }
.calc-result.err { color: var(--danger); }

.calc-select-row { display: flex; flex-direction: row; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line3); }
.calc-select-row .select-box { width: 190px; }
.calc-select-row .text-box { width: 80px; }
.calc-price-display { margin-left: auto; font-weight: 700; font-size: 16px; white-space: nowrap; }


.capture-target { cursor: crosshair; user-select: none; -webkit-user-select: none; }
.capture-select-box { position: absolute; z-index: 9999; border: 2px dashed var(--accent-dark, #2563eb); background: rgba(37,99,235,0.12); pointer-events: none; }
.capture-toast {
  position: fixed; z-index: 10000; transform: translate(-50%,-80%); opacity: 0;
  background: #17191c; color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 8px 14px; border-radius: 8px; white-space: nowrap; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease; box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.table-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }

.table-card .row.has-controls { position: relative; padding-right: 78px; }
.row-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: grid; place-content: center; border-radius: 6px; font-size: 13px; color: #c3c6ca; background: transparent; border: 0; cursor: pointer; }
.row-del:hover { background: var(--danger-bg); color: var(--danger); }

.row-hide-toggle { position: absolute; right: 32px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.row-hide-toggle input { width: 12px; height: 12px; margin: 0; cursor: pointer; }
.table-card .row.row-hidden { opacity: 0.5; }
.table-card .bar { padding: 11px 15px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.table-card .bar small { font-weight: 400; color: rgba(255,255,255,0.6); }
.table-card .sub-head { display: flex; justify-content: space-between; gap: 12px; padding: 8px 15px; background: var(--bg); font-size: 11.5px; color: #8a8e95; }
.table-card .row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 9px 15px; border-top: 1px solid rgba(23,25,28,0.055); font-size: 13px; }

.table-card .row .k { color: #2a2d32; font-weight: 600; min-width: 76px; flex: 1 1 55%; word-break: keep-all; overflow-wrap: break-word; }
.table-card .row .v { color: #45484d; font-weight: 600; font-variant-numeric: tabular-nums; flex: 1 1 35%; text-align: right; white-space: normal; word-break: normal; overflow-wrap: break-word; }


.film-card .sub-head, .film-card .row { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(0,0.9fr); gap: 2px 10px; align-items: baseline; }
.film-card .sub-head span:nth-child(n+2) { text-align: right; }
.film-card .row .k { min-width: 0; }
.film-card .row .r { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 12px; overflow-wrap: anywhere; }
.film-card .row .v.auto { color: #2a2d32; }
.base-card .sub-head { grid-template-columns: minmax(120px,1fr) minmax(0,1.6fr) minmax(110px,1fr); display: grid; }
.base-card .row { display: grid; grid-template-columns: minmax(120px,1fr) minmax(0,1.6fr) minmax(110px,1fr); gap: 12px; padding: 11px 16px; font-size: 12.5px; }
.base-card .row .k { font-weight: 500; }
.base-card .row .v { color: #5d626a; }
.base-card .row .m { text-align: right; color: var(--danger); font-variant-numeric: tabular-nums; }


.two-card-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: stretch; }
.two-card-row .table-card { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; }
.two-card-row .table-card > .row:last-child { flex: 1; }

.two-card-row .bar { padding: 6px 12px; font-size: 12px; }
.two-card-row .sub-head { padding: 4px 12px; font-size: 10px; }
.two-card-row .row { padding: 4px 12px; font-size: 11px; }
.two-card-row .base-card .row { padding: 5px 13px; font-size: 10.5px; gap: 8px; }

.fallback-banner { padding: 11px 15px; border-radius: 11px; background: var(--danger-bg); color: var(--danger); font-size: 12.5px; }


.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th, .data-table td { padding: 8px 12px; text-align: left; white-space: nowrap; }
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table thead th { background: var(--bg); color: #8a8e95; font-weight: 600; font-size: 11px; border-bottom: 1px solid rgba(23,25,28,0.09); }
.data-table tbody td { border-top: 1px solid rgba(23,25,28,0.055); color: #2a2d32; }
.data-table tbody tr:hover td { background: rgba(23,25,28,0.02); }
.data-table td.data-empty { color: var(--muted); text-align: center; padding: 20px 12px; white-space: normal; }

.data-table tr.row-warn td { background: #fffbeb; }
.data-table tr.row-warn:hover td { background: #fef3c7; }
.data-table tfoot td { border-top: 1px solid var(--line3); background: var(--bg); font-weight: 700; }

.summary-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 14px; }
.summary-grid.pay { grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); }
.summary-card { padding: 18px; border-radius: 14px; border: 1px solid var(--line); }
.summary-card .k { font-size: 12px; opacity: 0.65; }
.summary-card .v { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.summary-card.pay .v { font-size: 26px; }

.ledger-table { display: grid; grid-template-columns: 82px minmax(0,1fr) 100px 30px; gap: 10px; align-items: center; padding: 9px 16px; font-size: 13px; color: #2a2d32; border-top: 1px solid rgba(23,25,28,0.055); }
.ledger-note { padding: 0 16px 8px 108px; font-size: 11px; color: #92610a; }
.ledger-empty { padding: 14px 16px; font-size: 12.5px; color: var(--muted); }
.ledger-head { display: grid; grid-template-columns: 82px minmax(0,1fr) 100px 30px; gap: 10px; padding: 9px 16px; font-size: 11.5px; }
.ledger-head.plus { background: var(--bg); color: var(--muted); }
.ledger-head.minus { background: var(--danger-bg); color: var(--danger); }
.ledger-total { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 13.5px; font-weight: 600; }
.ledger-total.plus { background: var(--bg); }
.ledger-total.minus { background: var(--danger-bg); color: var(--danger); }
.ledger-del { cursor: pointer; width: 26px; height: 26px; display: grid; place-content: center; border-radius: 7px; font-size: 13px; color: #c3c6ca; background: transparent; border: 0; }
.ledger-del:hover { background: rgba(23,25,28,0.06); color: var(--danger); }
.ledger-date { font-variant-numeric: tabular-nums; color: var(--muted); }
.ledger-amt { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-amt.minus { color: var(--danger); font-weight: 600; }

.pay-empty { margin-top: 22px; padding: 34px 20px; border: 1px dashed rgba(23,25,28,0.18); border-radius: 14px; text-align: center; color: var(--muted); font-size: 13.5px; }



.pay-table { max-width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12.5px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pay-table thead th { background: var(--ink); color: #fff; font-weight: 600; text-align: left; padding: 8px 12px; font-size: 11px; letter-spacing: 0.02em; white-space: nowrap; }
.pay-table thead th.pt-amt { text-align: right; }
.pay-table td { padding: 7px 12px; border-bottom: 1px solid rgba(23,25,28,0.06); vertical-align: top; }
.pay-table .pt-master { font-weight: 700; white-space: nowrap; }
.pay-table .pt-num { color: var(--muted); white-space: nowrap; }
.pay-table .pt-date { color: var(--muted); white-space: nowrap; font-size: 12px; }

.pay-table .pt-title { font-weight: 600; min-width: 150px; max-width: 280px; }
.pay-table .pt-title .badge { margin-left: 6px; font-weight: 500; }
.pay-table .pt-kind { color: #8a8e95; white-space: nowrap; }

.pay-table .pt-desc { max-width: 480px; }
.pay-table .pt-amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-table .pt-subtotal td { font-weight: 700; background: var(--bg); border-bottom: 2px solid var(--line); }

.pay-table .pt-subtotal-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pay-table tbody:last-child tr:last-child td { border-bottom: 0; }

.pay-table .pt-grandtotal td { font-weight: 700; font-size: 13.5px; background: var(--ink); color: #fff; border-bottom: 0; }

.pay-table .pt-carryover td { font-weight: 700; font-size: 13px; background: #fbeeee; color: #96555b; }
.pay-table .pt-carryover small { font-weight: 500; font-size: 11.5px; }

.pay-table .pt-settled td { font-weight: 600; font-size: 12.5px; background: var(--bg); color: var(--muted); }

.pay-table .pt-account td { font-weight: 600; font-size: 12px; background: var(--bg); border-bottom: 0; }
.pay-group-actions { display: inline-flex; gap: 8px; font-weight: 400; }
.btn-tiny { cursor: pointer; min-height: 32px; padding: 7px 14px; border-radius: 8px; font-size: 12.5px; border: 0; }
.btn-tiny.soft { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.btn-tiny.soft:hover { opacity: 0.85; }
.btn-tiny.outline { background: transparent; border: 1px solid rgba(23,25,28,0.12); color: var(--danger); }
.btn-tiny.outline:hover { background: var(--danger-bg); }

.deposit-list { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.deposit-row { display: flex; flex-wrap: wrap; row-gap: 4px; justify-content: space-between; gap: 14px; padding: 13px 16px; border-radius: 11px; background: var(--accent-bg); font-size: 13.5px; }

.deposit-row .left { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; word-break: keep-all; overflow-wrap: break-word; }
.deposit-row .sep { color: var(--faint); }
.deposit-row .right { flex: 0 0 auto; display: flex; gap: 6px; align-items: center; }
.deposit-row .cum { font-size: 11.5px; color: var(--muted); }
.deposit-row .amt { font-weight: 600; font-variant-numeric: tabular-nums; }



.cc-head { background: var(--ink); color: var(--bg); padding: 5mm 10mm 4mm; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex: 0 0 auto; margin: -12mm -13mm 0; }
.cc-shop { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; opacity: 0.72; }
.cc-title { margin: 2px 0 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.cc-meta { text-align: right; font-size: 9.5px; opacity: 0.72; line-height: 1.4; }
.cc-meta b { font-weight: 700; opacity: 1; font-variant-numeric: tabular-nums; }

.cc-section { padding: 6px 0; border-top: 1px solid var(--line); }
.cc-section:first-of-type { border-top: 0; padding-top: 10px; }
.cc-section-title { display: flex; align-items: baseline; gap: 7px; margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: -0.01em; }
.cc-sub { font-size: 10px; font-weight: 400; color: var(--muted); }

.cc-info-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 6px 10px; }
.cc-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 9.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.01em; }
.cc-field input {
  font: inherit; font-size: 11px; font-weight: 400; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line3); border-radius: 6px; padding: 3px 7px; width: 100%; height: 26px;
}

.cc-fuel-row { display: flex; align-items: center; gap: 6px; height: 26px; }
.cc-fuel-bar { display: flex; gap: 2px; flex: 1; }
.cc-fuel-seg { flex: 1; height: 14px; border-radius: 2px; border: 1px solid var(--line3); background: var(--bg); cursor: pointer; padding: 0; }
.cc-fuel-seg.on { background: var(--accent); border-color: var(--accent); }
.cc-fuel-lbl { font-size: 9px; color: var(--muted); font-weight: 700; width: 11px; text-align: center; }

.cc-diag-wrap { display: grid; grid-template-columns: 200px minmax(0,1fr) minmax(0,1fr); gap: 14px; align-items: start; }
.cc-diag-card { background: var(--bg); border: 1px solid var(--line3); border-radius: 10px; padding: 8px; }
.cc-car-svg { width: 100%; height: auto; display: block; }
.cc-car-outline { fill: #fff; stroke: var(--line3); stroke-width: 1.5; }
.cc-zone { fill: #fff; stroke: var(--line3); stroke-width: 1.5; cursor: pointer; }
.cc-zone.s1 { fill: #fef3c7; stroke: #d9a63d; }
.cc-zone.s2 { fill: #ffe2cc; stroke: #e0893f; }
.cc-zone.s3 { fill: #fbd9d8; stroke: #d9655e; }
.cc-zone-label { font-size: 9.5px; fill: var(--muted); pointer-events: none; text-anchor: middle; font-weight: 600; }
.cc-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; font-size: 8.5px; color: var(--muted); }
.cc-legend span { display: inline-flex; align-items: center; gap: 3px; }
.cc-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; border: 1px solid var(--line3); }
.cc-legend i.s0 { background: #fff; }
.cc-legend i.s1 { background: #fef3c7; border-color: #d9a63d; }
.cc-legend i.s2 { background: #ffe2cc; border-color: #e0893f; }
.cc-legend i.s3 { background: #fbd9d8; border-color: #d9655e; }

.cc-check-col { min-width: 0; overflow-x: auto; }
.cc-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.cc-table th { text-align: left; font-size: 10px; color: var(--muted); font-weight: 700; padding: 0 8px 6px; border-bottom: 1px solid var(--line3); }
.cc-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cc-table tr:last-child td { border-bottom: 0; }
.cc-part-name { font-weight: 600; white-space: nowrap; }
.cc-group-title { font-size: 10px; font-weight: 700; color: var(--ink); margin: 8px 0 3px; }
.cc-group-title:first-child { margin-top: 0; }
.cc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 2px; border-bottom: 1px solid var(--line); }
.cc-row:last-child { border-bottom: 0; }
.cc-row-lbl { font-size: 10.5px; font-weight: 600; }
.cc-chip { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line3); background: #fff; cursor: pointer; white-space: nowrap; }
.cc-chip.s1 { background: #fef3c7; color: #92650a; border-color: #d9a63d; }
.cc-chip.s2 { background: #ffe2cc; color: #b1480c; border-color: #e0893f; }
.cc-chip.s3 { background: #fbd9d8; color: #a42a24; border-color: #d9655e; }

.cc-note-area { width: 100%; height: 44px; resize: none; font: inherit; font-size: 10.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line3); border-radius: 7px; padding: 5px 8px; }

.cc-sign-row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.cc-sign-box { border: 1px solid var(--line3); border-radius: 8px; background: var(--bg); overflow: hidden; }
.cc-sign-box canvas { width: 100%; height: 56px; display: block; touch-action: none; cursor: crosshair; }
.cc-sign-bar { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px; border-top: 1px solid var(--line3); font-size: 9.5px; color: var(--muted); }
.cc-sign-clear { font: inherit; font-size: 9.5px; font-weight: 700; color: var(--accent); cursor: pointer; }
.cc-staff-col { display: flex; flex-direction: column; gap: 6px; }
.cc-staff-col .cc-field input { height: 22px; }

.cc-foot { margin-top: auto; padding-top: 8px; font-size: 9px; color: var(--muted); text-align: center; }

@media (max-width: 230mm) {
  .cc-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cc-diag-wrap, .cc-sign-row { grid-template-columns: 1fr; }
}


@page { size: A4; margin: 0; }
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  body { background: #fff; }
  .noprint { display: none !important; }
  
  .container { padding: 0 !important; max-width: none !important; }
  .a4wrap { padding: 0 !important; max-width: none !important; }
  
  .q-page { display: block !important; }
  [contenteditable] { outline: 0 !important; background: none !important; }
  .printflow { padding: 10mm !important; }
  
  [data-pcard] { break-inside: auto; }
  .table-card .row, .base-card .row, .ledger-table, .deposit-row, .data-table tr { break-inside: avoid; }
  
  .pay-table tr { break-inside: avoid; }
  .pay-table thead { display: table-header-group; }
  .data-table thead { display: table-header-group; } 
  .data-table { font-size: 9.5px !important; }
  .data-table th, .data-table td { padding: 4px 7px !important; }
  
  .card-grid, .card-grid.wide, .card-grid.pair { display: block !important; }
  .card-grid > *, .card-grid.wide > *, .card-grid.pair > * { margin-bottom: 8px; }
  
  .card-grid.wide { background: none !important; border: 0 !important; }
  .card-col { background: none !important; gap: 8px !important; }
  .card-grid.wide .table-card, .card-col .table-card { border: 1px solid var(--line) !important; border-radius: 10px !important; }
  .card-col .table-card:last-child { flex: initial !important; }
  .base-card { border-radius: 10px !important; }
  .two-card-row { display: block !important; }
  .two-card-row .table-card { border-radius: 10px !important; margin-bottom: 8px; }
  .two-card-row .table-card > .row:last-child { flex: initial !important; }
  .summary-grid, .summary-grid.pay { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
  .summary-card { flex: 1 1 150px; padding: 10px !important; }
  .summary-card .v { font-size: 17px !important; margin-top: 2px !important; }
  .table-card .bar { padding: 6px 10px !important; font-size: 11.5px !important; }
  .table-card .sub-head { padding: 3px 10px !important; font-size: 9.5px !important; }
  .table-card .row { padding: 3px 10px !important; font-size: 10px !important; gap: 2px 8px !important; }
  .table-card .row .k { min-width: 60px !important; }
  .base-card .row { padding: 5px 9px !important; font-size: 9.5px !important; }
  .base-card .sub-head { padding: 3px 9px !important; font-size: 9px !important; }
  
  .stack { display: block !important; }
  .stack > * { margin-bottom: 10px; }
  
  .stack.narrow { max-width: none; }
  .pay-table { font-size: 10px !important; }
  .pay-table th, .pay-table td { padding: 4px 7px !important; }
  .deposit-list { margin-top: 10px !important; }
  .deposit-row { padding: 7px 11px !important; font-size: 11px !important; }
  
  .a4 { width: 210mm !important; height: 296mm; min-height: 0; overflow: hidden; box-shadow: none !important; border: 0 !important; margin: 0 !important; border-radius: 0 !important; }
}


.demo-banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; background: #fff7e0; border: 1px solid #f0d78c; color: #6b5310; font-size: 13px; }


.fx-page { gap: 18px; }
.fx-month { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.fx-month > button:not(.btn) { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line3); background: #fff; font-size: 16px; }
.fx-month strong { min-width: 118px; text-align: center; font-size: 16px; letter-spacing: -0.02em; }
.fx-calc { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto minmax(0,1.15fr); gap: 10px; align-items: stretch; }
.fx-op { display: grid; place-items: center; font-size: 22px; color: var(--faint); }
.fx-box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.fx-box .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fx-box .big { font-size: 26px; font-weight: 700; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.fx-box .lines { display: grid; gap: 5px; font-size: 12.5px; }
.fx-box .lines > div { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.fx-box .lines .fx-hyundai { color: #1d4ed8; }
.fx-box .lines .fx-kia { color: #dc2626; }
.fx-box .lines .muted { color: var(--muted); }
.fx-box.result { background: var(--ink); color: #fff; border-color: var(--ink); }
.fx-box.result .label, .fx-box.result .lines .muted { color: rgba(255,255,255,0.62); }
.fx-box.result .big { font-size: 34px; }
.fx-box.result.minus .big { color: #ffb4b4; }
.fx-check { display: flex; gap: 7px; align-items: flex-start; font-size: 12px; color: var(--muted); cursor: pointer; line-height: 1.45; }
.fx-check input { margin: 2px 0 0; accent-color: var(--ink); }
.fx-barcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 12px; }
.fx-barcard .t { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.fx-barcard .t span { color: var(--muted); font-weight: 500; }
.fx-bar { display: flex; height: 16px; border-radius: 5px; overflow: hidden; background: var(--bg); }
.fx-bar i { display: block; height: 100%; }
.fx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--ink2); }
.fx-legend span { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.fx-legend b { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fx-table .fx-bar-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-table table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 680px; }
.fx-table th { text-align: left; font-size: 11.5px; font-weight: 500; color: #8a8e95; background: var(--bg); padding: 8px 10px; white-space: nowrap; }
.fx-table td { padding: 6px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
.fx-table .num { text-align: right; }
.fx-table tr.done .fx-cell { color: var(--faint); }
.fx-table tfoot td { background: var(--bg); font-weight: 700; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line3); padding: 10px; }
.fx-foot-sub { font-weight: 500; color: var(--muted); font-size: 12px; }
.fx-empty { text-align: center; color: var(--faint); padding: 18px 10px !important; }
.fx-cell { all: unset; box-sizing: border-box; width: 100%; padding: 5px 7px; border-radius: 6px; border: 1px solid transparent; cursor: text; font-size: 13px; color: var(--ink); }
.fx-cell:hover { border-color: var(--line3); }
.fx-cell:focus { border-color: var(--ink); background: var(--bg); }
select.fx-cell { cursor: pointer; min-width: 104px; white-space: nowrap; }
.fx-cell.amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.fx-cell.day { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.fx-pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.fx-pill.fixed { color: var(--accent); background: var(--accent-bg); }
.fx-pill.once { color: #8a5a12; background: #fbf2e2; }
.fx-paid { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.fx-paid input { accent-color: var(--good); }
.fx-table tr.done .fx-paid { color: var(--good); font-weight: 600; }
.fx-del { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--faint); }
.fx-del:hover { background: var(--danger-bg); color: var(--danger); }
.fx-add { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr) minmax(0,1fr) 90px minmax(0,1fr) auto; gap: 8px; padding: 12px 15px; border-top: 1px solid var(--line); align-items: end; }
.fx-add label { display: grid; gap: 4px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.fx-add .text-box, .fx-add .select-box { width: 100%; }
.fx-hint { font-size: 12px; color: var(--muted); padding: 0 15px 12px; margin: 0; line-height: 1.5; }
.fx-notes { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin: 0; padding-left: 18px; }
@media (max-width: 1100px) {
  .fx-calc { grid-template-columns: 1fr; }
  .fx-op { height: 14px; font-size: 18px; }
}
@media (max-width: 700px) {
  .fx-add { grid-template-columns: 1fr 1fr; }
  .fx-add .wide { grid-column: 1 / -1; }
}

.fx-table th:last-child, .fx-table td:last-child:not(.fx-empty) { position: sticky; right: 0; z-index: 1; width: 44px; padding-left: 6px; padding-right: 8px; }
.fx-table thead th:last-child, .fx-table tfoot td:last-child { background: var(--bg); }
.fx-table tbody td:last-child:not(.fx-empty) { background: #fff; }
@media (max-width: 899.98px) {
  .fx-table tbody td:last-child:not(.fx-empty) { box-shadow: -8px 0 8px -8px rgba(23,25,28,0.18); }
}


.fx-tabs { margin-top: 12px; margin-bottom: -4px; }
.lb-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lb-top .fx-month { margin-top: 0; }
.lb-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.lb-sum-inc .label { color: #2f7d4f; }
.lb-sum-inc .big { color: #2f7d4f; }
.lb-sum-exp .label { color: #c4475e; }
.lb-sum-exp .big { color: #c4475e; }
.lb-summary .result .lines > div { flex-wrap: wrap; }
.lb-acc-box.acc-kyungsu .label { color: #1d4ed8; }
.lb-acc-box.acc-juri .label { color: #b4467a; }
.lb-cal { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 10px 6px; }
.lb-week, .lb-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.lb-week span { text-align: center; font-size: 11.5px; color: var(--muted); padding: 4px 0 8px; border-bottom: 1px solid var(--line); }
.lb-week .sun, .lb-cell.sun .d { color: #d0466c; }
.lb-week .sat, .lb-cell.sat .d { color: #2f62c7; }
.lb-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; min-height: 74px; padding: 8px 2px; border-radius: 10px; min-width: 0; cursor: pointer; }
.lb-cell.blank { cursor: default; }
.lb-cell .d { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.lb-cell .amt { font-size: 12px; color: #c4475e; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.25; }
.lb-cell .amt.inc { color: #2f7d4f; }
.lb-cell:not(.blank):hover { background: var(--bg); }
.lb-cell.today .d { background: var(--ink); color: #fff; }
.lb-cell.sel { background: #fdf0f3; box-shadow: inset 0 0 0 1.5px #e7a3b4; }
.lb-day { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lb-day-head { display: flex; align-items: center; gap: 10px; padding: 12px 15px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.lb-day-head strong { font-size: 15px; }
.lb-day-head span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-day-head .btn { margin-left: auto; }
.lb-entry { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 10px; width: 100%; padding: 11px 15px; border-top: 1px solid var(--line); font-size: 13.5px; }
.lb-entry:first-of-type { border-top: 0; }
.lb-entry:hover { background: var(--bg); }
.lb-entry .desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.lb-entry .amt { font-weight: 700; font-variant-numeric: tabular-nums; color: #c4475e; }
.lb-entry.inc .amt { color: #2f7d4f; }
.lb-pill.inc { color: #2f7d4f; background: #e8f3ec; }
.lb-cal-legend { display: flex; justify-content: flex-end; gap: 12px; padding: 4px 6px 2px; font-size: 11px; color: var(--muted); }
.lb-cal-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.lb-cal-legend .inc::before { background: #2f7d4f; }
.lb-cal-legend .exp::before { background: #c4475e; }
.lb-seg { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--bg); gap: 2px; }
.lb-seg button { padding: 7px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--muted); }
.lb-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(23,25,28,0.12); }
.lb-dialog.lb-inc .lb-seg button.on { color: #2f7d4f; }
.lb-dialog.lb-exp .lb-seg button.on { color: #c4475e; }
.lb-dialog.lb-inc .lb-amt-wrap { border-bottom-color: #2f7d4f; }
.lb-dialog.lb-inc .lb-amt-wrap input, .lb-dialog.lb-inc .lb-amt-wrap span { color: #2f7d4f; }
.lb-dialog.lb-inc .lb-chip.on { background: #2f7d4f; border-color: #2f7d4f; }
.lb-pill { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-bg); padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.lb-acc { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.lb-acc.acc-kyungsu { color: #1d4ed8; background: #eef3ff; }
.lb-acc.acc-juri { color: #b4467a; background: #fcf0f5; }
.lb-overlay { align-items: center; justify-content: center; padding: 16px; }
.lb-dialog { max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; }
.lb-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lb-dlg-head strong { font-size: 16px; }
.lb-dlg-head .text-box { width: auto; }
.lb-amt-wrap { display: flex; align-items: baseline; justify-content: center; gap: 4px; margin: 18px 0 6px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.lb-amt-wrap input { all: unset; min-width: 0; width: 100%; text-align: right; font-size: 32px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.lb-amt-wrap input::placeholder { color: var(--faint); }
.lb-amt-wrap span { font-size: 20px; font-weight: 700; }
.lb-dlg-label { font-size: 12px; color: var(--muted); margin: 14px 0 7px; }
.lb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lb-chip { padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line3); background: #fff; font-size: 13px; font-weight: 600; color: var(--ink2); white-space: nowrap; }
.lb-chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.lb-chip.soft { font-weight: 500; font-size: 12px; padding: 5px 11px; background: var(--bg); border-color: transparent; }
.lb-cat-input { width: 110px; padding: 7px 12px; border-radius: 99px; }
.lb-desc { width: 100%; }
.lb-recent { margin-top: 8px; }
@media (max-width: 700px) {
  .lb-summary { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .lb-summary > .result { grid-column: 1 / -1; }
  .lb-summary .fx-box .big { font-size: 19px; overflow-wrap: anywhere; }
  .lb-cal { padding: 6px 4px 4px; }
  .lb-cell { min-height: 60px; padding: 6px 0; }
  .lb-cell .d { font-size: 13.5px; width: 24px; height: 24px; }
  .lb-cell .amt { font-size: 9.5px; letter-spacing: -0.04em; }
  .lb-entry { grid-template-columns: auto minmax(0,1fr) auto; }
  .lb-entry .lb-acc { grid-column: 2; grid-row: 2; justify-self: start; }
  .lb-entry .amt { grid-row: 1 / span 2; grid-column: 3; }
}
.lb-summary .lines > div > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-summary .lines > div > span:last-child { white-space: nowrap; }
.lb-summary .result .lines > div > span:last-child { white-space: normal; text-align: right; }
.lb-summary .fx-box, .lb-summary .lines { grid-template-columns: minmax(0,1fr); }
.lb-auto { margin-left: 7px; font-size: 10.5px; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--line3); padding: 1px 6px; border-radius: 5px; vertical-align: 1px; }
.lb-acc.acc-none { color: var(--muted); background: var(--bg); }


.pay-page { gap: 14px; }
.pay-page > .toolbar { margin-bottom: 0; }
.pay-totals-strip .pay-brand-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 0; min-width: 0; }
.pay-totals-strip .pay-brand-total { align-items: flex-start; flex-direction: column; gap: 6px; padding: 12px 14px; }
.pay-totals-strip .pay-brand-total .v { font-size: 19px; }
.pay-reps { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.pay-actions { gap: 8px; }
.pay-settings { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.pay-setting { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pay-setting .select-box { max-width: 240px; min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }
.more-menu { position: relative; }
.pay-actions [data-act="toggle-edit"] { margin-left: auto; }
.pay-actions .pay-settings ~ [data-act="toggle-edit"] { margin-left: 0; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 200px; display: flex; flex-direction: column; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(23,25,28,0.12); }
.more-menu-list button { text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; }
.more-menu-list button:hover { background: var(--soft, #f3f4f6); }
.pay-filter .search-box { flex: 1 1 260px; max-width: 420px; }
@media (max-width: 720px) {
  .pay-settings { margin-left: 0; width: 100%; }
  .more-menu-list { left: 0; right: auto; }
  .pay-totals-strip .pay-brand-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-totals-strip .pay-brand-total .v { font-size: 16px; }
}


.pay-split { display: block; }
.pay-side { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.pay-side-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.pay-side-card .t { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: baseline; gap: 6px; }
.pay-side-card .t small { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.pay-side-card .deposit-list { margin-top: 0; }
.pay-side-card .deposit-row { padding: 10px 12px; font-size: 12.5px; }
.pay-side-empty { font-size: 12.5px; color: var(--muted); line-height: 1.6; padding: 6px 0; }
.pay-side-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pay-side-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--muted); padding: 0 0 6px; border-bottom: 1px solid var(--line); }
.pay-side-table td { padding: 7px 0; border-bottom: 1px solid rgba(23,25,28,0.06); }
.pay-side-table tr:last-child td { border-bottom: 0; }
.pay-side-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pay-side-table .dep { color: var(--ok, #2f6b4a); }
@media (min-width: 1280px) {
  .pay-split { display: grid; grid-template-columns: max-content minmax(260px, 1fr); gap: 20px; align-items: start; }
  .pay-side { position: sticky; top: 16px; margin-top: 22px; max-height: calc(100vh - 32px); overflow-y: auto; }
}
@media print { .pay-split { display: block; } }
.pay-actions .pay-setting .select-box { width: auto; max-width: 240px; flex: 0 1 auto; }

.meter-stepper { display: inline-flex; align-items: center; gap: 4px; }
.meter-stepper .text-box { width: 84px; text-align: center; }
.meter-stepper .btn { min-width: 36px; font-size: 18px; line-height: 1; }


.q-builder { width: 380px; flex: 0 0 380px; gap: 9px; }
.qb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.qb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.qb-inline { display: flex; gap: 6px; align-items: center; }
.qb-inline .select-box { flex: 1; min-width: 0; }
.qb-fill { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg); border-radius: 10px; }
.qb-rows { display: flex; flex-direction: column; gap: 6px; }
.qb-row { display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.qb-row-top { display: flex; gap: 5px; align-items: center; }
.qb-row-line { flex-direction: row; align-items: center; gap: 5px; }
.qb-row .text-box { width: 100%; min-width: 0; font-size: 12.5px; padding: 7px 9px; }
.qb-row .qb-kind { flex: 0 0 92px; width: 92px; }
.qb-row .qb-amt { flex: 0 0 100px; width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.qb-row-top .qb-amt { margin-left: auto; }
.qb-row.qb-new { border-style: dashed; background: var(--bg); }
.qb-row.qb-new .btn { flex: 0 0 auto; white-space: nowrap; }
.qb-row textarea.qb-desc { resize: vertical; min-height: 52px; line-height: 1.45; font-family: inherit; }
.qb-row .qb-film-search { font-size: 12px; background: var(--bg); border-style: dashed; }
.qb-del, .qb-star { flex: 0 0 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; }
.qb-del:hover { background: var(--danger-bg); color: var(--danger); }
.qb-star:hover, .qb-star.on { color: #d79b00; }
.qb-add { align-self: flex-start; }
.qb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-chip { display: inline-flex; align-items: center; border: 1px solid var(--line3); border-radius: 999px; background: #fff; overflow: hidden; }
.qb-chip button { border: 0; background: transparent; font: inherit; font-size: 12px; padding: 5px 4px 5px 10px; cursor: pointer; color: var(--ink); }
.qb-chip button small { color: var(--muted); margin-left: 2px; }
.qb-chip .qb-chip-x { padding: 5px 9px 5px 4px; color: var(--faint); }
.qb-chip button:first-child:hover { color: #000; text-decoration: underline; }
.qb-totals { display: flex; flex-direction: column; gap: 6px; padding: 10px; background: var(--bg); border-radius: 10px; }
.qb-total-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: #42464d; }
.qb-total-row .text-box { width: 150px; text-align: right; font-variant-numeric: tabular-nums; padding: 6px 9px; }
.qb-total-row.is-final { font-weight: 700; color: var(--ink); }
.qb-total-row.is-final .text-box { font-weight: 700; font-size: 14px; }
.qb-auto { border: 1px solid var(--line3); background: #fff; border-radius: 6px; font-size: 11px; padding: 1px 6px; cursor: pointer; margin-left: 4px; color: var(--muted); }
.qb-auto[hidden] { display: none; }
.qb-sec { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.qb-sec > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--ink); list-style: none; }
.qb-sec > summary::-webkit-details-marker { display: none; }
.qb-sec > summary::before { content: "▸ "; color: var(--muted); }
.qb-sec[open] > summary::before { content: "▾ "; }
.qb-sec[open] { display: flex; flex-direction: column; gap: 8px; }
.qb-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg); color: var(--muted); font-size: 11px; text-align: center; font-weight: 500; }
.q-builder .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 720px) {
  .q-builder { width: 100%; flex: 1 1 100%; }
}


.trend-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trend-head h2 { margin: 0; }
.trend-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.trend-legend i { display: inline-block; }
.trend-legend .lg-bar { width: 10px; height: 10px; border-radius: 3px; background: #5980a6; }
.trend-legend .lg-ly { width: 12px; height: 2px; background: #17191c; margin-left: 8px; }
.trend-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; margin-top: 14px; align-items: end; }
.trend-col { display: flex; flex-direction: column; align-items: stretch; text-align: center; min-width: 0; cursor: default; }
.trend-val { font-size: 10.5px; color: var(--muted); height: 16px; white-space: nowrap; overflow: visible; font-variant-numeric: tabular-nums; }
.trend-plot { position: relative; height: 300px; border-bottom: 1px solid var(--line); }
.trend-bar { position: absolute; left: 18%; right: 18%; bottom: 0; background: #5980a6; border-radius: 4px 4px 0 0; transition: opacity .15s; }
.trend-col.is-now .trend-bar { background: #2f5a85; }
.trend-col:hover .trend-bar { opacity: .8; }
.trend-ly { position: absolute; left: 8%; right: 8%; height: 2px; background: #17191c; opacity: .55; border-radius: 1px; z-index: 1; }
.trend-m { font-size: 12px; color: var(--ink); margin-top: 6px; }
.trend-col.is-now .trend-m { font-weight: 700; }
.trend-cnt { font-size: 10.5px; color: var(--faint); }
@media (max-width: 600px) {
  .trend-val { display: none; }
  .trend-plot { height: 140px; }
  .trend-chart { gap: 3px; }
}


.orders-empty { padding: 28px 0; }
.start-guide { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; max-width: 760px; }
.start-guide h2 { margin: 0 0 14px; font-size: 17px; }
.start-guide ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.start-guide li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.start-guide li:first-child { border-top: 0; }
.start-guide .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.start-guide li > div { flex: 1; min-width: 0; }
.start-guide b { font-size: 14px; }
.start-guide p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.start-guide .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 600px) { .start-guide li { flex-wrap: wrap; } .start-guide .btn { margin-left: 40px; } }
