:root {
  --navy-950: #0b1120;
  --navy-900: #111a2e;
  --navy-800: #1a2540;
  --navy-700: #26334f;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --line: #e4e8f0;
  --line-2: #eef1f6;
  --text: #121a2c;
  --text-2: #4a5570;
  --text-3: #8590a8;
  --accent: #ff7a1a;
  --accent-600: #ec6608;
  --accent-50: #fff3ea;
  --blue: #2f6bff;
  --blue-50: #ecf2ff;
  --green: #12a66b;
  --green-50: #e8f8f0;
  --red: #e5484d;
  --red-50: #fdeced;
  --violet: #7c5cff;
  --violet-50: #f1edff;
  --amber: #c98a00;
  --amber-50: #fff7e0;
  --gray-50: #f0f2f6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.muted { color: var(--text-3); }
.nowrap { white-space: nowrap; }

/* ---------- 로고 ---------- */
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-toggle { width: 34px; height: 20px; border-radius: 20px; background: var(--accent); position: relative; flex: none; }
.logo-toggle::after { content: ''; position: absolute; right: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.logo-text { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.logo-sub { font-size: 10px; letter-spacing: .18em; color: var(--text-3); font-weight: 600; }

/* ---------- 로그인 ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background:
  radial-gradient(1000px 500px at 80% -10%, rgba(255, 122, 26, .12), transparent 60%), var(--navy-950); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 18px; padding: 36px 32px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.auth-card .logo { justify-content: center; margin-bottom: 6px; }
.auth-card h1 { font-size: 15px; text-align: center; color: var(--text-2); font-weight: 500; margin: 0 0 26px; }
.auth-card .btn { width: 100%; height: 46px; margin-top: 8px; }
.auth-err { color: var(--red); font-size: 13px; min-height: 20px; margin-top: 10px; text-align: center; }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--surface); outline: none; transition: border .15s, box-shadow .15s; }
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 26, .15); }
.input.sm, .select.sm { height: 34px; font-size: 13px; padding: 0 10px; border-radius: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.hint { font-size: 12px; color: var(--text-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; transition: background .15s, border .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-600); }
.btn.dark { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn.dark:hover { background: var(--navy-800); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-50); border-color: #f6c5c7; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--gray-50); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }

/* ---------- 앱 레이아웃 ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy-950); color: #c9d1e4; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { padding: 22px 20px 20px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: #fff; }
.sidebar .logo-sub { color: #7c88a6; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-sec { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #5d6a88; padding: 14px 12px 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-weight: 500; color: #b3bdd4; cursor: pointer; }
.nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav a.active { background: rgba(255, 122, 26, .14); color: #ffb27a; }
.nav a.active svg { color: var(--accent); }
.nav a .cnt { margin-left: auto; font-size: 11px; background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav a.logout { color: #ff8d8f; }
.side-foot { padding: 14px 20px; font-size: 12px; color: #6f7b98; border-top: 1px solid rgba(255, 255, 255, .06); }
.side-foot b { color: #c9d1e4; font-weight: 600; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.topbar p { margin: 0; font-size: 12px; color: var(--text-3); }
.me { display: flex; align-items: center; gap: 10px; text-align: right; font-size: 12px; }
.me b { display: block; font-size: 13px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: #fff; font-weight: 700; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; border-radius: 8px; background: var(--gray-50); color: var(--text-2); }
.menu-btn { display: none; }
.content { padding: 24px 28px 60px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.card-h h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card-b { padding: 18px 20px; }
.pill { font-size: 12px; font-weight: 700; background: var(--gray-50); color: var(--text-2); padding: 1px 8px; border-radius: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- 배지 ---------- */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-50); color: var(--text-2); }
.b-주식 { background: var(--blue-50); color: var(--blue); }
.b-코인 { background: var(--accent-50); color: var(--accent-600); }
.b-유튜브 { background: var(--red-50); color: var(--red); }
.s-대기 { background: var(--gray-50); color: var(--text-2); }
.s-분배 { background: var(--amber-50); color: var(--amber); }
.s-부재 { background: #f3f4f7; color: #6b7280; }
.s-재통화예정 { background: var(--violet-50); color: var(--violet); }
.s-지속관리 { background: var(--blue-50); color: var(--blue); }
.s-1\:1컨택요청 { background: #fff0f6; color: #d6336c; }
.s-입금대기 { background: #e6fcf5; color: #0c8f6a; }
.s-계약 { background: var(--green); color: #fff; }
.s-closed { background: #f1f1f1; color: #9aa0ab; text-decoration: line-through; }

/* ---------- 회원 관리 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.search { position: relative; flex: 1 1 240px; max-width: 320px; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-3); }
.search .input { padding-left: 36px; height: 38px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: #cfd5e2; }
.chip.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.chip .n { font-size: 11px; opacity: .7; font-weight: 700; }
.tabs { display: flex; gap: 2px; padding: 0 14px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tab { padding: 12px 10px; font-size: 13px; font-weight: 600; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 5px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }
.tab .n { font-size: 11px; background: var(--gray-50); color: var(--text-2); padding: 0 6px; border-radius: 10px; }
.tab.on .n { background: var(--accent-50); color: var(--accent-600); }
.tab.alert .n { background: var(--red); color: #fff; }

.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { font-size: 12px; font-weight: 600; color: var(--text-3); text-align: left; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.t td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tbody tr { cursor: pointer; transition: background .1s; }
.t tbody tr:hover { background: #fafbfd; }
.t tbody tr.sel { background: var(--accent-50); }
.t tbody tr.cur { box-shadow: inset 3px 0 0 var(--accent); background: #fffaf6; }
.t .ck { width: 36px; padding-right: 0; }
.t .ck input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.namecell { display: flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.memo-cell { max-width: 420px; min-width: 240px; font-size: 12.5px; color: var(--text-2); }
.memo-cell .mm { max-height: 54px; overflow-y: auto; }
.memo-cell .mm div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.memo-cell .who { color: var(--text-3); }
.sub { font-size: 11.5px; color: var(--text-3); }
.sub.warn { color: var(--red); font-weight: 600; }
.empty { padding: 60px 20px; text-align: center; color: var(--text-3); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; font-size: 13px; color: var(--text-2); }

.bulkbar { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--navy-900); color: #fff; border-radius: 14px; padding: 10px 12px 10px 18px; display: flex; gap: 10px; align-items: center; box-shadow: 0 12px 40px rgba(11, 17, 32, .35); z-index: 40; flex-wrap: wrap; max-width: calc(100vw - 32px); }
.bulkbar b { color: #ffb27a; }
.bulkbar .select { height: 34px; background: var(--navy-800); border-color: var(--navy-700); color: #fff; width: auto; font-size: 13px; }
.bulkbar .btn { height: 34px; font-size: 13px; }
.bulkbar .btn.ghost { color: #c9d1e4; }
.bulkbar .btn.ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- 작업창 (드로어) ---------- */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 460px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -20px 0 50px rgba(16, 24, 40, .12); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s ease; }
.drawer.open { transform: none; }
.dr-h { padding: 18px 22px 14px; border-bottom: 1px solid var(--line-2); }
.dr-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.dr-name { font-size: 20px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.dr-phone { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; }
.dr-phone .num { font-family: var(--mono); font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.dr-meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.dr-meta span { background: var(--gray-50); padding: 2px 8px; border-radius: 6px; }
.dr-b { flex: 1; overflow-y: auto; padding: 16px 22px 24px; }
.dr-sec { margin-bottom: 18px; }
.dr-sec > .label { display: flex; justify-content: space-between; margin-bottom: 8px; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.res { height: 40px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; position: relative; }
.res .k { position: absolute; top: 3px; left: 6px; font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.res:hover { border-color: #cdd3df; }
.res.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.res.on .k { color: #8da0c8; }
.res.cur::after { content: '현재'; position: absolute; top: -7px; right: 6px; font-size: 9.5px; background: var(--accent); color: #fff; padding: 0 5px; border-radius: 4px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { height: 28px; padding: 0 10px; border-radius: 14px; border: 1px dashed #cfd5e2; background: var(--surface); font-size: 12px; color: var(--text-2); cursor: pointer; }
.quick button:hover { border-style: solid; border-color: var(--accent); color: var(--accent-600); }
.quick button.on { background: var(--violet-50); border: 1px solid var(--violet); color: var(--violet); }
.dr-save { display: flex; gap: 8px; margin-top: 10px; }
.dr-save .btn { flex: 1; height: 42px; }
.timeline { display: flex; flex-direction: column; }
.tl { padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.tl:last-child { border-bottom: 0; }
.tl-h { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 2px; }
.tl-b { white-space: pre-wrap; word-break: break-all; }
.tl-act { display: none; gap: 2px; }
.tl:hover .tl-act { display: flex; }
.kbd-hint { font-size: 11.5px; color: var(--text-3); padding: 10px 22px; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: #fff; }
.script-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; font-size: 13px; margin-bottom: 8px; }
.seg { display: inline-flex; background: var(--gray-50); padding: 3px; border-radius: 9px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-3); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

/* ---------- 대시보드 ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { padding: 18px 20px; }
.kpi .k-l { font-size: 12.5px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .k-v { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; line-height: 1.2; }
.kpi .k-v small { font-size: 14px; color: var(--text-3); font-weight: 600; margin-left: 2px; }
.kpi .k-s { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi.accent { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.kpi.accent .k-l { color: #aab5cf; }
.kpi.accent .k-s { color: #8a96b3; }
.progress { height: 6px; background: rgba(255, 255, 255, .12); border-radius: 6px; margin-top: 10px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.progress.light { background: var(--gray-50); }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 88px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 10px; background: var(--gray-50); border-radius: 6px; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 6px; background: var(--navy-700); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 160px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.chart .stack-bar { width: 100%; max-width: 26px; display: flex; flex-direction: column-reverse; border-radius: 5px 5px 2px 2px; overflow: hidden; min-height: 2px; background: var(--gray-50); }
.chart .stack-bar i { display: block; }
.chart .lbl { font-size: 10.5px; color: var(--text-3); }
.chart .val { font-size: 10.5px; color: var(--text-2); font-weight: 600; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.rank-1 { color: var(--accent-600); font-weight: 800; }
.pool-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.pool { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); cursor: pointer; transition: border .15s; }
.pool:hover { border-color: #cdd3df; }
.pool.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 122, 26, .12); }
.pool .p-v { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pool .p-l { font-size: 12.5px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }

/* ---------- 분배 ---------- */
.dist-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.num-in { width: 76px; height: 34px; text-align: right; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font-family: var(--mono); outline: none; }
.num-in:focus { border-color: var(--accent); }
.summary { background: var(--navy-900); color: #dfe5f2; border-radius: 12px; padding: 16px 18px; font-size: 13px; }
.summary .big { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.summary .line { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px dashed rgba(255, 255, 255, .1); }
.toggle { position: relative; width: 42px; height: 24px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #cfd5e2; border-radius: 24px; cursor: pointer; transition: .2s; }
.toggle span::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(18px); }
.info-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 12.5px; color: var(--text-2); }
.info-box ol, .info-box ul { margin: 6px 0 0; padding-left: 18px; }
.info-box li { margin: 3px 0; }

/* ---------- 업로드 ---------- */
.drop { border: 2px dashed #cfd5e2; border-radius: 14px; padding: 34px 20px; text-align: center; color: var(--text-2); cursor: pointer; transition: .15s; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-50); }
.drop b { color: var(--text); }
.code { background: var(--navy-950); color: #d5dcec; border-radius: 10px; padding: 14px 16px; font-family: var(--mono); font-size: 12px; max-height: 320px; overflow: auto; white-space: pre; }
.copyline { display: flex; gap: 8px; align-items: center; }
.copyline .input { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); }

/* ---------- 모달 / 토스트 ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(11, 17, 32, .45); z-index: 60; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.modal.wide { max-width: 720px; }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; align-items: center; }
.modal-h h3 { margin: 0; font-size: 16px; }
.modal-b { padding: 20px 22px; overflow-y: auto; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: fade .15s; }
.toast.err { background: var(--red); }

/* ---------- 반응형 ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-grid, .dist-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 248px; z-index: 70; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 16px 16px 80px; }
  .toolbar { padding: 12px 16px; }
  .me .me-txt { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .memo-cell { min-width: 200px; }
  .card-h, .card-b { padding-left: 16px; padding-right: 16px; }
}

/* ---------- v2 ---------- */
a.btn { text-decoration: none; }
#wm { position: fixed; inset: 0; pointer-events: none; z-index: 90; background-repeat: repeat; }
.cards { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.qcard { border-radius: 12px; padding: 12px 14px; border: 1px solid transparent; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: .15s; min-width: 0; }
.qcard b { font-size: 22px; color: var(--text); letter-spacing: -.02em; }
.qcard span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qcard:hover { filter: brightness(.98); }
.qcard.on { border-color: var(--navy-900); box-shadow: 0 0 0 2px rgba(17, 26, 46, .15); }
.qc-star { background: #fff8db; } .qc-new { background: #eaf1ff; } .qc-contact { background: #e8f8ef; } .qc-follow { background: #fff4e0; }
.qc-stale { background: #ffecec; } .qc-hot { background: #f3eeff; } .qc-joined { background: #e6f7f8; } .qc-paid { background: #eefbe7; }
.starbtn { border: 0; background: none; cursor: pointer; font-size: 16px; color: #d0d5df; padding: 0 2px; line-height: 1; }
.starbtn.on { color: #f5b301; }
.istars { color: #f5b301; letter-spacing: -1px; font-size: 13px; white-space: nowrap; }
.istars button { border: 0; background: none; cursor: pointer; font-size: 20px; color: #dfe3ea; padding: 0 1px; }
.istars button.on { color: #f5b301; }
.jchips { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.jchips b { white-space: nowrap; }
.jc { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #e6f7f8; color: #0b7f86; font-weight: 600; white-space: nowrap; }
.jc.tg { background: #e9f3ff; color: #2479d1; } .jc.site { background: var(--accent-50); color: var(--accent-600); }
.lock { color: var(--text-3); font-size: 11px; }
.toggles { display: flex; gap: 8px; flex-wrap: wrap; }
.tg-btn { height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.tg-btn.on { background: #e6f7f8; border-color: #9fdde1; color: #0b7f86; }
.call-big { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 12px; background: var(--green); color: #fff !important; font-weight: 700; font-size: 15px; text-decoration: none; margin: 10px 0 2px; }
.call-big:hover { filter: brightness(1.05); }
.mini-list .it { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.mini-list .it:last-child { border-bottom: 0; }
.mini-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mini-form .full { grid-column: 1 / -1; }
/* 연속 콜 */
.dial-wrap { max-width: 760px; margin: 0 auto; }
.dial-card { padding: 24px; }
.dial-name { font-size: 26px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dial-phone { font-family: var(--mono); font-size: 30px; font-weight: 700; margin: 6px 0 4px; letter-spacing: .01em; }
.dial-call { display: flex; align-items: center; justify-content: center; gap: 10px; height: 64px; border-radius: 16px; background: var(--green); color: #fff; font-size: 20px; font-weight: 800; text-decoration: none; margin: 16px 0; box-shadow: 0 8px 24px rgba(18, 166, 107, .3); }
.dial-call:active { transform: translateY(1px); }
.dial-call svg { width: 26px; }
.dial-progress { height: 6px; background: var(--gray-50); border-radius: 6px; overflow: hidden; margin: 6px 0 16px; }
.dial-progress i { display: block; height: 100%; background: var(--accent); }
.countdown { position: fixed; inset: 0; background: rgba(11, 17, 32, .82); z-index: 75; display: grid; place-items: center; color: #fff; text-align: center; }
.countdown .n { font-size: 96px; font-weight: 800; line-height: 1; color: var(--accent); }
.day-group { margin-bottom: 18px; }
.day-h { font-weight: 800; font-size: 14px; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.ev { display: grid; grid-template-columns: 64px 70px 1fr auto; gap: 10px; align-items: center; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; cursor: pointer; }
.ev:hover { border-color: #cdd3df; }
.ev.done { opacity: .5; }
.ev .tm { font-family: var(--mono); font-weight: 700; }
.t-통화, .t-재통화 { background: var(--violet-50); color: var(--violet); } .t-내방 { background: var(--accent-50); color: var(--accent-600); } .t-미팅, .t-화상 { background: var(--blue-50); color: var(--blue); }
@media (max-width: 1280px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .qcard b { font-size: 18px; }
  .ev { grid-template-columns: 54px 1fr auto; } .ev .tp { display: none; }
  .dial-card { padding: 18px; } .dial-phone { font-size: 24px; }
  .t .hide-m { display: none; }
}
