/* ============================================================
   SITEDESK — Base + Components
   ============================================================ */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css");

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.01em;
  word-break: keep-all;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
::selection { background: var(--green-200); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }

.app-shell { display: flex; min-height: 100vh; }

/* ===========================================================
   SIDEBAR
   =========================================================== */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--green-25) 0%, #FFFFFF 38%);
  border-right: 1px solid var(--line);
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 16px 16px;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 8px 6px 4px;
}
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--green-500), var(--green-700));
  display: grid; place-items: center;
  box-shadow: var(--shadow-green);
  flex-shrink: 0;
}
.brand-mark span {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px;
}
.brand-mark i { width: 6px; height: 6px; border-radius: 2px; background: #fff; display: block; }
.brand-mark i:nth-child(3) { opacity: .55; }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink-900); }
.brand-name b { color: var(--green-600); }
.brand-sub { font-size: 11px; color: var(--ink-400); font-weight: 600; margin-top: 1px; letter-spacing: .02em; white-space: nowrap; }
/* 교체된 브랜드 로고 이미지 (흰 배경 PNG → 밝은 배경에 multiply로 자연스럽게 합성) */
.brand-logo { display: block; height: 40px; width: auto; mix-blend-mode: multiply; }

/* Building selector */
.bldg {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 11px 12px;
  box-shadow: var(--shadow-xs);
  position: relative;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.bldg:hover { border-color: var(--green-200); box-shadow: var(--shadow-sm); }
.bldg-label { font-size: 10.5px; font-weight: 700; color: var(--green-600); letter-spacing: .04em; margin-bottom: 5px; white-space: nowrap; }
.bldg-row { display: flex; align-items: center; gap: 9px; }
.bldg-ico {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--green-50); color: var(--green-600);
  display: grid; place-items: center; flex-shrink: 0;
}
.bldg-name { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; line-height: 1.25; }
.bldg-name small { display: block; font-size: 11px; font-weight: 500; color: var(--ink-400); }
.bldg-chev { color: var(--ink-400); transition: transform .2s; flex-shrink: 0; }
.bldg.open .bldg-chev { transform: rotate(180deg); }

.bldg-menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.bldg.open .bldg-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.bldg-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 9px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; color: var(--ink-700);
}
.bldg-opt:hover { background: var(--green-25); }
.bldg-opt.active { background: var(--green-50); color: var(--green-700); }
.bldg-opt .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ink-300); margin-left: auto; }
.bldg-opt.active .dot { background: var(--green-500); }

/* Nav */
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.nav-label { font-size: 10.5px; font-weight: 700; color: var(--ink-400); letter-spacing: .06em; padding: 0 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9.5px 11px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; color: var(--ink-600);
  position: relative; transition: background .14s, color .14s;
  white-space: nowrap;
}
.nav-item:hover { background: var(--green-25); color: var(--ink-900); }
.nav-item .ic { color: var(--ink-400); display: grid; place-items: center; transition: color .14s; }
.nav-item:hover .ic { color: var(--green-600); }
.nav-item.active { background: var(--green-600); color: #fff; box-shadow: var(--shadow-green); }
.nav-item.active .ic { color: #fff; }
.nav-item .badge {
  margin-left: auto; font-size: 11px; font-weight: 800;
  background: var(--urgent); color: #fff;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; display: grid; place-items: center;
}
.nav-item.active .badge { background: rgba(255,255,255,.22); }

.sidebar-spacer { flex: 1; }

/* Profile */
.profile {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.profile:hover { border-color: var(--green-200); }
.avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--green-400), var(--green-700));
  color: #fff; font-size: 13px; font-weight: 800;
  display: grid; place-items: center;
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 13px; font-weight: 700; }
.profile-role { font-size: 11px; color: var(--ink-400); font-weight: 500; }
.profile .ic { color: var(--ink-300); }

