/* ==========================================================================
   AILO Dashboard D06 — 브랜치허브 (프랜차이즈 본사 콘솔)
   원형: 지도 중심 라이트 · 좌측 화이트 사이드바(접기) + 지도 히어로 카드
   타이포: Pretendard 단일, 큰 숫자 800 / 라벨 600 · 컬러: 화이트 + 시그널 레드 #d6283a
   ========================================================================== */

:root {
  --ailo-bg: #f5f5f6;
  --ailo-fg: #16171a;
  --ailo-muted: #6a6d74;
  --ailo-line: #e6e6e9;
  --ailo-accent: #d6283a;

  --d06-card: #ffffff;
  --d06-red: #d6283a;
  --d06-red-ink: #b31d2e;
  --d06-red-wash: rgba(214, 40, 58, .09);
  --d06-red-soft: #fdecee;
  --d06-prev: #a9abb2;
  --d06-grid: #ececef;
  --d06-base: #cfd0d5;
  --d06-axis: #7c7f86;
  /* 채널 3색 — 검증 통과 (light, #fff) */
  --d06-s1: #d6283a;
  --d06-s2: #3a6fd8;
  --d06-s3: #1a9e77;
  /* 퍼널 서열 램프 (레드 단일 색상, 밝은→진한) */
  --d06-r1: #f19aa3;
  --d06-r2: #e45a69;
  --d06-r3: #d6283a;
  --d06-r4: #b01f31;
  --d06-r5: #8f1424;
  /* 상태 */
  --d06-good: #0d7a3f;
  --d06-good-bg: #e5f4eb;
  --d06-warn: #9a5b00;
  --d06-warn-bg: #fdf1dc;
  --d06-bad: #c22436;
  --d06-prog: #2f5fc4;
  --d06-prog-bg: #e8effc;

  --d06-sb: 252px;
  --d06-sb-mini: 76px;
  --d06-radius: 14px;
  --d06-gap: clamp(12px, 1.4vw, 20px);
}

body { background: var(--ailo-bg); font-size: 14px; }
.num, .tbl td.num { font-variant-numeric: tabular-nums; }
.tx-up { color: var(--d06-good); }
.tx-down { color: var(--d06-bad); }

/* ===== App shell ===== */
.app { display: flex; min-height: 100vh; }
.shell { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: var(--d06-sb); transition: margin-left .25s var(--ailo-ease); }
html.sb-mini .shell { margin-left: var(--d06-sb-mini); }

/* ===== Sidebar ===== */
.sb {
  position: fixed; inset: 0 auto 0 0; width: var(--d06-sb); z-index: 130;
  background: #fff; border-right: 1px solid var(--ailo-line);
  display: flex; flex-direction: column; padding: 18px 14px 14px;
  transition: width .25s var(--ailo-ease), transform .3s var(--ailo-ease), visibility .3s;
  overflow: hidden auto;
}
.sb__head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 18px; }
.sb__logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb__mark {
  flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--d06-red); color: #fff; font-size: 17px;
  box-shadow: 0 6px 14px -6px rgba(214, 40, 58, .7);
}
.sb__name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.sb__name small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ailo-muted); letter-spacing: 0; }
.sb__close { display: none; border: 0; background: transparent; width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
.sb__close:hover { background: var(--ailo-bg); }

.sb__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sb__group { font-size: 11px; font-weight: 700; color: #9a9ca3; letter-spacing: .08em; padding: 14px 12px 6px; white-space: nowrap; }
.sb__nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; color: #44464c; font-weight: 600; white-space: nowrap;
  transition: background .15s, color .15s;
}
.sb__nav a i { width: 20px; text-align: center; font-size: 15px; color: #8c8f96; flex: none; }
.sb__nav a span { flex: 1; }
.sb__nav a em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ailo-muted); background: var(--ailo-bg); border-radius: 99px; padding: 1px 8px; }
.sb__nav a em.is-hot { background: var(--d06-red); color: #fff; }
.sb__nav a:hover { background: var(--ailo-bg); color: var(--ailo-fg); }
.sb__nav a.is-active { background: var(--d06-red-soft); color: var(--d06-red-ink); }
.sb__nav a.is-active i { color: var(--d06-red); }
.sb__nav a.is-active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--d06-red); }

