/* =========================================================
   NOVUS AIX Cloud Platform
   레이아웃: 블루 히어로 + 유리 질감 팬 + 겹쳐 올라오는 시트 + 화이트 카드
   ========================================================= */
:root {
  --hero-top: #4a74b0;
  --hero-mid: #7fa5d5;
  --hero-low: #c2d7ef;
  --sheet: #f2f5f9;
  --paper: #ffffff;
  --line: #e7ecf2;
  --line-strong: #d6dee8;
  --ink: #1c2129;
  --ink-2: #3c4450;
  --muted: #7f8996;
  --graphite: #262a30;
  --blue: #2d6cdf;
  --blue-soft: #e8f0fd;
  --green: #3fa75a;
  --green-soft: #e4f4e8;
  --green-bar: #b9e0c3;
  --red: #d9463b;
  --red-soft: #fcebea;
  --red-bar: #f0beb9;
  --amber: #b7791f;
  --amber-soft: #fcf1de;

  --r-sheet: 36px;
  --r-card: 24px;
  --r-field: 12px;

  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  --font-num: 'Manrope', 'Pretendard Variable', Pretendard, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--sheet);
  overflow-x: hidden;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid rgba(45, 108, 223, .45); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--graphite); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.num, .tabular { font-variant-numeric: tabular-nums; }

/* ---------- 상단 바 ---------- */
.topbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 40px;
  background: var(--hero-top);
  color: #fff;
}
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; font-size: 26px; color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-num); font-weight: 600; font-size: 16px; letter-spacing: .01em; }
.brand-text small { font-size: 11.5px; color: rgba(255, 255, 255, .82); }

.nav-pills { display: flex; gap: 8px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.nav-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px 0 5px;
  border-radius: 999px;
  color: #fff;
  font-weight: 500;
  transition: background-color .15s ease;
}
.nav-pill:hover { background: rgba(255, 255, 255, .16); }
.nav-pill-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .2); font-size: 16px; }
.nav-pill.is-active { background: #fff; color: var(--ink); }
.nav-pill.is-active .nav-pill-icon { background: var(--graphite); color: #fff; }

.topbar-right { justify-self: end; }
.user-menu { position: relative; }
.user-menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px 0 5px;
  border-radius: 999px; background: #fff; color: var(--ink);
}
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--graphite); color: #fff; font-weight: 600; font-size: 14px; }
.user-name { font-weight: 500; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-caret { font-size: 16px; color: var(--muted); }
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  padding: 8px; border-radius: 18px; background: #fff; color: var(--ink);
  box-shadow: 0 18px 50px rgba(20, 40, 70, .18); border: 1px solid var(--line);
}
.user-dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-dropdown-head strong { display: block; }
.user-dropdown-head span { font-size: 12.5px; color: var(--muted); }
.user-dropdown a, .user-dropdown button {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; border: 0; background: none; cursor: pointer; text-align: left;
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--sheet); }
.user-dropdown svg { font-size: 17px; color: var(--muted); }
.user-dropdown form { margin: 0; }

/* ---------- 히어로 ---------- */
.hero {
  position: relative;
  padding: 18px 40px 76px;
  background:
    radial-gradient(520px 260px at 50% 30%, rgba(255, 255, 255, .38), transparent 70%),
    linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 55%, var(--hero-low) 100%);
  color: #fff;
}
.hero.has-strip { padding-bottom: 0; }
.hero-row { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; min-height: 150px; }
.hero-eyebrow, .hero-back { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, .92); margin-bottom: 6px; }
.hero-back { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px 4px 6px; border-radius: 999px; background: rgba(255, 255, 255, .16); }
.hero-back:hover { background: rgba(255, 255, 255, .26); }
.hero-back svg { font-size: 16px; }
.hero-title {
  font-family: var(--font-num), var(--font);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.12;
  text-shadow: 0 1px 12px rgba(30, 60, 110, .18);
  max-width: 16em;
}
.hero-pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.hero-pills li {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: #fff; color: var(--ink); font-weight: 500; font-size: 13.5px;
}
.hero-pills li span { color: var(--muted); font-weight: 400; }
.hero-pills em { font-style: normal; }
.dot-ok { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--green-soft); color: var(--green); font-weight: 600; font-size: 12.5px; }

