/* =========================================================
   KMWORKS SmartSuite — 관리자 데모 공통 스타일
   ========================================================= */
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --line: #e9ecf1;
  --line-soft: #f1f3f6;
  --tx: #111827;
  --tx-2: #374151;
  --tx-3: #6b7280;
  --tx-4: #9ca3af;
  --side: #0a0f1c;
  --side-2: #121a2c;
  --accent: #3d6bff;
  --accent-2: #22d3ee;
  --accent-soft: rgba(61, 107, 255, .1);
  --ok: #10b981; --warn: #f59e0b; --danger: #ef4444; --info: #3b82f6; --violet: #7c5cff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.04);
  --shadow-lg: 0 24px 60px -20px rgba(16,24,40,.25);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--tx); font-size: 14px; letter-spacing: -0.01em; -webkit-font-smoothing: antialiased; word-break: keep-all; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Demo ribbon ---------- */
.demo-ribbon {
  height: 36px; display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 12.5px;
  background: linear-gradient(90deg, #0a0f1c, #141c33 50%, #0a0f1c); color: rgba(255,255,255,.72); position: relative; z-index: 30;
}
.demo-ribbon b { color: #fff; font-weight: 700; }
.demo-ribbon .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); }
.demo-ribbon a { color: #fff; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.1); }
.demo-ribbon a:hover { background: rgba(255,255,255,.18); }

/* ---------- Login ---------- */
.login { min-height: calc(100vh - 36px); display: grid; grid-template-columns: 1.08fr 1fr; background: #fff; }
.login__art {
  position: relative; overflow: hidden; color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 420px at 10% 0%, color-mix(in srgb, var(--accent) 50%, transparent), transparent 70%),
    radial-gradient(600px 420px at 100% 100%, color-mix(in srgb, var(--accent-2) 32%, transparent), transparent 70%),
    #060a14;
}
.login__art::before {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: linear-gradient(180deg, #000, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.login__art > * { position: relative; z-index: 1; }
.login__brand { display: flex; align-items: center; gap: 12px; }
.login__brand span { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.login__brand b { display: block; font-size: 18px; letter-spacing: -0.03em; }
.login__brand small { color: rgba(255,255,255,.5); font-size: 12px; }
.login__headline { font-size: 44px; line-height: 1.15; font-weight: 800; letter-spacing: -0.05em; margin: 0; }
.login__headline em { font-style: normal; color: rgba(255,255,255,.45); }
.login__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 36px; }
.login__card { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px); }
.login__card small { color: rgba(255,255,255,.5); font-size: 11.5px; }
.login__card b { display: block; font-size: 22px; margin-top: 4px; letter-spacing: -0.03em; }
.login__foot { font-size: 12px; color: rgba(255,255,255,.4); }
.login__form-wrap { display: grid; place-items: center; padding: 48px 32px; }
.login__form { width: 100%; max-width: 400px; }
.login__form h1 { margin: 0; font-size: 28px; letter-spacing: -0.04em; }
.login__form > p { margin: 8px 0 32px; color: var(--tx-3); }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--tx-2); }
.input {
  height: 50px; border-radius: 12px; border: 1px solid #dfe3ea; padding: 0 16px; background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.login__btn { width: 100%; height: 52px; border-radius: 12px; border: 0; background: var(--tx); color: #fff; font-weight: 700; font-size: 15px; margin-top: 6px; transition: background .2s; }
.login__btn:hover { background: #000; }
.login__error { min-height: 20px; color: var(--danger); font-size: 13px; margin-top: 10px; }
.login__notice {
  margin-top: 26px; border-radius: 16px; padding: 18px 18px 16px; background: #f6f8fc; border: 1px solid #e6ebf5;
}
.login__notice b { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.login__notice b::before { content: "i"; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; font-style: italic; }
.login__notice p { margin: 8px 0 14px; color: var(--tx-3); font-size: 13px; line-height: 1.65; }
.login__notice .row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 10px; background: #fff; border: 1px solid #dfe3ea; font-size: 13px; font-weight: 600; }
.chip-btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-btn:hover { border-color: #c9d0db; }
.chip-btn--accent:hover { filter: brightness(1.05); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; height: calc(100vh - 36px); }
.side { background: var(--side); color: rgba(255,255,255,.62); display: flex; flex-direction: column; padding: 20px 14px; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; color: #fff; }
.side__brand span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.side__brand b { display: block; font-size: 15px; letter-spacing: -0.02em; }
.side__brand small { font-size: 11px; color: rgba(255,255,255,.45); }
.side__group { font-size: 10.5px; letter-spacing: .14em; color: rgba(255,255,255,.3); padding: 18px 12px 8px; font-weight: 700; }
.side__link { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s; }
.side__link:hover { background: rgba(255,255,255,.05); color: #fff; }
.side__link.on { background: var(--side-2); color: #fff; box-shadow: inset 2px 0 0 var(--accent-2); }
.side__link i { font-style: normal; width: 18px; text-align: center; opacity: .85; }
.side__link em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(239,68,68,.18); color: #ff8a8a; }
.side__spacer { flex: 1; }
.side__card { margin-top: 18px; border-radius: 14px; padding: 16px; background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.08); }
.side__card b { color: #fff; font-size: 13px; }
.side__card p { margin: 6px 0 12px; font-size: 12px; line-height: 1.6; }
.side__card a { display: block; text-align: center; padding: 9px; border-radius: 10px; background: #fff; color: var(--tx); font-weight: 700; font-size: 12.5px; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { height: 64px; flex: 0 0 64px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__search { flex: 1; max-width: 420px; height: 40px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--tx-4); }
.topbar__search input { border: 0; background: transparent; outline: none; flex: 1; color: var(--tx); }
.topbar__search kbd { font-family: inherit; font-size: 11px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; position: relative; }
.icon-btn .badge-dot { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.user-chip span { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--tx); color: #fff; }
.user-chip b { font-size: 13px; display: block; line-height: 1.2; }
.user-chip small { font-size: 11px; color: var(--tx-4); }
.content { flex: 1; overflow-y: auto; padding: 28px; }

/* ---------- Page chrome ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.crumb { font-size: 12.5px; color: var(--tx-4); margin-bottom: 6px; }
.crumb a:hover { color: var(--tx-2); }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.045em; }
.page-head p { margin: 6px 0 0; color: var(--tx-3); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover { border-color: #d5dae2; }
.btn--primary { background: var(--tx); border-color: var(--tx); color: #fff; }
.btn--primary:hover { background: #000; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); } .g-3 { grid-template-columns: repeat(3, 1fr); } .g-2 { grid-template-columns: repeat(2, 1fr); }
.g-21 { grid-template-columns: 2fr 1fr; } .g-12 { grid-template-columns: 1fr 2fr; } .g-32 { grid-template-columns: 3fr 2fr; }
.card { background: var(--panel); 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: 18px 20px 0; }
.card__h h3 { margin: 0; font-size: 15px; letter-spacing: -0.03em; }
.card__h small { color: var(--tx-4); font-size: 12px; }
.card__b { padding: 16px 20px 20px; }
.card__b--flush { padding: 12px 0 4px; }

.kpi { padding: 18px 20px; position: relative; overflow: hidden; }
.kpi__label { font-size: 12.5px; color: var(--tx-3); display: flex; align-items: center; gap: 7px; }
.kpi__label i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.kpi__value { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; margin-top: 12px; }
.kpi__value small { font-size: 14px; font-weight: 600; color: var(--tx-3); margin-left: 3px; }
.kpi__delta { font-size: 12px; font-weight: 600; margin-top: 4px; color: var(--tx-3); }
.up { color: var(--ok); } .down { color: var(--danger); }
.kpi .spark { position: absolute; right: 16px; bottom: 16px; width: 96px; height: 34px; }
.kpi--alert { border-color: #fbd5d5; background: linear-gradient(180deg, #fff, #fff7f7); }
.kpi--alert .kpi__label i { background: #fde8e8; color: var(--danger); }

/* Table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--tx-3); padding: 10px 20px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap; }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; white-space: nowrap; }
.table tbody tr { transition: background .12s; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr:hover { background: #fafbfd; }
.table .sub { display: block; font-size: 12px; color: var(--tx-4); margin-top: 2px; }
.table .id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--tx-2); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.b-blue { background: #eaf0ff; color: #2c56e6; } .b-green { background: #e4f8ef; color: #0e9a6a; } .b-amber { background: #fff4df; color: #b76c00; }
.b-red { background: #fdeaea; color: #d42d2d; } .b-gray { background: #f0f2f5; color: #5b6472; } .b-violet { background: #f0ebff; color: #6541ee; } .b-cyan { background: #e2f8fb; color: #0b8ea3; }
.badge--plain::before { display: none; }

.avatar { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 800; color: #fff; vertical-align: middle; }
.person { display: inline-flex; align-items: center; gap: 9px; }

/* Filters / tabs */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 11px; }
.tabs button { border: 0; background: transparent; padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--tx-3); }
.tabs button.on { background: #fff; color: var(--tx); box-shadow: var(--shadow); }
.tabs button span { margin-left: 5px; font-size: 11.5px; color: var(--tx-4); }
.select { height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 0 12px; }
.search-sm { height: 36px; border-radius: 10px; border: 1px solid var(--line); padding: 0 12px; min-width: 220px; outline: none; }
.search-sm:focus { border-color: var(--accent); }
.toolbar .grow { flex: 1; }

/* Lists */
.list { display: grid; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-soft); }
.list__item:last-child { border-bottom: 0; }
.list__item .grow { flex: 1; min-width: 0; }
.list__item b { font-size: 13.5px; display: block; }
.list__item small { color: var(--tx-4); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }

/* Progress */
.bar { height: 8px; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 20px 38px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); }
.timeline li.done::before { background: var(--accent); }
.timeline li.wait::before { border-color: var(--line); }
.timeline b { font-size: 13.5px; }
.timeline small { display: block; color: var(--tx-4); font-size: 12px; margin-top: 2px; }
.timeline p { margin: 6px 0 0; font-size: 13px; color: var(--tx-2); }

/* Key-value */
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 16px; font-size: 13.5px; }
.kv dt { color: var(--tx-4); } .kv dd { margin: 0; font-weight: 500; }

/* Photos */
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.photo { aspect-ratio: 4/3; border-radius: 12px; position: relative; overflow: hidden; background: #dde3ec; }
.photo span { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); padding: 2px 8px; border-radius: 999px; }

/* Checklist */
.check-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.check-row:last-child { border-bottom: 0; }
.check-row .res { margin-left: auto; }
.check-box { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: var(--ok); flex: 0 0 20px; }
.check-box.ng { background: var(--danger); }
.check-box.na { background: var(--tx-4); }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.lane { background: #eef0f4; border-radius: 16px; padding: 12px; }
.lane__h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 12px; font-weight: 700; font-size: 13.5px; }
.lane__h span { font-size: 12px; color: var(--tx-3); background: #fff; padding: 1px 8px; border-radius: 999px; }
.ticket { background: #fff; border-radius: 12px; padding: 13px; border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 9px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.ticket:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(16,24,40,.25); }
.ticket b { display: block; font-size: 13.5px; margin: 6px 0 4px; letter-spacing: -0.02em; }
.ticket small { color: var(--tx-4); font-size: 12px; }
.ticket__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal__h { padding: 10px; font-size: 12px; font-weight: 700; color: var(--tx-3); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fafbfc; }
.cal__d { min-height: 104px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 12px; }
.cal__d.muted { background: #fafbfc; color: var(--tx-4); }
.cal__d.today { background: #f5f8ff; }
.cal__d.today .n { background: var(--accent); color: #fff; }
.cal__d .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-weight: 700; }
.cal__ev { display: block; margin-top: 4px; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Map (가상의 지도) */
.map {
  position: relative; border-radius: 12px; overflow: hidden; height: 100%; min-height: 300px;
  background:
    linear-gradient(115deg, transparent 47%, #d8e6f5 47.5%, #d8e6f5 52%, transparent 52.5%),
    linear-gradient(25deg, transparent 58%, #fff 58.3%, #fff 60%, transparent 60.3%),
    linear-gradient(160deg, transparent 30%, #fff 30.3%, #fff 31.6%, transparent 31.9%),
    linear-gradient(70deg, transparent 72%, #fff 72.3%, #fff 73.4%, transparent 73.7%),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(255,255,255,.7) 46px 48px),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(255,255,255,.7) 58px 60px),
    #e9eef3;
}
.pin { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; }
.pin b { padding: 4px 9px; border-radius: 999px; background: var(--tx); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
.pin::after { content: ""; width: 10px; height: 10px; margin-top: -4px; transform: rotate(45deg); background: var(--tx); border-radius: 2px; }
.pin.p-accent b, .pin.p-accent::after { background: var(--accent); }
.pin.p-red b, .pin.p-red::after { background: var(--danger); }
.pin.p-green b, .pin.p-green::after { background: var(--ok); }
.pin.p-amber b, .pin.p-amber::after { background: var(--warn); }

/* Drawer / modal */
.drawer-back { position: fixed; inset: 0; background: rgba(10,15,28,.35); backdrop-filter: blur(2px); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-back.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100%); background: #fff; z-index: 61; transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.7,.2,1); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.drawer.on { transform: none; }
.drawer__h { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.drawer__h h3 { margin: 0; font-size: 17px; }
.drawer__b { padding: 22px 24px; overflow-y: auto; flex: 1; }
.drawer__f { padding: 16px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px); background: var(--tx); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600; opacity: 0; transition: all .25s; z-index: 80; box-shadow: var(--shadow-lg); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* AI block */
.ai-box { border-radius: 14px; padding: 16px; background: linear-gradient(135deg, #f4f6ff, #eefbfd); border: 1px solid #e0e7fb; }
.ai-box__h { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; }
.ai-box__h i { font-style: normal; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.ai-box p { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--tx-2); }
.ai-box ul { margin: 10px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.8; color: var(--tx-2); }

.empty { padding: 40px; text-align: center; color: var(--tx-4); }
.muted { color: var(--tx-4); }
.mt-16 { margin-top: 16px; } .mt-8 { margin-top: 8px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--tx-3); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }

/* SVG charts */
.chart { width: 100%; display: block; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--tx-4); }
.chart .gridline { stroke: #eef0f4; stroke-width: 1; }

/* Mobile */
.side-toggle { display: none; }
@media (max-width: 1180px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .kanban { grid-template-columns: repeat(2, minmax(240px, 1fr)); } }
@media (max-width: 960px) {
  .login { grid-template-columns: 1fr; }
  .login__art { padding: 36px 28px; min-height: 280px; }
  .login__headline { font-size: 30px; }
  .login__cards { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; top: 36px; bottom: 0; left: 0; width: 260px; z-index: 70; transform: translateX(-100%); transition: transform .25s; }
  .side.on { transform: none; }
  .side-toggle { display: grid; }
  .topbar { padding: 0 16px; }
  .topbar__search { display: none; }
  .content { padding: 18px 16px; }
  .g-3, .g-2, .g-21, .g-12, .g-32 { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .user-chip div { display: none; }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .demo-ribbon { font-size: 11px; gap: 8px; }
  .demo-ribbon .hide-sm { display: none; }
}
@media (max-width: 560px) { .g-4 { grid-template-columns: 1fr 1fr; } .kpi__value { font-size: 24px; } .kanban { grid-template-columns: 1fr; } }

/* Icons */
.i { width: 1em; height: 1em; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: inline-block; vertical-align: middle; flex: none; }
.side__link i .i { width: 17px; height: 17px; }
.kpi__label i .i { width: 15px; height: 15px; }
.icon-btn .i { width: 18px; height: 18px; }
.btn .i { width: 15px; height: 15px; }
.topbar__search .i { width: 16px; height: 16px; }
.list__item .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.list__item .ico .i { width: 17px; height: 17px; }

/* KPI 스파크라인은 우측 상단 */
.kpi .spark { top: 18px; bottom: auto; right: 18px; width: 84px; height: 30px; }
/* 현장 사진 샘플 패턴 */
.photo.ph-a::after { content: ""; position: absolute; inset: 20% 18%; border-radius: 8px; border: 2px solid rgba(255,255,255,.5); background: repeating-linear-gradient(90deg, rgba(255,255,255,.18) 0 5px, transparent 5px 11px); }
.photo.ph-b::after { content: ""; position: absolute; left: 32%; top: 24%; width: 36%; height: 52%; border-radius: 50%; border: 3px solid #ffd166; box-shadow: 0 0 0 7px rgba(255,209,102,.25); }
.photo.ph-c::after { content: ""; position: absolute; left: 20%; right: 20%; top: 42%; height: 16%; border-radius: 999px; background: rgba(20,20,20,.55); box-shadow: 0 0 0 3px rgba(255,255,255,.35); }
.photo.ph-d::after { content: "✓"; position: absolute; right: 10px; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #10b981; color: #fff; font-size: 13px; font-weight: 800; }
.photo.ph-d::before { content: ""; position: absolute; inset: 20% 18%; border-radius: 8px; border: 2px solid rgba(255,255,255,.55); background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 5px, transparent 5px 11px); }

/* ---------- Dark theme (관제형) ---------- */
body.theme-dark { --bg: #060a14; --panel: #0d1424; --line: rgba(255,255,255,.08); --line-soft: rgba(255,255,255,.05); --tx: #eef1f6; --tx-2: #cdd3de; --tx-3: #8a94a6; --tx-4: #667085; --side: #04070f; --side-2: #111a2e; --shadow: 0 1px 0 rgba(255,255,255,.02); }
body.theme-dark .topbar { background: rgba(6,10,20,.85); }
body.theme-dark .topbar__search { background: #0d1424; }
body.theme-dark .topbar__search kbd { background: #111a2e; }
body.theme-dark .icon-btn, body.theme-dark .user-chip, body.theme-dark .btn, body.theme-dark .select, body.theme-dark .search-sm { background: #0d1424; color: var(--tx); border-color: var(--line); }
body.theme-dark .btn--primary { background: #fff; color: #0b1020; border-color: #fff; }
body.theme-dark .btn--primary:hover { background: #e5e7eb; }
body.theme-dark .user-chip span { background: #fff; color: #0b1020; }
body.theme-dark .table th { background: #0a1120; }
body.theme-dark .table tbody tr:hover { background: rgba(255,255,255,.025); }
body.theme-dark .tabs { background: #0a1120; }
body.theme-dark .tabs button.on { background: #1a2338; color: #fff; }
body.theme-dark .kpi--alert { border-color: rgba(251,113,133,.3); background: linear-gradient(180deg, #0d1424, #1a1020); }
body.theme-dark .bar { background: rgba(255,255,255,.07); }
body.theme-dark .b-blue { background: rgba(99,132,255,.16); color: #a5b8ff; } body.theme-dark .b-green { background: rgba(16,185,129,.16); color: #5eead4; }
body.theme-dark .b-amber { background: rgba(245,158,11,.16); color: #fcd34d; } body.theme-dark .b-red { background: rgba(251,113,133,.16); color: #fda4af; }
body.theme-dark .b-gray { background: rgba(255,255,255,.08); color: #aab3c2; } body.theme-dark .b-violet { background: rgba(139,120,255,.18); color: #c4b5fd; } body.theme-dark .b-cyan { background: rgba(45,212,191,.15); color: #5eead4; }
body.theme-dark .ai-box { background: linear-gradient(135deg, rgba(109,93,252,.14), rgba(45,212,191,.07)); border-color: rgba(139,120,255,.25); }
body.theme-dark .chart .gridline { stroke: rgba(255,255,255,.06); }
body.theme-dark .chart text { fill: #667085; }
body.theme-dark .drawer { background: #0b1222; color: var(--tx); }
body.theme-dark .drawer__h, body.theme-dark .drawer__f { border-color: var(--line); }
body.theme-dark .toast { background: #fff; color: #0b1020; }
body.theme-dark .timeline li::before { background: #0d1424; }
body.theme-dark .timeline li.done::before { background: var(--accent); }

/* 관제 배치도 */
.plant { position: relative; border-radius: 12px; height: 100%; min-height: 420px;
  background: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0/28px 28px, linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0/28px 28px, #0a1122; }
.plant__room { position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 10px; font-size: 11.5px; color: rgba(255,255,255,.5); font-weight: 600; }
.node { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 5px; cursor: pointer; }
.node b { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #04120f; background: #2dd4bf; box-shadow: 0 0 0 5px rgba(45,212,191,.16); transition: transform .15s; }
.node:hover b { transform: scale(1.1); }
.node small { font-size: 10.5px; color: rgba(255,255,255,.65); white-space: nowrap; background: rgba(4,7,15,.7); padding: 1px 7px; border-radius: 999px; }
.node.warn b { background: #fbbf24; box-shadow: 0 0 0 5px rgba(251,191,36,.18); }
.node.alarm b { background: #fb7185; color: #fff; box-shadow: 0 0 0 5px rgba(251,113,133,.22), 0 0 22px rgba(251,113,133,.6); animation: nodePulse 1.6s infinite; }
.node.off b { background: #475569; color: #e2e8f0; box-shadow: none; }
@keyframes nodePulse { 50% { box-shadow: 0 0 0 10px rgba(251,113,133,.1), 0 0 28px rgba(251,113,133,.7); } }
.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; color: #5eead4; }
.live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2dd4bf; box-shadow: 0 0 10px #2dd4bf; animation: liveBlink 1.6s infinite; }
@keyframes liveBlink { 50% { opacity: .3; } }
.gauge { text-align: center; }
.gauge svg { width: 100%; max-width: 170px; margin: 0 auto; }
.gauge b { display: block; font-size: 26px; letter-spacing: -0.04em; margin-top: -40px; }
.gauge small { color: var(--tx-4); }
.ctrl-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.ctrl-row:last-child { border-bottom: 0; }
.switch { width: 44px; height: 26px; border-radius: 999px; background: #334155; position: relative; border: 0; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch.on { background: var(--accent); } .switch.on::after { left: 21px; }
.stepper-a { display: flex; align-items: center; gap: 10px; }
.stepper-a button { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--tx); font-size: 16px; }
.stepper-a b { min-width: 52px; text-align: center; font-size: 16px; }
.score { display: flex; align-items: center; gap: 12px; }
.score .bar { flex: 1; }
body.theme-dark .login { background: #070b16; }
body.theme-dark .input { background: #0d1424; border-color: var(--line); color: var(--tx); }
body.theme-dark .login__notice { background: #0d1424; border-color: var(--line); }
body.theme-dark .chip-btn { background: #111a2e; border-color: var(--line); color: var(--tx); }
body.theme-dark .chip-btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
body.theme-dark .login__btn { background: #fff; color: #0b1020; }
.side__card a { color: #0b1020; }
