/* 유인에너지 영업 관리 — 디자인 토큰 (목업 기준) */
:root {
  --bg: #F2F4F6;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --fill: #F2F4F6;
  --fill-2: #E8EBED;
  --line: #E5E8EB;
  --line-2: #F0F2F4;
  --text: #191F28;
  --text-2: #4E5968;
  --text-3: #8B95A1;
  --text-4: #B0B8C1;
  --blue: #3182F6;
  --blue-hover: #2272EB;
  --blue-strong: #1B64DA;
  --blue-50: #E8F3FF;
  --blue-100: #C9E2FF;
  --blue-200: #90C2FF;
  --blue-300: #64A8FF;
  --red: #F04452;
  --red-50: #FEEEEF;
  --orange: #F59E0B;
  --orange-text: #C2410C;
  --orange-50: #FFF4E5;
  --green: #03B26C;
  --green-50: #E6F8F0;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0, 29, 58, .04);
  --shadow-lg: 0 12px 40px rgba(0, 29, 58, .16);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', '맑은 고딕', system-ui, sans-serif;
  --sidebar: 236px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; word-break: keep-all;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
.num, .tnum, table td, .kpi-value { font-variant-numeric: tabular-nums; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--text-3); }
.hidden { display: none !important; }
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
.bold { font-weight: 700; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.pos { color: var(--blue-strong); }
.neg { color: var(--red); }
.row { display: flex; align-items: center; gap: 8px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.gap-4 { gap: 4px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
svg.ic { width: 20px; height: 20px; flex: none; }
svg.ic-sm { width: 15px; height: 15px; vertical-align: -2px; }

/* ---------- 앱 레이아웃 ---------- */
.app { min-height: 100vh; display: flex; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface); position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column; padding: 28px 16px 20px; border-right: 1px solid var(--line-2); z-index: 20;
}
.brand { padding: 0 12px 28px; display: flex; align-items: center; gap: 10px; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.brand-sub { color: var(--text-3); font-size: 14px; margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; color: var(--text-2);
  font-size: 16px; font-weight: 500; border: 0; background: none; text-align: left; width: 100%;
}
.nav-item svg { width: 22px; height: 22px; color: #8D96A2; }
.nav-item:hover { background: var(--fill); }
.nav-item.active { background: var(--blue); color: #fff; font-weight: 600; }
.nav-item.active svg { color: #fff; }
.nav-bottom { margin-top: auto; }
.main { flex: 1; min-width: 0; margin-left: var(--sidebar); display: flex; flex-direction: column; }
.topbar {
  height: 76px; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: var(--surface);
  border-bottom: 1px solid var(--line-2); position: sticky; top: 0; z-index: 15;
}
.search { position: relative; flex: 0 1 480px; }
.search input {
  width: 100%; height: 46px; border: 0; background: var(--fill); border-radius: 23px; padding: 0 18px 0 46px;
  font-size: 15px; outline: none;
}
.search input:focus { background: #EDF0F3; box-shadow: 0 0 0 2px var(--blue-100); }
.search > svg { position: absolute; left: 16px; top: 13px; color: var(--text-3); }
.search-results {
  position: absolute; top: 52px; left: 0; right: 0; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; max-height: 420px; overflow: auto; z-index: 40;
}
.search-results .sr-head { font-size: 12px; color: var(--text-3); padding: 8px 10px 4px; }
.search-results button {
  display: flex; width: 100%; border: 0; background: none; padding: 10px; border-radius: 10px; gap: 10px;
  text-align: left; align-items: center;
}
.search-results button:hover, .search-results button.focus { background: var(--fill); }
.user-btn {
  margin-left: auto; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px 8px;
  border-radius: 24px; font-weight: 600; font-size: 15px;
}
.user-btn:hover { background: var(--fill); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: #E5E8EB; display: grid; place-items: center; color: #6B7684;
}
.avatar svg { width: 26px; height: 26px; }
.content { padding: 32px 32px 48px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 34px; font-weight: 800; letter-spacing: -0.04em; margin: 0; line-height: 1.2; }
.page-sub { color: var(--text-3); font-size: 16px; margin-top: 6px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* 모바일 */
.m-topbar, .tabbar { display: none; }

/* ---------- 카드 / KPI ---------- */
.card { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.card-title .muted { font-size: 14px; font-weight: 500; margin-left: 8px; letter-spacing: 0; }
.link { color: var(--blue); font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; }
.link svg { width: 18px; height: 18px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid-1-1 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { display: flex; gap: 20px; align-items: flex-start; padding: 24px 24px 22px; }
.kpi-icon {
  width: 68px; height: 68px; border-radius: 50%; background: var(--blue-50); display: grid; place-items: center;
  color: var(--blue); flex: none;
}
.kpi-icon svg { width: 34px; height: 34px; }
.kpi-label { font-size: 16px; font-weight: 600; color: var(--text); }
.kpi-value { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; margin-top: 6px; white-space: nowrap; }
.kpi-value small { font-size: .82em; font-weight: 800; }
.kpi-sub { color: var(--text-3); font-size: 15px; margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
.delta { font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 10px; background: var(--fill); color: var(--text-2); }
.delta.up { background: var(--blue-50); color: var(--blue-strong); }
.delta.down { background: var(--red-50); color: var(--red); }
.stat-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.stat { padding: 16px 18px; border-left: 1px solid var(--line-2); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat-label { font-size: 13px; color: var(--text-3); }
.stat-value { font-size: 19px; font-weight: 700; margin-top: 2px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value.blue { color: var(--blue-strong); }

/* ---------- 할 일 ---------- */
.tasks { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.task {
  background: var(--surface); border-radius: var(--radius); padding: 16px 18px; border: 0; text-align: left;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; min-height: 92px; position: relative;
}
.task:hover { box-shadow: 0 0 0 2px var(--blue-100); }
.task-count { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.task-title { font-weight: 600; font-size: 15px; }
.task-desc { font-size: 12.5px; color: var(--text-3); }
.task.zero .task-count { color: var(--text-4); }
.task.hot .task-count { color: var(--orange-text); }
.task.hot::after { content: ''; position: absolute; top: 16px; right: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.all-done { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; color: var(--text-2); display: flex; gap: 10px; align-items: center; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px;
  border-radius: 12px; border: 0; font-weight: 600; font-size: 15px; background: var(--fill); color: var(--text-2);
  white-space: nowrap; transition: background .12s, box-shadow .12s;
}
.btn:hover { background: var(--fill-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-light { background: var(--blue-50); color: var(--blue-strong); }
.btn-light:hover { background: #DCEBFF; }
.btn-outline { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-danger { background: var(--red-50); color: var(--red); }
.btn-danger:hover { background: #FDDCDF; }
.btn-lg { height: 56px; font-size: 17px; border-radius: 14px; padding: 0 24px; }
.btn-xl { height: 60px; font-size: 18px; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-big-cta { height: 54px; padding: 0 26px; font-size: 18px; border-radius: 14px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; display: inline-grid; place-items: center;
  color: var(--text-2);
}
.icon-btn:hover { background: var(--fill); }
.icon-btn svg { width: 22px; height: 22px; }

/* ---------- 입력 ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.input, .select, textarea.input {
  width: 100%; height: 48px; border: 0; background: var(--fill); border-radius: 12px; padding: 0 16px; font-size: 16px;
  outline: none; transition: box-shadow .12s, background .12s; appearance: none; -webkit-appearance: none;
}
textarea.input { height: auto; min-height: 80px; padding: 12px 16px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus { background: #EEF1F4; box-shadow: 0 0 0 2px var(--blue); }
.input:disabled { background: #EEF0F3; color: var(--text-2); box-shadow: none; cursor: not-allowed; -webkit-text-fill-color: var(--text-2); opacity: 1; }
.input.invalid { box-shadow: 0 0 0 2px var(--red); }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238B95A1' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.input-sm, .select-sm { height: 38px; font-size: 14px; border-radius: 10px; padding: 0 12px; }
.select-sm { padding-right: 34px; background-position: right 10px center; }
.input-wrap { position: relative; }
.input-wrap .suffix {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; pointer-events: none;
}
.input-wrap .input { padding-right: 56px; }
.input-xl { height: 62px; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.input-xl:focus { box-shadow: 0 0 0 2px var(--blue); background: #fff; }
.input-lg { height: 56px; font-size: 20px; font-weight: 600; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.input-lg:focus { box-shadow: 0 0 0 2px var(--blue); background: #fff; }
.hint { font-size: 13.5px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }

.seg { display: inline-flex; background: var(--fill); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button {
  border: 0; background: none; padding: 0 16px; height: 38px; border-radius: 9px; font-weight: 600; color: var(--text-3);
  font-size: 15px; white-space: nowrap;
}
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg-block { display: flex; }
.seg-block button { flex: 1; }
.seg-sm button { height: 32px; font-size: 13.5px; padding: 0 12px; }
.basis-seg button { height: auto; min-height: 52px; padding: 7px 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.3; font-size: 16px; }
.basis-seg button small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.basis-seg button.on small { color: var(--text-2); }

.chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 30px; padding: 0 12px; border-radius: 15px;
  background: var(--blue-50); color: var(--blue-strong); font-size: 14px; font-weight: 600; white-space: nowrap; border: 0;
}
.chip-sm { height: 24px; padding: 0 9px; font-size: 12.5px; border-radius: 12px; }
.chip-gray { background: var(--fill); color: var(--text-2); }
.chip-orange { background: var(--orange-50); color: var(--orange-text); }
.chip-green { background: var(--green-50); color: #008A52; }
.chip-red { background: var(--red-50); color: var(--red); }
button.chip { cursor: pointer; }
button.chip.off { background: var(--fill); color: var(--text-3); }
.fuel { min-width: 52px; }
.fuel-무연 { background: #E6F8F0; color: #008A52; }
.fuel-등유 { background: #FFF4E5; color: #C2410C; }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.table th {
  background: var(--surface-2); color: var(--text-3); font-weight: 500; font-size: 14px; text-align: left; padding: 13px 16px;
  white-space: nowrap; border-bottom: 1px solid var(--line-2);
}
.table th:first-child { border-radius: 10px 0 0 10px; }
.table th:last-child { border-radius: 0 10px 10px 0; }
.table td { padding: 14px 11px; border-bottom: 1px solid var(--line-2); white-space: nowrap; vertical-align: middle; }
.table th { padding-left: 11px; padding-right: 11px; }
.table tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; }
.table .ctr { text-align: center; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: #FAFBFC; }
.table tfoot td { font-weight: 700; background: var(--surface-2); border-bottom: 0; }
.table tfoot td:first-child { border-radius: 10px 0 0 10px; }
.table tfoot td:last-child { border-radius: 0 10px 10px 0; }
.table-dense td { padding: 10px 12px; font-size: 14px; }
.table-dense th { padding: 10px 12px; font-size: 13px; }
.table tr.plan td { background: #FBFCFF; }
.table tr.plan td:first-child { box-shadow: inset 3px 0 0 var(--blue-200); }
.cell-sub { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 1px; font-weight: 400; }
.sticky-col { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.table th.sticky-col { background: var(--surface-2); z-index: 2; }

/* ---------- 리스트 ---------- */
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); border: 0; width: 100%; text-align: left; font-size: 16px;
}
.list-row:hover { background: var(--surface-2); }
.list-row .chev { margin-left: auto; color: var(--text-3); }
.list-group { border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; background: var(--surface); }
.list-group .list-row { border-radius: 0; box-shadow: none; }
.list-group .list-row + .list-row { border-top: 1px solid var(--line-2); }
.qa-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.qa-icon svg { width: 26px; height: 26px; }
.quick { display: flex; flex-direction: column; gap: 12px; }
.quick .list-row { padding: 14px 16px; font-weight: 600; }

/* ---------- 가로 막대 ---------- */
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { display: grid; grid-template-columns: 56px 1fr 110px; gap: 16px; align-items: center; font-size: 16px; }
.hbar-track { height: 18px; border-radius: 9px; background: var(--fill); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 9px; background: var(--blue); min-width: 4px; transition: width .5s ease; }
.hbar-val { text-align: right; font-variant-numeric: tabular-nums; }
.foot-note { font-size: 12.5px; color: var(--text-3); text-align: right; margin-top: 14px; }

/* 세로 막대 차트 */
.vbars { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 22px; }
.vbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.vbar-col { width: 100%; max-width: 44px; background: var(--blue-200); border-radius: 8px 8px 3px 3px; position: relative; min-height: 2px; }
.vbar-col.hi { background: var(--blue); }
.vbar-col.neg { background: var(--red); }
.vbar-lbl { font-size: 12.5px; color: var(--text-3); }
.vbar-val { font-size: 12px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 탭 ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 12px 14px; font-size: 16px; font-weight: 600; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab.on { color: var(--text); border-bottom-color: var(--text); }
.tab .badge { margin-left: 4px; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; font-size: 12px; font-weight: 700; background: var(--fill); color: var(--text-2); }
.badge.hot { background: var(--orange); color: #fff; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters .search-sm { position: relative; width: 240px; }
.filters .search-sm input { padding-left: 36px; }
.filters .search-sm svg { position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; color: var(--text-3); }

/* 월 선택 */
.month-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 18px 0 20px; border-radius: 14px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border: 0; font-size: 18px; font-weight: 500;
}
.month-btn svg { width: 20px; height: 20px; color: var(--text-2); }
.month-btn.sm { height: 42px; font-size: 15px; border-radius: 11px; padding: 0 12px 0 14px; }
.popover {
  position: fixed; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px;
  z-index: 60; width: 292px;
}
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-weight: 700; }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mp-grid button { height: 42px; border: 0; border-radius: 10px; background: var(--surface); font-size: 15px; position: relative; }
.mp-grid button:hover { background: var(--fill); }
.mp-grid button.has::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 2px; background: var(--blue-200); }
.mp-grid button.on { background: var(--blue); color: #fff; font-weight: 700; }
.mp-grid button.on::after { background: #fff; }
.menu { padding: 6px; width: 220px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 11px 12px; border-radius: 9px; text-align: left; font-size: 15px; }
.menu button:hover { background: var(--fill); }
.hmenu button { justify-content: space-between; padding: 9px 12px; font-size: 14.5px; }
.hmenu button.on { color: var(--blue-strong); font-weight: 700; }
.hmenu button svg { width: 16px; height: 16px; color: var(--blue); }
.menu-label { font-size: 12px; color: var(--text-3); padding: 6px 12px 4px; }
.menu-sep { height: 1px; background: var(--line-2); margin: 4px 0; }
th .caret { font-size: 10px; margin-left: 3px; color: var(--text-4); }
th.filtered, .xl th.filtered { color: var(--blue-strong); }
th.filtered .caret { color: var(--blue); }
.menu .menu-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }

/* ---------- 오버레이 ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(0, 12, 30, .44); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.modal {
  background: var(--surface); border-radius: 22px; width: 100%; max-width: 480px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: rise .18s ease;
}
.modal.wide { max-width: 720px; }
.modal-head { padding: 24px 24px 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-title { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.modal-body { padding: 12px 24px; overflow: auto; }
.modal-foot { padding: 12px 24px 24px; display: flex; gap: 8px; }
.modal-foot .btn { flex: 1; height: 52px; font-size: 16px; }
.drawer-backdrop { justify-content: flex-end; padding: 0; }
.drawer {
  background: var(--bg); width: 520px; max-width: 100%; height: 100%; overflow: auto; animation: slide .18s ease;
  display: flex; flex-direction: column;
}
.drawer-head { background: var(--surface); padding: 20px 24px; display: flex; align-items: flex-start; gap: 12px; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line-2); }
.drawer-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.drawer-foot { position: sticky; bottom: 0; background: var(--surface); padding: 12px 16px calc(12px + var(--safe-b)); display: flex; gap: 8px; border-top: 1px solid var(--line-2); margin-top: auto; }
.drawer-foot .btn { flex: 1; height: 50px; }

.toast-wrap { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(28px + var(--safe-b)); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: rgba(25, 31, 40, .94); color: #fff; padding: 13px 20px; border-radius: 14px; font-size: 15px; font-weight: 500; animation: rise .2s; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.toast.err { background: #E42939; }

/* ---------- 정보 목록 ---------- */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; font-size: 15px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }
.amount-rows { display: flex; flex-direction: column; gap: 14px; }
.amount-row { display: flex; justify-content: space-between; gap: 12px; font-size: 17px; }
.amount-row .l { color: var(--text-2); }
.amount-row .v { font-variant-numeric: tabular-nums; font-weight: 500; }
.hl-box { background: var(--blue-50); border-radius: 16px; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hl-box .l { color: var(--blue-strong); font-weight: 700; font-size: 18px; }
.hl-box .v { color: var(--blue-strong); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hl-box.neg { background: var(--red-50); }
.hl-box.neg .l, .hl-box.neg .v { color: var(--red); }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.section-title { font-size: 17px; font-weight: 700; margin: 0 0 12px; }

/* 점검 결과 */
.issues { display: flex; flex-direction: column; gap: 8px; }
.issue { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; align-items: flex-start; line-height: 1.45; }
.issue svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.issue.error { background: var(--red-50); color: #C21F2D; }
.issue.warn { background: var(--orange-50); color: #9A3412; }
.issue.info { background: var(--fill); color: var(--text-2); }
.issue.ok { background: var(--green-50); color: #007A48; }

/* 배너 */
.banner { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--blue-50); color: #1D4E9E; font-size: 14.5px; align-items: flex-start; margin-bottom: 16px; line-height: 1.5; }
.banner svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.banner.warn { background: var(--orange-50); color: #9A3412; }
.banner .btn { margin-left: auto; }

/* ---------- 영업일보 쓰기 ---------- */
.write-page { max-width: 520px; margin: 0 auto; }
.write-shell { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); min-height: 720px; display: flex; flex-direction: column; overflow: hidden; }
.step-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; padding: 14px 12px 6px; }
.step-head .title { text-align: center; font-weight: 700; font-size: 16px; }
.step-head .count { text-align: right; color: var(--text-3); font-size: 15px; padding-right: 10px; }
.step-body { padding: 16px 24px 24px; flex: 1; display: flex; flex-direction: column; gap: 20px; }
.step-title { font-size: 28px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.3; margin: 0; }
.step-sub { color: var(--text-3); font-size: 16px; margin-top: 6px; }
.step-foot { padding: 12px 24px calc(20px + var(--safe-b)); position: sticky; bottom: 0; background: linear-gradient(to top, #fff 75%, rgba(255,255,255,0)); }
.pick-card {
  display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 14px; background: var(--blue-50);
  box-shadow: inset 0 0 0 1.5px var(--blue); font-size: 18px; font-weight: 600; width: 100%; border: 0; text-align: left;
}
.pick-card .check-c { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; }
.pick-card .check-c svg { width: 18px; height: 18px; }
.cust-row { display: flex; align-items: center; padding: 16px 18px; font-size: 17px; width: 100%; background: none; border: 0; text-align: left; gap: 10px; }
.cust-row + .cust-row { border-top: 1px solid var(--line-2); }
.cust-row:hover { background: var(--surface-2); }
.cust-row .meta { margin-left: auto; font-size: 13px; color: var(--text-3); }
.cust-row svg { color: var(--text-3); }
.info-row {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line);
  width: 100%; border: 0; background: var(--surface); text-align: left;
}
.info-row:hover { background: var(--surface-2); }
.info-row .doc-ic { width: 26px; height: 26px; color: var(--text-2); }
.info-row .t { font-weight: 700; font-size: 16px; }
.info-row .s { font-size: 13.5px; color: var(--text-3); margin-top: 2px; }
.loaded-banner { display: flex; align-items: center; gap: 10px; background: var(--fill); border-radius: 12px; padding: 11px 14px; font-size: 14px; color: var(--text-2); }
.loaded-banner svg { width: 18px; height: 18px; color: var(--blue); flex: none; }
.loaded-banner button { margin-left: auto; }
.margin-live { border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); padding: 14px 16px; }
.margin-live .big { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.sens { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sens button { border: 0; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 10px; padding: 7px 10px; font-size: 13px; text-align: left; line-height: 1.35; }
.sens button b { display: block; font-size: 14px; }
.sens button.on { box-shadow: inset 0 0 0 1.5px var(--blue); background: var(--blue-50); }
.stepper { display: flex; gap: 6px; margin-top: 8px; }
.stepper button { flex: 1; height: 34px; border: 0; border-radius: 9px; background: var(--fill); font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.big-amount { font-size: 42px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.big-amount small { font-size: .8em; }
.done-mark { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin: 32px auto 8px; animation: rise .3s; }
.done-mark svg { width: 40px; height: 40px; }
.photo-list { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 84px; height: 84px; border-radius: 12px; background: var(--fill) center/cover no-repeat; position: relative; border: 0; overflow: hidden; display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.thumb .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; border: 0; }
.thumb .x svg { width: 14px; height: 14px; }
.add-photo { width: 84px; height: 84px; border-radius: 12px; border: 1.5px dashed var(--text-4); background: none; color: var(--text-3); display: grid; place-items: center; font-size: 12px; gap: 2px; align-content: center; }
.add-photo svg { width: 24px; height: 24px; }

.side-panel { position: sticky; top: 100px; }
.write-layout { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 360px); gap: 24px; justify-content: center; align-items: start; }

/* 타임라인 */
.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item { display: grid; grid-template-columns: 10px 1fr; gap: 12px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue-200); margin-top: 6px; }
.tl-item .t { font-size: 14.5px; }
.tl-item .s { font-size: 12.5px; color: var(--text-3); }
.tl-changes { margin-top: 6px; font-size: 13px; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.tl-changes div { display: flex; gap: 6px; flex-wrap: wrap; }
.tl-changes .old { color: var(--text-3); text-decoration: line-through; }

.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty img, .empty .em-ic { width: 96px; height: 96px; margin: 0 auto 12px; display: grid; place-items: center; }
.empty .em-ic { border-radius: 50%; background: var(--fill); color: var(--text-4); }
.empty .em-ic svg { width: 44px; height: 44px; }
.empty .t { font-weight: 700; color: var(--text-2); font-size: 16px; }

/* 로그인 */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 28px; padding: 40px 32px 32px; box-shadow: var(--shadow); }
.login-logo { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1180px) {
  .stat-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat:nth-child(5) { border-left: 0; }
  .stat:nth-child(n+5) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 1280px) {
  .stat { padding: 14px 14px; }
  .stat-value { font-size: 17px; }
  .kpi-value { font-size: 28px; }
  .kpi-icon { width: 56px; height: 56px; }
  .kpi-icon svg { width: 28px; height: 28px; }
  .write-layout { grid-template-columns: minmax(0, 520px); }
  .side-panel { display: none; }
}
@media (max-width: 1023px) {
  .sidebar, .topbar { display: none; }
  .main { margin-left: 0; padding-bottom: calc(76px + var(--safe-b)); }
  .content { padding: 16px 16px 32px; }
  .m-topbar {
    display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 8px 0 16px; position: sticky; top: 0; z-index: 15;
    background: rgba(242, 244, 246, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .m-topbar .m-title { font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
  .m-topbar .m-actions { margin-left: auto; display: flex; gap: 2px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line-2); padding: 6px 4px calc(6px + var(--safe-b));
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  }
  .tabbar button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; color: var(--text-3); padding: 4px 0; font-weight: 500; }
  .tabbar button svg { width: 24px; height: 24px; }
  .tabbar button.on { color: var(--text); font-weight: 700; }
  .tabbar .tb-write span.plus { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; margin-top: -2px; box-shadow: 0 4px 12px rgba(49, 130, 246, .35); }
  .tabbar .tb-write span.plus svg { width: 24px; height: 24px; }
  .page-title { font-size: 26px; }
  .page-sub { font-size: 14px; }
  .page-head { margin-bottom: 16px; }
  .grid-3, .grid-4, .grid-2-1, .grid-1-1 { grid-template-columns: minmax(0, 1fr); }
  .kpi { padding: 18px; gap: 14px; align-items: center; }
  .kpi-icon { width: 48px; height: 48px; }
  .kpi-icon svg { width: 24px; height: 24px; }
  .kpi-label { font-size: 14px; }
  .kpi-value { font-size: 24px; margin-top: 2px; }
  .kpi-sub { font-size: 13px; margin-top: 4px; }
  .card { padding: 18px; border-radius: 18px; }
  .card-title { font-size: 18px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .stat:nth-child(5) { border-left: 0; }
  .stat-value { font-size: 17px; }
  .hbar { grid-template-columns: 44px 1fr 92px; gap: 10px; font-size: 14.5px; }
  .month-btn { height: 44px; font-size: 16px; }
  .page-actions .btn-big-cta { display: none; }
  .write-page { max-width: none; margin: -16px -16px -32px; }
  .write-shell { border-radius: 0; min-height: 100vh; min-height: 100dvh; box-shadow: none; }
  .write-mode .m-topbar, .write-mode .tabbar { display: none; }
  .write-mode .main { padding-bottom: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
  .backdrop:not(.drawer-backdrop) { align-items: flex-end; padding: 0; }
  .drawer { width: 100%; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .filters .search-sm { width: 100%; }
  .table-m-hide { display: none; }
  .tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv { grid-template-columns: 100px 1fr; }
}
@media (max-width: 420px) {
  .step-title { font-size: 25px; }
  .big-amount { font-size: 36px; }
  .hl-box .v { font-size: 26px; }
  .kpi-value { font-size: 22px; }
}

/* 정렬되는 머리글 · 합계 줄 */
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table th.sorted, .xl th.sorted { color: var(--blue-strong); }
.arr { font-size: 9px; margin-left: 4px; vertical-align: 1px; }
.table tfoot tr.total-row td { background: #EEF4FD; color: var(--text); border-top: 1px solid #D5E3F7; }
.table tfoot tr.total-row .cell-sub { color: var(--text-2); }

/* ---------- 엑셀처럼 보기 (셀 바로 수정) ---------- */
.xl-hint { font-size: 13px; color: var(--text-3); margin: -4px 0 10px; line-height: 1.6; }
.xl-hint b { color: var(--text-2); font-weight: 600; }
.calc-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #F1F3F5; box-shadow: inset 0 0 0 1px var(--line); vertical-align: -1px; }
/* 세로는 창 전체가 스크롤: 머리글은 상단 바 아래, 합계 줄·가로 스크롤바는 창 아래에 붙는다 */
.xl-grid { position: relative; outline: none; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); background: #fff; }
.xl-grid:focus-visible { box-shadow: 0 0 0 1px var(--blue-200); }
.xl-head { position: sticky; top: 76px; z-index: 7; overflow: hidden; border-radius: 12px 12px 0 0; background: var(--surface-2); box-shadow: 0 1px 0 var(--line); }
.xl-body { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.xl-body::-webkit-scrollbar { display: none; }
.xl-foot { position: sticky; bottom: 0; z-index: 7; border-radius: 0 0 12px 12px; background: #EEF4FD; box-shadow: 0 -6px 14px rgba(0, 29, 58, .07); }
.xl-foot-in { overflow: hidden; }
.xl-hbar { overflow-x: auto; overflow-y: hidden; height: 14px; background: #fff; border-radius: 0 0 12px 12px; }
.xl-hbar::-webkit-scrollbar { height: 10px; }
.xl-hbar::-webkit-scrollbar-thumb { background: #C5CCD4; border-radius: 5px; }
.xl-hbar::-webkit-scrollbar-thumb:hover { background: #9AA4B0; }
.xl { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13.5px; }
.xl th, .xl td {
  height: 36px; padding: 0 9px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; font-variant-numeric: tabular-nums;
}
.xl th.n, .xl td.n { text-align: right; }
.xl td.c { text-align: center; }
.xl td.b { font-weight: 700; }
.xl thead th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 13px; cursor: pointer; user-select: none; border-bottom: 0; }
.xl thead th:hover { color: var(--text); }
.xl tfoot td { background: #EEF4FD; font-weight: 700; border-top: 1px solid #D5E3F7; border-bottom: 0; }
.xl tfoot .avg { font-weight: 500; color: var(--text-2); font-size: 12.5px; }
.xl .fz { position: sticky; z-index: 2; }
.xl thead .fz, .xl tfoot .fz { z-index: 3; }
.xl .basis.vol { color: #C2410C; font-weight: 700; }
.xl td.picking { outline: 2px solid var(--blue); outline-offset: -2px; }
.xl-dd {
  position: fixed; z-index: 80; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px;
  display: flex; flex-direction: column; gap: 2px; animation: rise .12s;
}
.xl-dd button {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 0; background: none; padding: 9px 12px;
  border-radius: 8px; font-size: 14.5px; text-align: left; cursor: pointer; white-space: nowrap;
}
.xl-dd button:hover, .xl-dd button.hi { background: var(--fill); }
.xl-dd button.cur { font-weight: 700; color: var(--blue-strong); }
.xl-dd button svg { width: 16px; height: 16px; color: var(--blue); }
.xl-dd-note { font-size: 12px; color: var(--text-3); padding: 7px 12px 4px; border-top: 1px solid var(--line-2); margin-top: 2px; white-space: nowrap; }
.xl tbody td.calc { background: #F7F8FA; color: var(--text-2); }
.xl tbody td.b.calc { color: var(--text); }
.xl tbody td.ed { cursor: cell; }
.xl tbody td.neg { color: var(--red); }
.xl tbody td.warn { color: var(--red); font-weight: 700; }
.xl tbody tr:hover td { background-color: #F4F8FF; }
.xl tbody tr:hover td.calc { background-color: #EEF2F8; }
.xl tbody tr.plan td:first-child { box-shadow: inset 3px 0 0 var(--blue-200); }
.xl td.fz:nth-child(4) { box-shadow: 2px 0 0 rgba(0, 0, 0, .04); }
.xl td.sel { outline: 2px solid var(--blue); outline-offset: -2px; background-color: #EAF3FF !important; }
.xl td.editing { padding: 0; overflow: visible; outline: 2px solid var(--blue); outline-offset: -2px; }
.xl td.editing input, .xl td.editing select {
  width: 100%; height: 34px; border: 0; outline: none; padding: 0 8px; font: inherit; background: #fff; color: var(--text);
  text-align: inherit; box-shadow: 0 2px 10px rgba(49, 130, 246, .18);
}
.xl td.saving { opacity: .45; }
.xl td.flash { animation: xl-flash 1.8s ease-out; }
@keyframes xl-flash { 0% { box-shadow: inset 0 0 0 100px rgba(255, 196, 0, .45); } 100% { box-shadow: inset 0 0 0 100px rgba(255, 196, 0, 0); } }
.xl .seq { color: var(--text-3); }
.xl .xl-open { border: 0; background: none; color: var(--text-4); padding: 0 0 0 4px; cursor: pointer; vertical-align: middle; line-height: 1; }
.xl .xl-open svg { width: 15px; height: 15px; }
.xl .xl-open:hover { color: var(--blue); }
.xl .chip-sm { height: 22px; font-size: 12px; }

/* 카드형 목록 (모바일 목록, 기사 화면) */
.m-list { display: none; }
.m-day { font-size: 13px; color: var(--text-3); font-weight: 600; padding: 14px 4px 6px; }
.m-item { display: flex; gap: 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 14px 16px; border: 0; width: 100%; text-align: left; }
.m-item .t { font-weight: 600; font-size: 16px; }
.m-item .s { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.m-item .amt { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; flex: none; }
.m-item .amt .s { font-weight: 500; }
@media (max-width: 1023px) {
  .m-list { display: flex; flex-direction: column; gap: 4px; }
  .d-only { display: none !important; }
  .m-hide { display: none !important; }
  .stat-strip:has(.m-hide) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-strip:has(.m-hide) .stat { border-top: 0; border-left: 1px solid var(--line-2); }
  .stat-strip:has(.m-hide) .stat:first-child { border-left: 0; }
  .stat-strip:has(.m-hide) .stat-value { font-size: 15px; }
}
@media (min-width: 1024px) { .m-only { display: none !important; } }
@media print {
  .sidebar, .topbar, .m-topbar, .tabbar, .page-actions, .filters { display: none !important; }
  .main { margin: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ---------- 석유대리점 수급보고 ---------- */
.search-box { position: relative; }
.search-box input { padding-left: 36px; width: 100%; }
.search-box svg { position: absolute; left: 11px; top: 10px; width: 18px; height: 18px; color: var(--text-3); }
.rp-results { border: 1px solid var(--line); border-radius: 12px; max-height: 250px; overflow-y: auto; }
.rp-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; font: inherit; color: inherit; }
.rp-row:last-child { border-bottom: 0; }
.rp-row:hover { background: var(--surface-2); }
.rp-row.on { background: var(--blue-50); box-shadow: inset 3px 0 0 var(--blue); }
.rp-name { font-weight: 600; font-size: 14.5px; display: flex; gap: 8px; align-items: baseline; }
.rp-id { font-size: 12px; color: var(--text-3); font-weight: 500; }
.rp-meta { font-size: 13px; color: var(--text-2); }
.rp-week { position: relative; cursor: pointer; gap: 8px; }
.rp-week input[type=date] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.rp-week input[type=date]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.issue .rp-fix { margin-left: auto; flex: none; }
.rp-table td.rp-miss { background: var(--red-50); color: var(--red); font-weight: 600; }
.rp-table tr.rp-bad td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.rp-fuels { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rp-fuel-name { width: 34px; font-weight: 600; }
.rp-fuels .select-sm { width: 220px; }
.rp-reg { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: 14px; background: var(--surface-2); margin-top: 8px; }
.rp-status { white-space: normal !important; min-width: 220px; }
.rp-sugg { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.rp-sugg .chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.rp-auto-list { margin: 10px 0 0; padding-left: 18px; max-height: 300px; overflow-y: auto; font-size: 14px; line-height: 1.7; }
.rp-box { border-top: 1px solid var(--line); padding-top: 18px; }
.rp-box-title { font-size: 16px; margin: 0; }
.rp-kv { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 10px 16px; margin-top: 12px; font-size: 14.5px; }
.rp-kv > span { color: var(--text-3); }
@media (max-width: 760px) { .rp-kv { grid-template-columns: max-content 1fr; } .rp-reg { flex-direction: column; align-items: flex-start; } }
.rp-weeks { display: flex; flex-direction: column; gap: 8px; }
.rp-wk { display: grid; grid-template-columns: 170px 1fr 220px auto; align-items: center; gap: 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); cursor: pointer; border: 1.5px solid transparent; }
.rp-wk:hover { background: #F2F4F6; }
.rp-wk.on { background: var(--blue-50); border-color: var(--blue); }
.rp-wk.due:not(.on) { border-color: #B7D3FF; }
.rp-wk-name b { display: block; font-size: 16.5px; }
.rp-wk-name span, .rp-wk-qty span, .rp-wk-state > span:last-child { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.rp-wk-qty b { font-size: 16px; font-variant-numeric: tabular-nums; }
.rp-wk-btns { display: flex; gap: 6px; justify-content: flex-end; min-width: 132px; }
@media (max-width: 760px) {
  .rp-wk { grid-template-columns: 1fr auto; row-gap: 8px; }
  .rp-wk-state { grid-column: 1; } .rp-wk-btns { grid-column: 2; grid-row: 2; }
}

/* ---------- 영업일보 쓰기: 간결한 입력 묶음 ---------- */
.w-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.w-sec { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.w-sec .input-lg { background: var(--surface); }
.w-sec .input:not(.input-lg) { background: var(--surface); }
.w-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.w-sec-head > .label { font-size: 15px; font-weight: 700; color: var(--text); }
.qty-chips, .pt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.w-sec .field > label .hint { font-weight: 500; font-size: 12.5px; margin-left: 4px; }
.input.auto { color: var(--text-3); background: transparent !important; box-shadow: inset 0 0 0 1px var(--line); }
.input.auto:focus { color: var(--text); background: var(--surface) !important; box-shadow: 0 0 0 2px var(--blue); }
.amount-row .l .cell-sub { font-weight: 400; }
@media (max-width: 760px) {
  .w-sec { padding: 14px 12px; }
  .w-pair { gap: 8px; }
  .w-sec .input-lg { font-size: 18px; padding-left: 12px; }
}
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pick-chips .chip { cursor: pointer; height: 30px; padding: 0 11px; font-size: 13.5px; border-radius: 15px; }
.pick-chips .pick-new { width: 170px; height: 32px; font-size: 14px; }

/* 눌러서 펼치는 목록 */
.popover.dd-pop { padding: 6px; outline: none; }
.dd-pick .dd-q { width: 100%; margin-bottom: 6px; }
.dd-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; }
.dd-list button { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; background: none;
  padding: 10px 12px; border-radius: 8px; font-size: 15px; color: var(--text); cursor: pointer; font-family: inherit; }
.dd-list button:hover, .dd-list button.hi { background: var(--fill); }
.dd-list button.cur { font-weight: 700; color: var(--blue-strong); }
.dd-list button.dd-clear { color: var(--text-3); font-size: 14px; }
.dd-list button.dd-new { color: var(--blue-strong); font-weight: 600; }
.dd-list button svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.dd-btn { display: block; width: 100%; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; }
.dd-btn.empty { color: var(--text-3); }
.dd-inline { width: auto; min-width: 116px; height: 36px; font-size: 14px; border-radius: 10px; padding: 0 34px 0 12px; background-position: right 10px center; }