/* 유리 원통 팬 — 페이지의 대표 요소 */
.hero-fan { position: absolute; left: 50%; top: -6px; width: 380px; height: 230px; transform: translateX(-50%); pointer-events: none; }
.hero-fan i {
  position: absolute; left: 50%; bottom: 0;
  width: 58px; height: 150px; margin-left: -29px;
  border-radius: 29px;
  transform-origin: 50% 165%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92) 0%, rgba(255, 255, 255, .35) 35%, rgba(180, 210, 245, .25) 70%, rgba(120, 170, 235, .55) 100%);
  border: 1px solid rgba(255, 255, 255, .75);
  box-shadow: inset 0 0 16px rgba(255, 255, 255, .55), 0 12px 30px rgba(30, 70, 130, .18);
}
.hero-fan i::before {
  content: ''; position: absolute; left: 5px; right: 5px; top: 5px; height: 22px;
  border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: inset 0 -3px 6px rgba(120, 160, 210, .35);
}
.hero-fan i:nth-child(1) { transform: rotate(-66deg); opacity: .55; }
.hero-fan i:nth-child(2) { transform: rotate(-44deg); opacity: .7; }
.hero-fan i:nth-child(3) { transform: rotate(-22deg); opacity: .85; }
.hero-fan i:nth-child(4) { transform: rotate(0deg); }
.hero-fan i:nth-child(5) { transform: rotate(22deg); background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(140, 185, 245, .5) 45%, rgba(60, 130, 230, .75)); }
.hero-fan i:nth-child(6) { transform: rotate(44deg); background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(110, 165, 240, .55) 45%, rgba(40, 110, 220, .8)); }
.hero-fan i:nth-child(7) { transform: rotate(66deg); background: linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(90, 150, 235, .6) 45%, rgba(30, 95, 210, .85)); }

