/* 디자인 기준
   ui-ux-pro-max: CRM 색 구성, Minimalism & Swiss, 데이터 중심 대시보드
   hallmark: 색과 글꼴은 토큰으로만, 카드 안에 카드 금지, 이모지 금지, 키보드 초점 표시
   색을 바꾸려면 아래 :root 만 고치면 된다. */
@font-face { font-family: "Pretendard Local"; src: url("../fonts/PretendardVariable.woff2") format("woff2-variations"); font-weight: 45 920; font-display: swap; }

:root {
  --font: "Pretendard Local", Pretendard, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --bg: #f5f7fb; --surface: #ffffff; --surface-2: #f1f5fb; --hover: #f7f9fe;
  --ink: #0f172a; --ink-2: #475569; --ink-3: #5d6b82;
  --line: #e2e8f3; --line-strong: #c7d2e5; --field: #8b9bb6;
  --brand: #0a1a3f; --brand-ink: #c3d0ee; --brand-hover: #16285a; --on-brand: #ffffff;
  --accent: #1d4ed8; --accent-hover: #1e40af; --accent-soft: #e8efff; --on-accent: #ffffff;
  --good: #047857; --good-soft: #e3f6ee; --warn: #92510a; --warn-soft: #fdf0d9;
  --bad: #b91c1c; --bad-soft: #fdeaea; --bad-line: #f3c2c2;
  --heat-1: #e4edff; --heat-2: #c3d6ff; --heat-3: #8fb0ff; --heat-4: #1d4ed8;
  --shadow: 0 1px 2px rgb(15 23 42 / 6%);
  --shadow-up: 0 8px 24px rgb(15 23 42 / 14%);
  --r: 10px; --r-s: 7px; --side: 228px; --h: 38px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 18px; height: 18px; flex: none; }
.num, .table td, .table th, .figure, .badge { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--surface); padding: 8px 14px; border-radius: var(--r-s); z-index: 50; }
.skip:focus { top: 12px; }

