:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #1d2330;
  --ink-2: #5b6474;
  --line: #e3e6eb;
  --brand: #e2621b;
  --brand-ink: #ffffff;
  --side: #1f2430;
  --side-ink: #c4cad6;
  --ok: #1e8a5a;
  --warn: #b7791f;
  --bad: #c53030;
  --radius: 10px;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 14px;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); display: flex; min-height: 100vh; }
a { color: inherit; }
td a, .meta a, .flash a { color: #2457c5; text-decoration: none; }
td a:hover { text-decoration: underline; }

/* 사이드바 */
.sidebar { width: 208px; flex: none; background: var(--side); color: var(--side-ink); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; color: #fff; text-decoration: none; font-size: 17px; padding: 4px 10px 18px; letter-spacing: -0.3px; }
.brand b { color: var(--brand); }
.sidebar nav a, .sidebar nav .soon { display: block; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--side-ink); }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.on { background: var(--brand); color: #fff; }
.sidebar .group { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #7d8596; margin: 16px 10px 4px; }
.sidebar .soon { opacity: .45; cursor: default; }

main { flex: 1; min-width: 0; padding: 22px 28px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.top h1 { font-size: 21px; margin: 0; display: flex; align-items: center; gap: 10px; letter-spacing: -0.4px; }
.top h1 small { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.actions { display: flex; gap: 8px; align-items: center; }
.actions form { margin: 0; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 7px 13px; border-radius: 8px; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c9ced7; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(.95); }
.btn.ghost { background: transparent; }
.btn.small { padding: 3px 9px; font-size: 12px; }
.btn.danger-link { border: 0; background: none; color: var(--bad); padding: 6px 0; margin-top: 8px; }
.x { border: 0; background: none; color: #a0a7b4; font-size: 18px; cursor: pointer; line-height: 1; padding: 2px 6px; }
.x:hover { color: var(--bad); }

/* 카드·표 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 0; margin-bottom: 16px; overflow-x: auto; }
.card h2 { font-size: 14px; margin: 12px 16px 4px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; color: var(--ink-2); font-weight: 600; background: #fafbfc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfbfd; }
tfoot td { background: #fafbfc; border-top: 1px solid var(--line); border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.empty { text-align: center; color: var(--ink-2); padding: 28px; }
.muted td { color: #9aa1ad; }
.neg { color: var(--bad); }
.low { color: var(--warn); }

.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: #eef0f4; color: var(--ink-2); font-weight: 500; }
.tag.done { background: #e3f4ec; color: var(--ok); }
.tag.in { background: #e3f4ec; color: var(--ok); }
.tag.out { background: #fdecec; color: var(--bad); }
.tag.adjust { background: #fdf3e1; color: var(--warn); }

/* 검색줄 */
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filters .spacer { flex: 1; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(226,98,27,.25); border-color: var(--brand); }
.filters input[name=q] { width: 240px; }
.check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px; color: var(--ink-2); }
.hint { color: var(--ink-2); font-size: 12.5px; }

/* 폼 */
.form { padding: 18px; max-width: 920px; }
.form.narrow { max-width: 620px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 16px; }
.grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.grid label input, .grid label select, .grid label textarea { font-weight: 400; color: var(--ink); font-size: 14px; }
.grid .wide { grid-column: 1 / -1; }
.formbar { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.lines { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; }
.lines td { padding: 6px 8px; }
.lines select { width: 100%; min-width: 260px; }
.lines input.num { width: 110px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 6px; }
.seg input { display: none; }
.seg span { display: block; padding: 7px 18px; cursor: pointer; }
.seg input:checked + span { background: var(--brand); color: #fff; font-weight: 600; }

/* 알림 */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: #e8f4ee; color: #1f5e40; border: 1px solid #cbe6d8; }
.flash.error { background: #fdecec; color: #8a1f1f; border-color: #f4caca; }
.flash.warn { background: #fdf5e4; color: #7a5212; border-color: #f1ddb2; }

/* 문서 상세 */
.meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 20px; margin: 0; padding: 14px 18px; }
.meta div { min-width: 0; }
.meta .wide { grid-column: 1 / -1; }
.meta dt { font-size: 12px; color: var(--ink-2); margin-bottom: 3px; }
.meta dd { margin: 0; }

/* 대시보드 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.stat:hover { border-color: #c9ced7; }
.stat span { color: var(--ink-2); font-size: 12.5px; }
.stat b { font-size: 24px; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.cols .card { margin: 0; }
.start { padding: 4px 18px 10px; }
.start ol { margin: 6px 0 8px; padding-left: 20px; line-height: 2; }
.start li.done a { color: var(--ok); text-decoration: line-through; }

@media (max-width: 820px) {
  body { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; padding: 10px 16px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .sidebar .group, .sidebar .soon { display: none !important; }
  .brand { padding: 4px 0 10px; }
  main { padding: 16px; }
  .filters input[name=q] { width: 100%; }
}

/* 품목 가격: 총 가격 ↔ 공급가액·부가세 */
fieldset.price { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 14px; }
fieldset.price legend { padding: 0 6px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
fieldset.price input[readonly] { background: #f5f6f8; color: var(--ink-2); }

/* 견적 일괄 전환 */
.bulkbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--ink-2); font-size: 13px; }
.pickcol { width: 36px; padding-right: 0 !important; }
.pickcol input { width: 16px; height: 16px; cursor: pointer; }
.btn.danger { color: var(--bad); border-color: #f0c9c9; background: #fff; }
.btn.danger:hover { background: #fdecec; border-color: var(--bad); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.stat em { font-style: normal; font-size: 12px; color: var(--ink-2); margin-top: -2px; }

/* 거래처 이름 옆 거래 내역 버튼, 거래 내역 화면 */
.name-cell { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.name-cell .btn { flex: none; }
.items-cell { max-width: 260px; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.stat b.date { font-size: 18px; }

/* 견적·판매 수량 − / + */
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.stepper input { border: 0; border-radius: 0; width: 72px !important; text-align: center; }
.stepper input:focus { outline: none; }
.stepper:focus-within { outline: 2px solid rgba(226,98,27,.25); border-color: var(--brand); }
.stepper .step { border: 0; background: #f5f6f8; width: 30px; font-size: 16px; line-height: 1; cursor: pointer; color: var(--ink-2); }
.stepper .step:hover { background: #eceef2; color: var(--ink); }

/* 회사 정보: 로고·직인 */
.brand-uploads { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 18px; }
.brand-box { display: flex; gap: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.brand-preview { flex: none; width: 120px; height: 80px; border: 1px dashed var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; background: #fafbfc; color: #a0a7b4; font-size: 12px; }
.brand-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-preview.stamp { width: 80px; }
.brand-meta { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.brand-meta input[type=file] { border: 0; padding: 0; font-size: 12.5px; }
.top h1 small { font-weight: 400; }

/* 특별 단가 */
.lead { margin: -6px 0 12px; }
.price-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.price-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--ink-2); font-weight: 600; width: 140px; }
.price-row label.grow { flex: 1; min-width: 200px; width: auto; }
.price-row input, .price-row select { font-weight: 400; color: var(--ink); font-size: 14px; }
.price-row input[readonly] { background: #f5f6f8; }
.row-btns { display: inline-flex; gap: 6px; flex: none; }
.btn.has { border-color: var(--brand); color: var(--brand); }
.muted-num { color: var(--ink-2); }
.ok { color: var(--ok); }
.nowrap { white-space: nowrap; }
form.inline { display: inline; }
.special-tag { display: inline-block; margin-left: 4px; font-size: 10.5px; color: var(--brand); font-weight: 700; }
.price-cell { white-space: nowrap; }
th.center { text-align: center; }
th.group-base { background: #f5f6f8; }
th.group-special { background: #fdf1e9; color: #b4501a; }
td.special-col { background: #fffaf6; }
.price-row label { width: 170px; }
tr.grand-row td { font-size: 15px; }
td.grand { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; }
.meta .total-box { grid-column: 1 / -1; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.meta .total-box dd { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.meta .total-box dd small { font-size: 14px; font-weight: 500; color: var(--ink-2); margin-left: 2px; }

/* 견적·판매: 품목 일괄 추가 창 */
dialog.picker { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(20,25,35,.25); display: none; flex-direction: column; }
dialog.picker[open] { display: flex; }
dialog.picker::backdrop { background: rgba(20,25,35,.45); }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.picker-head h2 { margin: 0; font-size: 16px; }
.picker-filter { display: flex; gap: 8px; padding: 12px 18px; }
.picker-filter input { flex: 1; }
.picker-filter select { width: 160px; }
.picker-body { overflow: auto; padding: 0 18px; min-height: 160px; }
.picker-body thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.picker-body tbody tr { cursor: pointer; }
.picker-body tbody tr:hover { background: #fafbfc; }
.picker-body tbody tr.is-added { cursor: default; color: var(--ink-2); }
.picker-body .added-tag { margin-left: 4px; font-size: 10.5px; font-weight: 700; color: var(--ok); }
.picker-empty { text-align: center; color: var(--ink-2); padding: 24px 0; }
.picker-foot { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 13px; }
.picker-foot .grow { flex: 1; }
dialog.picker.wide { width: min(1040px, calc(100vw - 32px)); }
dialog.picker > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.picker-head h2 small { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-left: 6px; }
.picker-filter.rate-row { align-items: center; padding-top: 0; color: var(--ink-2); font-size: 13px; }
.picker-filter.rate-row .grow { flex: 1; }
.picker-filter.rate-row input { flex: none; }
.memo-inline { display: flex; align-items: center; gap: 6px; }
.memo-inline input { width: 200px !important; }
.picker-body tbody tr.on { background: #fffaf6; }
.picker-body input.pick-supply, .picker-body input.pick-total { width: 120px; }
.picker-body input:disabled { background: transparent; border-color: transparent; color: #a0a7b4; }
.bulk-open { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.picker-filter.rate-row { flex-wrap: wrap; }
.picker-filter.rate-row > span, .memo-inline { white-space: nowrap; }
/* 특별 단가: 일괄 지정 입력칸 */
.bulkbar { flex-wrap: wrap; }
.bulkbar .sep { width: 1px; height: 18px; background: var(--line); }
.inline-field { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12.5px; color: var(--ink-2); }
.inline-field input { width: 110px !important; padding: 4px 8px; }
.inline-field input[readonly] { background: #f5f6f8; width: 90px !important; }
/* 견적·판매 줄: 수량이 1이 아닐 때 칸 아래에 합계 금액 */
.line-sum { font-size: 11.5px; color: var(--ink-2); text-align: right; margin-top: 2px; white-space: nowrap; }
.line-sum:empty { display: none; }
.lines td.num { vertical-align: middle; }
.lines input.disc-input { width: 90px; }
/* 대시보드 판매 총가격: 오리진마인드 대표 색 */
.stat b.brand-num { color: #ff6c00; }

/* 대시보드: 메모 */
.card h2 small { font-weight: 500; color: var(--ink-2); font-size: 12px; margin-left: 4px; }
.memo-add { display: flex; gap: 6px; padding: 8px 16px 10px; flex-wrap: wrap; }
.memo-add input[name=body] { flex: 1; min-width: 180px; }
.memo-add input[type=date] { width: 150px; }
.memo-done { padding: 8px 16px 12px; border-top: 1px solid var(--line); color: var(--ink-2); }
.memo-done summary { cursor: pointer; font-size: 12.5px; }
.memo-done table { margin-top: 6px; font-size: 12.5px; }
.tag.due { background: #fff1e6; color: #c25400; }
tr.muted td { color: var(--ink-2); text-decoration: line-through; }
.brand-text { color: #ff6c00; font-weight: 600; }

/* 대시보드: 달력 */
.card.cal { margin-bottom: 16px; }
.cal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 8px; flex-wrap: wrap; }
.cal-head h2 { margin: 0; font-size: 16px; }
.cal-nav { display: flex; gap: 4px; }
.cal-legend { margin-left: auto; display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-2); }
.cal-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.cal-legend .sale::before { background: #ff6c00; }
.cal-legend .buy::before { background: var(--ink); }
.cal-legend .memo::before { background: #4f7cf0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-dow { text-align: center; font-size: 12px; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid var(--line); background: #fafbfc; }
.cal-day { min-height: 84px; padding: 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow: hidden; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:hover { background: #fafbfc; }
.cal-day.out { background: #fbfbfc; }
.cal-day.out .num-day { color: #c0c5cf; }
.cal-day .num-day { font-size: 12.5px; font-weight: 600; }
.cal-dow.sun, .cal-day.sun .num-day { color: var(--bad); }
.cal-dow.sat, .cal-day.sat .num-day { color: #2457c5; }
.cal-day.today .num-day { background: #ff6c00; color: #fff; border-radius: 999px; padding: 0 6px; align-self: flex-start; }
.cal-day.picked { box-shadow: inset 0 0 0 2px #ff6c00; }
.cal-amt, .cal-etc, .cal-memo { font-size: 11px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cal-amt.sale { color: #ff6c00; font-weight: 700; }
.cal-amt.buy { color: var(--ink); }
.cal-etc { color: var(--ink-2); }
.cal-memo { color: #2f5bd3; background: #eef3fe; border-radius: 4px; padding: 0 4px; }
.cal-memo.done { text-decoration: line-through; opacity: .6; }
.cal-picked { border-top: 1px solid var(--line); padding: 4px 0 8px; }
.cal-picked h3 { font-size: 13.5px; margin: 8px 16px 2px; }
.cal-day { min-height: 64px; padding: 4px 5px; }
.cal-legend { gap: 6px; }
/* 달력은 대시보드 격자 한 칸(절반) */
.card.cal { width: auto; min-width: 0; margin: 0; }

/* 대시보드 칸(위젯): 2칸 격자, 배치 편집 */
.widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.widget.span-2 { grid-column: 1 / -1; }
.widget .card { margin: 0; }
.widget .stat { height: 100%; }
.widget.is-hidden { display: none; }
.widget-bar { display: none; }
@media (max-width: 900px) { .widgets { grid-template-columns: minmax(0, 1fr); } .widget.span-2 { grid-column: auto; } }
.layout-tools { display: inline-flex; gap: 8px; align-items: center; }
.layout-tools[hidden] { display: none; }
.layout-hint { margin: -6px 0 10px; }
body.layout-editing .widget { display: block; outline: 2px dashed #f0b88a; outline-offset: 3px; border-radius: var(--radius); background: #fffaf6; cursor: grab; }
body.layout-editing .widget.is-hidden { opacity: .45; }
body.layout-editing .widget-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12.5px; font-weight: 600; color: #b4501a; }
body.layout-editing .widget-bar .widget-name { flex: 1; }
body.layout-editing .widget-bar .grip { font-size: 16px; line-height: 1; color: #d08a5a; }
body.layout-editing .widget-body { pointer-events: none; user-select: none; }  /* 편집 중에는 칸 안 링크·버튼이 눌리지 않게 */
.widget-ghost { opacity: .35; }
.widget-chosen { box-shadow: 0 8px 24px rgba(20,25,35,.18); }
/* hidden 속성은 .btn·.special-tag 처럼 display 를 정한 요소에서도 항상 숨긴다 */
[hidden] { display: none !important; }

/* 인사 */
.form-sec { font-size: 13px; margin: 18px 0 10px; color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.form-sec:first-child { margin-top: 0; }
.grid label .hint { font-weight: 400; }
tr.muted-row td { color: var(--ink-2); }
.pre { white-space: pre-wrap; }
.hr-cols { margin-bottom: 16px; }
.leave-box { display: flex; gap: 20px; align-items: center; padding: 8px 16px 14px; flex-wrap: wrap; }
.leave-big { display: flex; flex-direction: column; align-items: center; min-width: 90px; }
.leave-big span { font-size: 12px; color: var(--ink-2); }
.leave-big b { font-size: 34px; letter-spacing: -1px; color: #ff6c00; line-height: 1.1; }
.leave-big b.neg { color: var(--bad); }
.leave-big small { font-size: 12px; color: var(--ink-2); }
.leave-detail { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.leave-detail div { display: flex; gap: 10px; }
.leave-detail dt { color: var(--ink-2); width: 76px; flex: none; }
.leave-detail dd { margin: 0; }
.leave-add, .cert-form, .file-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 16px 12px; }
.leave-add input[name=reason] { flex: 1; min-width: 140px; }
.cert-form input[name=purpose] { flex: 1; min-width: 140px; }
.file-add input[name=kind] { width: 160px; }
.tag.leave-annual { background: #f0ecfd; color: #6a4bc4; }
.cal-leave { font-size: 11px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #6a4bc4; background: #f0ecfd; border-radius: 4px; padding: 0 4px; }
.cal-leave.pending { background: transparent; border: 1px dashed #b9a6ef; }
.cal-legend .leave::before { background: #8b6be0; }
/* 인사카드 메모 */
.note-add { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; padding: 8px 16px 12px; }
.note-add input[type=date] { width: 150px; }
.note-add select { width: 120px; }
.note-add textarea { flex: 1; min-width: 220px; resize: vertical; font: inherit; }
.note-list { list-style: none; margin: 0; padding: 0 16px 8px; }
.note-list li { border-top: 1px solid var(--line); padding: 10px 0; }
.note-list li.empty { border: 0; }
.note-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.note-head .grow { flex: 1; }
.note-date { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.note-body { margin-top: 4px; line-height: 1.55; }
.note-list .note-edit { padding: 8px 0 0; }
.tag.note-면담 { background: #e8f0fe; color: #2457c5; }
.tag.note-칭찬 { background: #e3f4ec; color: var(--ok); }
.tag.note-주의 { background: #fdecec; color: var(--bad); }
.tag.note-업무 { background: #fdf3e1; color: var(--warn); }

/* 인사카드 자유 배치 (gridstack) */
.hr-grid { margin: 0 -8px; }
.hr-grid .grid-stack-item-content { display: flex; flex-direction: column; overflow: hidden !important; inset: 8px !important; }
.hr-grid .widget-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hr-grid .widget-body > .card, .hr-grid .widget-body > section.card { flex: 1; min-height: 0; margin: 0; overflow: auto; }
.hr-grid .grid-stack-item.is-hidden { display: none; }
body.layout-editing .hr-grid .grid-stack-item { display: block; }
body.layout-editing .hr-grid .grid-stack-item-content { outline: 2px dashed #f0b88a; outline-offset: 0; border-radius: var(--radius); background: #fffaf6; }
body.layout-editing .hr-grid .grid-stack-item.is-hidden .grid-stack-item-content { opacity: .45; }
body.layout-editing .hr-grid .widget-bar { cursor: move; }
.hr-grid .grid-stack-placeholder > .placeholder-content { background: #fde3cf; border: 2px dashed #f0a46a; border-radius: var(--radius); }
.hr-grid.no-grid .grid-stack-item { position: static !important; height: auto !important; margin-bottom: 16px; }
.hr-grid.no-grid .grid-stack-item-content { position: static !important; }
/* 좁은 화면(768px 아래): 저장한 순서대로 위아래로 쌓고 높이는 내용에 맞춘다. 배치 편집은 넓은 화면에서만 */
@media (max-width: 767px) {
  .hr-grid { height: auto !important; margin: 0; }
  .hr-grid .grid-stack-item { position: relative !important; top: auto !important; left: auto !important; width: auto !important; height: auto !important; min-height: 0 !important; margin-bottom: 16px; transform: none !important; }
  .hr-grid .grid-stack-item-content { position: relative !important; inset: auto !important; }
  .hr-grid .widget-body > .card, .hr-grid .widget-body > section.card { overflow: visible; }
  #layout-edit { display: none; }
}
/* 인사카드 연장근로 수당 */
.ot-add { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 16px 12px; }
.ot-add input[type=month] { width: 150px; }
.ot-add .ot-hours { width: 80px; }
.ot-add .ot-amount { width: 130px; }
.ot-add .ot-memo { flex: 1; min-width: 120px; }
.ot-table tr.ot-year td { background: #fafbfc; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.ot-table tr.ot-year td.strong { color: #ff6c00; }
.ot-add .ot-wage { width: 110px; }
.ot-add .ot-x { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.ot-add .ot-calc { flex-basis: 100%; }
.ot-add .ot-calc:empty { display: none; }

/* 대리점 계약 */
.seg a { display: block; padding: 7px 18px; text-decoration: none; color: inherit; }
.seg a.on { background: var(--brand); color: #fff; font-weight: 600; }
.sign-view { padding: 8px 16px; }
.sign-view img { max-width: 260px; max-height: 120px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }

/* 로그인 */
.side-user { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 4px 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); color: #fff; font-size: 13px; }
.side-user .btn { color: var(--side-ink); border-color: rgba(255,255,255,.15); background: transparent; }
.auth-body { display: block; background: #f3f4f7; }
.auth-box { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; }
.auth-brand { text-align: center; font-size: 22px; margin-bottom: 18px; color: var(--ink); }
.auth-brand b { color: #ff6c00; }
.auth-form { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.auth-form label:not(.check) { display: flex; flex-direction: column; gap: 5px; }
.auth-form .btn.big { justify-content: center; padding: 12px; font-size: 16px; }
.auth-title { font-size: 17px; margin: 0; }
@media (max-width: 900px) { .side-user { margin: 8px 0 0; } }
.card.auth-form .auth-title { margin: 0; }

/* 원격 서명 링크 (계약서 상세·동의서 목록) */
.sl-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 10px; }
.sl-ways > div { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.sl-ways p { margin: 4px 0 10px; }
.sl-list { display: flex; flex-direction: column; gap: 8px; }
.sl-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.sl-item.muted { background: #fafbfc; }
.sl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sl-revoke { margin-left: auto; }
.sl-copy { display: flex; gap: 6px; align-items: center; }
.sl-copy input { flex: 1; min-width: 0; font-size: 12.5px; background: #f5f6f8; }