/* 최근 항목 스트립 (시트 뒤로 살짝 숨어듦) */
.strip { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 28px; align-items: end; }
.strip-card {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  height: 84px; padding: 12px 14px;
  border-radius: 20px 20px 0 0;
  background: rgba(255, 255, 255, .42);
  border: 1px solid rgba(255, 255, 255, .6); border-bottom: 0;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
}
.strip-card:hover { background: rgba(255, 255, 255, .6); }
.strip-card.is-active { z-index: 3; height: 92px; border-radius: 22px; background: #fff; border: 0; box-shadow: 0 16px 40px rgba(30, 60, 110, .18); margin-bottom: -10px; }
.strip-icon { width: 30px; height: 30px; border-radius: 50%; background: #fff; flex-shrink: 0; position: relative; }
.strip-icon::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--muted); }
.strip-icon.tone-ok::after { background: var(--green); }
.strip-icon.tone-warn::after { background: var(--red); }
.strip-card.is-active .strip-icon { background: var(--sheet); }
.strip-text { min-width: 0; display: flex; flex-direction: column; }
.strip-text strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-text small { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-go { margin-left: auto; font-size: 15px; color: var(--ink-2); }

/* ---------- 시트 ---------- */
.sheet {
  position: relative;
  margin-top: -44px;
  min-height: 60vh;
  padding: 28px 40px 64px;
  background: var(--sheet);
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
}
.hero.has-strip + .sheet { margin-top: -30px; padding-top: 40px; }

/* ---------- 그리드 & 카드 ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.grid + .grid, .grid + .card, .card + .card, .card + .grid, .notes { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card { background: var(--paper); border-radius: var(--r-card); padding: 20px 22px; border: 1px solid rgba(214, 222, 232, .55); min-width: 0; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-flush .card-head { padding: 20px 22px 0; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.card-title svg { font-size: 17px; color: var(--ink-2); }
.card-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.card-link { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--ink-2); flex-shrink: 0; }
.card-link:hover { background: var(--sheet); }
.card-link svg { font-size: 16px; }

.metric { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; }
.metric-value { font-family: var(--font-num); font-size: clamp(30px, 3vw, 42px); font-weight: 300; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.metric-unit { font-size: 14px; color: var(--muted); margin-left: -2px; align-self: flex-end; padding-bottom: 6px; }
.metric-badge { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; background: var(--green); }
.metric-badge.warn { background: var(--red); }
.metric-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); }
.metric-foot strong { color: var(--ink); font-weight: 600; }
.metric-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 4px; }
.metric-pairs div { display: flex; flex-direction: column; }
.metric-pairs strong { font-family: var(--font-num); font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.metric-pairs span { font-size: 12px; color: var(--muted); }

/* 미니 막대 */
.bars-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.bars { position: relative; height: 70px; display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; border-bottom: 1px dashed var(--line-strong); padding-top: 18px; }
.bar-col { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 5px; border-radius: 3px; background: var(--green-bar); }
.bar.is-unpaid { background: var(--red-bar); }
.bar.is-empty { background: var(--line-strong); }
.bar-dot { position: absolute; top: -16px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 10px; }
.bar-dot.ok { background: var(--green); }
.bar-dot.warn { background: var(--red); }
.bars-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

.progress { height: 8px; border-radius: 999px; background: var(--sheet); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }

/* ---------- 툴바/필터 ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.filter-label { font-size: 13px; color: var(--muted); margin-right: 2px; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 폼 요소 ---------- */
.input, .select, .textarea {
  height: 40px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-field);
  background: #fff; font-size: 14px; min-width: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; width: 100%; }
.select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237f8996' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.input[readonly] { background: var(--sheet); }
.input.money { text-align: right; font-variant-numeric: tabular-nums; }
.select-sm, .input-sm { height: 34px; font-size: 13px; border-radius: 10px; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 16px; }
.search-field .input { padding-left: 36px; width: 220px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-row.full { grid-column: 1 / -1; }
.form-row > label, .form-label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form-row .req { color: var(--red); margin-left: 2px; }
.form-help { font-size: 12px; color: var(--muted); }
.form-error { font-size: 12px; color: var(--red); min-height: 0; }
.form-section { margin-top: 24px; }
.form-section:first-child { margin-top: 4px; }
.form-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.form-section-head h3 { font-size: 14.5px; font-weight: 600; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--line); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span { display: inline-flex; align-items: center; height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.segmented input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 40, 70, .12); }
.segmented input:focus-visible + span { outline: 3px solid rgba(45, 108, 223, .45); }
.alert { padding: 12px 14px; border-radius: 14px; font-size: 13.5px; }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-info { background: var(--blue-soft); color: #1f4fa8; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--sheet); }
.btn svg { font-size: 16px; }
.btn-dark { background: var(--graphite); border-color: var(--graphite); color: #fff; }
.btn-dark:hover { background: #3a3f47; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: #2459bd; }
.btn-red { background: var(--red); border-color: var(--red); color: #fff; }
.btn-red:hover { background: #bf3a30; }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red-bar); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 34px; padding: 0; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- 칩 ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-ok { background: var(--green-soft); color: var(--green); }
.chip-warn { background: var(--red-soft); color: var(--red); }
.chip-info { background: var(--blue-soft); color: var(--blue); }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-muted { background: #edf0f4; color: #5f6976; }

/* ---------- 테이블 ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f8fafc; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .center { text-align: center; }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 600; }
.table .muted { color: var(--muted); }
.table-group tbody td:first-child:not(.group-cell) { padding-left: 14px; }
.table tfoot td { font-weight: 600; border-top: 1px solid var(--line-strong); background: #fafbfd; }
.row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.row-link { font-weight: 600; }
.row-link:hover { color: var(--blue); }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.empty-state { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.list-total { font-size: 13px; color: var(--muted); }
.list-total strong { color: var(--blue); font-weight: 600; }
.pager { display: flex; gap: 4px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.page-btn:hover { background: var(--sheet); }
.page-btn.is-active { background: var(--graphite); color: #fff; }
.page-btn.is-disabled { opacity: .35; pointer-events: none; }

/* ---------- 요약표 (청구서 상세) ---------- */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }
.kv-row dt { color: var(--ink-2); }
.kv-row dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; }
.kv-row.is-sub dt { color: var(--muted); padding-left: 12px; }
.kv-row.is-strong dt, .kv-row.is-strong dd { font-weight: 600; }
.kv-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: 8px; padding: 16px 18px; border-radius: 18px; background: var(--sheet); }
.kv-total span { font-weight: 600; }
.kv-total strong { font-family: var(--font-num); font-size: 30px; font-weight: 400; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kv-total small { font-size: 14px; color: var(--muted); margin-left: 2px; }

.info-list { display: grid; grid-template-columns: 140px 1fr; gap: 0; margin: 0; }
.info-list dt, .info-list dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { font-weight: 500; word-break: break-all; }
.info-list dt:nth-last-of-type(1), .info-list dd:last-of-type { border-bottom: 0; }

.notes { list-style: none; padding: 0; margin: 16px 0 0; color: var(--muted); font-size: 12.5px; }
.notes li { position: relative; padding-left: 12px; margin-bottom: 4px; }
.notes li::before { content: ''; position: absolute; left: 0; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

/* ---------- 모달 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(22, 34, 52, .4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal.is-open { display: flex; }
.modal-dialog { width: 100%; max-width: 580px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 28px; box-shadow: 0 30px 80px rgba(20, 40, 70, .28); animation: modal-in .16s ease-out; }
.modal-sm { max-width: 420px; }
.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1240px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 26px 14px; }
.modal-title { font-size: 19px; font-weight: 600; }
.modal-body { padding: 4px 26px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 26px 20px; border-top: 1px solid var(--line); }
.modal-foot .spacer { margin-right: auto; }
.confirm-message { white-space: pre-line; color: var(--ink-2); }
.cert-frame { width: 100%; height: min(70vh, 900px); border: 1px solid var(--line); border-radius: 16px; background: var(--sheet); }

/* 모달 내 편집 표 */
.edit-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.edit-table { border-collapse: collapse; min-width: 100%; }
.edit-table th { position: sticky; top: 0; font-size: 12px; font-weight: 600; color: var(--muted); background: #fafbfd; padding: 9px 6px; white-space: nowrap; text-align: left; border-bottom: 1px solid var(--line); }
.edit-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); }
.edit-table tr:last-child td { border-bottom: 0; }
.edit-table th:first-child, .edit-table td:first-child { padding-left: 10px; }
.edit-table th:last-child, .edit-table td:last-child { padding-right: 10px; }
.edit-table .input { height: 34px; font-size: 13px; border-radius: 9px; padding: 0 8px; width: 100%; }
.edit-table .w-text { min-width: 130px; }
.edit-table .w-region { min-width: 74px; }
.edit-table .w-money { min-width: 96px; }
.edit-table .w-date { min-width: 140px; }
.edit-table .input.money { text-align: right; font-variant-numeric: tabular-nums; }
.edit-table .calc-cell { text-align: right; font-weight: 600; white-space: nowrap; padding-right: 8px; font-variant-numeric: tabular-nums; }
.edit-table .th-num { text-align: right; }
.add-row { margin-top: 10px; }

.preview-total { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.preview-total div { padding: 12px 14px; border-radius: 16px; background: var(--sheet); }
.preview-total span { display: block; font-size: 12px; color: var(--muted); }
.preview-total strong { font-family: var(--font-num); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.preview-total .is-total { background: var(--graphite); color: #fff; }
.preview-total .is-total span { color: rgba(255, 255, 255, .7); }

.temp-password { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--sheet); font-family: var(--font-num); font-size: 22px; font-weight: 600; letter-spacing: .06em; }

/* ---------- 토스트 ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 999px; background: var(--graphite); color: #fff; font-weight: 500; box-shadow: 0 12px 30px rgba(20, 40, 70, .25); transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 32px); }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: var(--red); }

/* ---------- 로그인 ---------- */
.login-page { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(640px 360px at 50% 26%, rgba(255, 255, 255, .45), transparent 70%), linear-gradient(180deg, var(--hero-top) 0%, var(--hero-mid) 48%, var(--hero-low) 78%, var(--sheet) 100%); }
.login-page .topbar { background: transparent; }
.login-stage { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 0 20px 48px; }
.login-stage .hero-fan { position: relative; left: auto; top: auto; transform: none; margin-top: 8px; }
.login-stage .hero-fan i { animation: fan-open .9s cubic-bezier(.2, .8, .2, 1) both; }
.login-stage .hero-fan i:nth-child(1) { --r: -66deg; }
.login-stage .hero-fan i:nth-child(2) { --r: -44deg; }
.login-stage .hero-fan i:nth-child(3) { --r: -22deg; }
.login-stage .hero-fan i:nth-child(4) { --r: 0deg; }
.login-stage .hero-fan i:nth-child(5) { --r: 22deg; }
.login-stage .hero-fan i:nth-child(6) { --r: 44deg; }
.login-stage .hero-fan i:nth-child(7) { --r: 66deg; }
@keyframes fan-open { from { transform: rotate(0deg); } to { transform: rotate(var(--r)); } }
.login-card { position: relative; z-index: 2; width: 100%; max-width: 420px; margin-top: -36px; padding: 30px 30px 26px; border-radius: 30px; background: #fff; box-shadow: 0 30px 70px rgba(30, 60, 110, .18); }
.login-card h1 { font-family: var(--font-num), var(--font); font-size: 26px; font-weight: 500; letter-spacing: -.01em; }
.login-card .login-sub { color: var(--muted); margin: 4px 0 22px; }
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .input { height: 48px; border-radius: 14px; width: 100%; }
.login-card .btn { height: 48px; width: 100%; margin-top: 6px; font-size: 15px; }
.login-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- 오류/빈 페이지 ---------- */
.narrow { max-width: 560px; margin: 0 auto; }
.error-box { max-width: 520px; margin: 40px auto; text-align: center; }
.error-code { font-family: var(--font-num); font-size: 64px; font-weight: 300; color: var(--muted); line-height: 1; }
.error-box p { margin: 12px 0 22px; color: var(--ink-2); }

/* ---------- 반응형 ---------- */
@media (max-width: 1200px) {
  .span-3 { grid-column: span 6; }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 12; }
  .strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .strip-card:nth-child(n + 4) { display: none; }
  .preview-total { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; padding: 14px 18px; }
  .nav-pills { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; overflow-x: auto; }
  .nav-pill { flex: 1; justify-content: center; padding: 0 10px; white-space: nowrap; font-size: 13px; }
  .nav-pill-icon { display: none; }
  .table th, .table td { white-space: nowrap; }
  .hero { padding: 12px 18px 64px; }
  .hero-fan { display: none; }
  .hero-row { flex-direction: column; align-items: flex-start; min-height: 0; padding-top: 12px; }
  .hero-pills { justify-content: flex-start; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 20px; }
  .strip-card:nth-child(n + 3) { display: none; }
  .sheet { padding: 20px 14px 48px; border-radius: 26px 26px 0 0; }
  .span-3, .span-6 { grid-column: span 12; }
  .form-grid, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .info-list { grid-template-columns: 110px 1fr; }
  .toolbar { padding: 14px 16px; }
  .search-field .input { width: 100%; }
  .modal { padding: 10px; }
  .modal-dialog { max-height: calc(100vh - 20px); border-radius: 22px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .preview-total { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-stage .hero-fan { display: block; transform: scale(.75); margin-bottom: -30px; }
  .user-name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