.sb__foot { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }
.sb__promo { border: 1px dashed #f0b7bd; background: #fff7f8; border-radius: 12px; padding: 12px 14px; font-size: 12.5px; white-space: nowrap; }
.sb__promo strong { display: block; color: var(--d06-red-ink); }
.sb__promo span { color: var(--ailo-muted); }
.sb__fold { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; color: var(--ailo-muted); font-weight: 600; white-space: nowrap; }
.sb__fold i { width: 20px; text-align: center; transition: rotate .25s; }
.sb__fold:hover { background: var(--ailo-bg); color: var(--ailo-fg); }

html.sb-mini .sb { width: var(--d06-sb-mini); }
html.sb-mini .sb__name, html.sb-mini .sb__nav a span, html.sb-mini .sb__nav a em,
html.sb-mini .sb__promo, html.sb-mini .sb__fold span { display: none; }
html.sb-mini .sb__group { font-size: 0; padding: 10px 0 4px; border-top: 1px solid var(--ailo-line); margin: 6px 8px 0; }
html.sb-mini .sb__nav a { justify-content: center; padding: 12px 0; }
html.sb-mini .sb__fold { justify-content: center; padding: 12px 0; }
html.sb-mini .sb__fold i { rotate: 180deg; }
html.sb-mini .sb__head { justify-content: center; padding-inline: 0; }

.sb-dim { display: none; }

/* ===== Topbar ===== */
.tb {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 2.2vw, 32px);
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ailo-line);
}
.tb__title { min-width: 0; margin-right: auto; }
.tb__crumb { display: flex; gap: 6px; font-size: 12px; color: var(--ailo-muted); }
.tb__crumb li + li::before { content: "/"; margin-right: 6px; color: #c2c3c8; }
.tb__crumb a:hover { color: var(--d06-red); }
.tb__title h1 { font-size: clamp(18px, 1.7vw, 22px); font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.tb__search { position: relative; display: flex; align-items: center; width: min(340px, 30vw); }
.tb__search i { position: absolute; left: 14px; color: #9a9ca3; font-size: 13px; pointer-events: none; }
.tb__search input {
  width: 100%; height: 40px; border: 1px solid var(--ailo-line); border-radius: 10px;
  background: var(--ailo-bg); padding: 0 40px 0 38px; font-size: 13.5px; outline: 0;
}
.tb__search input:focus { border-color: var(--d06-red); background: #fff; box-shadow: 0 0 0 3px var(--d06-red-wash); }
.tb__search kbd { position: absolute; right: 10px; font-size: 11px; background: #fff; color: var(--ailo-muted); border: 1px solid var(--ailo-line); box-shadow: none; padding: 1px 7px; border-radius: 6px; }
.tb__actions { display: flex; align-items: center; gap: 8px; }
.tb__icon { position: relative; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--ailo-line); background: #fff; font-size: 16px; }
.tb__icon:hover { border-color: #cfd0d5; }
.tb__badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--d06-red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; border: 2px solid #fff; box-sizing: content-box; }
.tb__profile { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 4px 6px 4px 4px; border-radius: 12px; text-align: left; }
.tb__profile:hover { background: var(--ailo-bg); }
.tb__who { line-height: 1.2; }
.tb__who b { display: block; font-size: 13.5px; }
.tb__who small { font-size: 11.5px; color: var(--ailo-muted); }
.tb__burger { color: var(--ailo-fg); margin-left: -8px; }

.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #1e1f23; color: #fff; font-weight: 700; font-size: 14px; }
.avatar--sm { width: 32px; height: 32px; font-size: 13px; background: var(--d06-red-soft); color: var(--d06-red-ink); }

/* 알림 드롭다운 */
.dd { position: relative; }
.dd__panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 340px; max-width: calc(100vw - 24px);
  background: #fff; border: 1px solid var(--ailo-line); border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(20, 20, 30, .28); padding: 8px; z-index: 140;
}
.dd__head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; }
.dd__link { border: 0; background: none; font-size: 12.5px; color: var(--d06-red-ink); font-weight: 600; }
.noti li { display: flex; gap: 10px; padding: 10px; border-radius: 10px; position: relative; }
.noti li:hover { background: var(--ailo-bg); }
.noti li.is-new::after { content: ""; position: absolute; right: 10px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--d06-red); }
.noti p { font-size: 13px; line-height: 1.45; padding-right: 14px; }
.noti small { display: block; font-size: 11.5px; color: var(--ailo-muted); margin-top: 2px; }
.noti__ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ailo-bg); color: #50535a; font-size: 13px; }
.noti__ic--red { background: var(--d06-red-soft); color: var(--d06-red); }
.noti__ic--amber { background: var(--d06-warn-bg); color: var(--d06-warn); }

/* ===== Main ===== */
.main { flex: 1; padding: clamp(16px, 2vw, 28px) clamp(16px, 2.2vw, 32px) 32px; display: flex; flex-direction: column; gap: var(--d06-gap); }

/* 필터 행 */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.seg { display: inline-flex; padding: 3px; background: #fff; border: 1px solid var(--ailo-line); border-radius: 11px; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ailo-muted); transition: background .15s, color .15s; }
.seg button:hover { color: var(--ailo-fg); }
.seg button.is-on { background: var(--ailo-fg); color: #fff; }
.seg--sm button { padding: 5px 12px; font-size: 12.5px; }
.seg--sm button.is-on { background: var(--d06-red); }
.filters__range { font-size: 13px; color: var(--ailo-muted); }
.filters__range i { margin-right: 4px; }
.filters__live { margin-left: auto; font-size: 12.5px; color: var(--ailo-muted); display: inline-flex; align-items: center; gap: 6px; }
.filters__live .dot { width: 8px; height: 8px; border-radius: 50%; background: #18a058; box-shadow: 0 0 0 3px rgba(24, 160, 88, .18); }

/* KPI 스트립 */
.kpis {
  display: grid; grid-template-columns: 1.25fr repeat(4, 1fr);
  background: var(--d06-card); border: 1px solid var(--ailo-line); border-radius: var(--d06-radius); overflow: hidden;
}
.kpi { position: relative; padding: 18px 20px 16px; border-left: 1px solid var(--ailo-line); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi--lead { background: linear-gradient(135deg, #fff 0%, #fff5f6 100%); }
.kpi--lead::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--d06-red); }
.kpi__label { font-size: 12.5px; font-weight: 600; color: var(--ailo-muted); }
.kpi__value { font-size: clamp(22px, 2vw, 28px); font-weight: 800; letter-spacing: -.03em; margin-top: 4px; line-height: 1.2; white-space: nowrap; }
.kpi--lead .kpi__value { font-size: clamp(26px, 2.6vw, 36px); }
.kpi__value small { font-size: .5em; font-weight: 600; color: var(--ailo-muted); margin-left: 3px; letter-spacing: 0; }
.delta { font-size: 12.5px; font-weight: 700; margin-top: 4px; white-space: nowrap; }
.delta__t { font-weight: 500; color: var(--ailo-muted); }
.delta--up { color: var(--d06-good); }
.delta--down { color: var(--d06-bad); }
.spark { position: absolute; right: 14px; top: 16px; width: 76px; height: 26px; overflow: visible; }
.spark__line { fill: none; stroke: #c4c6cc; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark__end { fill: var(--d06-red); stroke: #fff; stroke-width: 2; }

/* ===== Grid ===== */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--d06-gap); }
.g-map { grid-column: span 8; }
.g-rank { grid-column: span 4; }
.g-trend { grid-column: span 8; }
.g-channel { grid-column: span 4; }
.g-table { grid-column: span 8; }
.g-funnel { grid-column: span 4; }
.g-log { grid-column: span 12; }

.card { color: var(--ailo-fg); background: var(--d06-card); border: 1px solid var(--ailo-line); border-radius: var(--d06-radius); padding: clamp(16px, 1.6vw, 22px); min-width: 0; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head--wrap { flex-wrap: wrap; }
.card h2 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.card__sub { font-size: 12.5px; color: var(--ailo-muted); margin-top: 2px; }
.sub-title { font-size: 13px; font-weight: 700; margin: 16px 0 8px; padding-top: 14px; border-top: 1px solid var(--ailo-line); }

.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ailo-muted); flex-wrap: wrap; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend--row { margin: -6px 0 10px; }
.lk { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.lk--line { width: 16px; height: 2px; border-radius: 2px; }

.chart { position: relative; height: 240px; }
.chart--lg { height: 280px; }
.chart--funnel { height: 190px; }

/* ===== Map ===== */
.card--map { background: linear-gradient(180deg, #fff 0%, #fffafa 100%); }
.map { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: stretch; }
.map__canvas { position: relative; min-width: 0; background: #fbf7f7; border-radius: 12px; padding: 8px; }
#krMap { width: 100%; height: auto; max-height: 500px; margin-inline: auto; }
.map__dot { fill: #ecdcdd; }
.map__land { fill: #fff; stroke: #e3c9cc; stroke-width: 1.4; stroke-linejoin: round; }
.bub { cursor: pointer; outline: none; }
.bub__hit { fill: transparent; }
.bub__c { fill: rgba(214, 40, 58, .2); stroke: var(--d06-red); stroke-width: 1.5; transition: fill .15s; }
.bub__core { fill: var(--d06-red); stroke: #fff; stroke-width: 1.5; }
.bub__t { font-size: 11.5px; font-weight: 700; fill: #2b2c30; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.bub:hover .bub__c, .bub:focus-visible .bub__c { fill: rgba(214, 40, 58, .4); }
.bub:focus-visible .bub__c { stroke-width: 3; }
.bub.is-sel .bub__c { fill: var(--d06-red); stroke: #fff; stroke-width: 2; }
.bub.is-sel .bub__core { fill: #fff; stroke: var(--d06-red); }
.bub.is-dim { opacity: .45; }
.map__legend { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ailo-muted); background: rgba(255, 255, 255, .85); padding: 4px 10px; border-radius: 99px; }
.lg-dot { display: inline-block; border-radius: 50%; border: 1.5px solid var(--d06-red); background: rgba(214, 40, 58, .2); }
.lg-dot--s { width: 8px; height: 8px; }
.lg-dot--l { width: 16px; height: 16px; }
.lg-sel { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--d06-red); }

.map__side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.region { background: #1b1c20; color: #fff; border-radius: 12px; padding: 16px 18px; }
.region__kicker { font-size: 11.5px; color: #b8b9bf; font-weight: 600; letter-spacing: .04em; }
.region h3 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 12px; }
.region__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 0; }
.region__stats dt { font-size: 11.5px; color: #a7a8ae; font-weight: 500; }
.region__stats dd { margin: 0; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.region .tx-up { color: #6fdc9a; }
.region .tx-down { color: #ff8f99; }
.btn-ghost { margin-top: 12px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.rbar__title { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.rbar__list { display: flex; flex-direction: column; gap: 9px; }
.rbar__list li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 46px; align-items: center; gap: 8px; font-size: 12.5px; }
.rbar__n { font-weight: 600; }
.rbar__track { height: 8px; background: #f3e4e6; border-radius: 99px; overflow: hidden; }
.rbar__fill { display: block; height: 100%; background: var(--d06-r2); border-radius: 99px; }
.rbar__list li.is-sel .rbar__fill { background: var(--d06-red-ink); }
.rbar__list li.is-sel .rbar__n { color: var(--d06-red-ink); }
.rbar__v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ailo-muted); }

/* ===== Ranking ===== */
.rank { display: flex; flex-direction: column; }
.rank li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--ailo-line); }
.rank li:first-child { border-top: 0; padding-top: 2px; }
.rank__no { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--ailo-bg); color: var(--ailo-muted); }
.rank li:nth-child(1) .rank__no { background: var(--d06-red); color: #fff; }
.rank li:nth-child(2) .rank__no, .rank li:nth-child(3) .rank__no { background: var(--d06-red-soft); color: var(--d06-red-ink); }
.rank__body p { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.rank__name { font-size: 14px; white-space: nowrap; }
.rank__reg { font-size: 11.5px; color: var(--ailo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__track { display: block; height: 4px; background: var(--ailo-bg); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.rank__track span { display: block; height: 100%; background: #c9cbd0; border-radius: 99px; }
.rank li:nth-child(1) .rank__track span { background: var(--d06-red); }
.rank__val { text-align: right; line-height: 1.3; }
.rank__val b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.rank__val small { font-size: 11.5px; font-weight: 600; }
.rank__empty { color: var(--ailo-muted); font-size: 13px; padding: 24px 0; display: block !important; text-align: center; }

/* ===== Table ===== */
.tbl-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-search { position: relative; }
.mini-search i { position: absolute; left: 11px; top: 50%; translate: 0 -50%; font-size: 12px; color: #9a9ca3; }
.mini-search input, .mini-select { height: 36px; border: 1px solid var(--ailo-line); border-radius: 9px; font-size: 13px; background: #fff; outline: 0; }
.mini-search input { padding: 0 12px 0 30px; width: 180px; }
.mini-select { padding: 0 10px; }
.mini-search input:focus, .mini-select:focus { border-color: var(--d06-red); box-shadow: 0 0 0 3px var(--d06-red-wash); }
.tbl-wrap { overflow-x: auto; margin-inline: -4px; padding-inline: 4px; }
.tbl-wrap:focus-visible { outline-offset: 0; }
.tbl { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ailo-muted); padding: 0 10px 10px; border-bottom: 1px solid var(--ailo-line); white-space: nowrap; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl th button { border: 0; background: none; padding: 0; color: inherit; font-weight: inherit; display: inline-flex; gap: 6px; align-items: center; }
.tbl th button i { font-size: 10.5px; color: #b9bbc0; }
.tbl th[aria-sort="ascending"] button, .tbl th[aria-sort="descending"] button { color: var(--ailo-fg); }
.tbl th[aria-sort="ascending"] i, .tbl th[aria-sort="descending"] i { color: var(--d06-red); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid #f0f0f2; white-space: nowrap; }
.tbl tbody tr:hover td { background: #fcf7f7; }
.tbl-empty { padding: 28px; text-align: center; color: var(--ailo-muted); }
.grade { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-weight: 800; font-size: 12px; }
.grade--A { background: var(--d06-good-bg); color: var(--d06-good); }
.grade--B { background: var(--d06-warn-bg); color: var(--d06-warn); }
.grade--C { background: var(--d06-red-soft); color: var(--d06-bad); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--d06-good-bg); color: var(--d06-good); }
.badge--warn { background: var(--d06-warn-bg); color: var(--d06-warn); }
.badge--prog { background: var(--d06-prog-bg); color: var(--d06-prog); }
.badge--new { background: var(--d06-red-soft); color: var(--d06-red-ink); }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager__info { font-size: 12.5px; color: var(--ailo-muted); }
.pager__btns { display: flex; gap: 4px; }
.pager__btns button { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--ailo-line); background: #fff; font-size: 13px; font-weight: 600; }
.pager__btns button:hover:not(:disabled) { border-color: #c8c9ce; }
.pager__btns button.is-on { background: var(--ailo-fg); border-color: var(--ailo-fg); color: #fff; }
.pager__btns button:disabled { opacity: .4; cursor: default; }

/* ===== Leads ===== */
.leads li { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.leads div { flex: 1; min-width: 0; line-height: 1.3; }
.leads b { font-size: 13.5px; }
.leads small { display: block; font-size: 12px; color: var(--ailo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== Log ===== */
.log { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.log li { display: flex; gap: 12px; padding: 10px 0 10px 14px; border-left: 2px solid var(--ailo-line); position: relative; font-size: 13px; }
.log li::before { content: ""; position: absolute; left: -5px; top: 15px; width: 8px; height: 8px; border-radius: 50%; background: #fff; border: 2px solid #b6b8be; }
.log li.is-warn::before { border-color: var(--d06-red); background: var(--d06-red); }
.log time { flex: none; width: 40px; font-size: 12px; font-weight: 700; color: var(--ailo-muted); font-variant-numeric: tabular-nums; padding-top: 1px; }

/* ===== Footer ===== */
.ft { padding: 18px clamp(16px, 2.2vw, 32px) 26px; font-size: 12px; color: var(--ailo-muted); border-top: 1px solid var(--ailo-line); }

/* ===== Tooltip ===== */
.tip { position: fixed; z-index: 200; pointer-events: none; background: #1d1b1a; color: #fff; font-size: 12.5px; font-weight: 500; padding: 7px 10px; border-radius: 8px; max-width: 260px; line-height: 1.45; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); }

/* ===== Responsive ===== */
@media (max-width: 1399.98px) {
  .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .spark { position: static; display: block; width: 100%; height: 24px; margin-top: 8px; }
}
@media (max-width: 1199.98px) {
  .g-map, .g-trend, .g-table { grid-column: span 12; }
  .g-rank, .g-channel, .g-funnel { grid-column: span 6; }
  .g-log { grid-column: span 6; }
  .log { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--ailo-line); }
}
@media (max-width: 991.98px) {
  .shell, html.sb-mini .shell { margin-left: 0; }
  .sb, html.sb-mini .sb { width: min(300px, 86vw); transform: translateX(-100%); visibility: hidden; box-shadow: 20px 0 50px -20px rgba(0, 0, 0, .35); }
  html.sb-mini .sb__name, html.sb-mini .sb__nav a span, html.sb-mini .sb__nav a em, html.sb-mini .sb__promo, html.sb-mini .sb__fold span { display: revert; }
  html.sb-mini .sb__nav a { justify-content: flex-start; padding: 10px 12px; }
  html.sb-mini .sb__group { font-size: 11px; padding: 14px 12px 6px; border: 0; margin: 0; }
  html.sb-mini .sb__head { justify-content: space-between; padding: 0 6px 18px; }
  html.nav-open .sb { transform: none; visibility: visible; transition: width .25s var(--ailo-ease), transform .3s var(--ailo-ease), visibility 0s; } /* 열 때 visibility 즉시 → 곧바로 포커스 가능 */
  .sb__close { display: grid; place-items: center; }
  .sb__fold { display: none; }
  .sb-dim { display: block; position: fixed; inset: 0; z-index: 125; background: rgba(15, 16, 20, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  html.nav-open .sb-dim { opacity: 1; visibility: visible; }
  .tb__who { display: none; }
  .map { grid-template-columns: minmax(0, 1fr); }
  .map__side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
  .g-rank, .g-channel, .g-funnel, .g-log { grid-column: span 12; }
  .tb__search { order: 5; width: 100%; }
  .tb { flex-wrap: wrap; row-gap: 10px; }
  .filters__live { margin-left: 0; }
}
@media (max-width: 575.98px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px; }
  .kpi--lead { grid-column: span 2; }
  .kpi:nth-child(4) { border-left: 1px solid var(--ailo-line); }
  .kpi:nth-child(2), .kpi:nth-child(4) { border-left: 0; }
  .kpi:nth-child(n+2) { border-top: 1px solid var(--ailo-line); }
  .delta__t { display: block; font-size: 11.5px; }
  .map__side { grid-template-columns: 1fr; }
  .seg button { padding: 7px 12px; }
  .filters__range { width: 100%; order: 3; }
  .tbl-tools, .mini-search, .mini-search input { width: 100%; }
  .mini-search { flex: 1; }
  .card__head:not(.card__head--wrap) { flex-wrap: wrap; }
  .tb__search kbd { display: none; }
}