/* 뼈대 */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--brand); color: var(--brand-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.logo { color: var(--on-brand); font-weight: 800; font-size: 17px; padding: 2px 10px; letter-spacing: -0.01em; }
.logo small { display: block; font-size: 12px; font-weight: 500; color: var(--brand-ink); }
.logo:hover { text-decoration: none; }
.side h2 { font-size: 12px; font-weight: 600; opacity: .72; padding: 0 10px 4px; }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side a.nav { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-s); color: var(--brand-ink); font-weight: 500; }
.side a.nav:hover { background: var(--brand-hover); color: var(--on-brand); text-decoration: none; }
.side a.nav[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.side :focus-visible { outline-color: var(--on-brand); }
.me { margin-top: auto; border-top: 1px solid var(--brand-hover); padding: 12px 10px 0; display: grid; gap: 6px; }
.me b { color: var(--on-brand); }
.me .links { display: flex; gap: 14px; }
.me a, .me button { background: none; border: 0; padding: 0; color: var(--brand-ink); cursor: pointer; font-size: 13px; }
.me button:hover { color: var(--on-brand); text-decoration: underline; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.search { position: relative; flex: 0 1 340px; }
.search svg { position: absolute; left: 11px; top: 10px; color: var(--ink-3); }
.top .search input { width: 100%; padding-left: 36px; }
.top .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.content { padding: 24px 28px 56px; display: grid; gap: 18px; align-content: start; width: 100%; max-width: 1480px; margin: 0 auto; grid-template-columns: minmax(0, 1fr); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { font-size: 23px; font-weight: 800; letter-spacing: -0.015em; line-height: 1.3; }
.head p { color: var(--ink-2); margin-top: 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 버튼과 입력 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--h); padding: 0 14px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn { color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); border-color: var(--bad-line); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.big { min-height: 48px; font-size: 16px; padding: 0 24px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
input:not([type=checkbox], [type=radio], [type=file]), select, textarea { min-height: var(--h); padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); max-width: 100%; }
input:not([type=checkbox], [type=radio]):focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: -1px; border-color: var(--accent); }
textarea { resize: vertical; width: 100%; line-height: 1.55; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > label, .field > .label, legend { font-weight: 600; font-size: 13px; }
.field .help { color: var(--ink-3); font-size: 12.5px; }
.field .error, .errors { color: var(--bad); font-size: 13px; }
.field > input, .field > select { width: 100%; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 140px; }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.field ul, .field div[id^="id_members"] { list-style: none; margin: 0; padding: 0; }
.field div[id^="id_members"] { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.field div[id^="id_members"] label { display: inline-flex; gap: 7px; align-items: center; }

/* 선택 버튼 (라디오) */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; flex: 1 1 0; min-width: 72px; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); background: var(--surface); font-weight: 600; white-space: nowrap; }
.seg input:hover + span { background: var(--surface-2); }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 판(panel): 한 겹만 쓴다 */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.panel.flush > .panel-head { padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--line); }
.panel h2 { font-size: 15.5px; font-weight: 700; }
.count { color: var(--accent); margin-left: 4px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.cols-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.cols-main > div, .cols-2 > div { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.empty { color: var(--ink-3); padding: 22px 18px; text-align: center; }
.empty .btn { margin-top: 10px; }
.masonry { columns: 2; column-gap: 18px; }
.masonry > section { break-inside: avoid; margin-bottom: 18px; }

/* 목록 */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.list a.item, .list .item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; color: var(--ink); }
.list a.item:hover { background: var(--hover); text-decoration: none; }
.item > span:first-child { min-width: 0; }
.strong { font-weight: 700; }
.sub { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }

/* 요약 숫자: 하나의 띠 */
.stats { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.stat { flex: 1 1 160px; padding: 14px 20px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.stat span { color: var(--ink-2); font-size: 13px; }
.figure { display: block; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.figure.bad { color: var(--bad); }
.figure small { font-size: 14px; font-weight: 600; color: var(--ink-3); margin-left: 2px; }

/* 표 */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:hover { background: var(--hover); }
.table tbody th { font-weight: 500; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tfoot > tr > * { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 700; background: var(--surface-2); }
.table .r { text-align: right; }
.table .nowrap { white-space: nowrap; }
.table .tight { width: 1px; white-space: nowrap; }
.table .sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 140px; }
.table thead .sticky, .table tfoot .sticky { background: var(--surface-2); }
.zero { color: var(--field); }
.late { color: var(--bad); font-weight: 700; }

/* 표시 */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); line-height: 1.6; }
.badge svg { width: 13px; height: 13px; }
.badge.info, .badge.contacted, .badge.doing { background: var(--accent-soft); color: var(--accent-hover); }
.badge.good, .badge.hot, .badge.ordered, .badge.done, .badge.approved { background: var(--good-soft); color: var(--good); }
.badge.warn, .badge.reacted, .badge.positive, .badge.review, .badge.notice, .badge.pending { background: var(--warn-soft); color: var(--warn); }
.badge.danger, .badge.refused, .badge.candidate, .badge.blocked, .badge.rejected { background: var(--bad-soft); color: var(--bad); }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs b { font-variant-numeric: tabular-nums; margin-left: 3px; }
.switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-s); overflow: hidden; background: var(--surface); }
.switch a { padding: 6px 14px; color: var(--ink-2); font-weight: 600; }
.switch a[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.switch a:hover { text-decoration: none; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.bulk { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.bulk .selected { font-weight: 700; margin-right: 6px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border-top: 1px solid var(--line); color: var(--ink-2); }

/* 알림 */
.flash { display: grid; gap: 8px; }
.msg { padding: 11px 15px; border-radius: var(--r-s); background: var(--good-soft); color: var(--good); font-weight: 600; border: 1px solid transparent; }
.msg.error { background: var(--bad-soft); color: var(--bad); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--bad-soft); border: 1px solid var(--bad-line); color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: var(--warn-soft); color: var(--warn); }
.alert.info { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-hover); }
.alert p { color: var(--ink); white-space: pre-line; }
.alert .grow { flex: 1; min-width: 0; }

/* 상세 */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 18px; margin: 0; }
.facts dt { color: var(--ink-3); font-size: 12.5px; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 12px 18px; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.timeline .meta b { color: var(--ink); font-size: 13px; }
.timeline .body { white-space: pre-wrap; margin-top: 4px; max-height: 9.5em; overflow: auto; }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 4px 0; }
details[open] > summary { margin-bottom: 10px; }

/* 빠른 등록 */
.quick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.paste { min-height: 340px; }
.match { display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-s); cursor: pointer; align-items: flex-start; }
.match:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.match.blocked { border-color: var(--bad-line); background: var(--bad-soft); }
.match input { margin-top: 3px; }
.order-box { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 12px; }
.total-ta { font-size: 18px; font-weight: 800; color: var(--accent); }
.bare { padding: 16px; max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.bare .quick { grid-template-columns: minmax(0, 1fr); }
.bare .paste { min-height: 150px; }

/* 막대와 물량표 */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; align-items: end; height: 190px; }
.bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; gap: 4px; }
.bar i { display: block; width: min(34px, 100%); background: var(--heat-3); border-radius: 4px 4px 0 0; min-height: 1px; }
.bar.current i { background: var(--accent); }
.bar b { font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar span { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.bar.current span { color: var(--accent); font-weight: 700; }
.heat td.cell { text-align: right; padding: 8px 10px; min-width: 66px; }
.heat .l1 { background: var(--heat-1); } .heat .l2 { background: var(--heat-2); } .heat .l3 { background: var(--heat-3); } .heat .l4 { background: var(--heat-4); color: var(--on-accent); font-weight: 700; }
.heat tbody tr:hover .l0 { background: var(--hover); }
.heat thead th { text-align: right; } .heat thead th.sticky { text-align: left; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.meter.good i { background: var(--good); }

/* 보드 */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; position: relative; }
.column { background: var(--surface-2); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 220px; border: 1px dashed transparent; }
.column.over { border-color: var(--accent); background: var(--accent-soft); }
.column h2 { font-size: 13.5px; padding: 2px 4px; display: flex; justify-content: space-between; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-s); padding: 12px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.card[draggable="true"] { cursor: grab; }
.card.overdue { border-color: var(--bad-line); }
.card.dragging { opacity: .5; }
.card .title { font-weight: 700; color: var(--ink); line-height: 1.45; }
.card .line { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.card form { display: flex; gap: 6px; }
.card select { min-height: 30px; padding: 3px 8px; font-size: 12.5px; }
.gantt { min-width: 760px; }
.gantt-row { display: grid; grid-template-columns: 250px minmax(0, 1fr); border-bottom: 1px solid var(--line); align-items: stretch; }
.gantt-row:last-child { border-bottom: 0; }
.gantt-row > :first-child { padding: 10px 18px; }
.gantt-head { background: var(--surface-2); font-size: 12px; color: var(--ink-2); font-weight: 600; }
.weeks { display: grid; grid-template-columns: repeat(12, 1fr); }
.weeks span { padding: 10px 4px; border-left: 1px solid var(--line); }
.track { position: relative; background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / 12)); min-height: 52px; }
.track .span { position: absolute; top: 15px; height: 22px; border-radius: 5px; background: var(--heat-2); overflow: hidden; }
.track .span i { display: block; height: 100%; background: var(--accent); }
.track .span.overdue { background: var(--bad-line); } .track .span.overdue i { background: var(--bad); }
.track .span.done { background: var(--good-soft); } .track .span.done i { background: var(--good); }
.track .now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bad); }