/* ===========================================================
   MAIN
   =========================================================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  position: sticky; top: 0; z-index: 40;
  background: rgba(243,247,244,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 20px;
  padding: 0 28px;
}
.greet { display: flex; flex-direction: column; gap: 2px; }
.greet h1 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.greet h1 b { color: var(--green-600); }
.greet p { font-size: 12.5px; color: var(--ink-400); margin: 0; font-weight: 500; white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 9px 15px; width: 270px;
  transition: border-color .15s, box-shadow .15s, width .2s;
}
.search:focus-within { border-color: var(--green-400); box-shadow: 0 0 0 3px var(--green-50); width: 300px; }
.search .ic { color: var(--ink-400); flex-shrink: 0; }
.search input { border: none; outline: none; background: none; font-size: 13.5px; flex: 1; min-width: 0; color: var(--ink-900); }
.search input::placeholder { color: var(--ink-400); }
.search kbd {
  font-family: var(--font); font-size: 10.5px; font-weight: 700; color: var(--ink-400);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--ink-600);
  position: relative; transition: border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--green-200); color: var(--green-600); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 99px; background: var(--urgent); border: 2px solid var(--surface); }

.content { padding: 22px 28px 44px; max-width: var(--content-max); width: 100%; margin: 0 auto; }
.section-gap { display: flex; flex-direction: column; gap: 18px; }

/* ===========================================================
   CARD primitives
   =========================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.card-title { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.card-sub { font-size: 12px; color: var(--ink-400); font-weight: 500; margin-top: 2px; }
.card-head .spacer { flex: 1; }

/* ===========================================================
   KPI
   =========================================================== */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 18px 18px 16px; position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--green-200); }