/* 로그인 */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: var(--brand); }
.login form { background: var(--surface); border-radius: 14px; padding: 32px; width: min(380px, 100%); display: grid; gap: 16px; box-shadow: var(--shadow-up); }
.login h1 { font-size: 22px; }
.login input { width: 100%; min-height: 44px; }
.formpage { max-width: 640px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .95em; }

.scrim { display: none; }
@media (max-width: 1100px) {
  .cols-main, .cols-2, .quick { grid-template-columns: minmax(0, 1fr); }
  .masonry { columns: 1; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 40; left: 0; width: 250px; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .side.open { transform: none; visibility: visible; box-shadow: var(--shadow-up); }
  .side.open + .scrim { display: block; position: fixed; inset: 0; background: rgb(15 23 42 / 45%); z-index: 30; border: 0; }
  .btn.menu-btn { display: inline-flex; padding: 0 10px; }
  .top { padding: 10px 14px; gap: 8px; }
  .top .spacer { display: none; }
  .search { flex: 1 1 0; min-width: 0; }
  .top .btn-text { display: none; }
  .content { padding: 18px 14px 48px; }
  input:not([type=checkbox], [type=radio]), select, textarea { font-size: 16px; }
  .btn { min-height: 44px; } .btn.small { min-height: 36px; }
  .bars { overflow-x: auto; grid-auto-columns: minmax(44px, 1fr); }
  .table .sticky { min-width: 110px; }
  .table th, .table td { white-space: nowrap; }
  .gantt { min-width: 640px; }
  .gantt-row { grid-template-columns: 150px minmax(0, 1fr); }
  .gantt-row > :first-child { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* 거래처 기록(타임라인) 2026-12-02 */
.tabs.inset { padding: 0 10px; }
.period { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; background: var(--accent-soft); color: var(--accent-hover); font-size: 13px; border-bottom: 1px solid var(--line); }
.period svg { width: 15px; height: 15px; }
.period a { margin-left: auto; font-weight: 600; }
.timeline .ev-title { margin-top: 4px; font-weight: 600; }
.timeline .edits, .timeline .fix { font-size: 12.5px; }
.timeline .edits > summary, .timeline .fix > summary { font-weight: 600; padding: 0; }
.timeline .edits[open] { flex-basis: 100%; }
.timeline .edits ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.timeline .fix { margin-top: 6px; }
.timeline .fix[open] { padding: 12px; background: var(--surface-2); border-radius: var(--r-s); }

/* 실적 달력 2026-12-02 */
.month-nav { display: flex; align-items: center; gap: 12px; }
.month-nav h2 { font-size: 18px; min-width: 120px; text-align: center; }
.month-nav .btn.small svg { width: 16px; height: 16px; }
.cal { display: grid; }
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 8px 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.cal-day { min-height: 104px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.cal-week .cal-day:last-child { border-right: 0; }
.cal-day > a, .cal-day > div { display: block; height: 100%; padding: 8px 10px; color: var(--ink); }
.cal-day > a:hover { background: var(--hover); text-decoration: none; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .d { color: var(--ink-3); }
.cal-day .d { font-weight: 700; font-size: 13px; }
.cal-day .d small { display: none; }
.cal-day.today .d { color: var(--accent); }
.cal-day.selected > a { background: var(--accent-soft); }
.cal-day dl { margin: 4px 0 0; display: grid; gap: 1px; font-size: 12px; }
.cal-day dl div { display: flex; justify-content: space-between; gap: 6px; }
.cal-day dt { color: var(--ink-3); }
.cal-day dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cal-day .v-ta dd { color: var(--accent); }
.cal-day .v-hot dd { color: var(--good); }
.cal-empty { display: none; }
.day-group { font-size: 13px; padding: 12px 18px 6px; color: var(--ink-2); }
@media (max-width: 720px) {
  /* 좁은 화면은 기록이 있는 날만 목록으로 */
  .cal-head { display: none; }
  .cal-week { display: contents; }
  .cal-day { display: none; min-height: 0; border-right: 0; }
  .cal-day.busy:not(.out) { display: block; }
  .cal-day > a { display: flex; gap: 14px; align-items: flex-start; padding: 10px 16px; }
  .cal-day .d { flex: 0 0 52px; }
  .cal-day .d small { display: inline; margin-left: 4px; font-weight: 500; color: var(--ink-3); }
  .cal-day dl { margin: 0; flex: 1; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); column-gap: 14px; }
  .cal:not(:has(.cal-day.busy:not(.out))) + .cal-empty { display: block; color: var(--ink-3); padding: 22px 18px; text-align: center; }
}

[hidden] { display: none !important; }

/* 2단계 로그인, 접속 기록 2026-12-03 */
.otp-code { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.otp-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: 13.5px; }
.otp-qr { display: flex; justify-content: center; }
.otp-qr svg { width: 200px; height: 200px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r-s); }
.otp-secret { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; font-weight: 700; letter-spacing: .05em; word-break: break-all; margin-top: 6px; }
.otp-out { margin-top: 14px; }
.otp-out button { background: none; border: 0; color: var(--brand-ink); cursor: pointer; font-size: 13px; text-decoration: underline; }
.login .otp-setup { width: min(420px, 100%); }
.login .check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.login .check input { width: 17px; min-height: 0; }
.table .ua { color: var(--ink-3); font-size: 12.5px; min-width: 180px; }
.otp-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login form.otp-out { background: none; box-shadow: none; padding: 0; width: auto; display: block; margin-top: 14px; }
@media (max-width: 420px) { .login form { padding: 24px 18px; } }