.kpi.accent { background: linear-gradient(155deg, var(--green-600), var(--green-700)); border-color: transparent; }
.kpi-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.kpi-ico {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--green-50); color: var(--green-600);
  display: grid; place-items: center; flex-shrink: 0;
}
.kpi.urgent .kpi-ico { background: var(--urgent-bg); color: var(--urgent); }
.kpi.accent .kpi-ico { background: rgba(255,255,255,.18); color: #fff; }
.kpi-name { font-size: 13px; font-weight: 700; color: var(--ink-500); white-space: nowrap; }
.kpi.accent .kpi-name { color: rgba(255,255,255,.85); }
.kpi-val { font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-val small { font-size: 15px; font-weight: 700; color: var(--ink-400); margin-left: 3px; }
.kpi.accent .kpi-val, .kpi.accent .kpi-val small { color: #fff; }
.kpi-foot { display: flex; align-items: center; gap: 7px; margin-top: 11px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; padding: 2px 7px 2px 5px; border-radius: 99px; }
.delta.up { color: var(--pos); background: var(--green-50); }
.delta.down { color: var(--neg); background: var(--urgent-bg); }
.kpi.accent .delta { background: rgba(255,255,255,.18); color: #fff; }
.kpi-foot .cmp { font-size: 11.5px; color: var(--ink-400); font-weight: 500; white-space: nowrap; }
.kpi.accent .kpi-foot .cmp { color: rgba(255,255,255,.7); }
.kpi-spark { position: absolute; right: 0; bottom: 0; opacity: .9; pointer-events: none; }

/* ===========================================================
   CHART
   =========================================================== */
.chart-card { padding-bottom: 16px; }
.seg { display: inline-flex; background: var(--bg-2); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg button {
  font-size: 12.5px; font-weight: 700; color: var(--ink-500);
  padding: 6px 14px; border-radius: var(--r-pill); transition: all .14s;
}
.seg button.active { background: var(--surface); color: var(--green-700); box-shadow: var(--shadow-xs); }
.chart-legend { display: flex; gap: 16px; padding: 14px 20px 0; }
.lg { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-600); white-space: nowrap; }
.lg i { width: 11px; height: 11px; border-radius: 99px; display: block; }
.lg.recv i { background: var(--green-500); }
.lg.done i { background: var(--green-200); border: 1.5px solid var(--green-500); }
.lg b { color: var(--ink-900); font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-wrap { position: relative; padding: 6px 12px 0; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-tip {
  position: absolute; pointer-events: none; opacity: 0; transform: translate(-50%, -8px);
  background: var(--ink-900); color: #fff; border-radius: 10px; padding: 9px 11px;
  font-size: 12px; box-shadow: var(--shadow-lg); transition: opacity .12s; white-space: nowrap; z-index: 5;
}
.chart-tip .t-label { font-weight: 700; font-size: 11px; color: rgba(255,255,255,.7); margin-bottom: 5px; }
.chart-tip .t-row { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.chart-tip .t-row + .t-row { margin-top: 3px; }
.chart-tip .t-row i { width: 8px; height: 8px; border-radius: 99px; }
.chart-tip .t-row b { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-hover-line { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0; }

/* ===========================================================
   AI COMPLAINT CARDS — the star
   =========================================================== */
.ai-strip { display: flex; align-items: center; gap: 9px; padding: 4px 0 0; }
.ai-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--green-50), var(--green-100));
  color: var(--green-700); font-size: 11.5px; font-weight: 800;
  padding: 4px 11px 4px 8px; border-radius: 99px; border: 1px solid var(--green-200);
  white-space: nowrap;
}
.ai-pill .ic { color: var(--green-600); }

.complaints { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 4px; }
.cmp-card {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.cmp-card:hover { border-color: var(--green-200); box-shadow: var(--shadow-md); }
.cmp-rail { width: 4px; }
.cmp-rail.urgent { background: var(--urgent); }
.cmp-rail.warn { background: var(--warn); }
.cmp-rail.low { background: var(--low); }
.cmp-body { padding: 15px 16px; min-width: 0; }
.cmp-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; flex-wrap: wrap; }
.badge-urg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; padding: 3px 9px 3px 7px; border-radius: 99px; }
.badge-urg .pulse { width: 6px; height: 6px; border-radius: 99px; }
.badge-urg.urgent { color: var(--urgent); background: var(--urgent-bg); border: 1px solid var(--urgent-line); }
.badge-urg.urgent .pulse { background: var(--urgent); animation: pulse 1.6s infinite; }
.badge-urg.warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-line); }
.badge-urg.warn .pulse { background: var(--warn); }
.badge-urg.low { color: var(--low); background: var(--low-bg); border: 1px solid var(--low-line); }
.badge-urg.low .pulse { background: var(--low); }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1);} 50%{opacity:.35;transform:scale(.8);} }

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 7px; background: var(--bg-2); color: var(--ink-600); }
.tag .swatch { width: 7px; height: 7px; border-radius: 2px; }
.cmp-loc { font-size: 11.5px; font-weight: 600; color: var(--ink-400); display: inline-flex; align-items: center; gap: 4px; }
.cmp-time { font-size: 11.5px; color: var(--ink-300); font-weight: 500; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

.cmp-summary { font-size: 14.5px; font-weight: 600; color: var(--ink-900); line-height: 1.45; letter-spacing: -0.01em; text-wrap: pretty; }
.cmp-summary .ai-tic { color: var(--green-600); font-weight: 800; font-size: 11px; margin-right: 6px; letter-spacing: .03em; vertical-align: 1px; }
.cmp-raw { font-size: 12px; color: var(--ink-400); margin-top: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

.cmp-action { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; padding: 15px 16px 15px 18px; border-left: 1px solid var(--line); background: var(--green-25); min-width: 168px; position: relative; }
.btn-assign {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--green-600); color: #fff; font-size: 13px; font-weight: 700;
  padding: 10px 14px; border-radius: var(--r-sm); box-shadow: var(--shadow-green);
  transition: background .14s, transform .12s; white-space: nowrap;
}
.btn-assign:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-assign:active { transform: translateY(0); }
.cmp-assignee { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--green-700); justify-content: center; }
.cmp-assignee .av { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(150deg,var(--green-400),var(--green-700)); color:#fff; font-size:10px; font-weight:800; display:grid; place-items:center; }
.btn-ghost { font-size: 11.5px; font-weight: 600; color: var(--ink-400); }
.btn-ghost:hover { color: var(--green-600); }

/* assign popover */
.assign-pop {
  position: absolute; top: calc(100% - 6px); right: 16px; width: 230px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg); padding: 7px; z-index: 50;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: all .15s;
}
.assign-pop.open { opacity: 1; visibility: visible; transform: translateY(0); }
.assign-pop .ap-head { font-size: 11px; font-weight: 700; color: var(--ink-400); padding: 6px 8px 7px; }
.ap-opt { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: var(--r-sm); }
.ap-opt:hover { background: var(--green-25); }
.ap-opt .av { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(150deg,var(--green-400),var(--green-700)); color:#fff; font-size:11px; font-weight:800; display:grid; place-items:center; flex-shrink:0; }
.ap-opt .ap-info { flex: 1; min-width: 0; }
.ap-opt .ap-name { font-size: 12.5px; font-weight: 700; }
.ap-opt .ap-stat { font-size: 11px; color: var(--ink-400); font-weight: 500; }
.ap-opt .ap-load { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.ap-load.free { color: var(--green-700); background: var(--green-50); }
.ap-load.busy { color: var(--warn); background: var(--warn-bg); }

/* ===========================================================
   SECONDARY WIDGETS
   =========================================================== */
.widget-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; }
.widget { padding: 18px 20px 20px; }
.rank-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.rank-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; }
.rank-no { font-size: 12px; font-weight: 800; color: var(--ink-300); font-variant-numeric: tabular-nums; }
.rank-row:nth-child(1) .rank-no { color: var(--green-600); }
.rank-mid { min-width: 0; }
.rank-name { font-size: 12.5px; font-weight: 700; margin-bottom: 5px; display: flex; align-items: center; gap: 6px; }
.rank-name .swatch { width: 8px; height: 8px; border-radius: 2px; }
.rank-bar { height: 6px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--green-400), var(--green-600)); }
.rank-val { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-val small { font-size: 11px; color: var(--ink-400); font-weight: 600; }

.dist { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.dist-row { }
.dist-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dist-label { font-size: 12.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.dist-label i { width: 9px; height: 9px; border-radius: 3px; }
.dist-val { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.dist-track { height: 9px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.dist-track i { display: block; height: 100%; border-radius: 99px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; margin-top: 14px; }
.donut { position: relative; flex-shrink: 0; }
.donut svg { transform: rotate(-90deg); display: block; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.donut-pct { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.donut-cap { font-size: 10.5px; font-weight: 700; color: var(--ink-400); margin-top: 3px; }
.donut-legend { display: flex; flex-direction: column; gap: 11px; flex: 1; }
.dl-row { display: flex; align-items: center; gap: 9px; }
.dl-row .dl-dot { width: 9px; height: 9px; border-radius: 99px; flex-shrink: 0; }
.dl-name { font-size: 12.5px; font-weight: 600; color: var(--ink-600); white-space: nowrap; }
.dl-val { font-size: 12.5px; font-weight: 800; margin-left: auto; font-variant-numeric: tabular-nums; }

/* ===========================================================
   INTRO MODAL
   =========================================================== */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(16,42,30,.42); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.modal-scrim.open { opacity: 1; visibility: visible; }
.modal {
  width: 460px; max-width: 100%;
  background: var(--surface); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(12px) scale(.97); transition: transform .28s cubic-bezier(.2,.9,.3,1.2);
}
.modal-scrim.open .modal { transform: translateY(0) scale(1); }
.modal-hero {
  background: linear-gradient(150deg, var(--green-600), var(--green-800));
  padding: 26px 28px 22px; color: #fff; position: relative; overflow: hidden;
}
.modal-hero .mh-mark { width: 44px; height: 44px; border-radius: 13px; background: rgba(255,255,255,.16); display: grid; place-items: center; margin-bottom: 14px; }
.modal-hero .mh-mark span { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.modal-hero .mh-mark i { width: 8px; height: 8px; border-radius: 2px; background: #fff; }
.modal-hero .mh-mark i:nth-child(3){ opacity:.55; }
/* 초록 히어로 위 로고 — 흰색 칩에 얹어 가독성 확보 */
.mh-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 12px; padding: 9px 13px; margin-bottom: 15px; box-shadow: var(--shadow-sm); }
.mh-logo img { display: block; height: 26px; width: auto; }
.modal-hero h2 { font-size: 20px; font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; }
.modal-hero p { font-size: 13px; margin: 0; color: rgba(255,255,255,.82); font-weight: 500; line-height: 1.5; }
.modal-hero .glow { position: absolute; width: 200px; height: 200px; border-radius: 99px; background: var(--green-400); filter: blur(60px); opacity: .4; right: -40px; top: -60px; }
.modal-body { padding: 22px 28px 8px; }
.feat { display: flex; gap: 13px; padding: 11px 0; }
.feat + .feat { border-top: 1px solid var(--line); }
.feat-ico { width: 38px; height: 38px; border-radius: 11px; background: var(--green-50); color: var(--green-600); display: grid; place-items: center; flex-shrink: 0; }
.feat-txt h3 { font-size: 13.5px; font-weight: 800; margin: 0 0 3px; }
.feat-txt p { font-size: 12.5px; color: var(--ink-500); margin: 0; line-height: 1.45; }
.modal-foot { padding: 14px 28px 22px; display: flex; align-items: center; gap: 14px; }
.modal-prog { flex: 1; height: 5px; border-radius: 99px; background: var(--bg-2); overflow: hidden; }
.modal-prog i { display: block; height: 100%; width: 0; background: var(--green-500); border-radius: 99px; }
.btn-primary {
  background: var(--green-600); color: #fff; font-size: 13.5px; font-weight: 700;
  padding: 11px 22px; border-radius: var(--r-sm); box-shadow: var(--shadow-green);
  transition: background .14s; white-space: nowrap;
}
.btn-primary:hover { background: var(--green-700); }

/* ===========================================================
   TOAST
   =========================================================== */
.toast-host { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--ink-900); color: #fff; font-size: 13px; font-weight: 600;
  padding: 12px 16px; border-radius: var(--r-pill); box-shadow: var(--shadow-lg);
  animation: toastin .3s cubic-bezier(.2,.9,.3,1.2);
}
.toast .tc { width: 22px; height: 22px; border-radius: 99px; background: var(--green-500); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
@keyframes toastin { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .widget-grid { grid-template-columns: 1fr; }
  .cmp-card { grid-template-columns: 4px 1fr; }
  .cmp-action { border-left: none; border-top: 1px solid var(--line); flex-direction: row; align-items: center; grid-column: 1 / -1; }
  .cmp-action .btn-assign { flex: 1; }
}
@media (max-width: 860px) {
  .sidebar { display: none; }
  .search { width: 180px; }
}

/* ===========================================================
   MOTION — 진입 애니메이션 · 부드러운 전환 (고급스러운 지연/이징)
   =========================================================== */
:root { --ease-out: cubic-bezier(.22,.61,.36,1); }
@keyframes spin360 { to { transform: rotate(360deg); } }

/* 섹션/카드 staggered 진입 */
.reveal { opacity: 0; transform: translateY(18px); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; transition: opacity .66s var(--ease-out), transform .66s var(--ease-out); }

/* hover를 조금 더 부드럽게 */
.kpi { transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), border-color .22s var(--ease-out); }
.kpi:hover { transform: translateY(-3px); }
.cmp-card { transition: transform .2s var(--ease-out), border-color .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.cmp-card:hover { transform: translateY(-2px); }

/* 차트: 라인 드로잉 + 영역/점 페이드 */
.chart-wrap svg .chart-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.chart-wrap svg.shown .chart-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.25s var(--ease-out); }
.chart-wrap svg .chart-area, .chart-wrap svg .chart-fade, .chart-wrap svg .chart-dots { opacity: 0; }
.chart-wrap svg.shown .chart-area { opacity: 1; transition: opacity .9s ease .15s; }
.chart-wrap svg.shown .chart-fade { opacity: 1; transition: opacity .9s ease .45s; }
.chart-wrap svg.shown .chart-dots { opacity: 1; transition: opacity .5s ease 1s; }

/* 위젯: 막대/도넛 채워짐 */
.rank-bar i, .dist-track i { transition: width 1.05s var(--ease-out); }
#donutArc { transition: stroke-dashoffset 1.25s var(--ease-out); }

/* 배정 로딩 상태 */
.btn-assign.assigning { background: var(--green-700); cursor: default; }
.btn-assign.assigning svg, .btn-assign svg.spin { animation: spin360 1s linear infinite; }

/* 검색 실시간 필터 */
.cmp-card.filtered { display: none; }
.cmp-empty { text-align: center; color: var(--ink-400); font-size: 13px; font-weight: 600; padding: 26px 0 10px; }

/* 알림 패널 */
.topbar-right { position: relative; }
.noti-pop {
  position: absolute; top: calc(100% + 12px); right: 0; width: 326px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg); padding: 7px; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility .2s;
}
.noti-pop.open { opacity: 1; visibility: visible; transform: none; }
.noti-head { display: flex; align-items: center; padding: 9px 11px 7px; }
.noti-head .noti-title { font-size: 13px; font-weight: 800; }
.noti-head .noti-clear { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--ink-400); }
.noti-head .noti-clear:hover { color: var(--green-600); }
.noti-item { display: flex; gap: 11px; padding: 10px 11px; border-radius: var(--r-sm); transition: background .14s; }
.noti-item:hover { background: var(--green-25); }
.noti-item + .noti-item { border-top: 1px solid var(--line); }
.noti-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.noti-ico.urgent { background: var(--urgent-bg); color: var(--urgent); }
.noti-ico.info { background: var(--green-50); color: var(--green-600); }
.noti-ico.done { background: var(--green-600); color: #fff; }
.noti-txt { min-width: 0; }
.noti-t { font-size: 12.5px; font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; }
.noti-s { font-size: 11px; color: var(--ink-400); font-weight: 500; margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .chart-wrap svg .chart-line { stroke-dashoffset: 0 !important; }
  .chart-wrap svg .chart-area, .chart-wrap svg .chart-fade, .chart-wrap svg .chart-dots { opacity: 1 !important; }
  .rank-bar i, .dist-track i, #donutArc { transition: none !important; }
}