/* ==========================================================================
   AILO Dashboard D01 — 랩노트 (연구실 운영)
   원형: 좌측 사이드바 + 주간 캘린더 중심 / 타이포: Pretendard + IBM Plex Mono(코드·시각)
   컬러: 화이트 + 인디고, 장비 식별 5색(검증된 범주 팔레트), 상태색은 아이콘+라벨과 함께
   ========================================================================== */

:root {
  --ailo-bg: #f5f6fb;
  --ailo-fg: #16173a;
  --ailo-muted: #5f6282;
  --ailo-line: #e5e7f1;
  --ailo-accent: #4f46e5;

  --d01-surface: #ffffff;
  --d01-ind-50: #f0f1ff;
  --d01-ind-100: #e2e4ff;
  --d01-ind-200: #b9bdf7;
  --d01-ind-700: #3730a3;
  --d01-ind-900: #1e1b5c;
  --d01-grid: #eceef5;
  --d01-axis: #cfd2e2;
  --d01-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 장비 식별(범주) — validate_palette 통과 순서 */
  --d01-s1: #4f46e5;
  --d01-s2: #eb6834;
  --d01-s3: #1baf7a;
  --d01-s4: #eda100;
  --d01-s5: #e87ba4;

  /* 상태 — 색만으로 의미를 싣지 않음(아이콘+라벨) */
  --d01-good: #0ca30c;
  --d01-warn: #fab219;
  --d01-crit: #d03b3b;
  --d01-good-ink: #0a6b1f;
  --d01-warn-ink: #855600;
  --d01-crit-ink: #b02727;

  --d01-sb: 252px;
  --d01-sb-mini: 76px;
  --d01-radius: 14px;
  --d01-gap: clamp(14px, 1.6vw, 22px);
  --d01-shadow: 0 1px 2px rgba(22, 23, 58, .04), 0 6px 20px -12px rgba(22, 23, 58, .12);
}

body { background: var(--ailo-bg); font-size: 14px; }
.mono, time { font-family: var(--d01-mono); font-feature-settings: "zero" 0; }

/* ===== Shell ===== */
.lab { display: flex; min-height: 100vh; }
.lab__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; padding: clamp(16px, 2.2vw, 30px); padding-top: clamp(18px, 2vw, 26px); display: flex; flex-direction: column; gap: var(--d01-gap); }

/* ===== Sidebar ===== */
.sb {
  position: sticky; top: 0; height: 100vh; flex: 0 0 var(--d01-sb); width: var(--d01-sb);
  background: var(--d01-surface); border-right: 1px solid var(--ailo-line);
  display: flex; flex-direction: column; padding: 18px 14px 14px; gap: 14px;
  transition: width .3s var(--ailo-ease), flex-basis .3s var(--ailo-ease);
  overflow-y: auto; overflow-x: hidden; z-index: 30;
}
.sb__head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.sb__logo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb__mark {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 38px;
  display: grid; place-items: center; color: #fff; font-size: 16px;
  background: linear-gradient(140deg, #6d64f2, var(--ailo-accent) 55%, var(--d01-ind-700));
  box-shadow: 0 6px 14px -6px rgba(79, 70, 229, .6);
}
.sb__name { font-weight: 800; font-size: 17px; letter-spacing: -.02em; line-height: 1.15; white-space: nowrap; }
.sb__name small { display: block; font-weight: 500; font-size: 11.5px; color: var(--ailo-muted); letter-spacing: 0; }
.sb__close { display: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--d01-ind-50); color: var(--ailo-fg); }

.sb__nav { display: flex; flex-direction: column; gap: 2px; }
.sb__group { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: #8a8daa; 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: #3d4063; font-weight: 500; white-space: nowrap;
  transition: background .2s, color .2s;
}
.sb__nav a i { width: 20px; text-align: center; font-size: 15px; color: #8a8daa; transition: color .2s; }
.sb__nav a:hover { background: var(--d01-ind-50); color: var(--ailo-fg); }
.sb__nav a:hover i { color: var(--ailo-accent); }
.sb__nav a.is-active { background: var(--d01-ind-50); color: var(--d01-ind-700); font-weight: 700; }
.sb__nav a.is-active i { color: var(--ailo-accent); }
.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(--ailo-accent); }
.sb__nav em {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: 10px; display: inline-grid; place-items: center; background: var(--d01-ind-100); color: var(--d01-ind-700);
}
.sb__nav em.is-warn { background: #fdecec; color: var(--d01-crit-ink); }

.sb__card { margin-top: auto; border: 1px solid var(--ailo-line); border-radius: 12px; padding: 12px 14px; background: linear-gradient(180deg, var(--d01-ind-50), #fff); }
.sb__card-t { font-size: 12px; font-weight: 700; color: var(--d01-ind-700); margin-bottom: 6px; white-space: nowrap; }
.sb__temps li { display: flex; justify-content: space-between; font-size: 12px; padding: 3px 0; color: var(--ailo-muted); white-space: nowrap; gap: 8px; }
.sb__temps b { font-family: var(--d01-mono); font-weight: 500; color: var(--ailo-fg); }

.sb__collapse {
  display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px;
  color: var(--ailo-muted); font-size: 13px; white-space: nowrap;
}
.sb__collapse i { width: 20px; text-align: center; transition: rotate .3s var(--ailo-ease); }
.sb__collapse:hover { background: var(--d01-ind-50); color: var(--ailo-fg); }

/* collapsed (desktop) */
@media (min-width: 992px) {
  .lab.sb-collapsed .sb { flex-basis: var(--d01-sb-mini); width: var(--d01-sb-mini); }
  .lab.sb-collapsed .sb__name,
  .lab.sb-collapsed .sb__nav span,
  .lab.sb-collapsed .sb__nav em,
  .lab.sb-collapsed .sb__card,
  .lab.sb-collapsed .sb__collapse span { display: none; }
  .lab.sb-collapsed .sb__group { font-size: 0; padding: 10px 0 4px; border-top: 1px solid var(--ailo-line); margin: 6px 8px 0; }
  .lab.sb-collapsed .sb__nav a { justify-content: center; padding: 11px 0; }
  .lab.sb-collapsed .sb__head { justify-content: center; padding: 0; }
  .lab.sb-collapsed .sb__collapse { justify-content: center; margin-top: auto; }
  .lab.sb-collapsed .sb__collapse i { rotate: 180deg; }
}
.sb-dim { display: none; }

/* ===== Topbar ===== */
.tb {
  position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; gap: 18px;
  padding: 0 clamp(16px, 2.2vw, 30px); background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ailo-line);
}
.tb__burger { color: var(--ailo-fg); margin-left: -8px; }
.tb__title { min-width: 0; }
.tb__crumb { display: flex; gap: 6px; font-size: 12px; color: var(--ailo-muted); white-space: nowrap; }
.tb__crumb li + li::before { content: "/"; margin-right: 6px; color: var(--d01-axis); }
.tb__crumb a:hover { color: var(--ailo-accent); }
.tb__page { font-weight: 700; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.tb__search { position: relative; flex: 1 1 auto; max-width: 440px; margin-left: auto; }
.tb__search i { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: #8a8daa; font-size: 13px; }
.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: 13px; color: var(--ailo-fg); transition: border-color .2s, box-shadow .2s, background .2s;
}
.tb__search input::placeholder { color: #8a8daa; }
.tb__search input:focus { outline: none; background: #fff; border-color: var(--ailo-accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.tb__search kbd { position: absolute; right: 10px; top: 50%; translate: 0 -50%; font: 500 11px var(--d01-mono); color: var(--ailo-muted); background: #fff; border: 1px solid var(--ailo-line); border-radius: 5px; padding: 1px 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; color: var(--ailo-fg); }
.tb__icon:hover { border-color: var(--d01-ind-200); color: var(--ailo-accent); }
.tb__badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--d01-crit); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.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(--d01-ind-50); }
.tb__who b { display: block; font-size: 13px; line-height: 1.2; }
.tb__who small { font-size: 11.5px; color: var(--ailo-muted); white-space: nowrap; }

.ava {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  background: #e8f5ef; color: #0e6b47;
}
.ava--me { background: var(--d01-ind-100); color: var(--d01-ind-700); }
.ava--b { background: #fdeee6; color: #9a3d12; }
.ava--c { background: #fdf0d2; color: #7a5200; }
.ava--sys { background: #eceef5; color: var(--ailo-muted); font-size: 12px; }

/* dropdown */
.dd { position: relative; }
.dd__panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 340px; background: #fff; border: 1px solid var(--ailo-line);
  border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(22, 23, 58, .28); z-index: 50; overflow: hidden;
}
.dd__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ailo-line); }
.dd__link { border: 0; background: none; font-size: 12px; color: var(--ailo-accent); font-weight: 600; }
.dd__list li { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--d01-grid); }
.dd__list li:last-child { border-bottom: 0; }
.dd__list li:hover { background: var(--d01-ind-50); }
.dd__list b { font-size: 13px; display: block; }
.dd__list p { font-size: 12px; color: var(--ailo-muted); }
.dd__list time { font-size: 11px; color: #8a8daa; }
.dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; }
.dot--crit { background: var(--d01-crit); }
.dot--warn { background: var(--d01-warn); }
.dot--ok { background: var(--d01-good); }
.dot--info { background: var(--ailo-accent); }

/* ===== Page head ===== */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ph__t { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.ph__d { color: var(--ailo-muted); font-size: 13px; margin-top: 4px; }
.ph__d i { color: var(--ailo-accent); margin-right: 2px; }
.ph__tools { display: flex; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: #fff; border: 1px solid var(--ailo-line); }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ailo-muted); white-space: nowrap; transition: background .2s, color .2s; }
.seg button:hover { color: var(--ailo-fg); }
.seg button[aria-pressed="true"] { background: var(--ailo-accent); color: #fff; box-shadow: 0 4px 10px -4px rgba(79, 70, 229, .6); }
.btn-ind { border: 0; border-radius: 10px; background: var(--d01-ind-900); color: #fff; padding: 0 16px; height: 40px; font-weight: 600; font-size: 13px; white-space: nowrap; transition: background .2s; }
.btn-ind:hover { background: var(--ailo-accent); }
.btn-line { border: 1px solid var(--ailo-line); background: #fff; border-radius: 9px; height: 36px; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--ailo-fg); white-space: nowrap; }
.btn-line:hover { border-color: var(--d01-ind-200); color: var(--ailo-accent); }

/* ===== Cards ===== */
.card { background: var(--d01-surface); border: 1px solid var(--ailo-line); border-radius: var(--d01-radius); padding: clamp(16px, 1.6vw, 22px); box-shadow: var(--d01-shadow); min-width: 0; }
.card__h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card__t { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.card__s { font-size: 12px; color: var(--ailo-muted); margin-top: 2px; }
.card__more { font-size: 12.5px; color: var(--ailo-accent); font-weight: 600; white-space: nowrap; }
.card__more:hover { color: var(--d01-ind-700); text-decoration: underline; }

/* ===== KPI ===== */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--d01-gap); }
.kpi { background: var(--d01-surface); border: 1px solid var(--ailo-line); border-radius: var(--d01-radius); padding: 16px 18px 12px; box-shadow: var(--d01-shadow); display: flex; flex-direction: column; min-width: 0; }
.kpi__l { font-size: 12.5px; font-weight: 600; color: var(--ailo-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi__l i { color: var(--ailo-accent); width: 16px; }
.kpi__v { margin-top: 6px; display: flex; align-items: baseline; gap: 4px; }
.kpi__v b { font-size: clamp(24px, 2vw, 30px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi__v span { font-size: 13px; color: var(--ailo-muted); font-weight: 600; }
.kpi__d { font-size: 12px; margin-top: 4px; display: flex; flex-wrap: wrap; gap: 0 4px; align-items: baseline; }
.kpi__d b { font-weight: 700; }
.kpi__d small { color: var(--ailo-muted); font-size: 11.5px; }
.kpi__d.is-good { color: var(--d01-good-ink); }
.kpi__d.is-bad { color: var(--d01-crit-ink); }
.spark { width: 100%; height: 36px; margin-top: 10px; overflow: visible; }
.spark__l { fill: none; stroke: var(--d01-ind-200); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark__a { fill: var(--ailo-accent); opacity: .08; }
.spark__d { fill: var(--ailo-accent); stroke: #fff; stroke-width: 2; vector-effect: non-scaling-stroke; }

/* ===== Calendar ===== */
.cal__h { align-items: center; flex-wrap: wrap; }
.cal__nav { display: flex; align-items: center; gap: 6px; }
.cal__wk { font-weight: 700; font-size: 13px; min-width: 76px; text-align: center; }
.ic-btn { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--ailo-line); background: #fff; color: var(--ailo-muted); font-size: 12px; }
.ic-btn:hover { color: var(--ailo-accent); border-color: var(--d01-ind-200); }
.cal__legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.lg {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--ailo-line); background: #fff; border-radius: 999px;
  padding: 5px 12px 5px 9px; font-size: 12.5px; font-weight: 600; color: var(--ailo-fg); transition: opacity .2s, border-color .2s;
}
.lg small { font-weight: 500; color: var(--ailo-muted); font-family: var(--d01-mono); font-size: 11px; }
.lg__sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); border: 2px solid var(--c); }
.lg:hover { border-color: var(--c); }
.lg[aria-pressed="false"] { opacity: .55; }
.lg[aria-pressed="false"] .lg__sw { background: transparent; }
.lg[aria-pressed="false"] { text-decoration: line-through; text-decoration-color: var(--ailo-muted); }

.cal__scroll { overflow-x: auto; border: 1px solid var(--ailo-line); border-radius: 12px; overscroll-behavior-x: contain; }
.cal__grid {
  --hour: 50px;
  display: grid; grid-template-columns: 58px repeat(6, minmax(132px, 1fr)); grid-template-rows: 54px calc(var(--rows) * var(--hour));
  min-width: 850px; position: relative;
}
.cal__corner { border-bottom: 1px solid var(--ailo-line); background: #fafbfe; }
.cal__day { border-bottom: 1px solid var(--ailo-line); border-left: 1px solid var(--ailo-line); display: flex; align-items: center; justify-content: center; gap: 8px; background: #fafbfe; }
.cal__day span { font-size: 12px; color: var(--ailo-muted); font-weight: 600; }
.cal__day b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.cal__day.is-today { background: var(--d01-ind-50); }
.cal__day.is-today b { background: var(--ailo-accent); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; }
.cal__day.is-today span { color: var(--d01-ind-700); }
.cal__times { display: grid; grid-auto-rows: var(--hour); background: #fafbfe; }
.cal__times span { font: 500 10.5px var(--d01-mono); color: #8a8daa; text-align: right; padding: 4px 8px 0 0; border-top: 1px solid var(--d01-grid); }
.cal__times span:first-child { border-top: 0; }
.cal__col {
  position: relative; border-left: 1px solid var(--ailo-line);
  background-image: repeating-linear-gradient(to bottom, var(--d01-grid) 0 1px, transparent 1px var(--hour));
}
.cal__col.is-today { background-color: rgba(240, 241, 255, .6); }
.ev {
  --pad: 3px;
  position: absolute; left: calc(var(--lane, 0) * 100% / var(--n, 1) + var(--pad)); width: calc(100% / var(--n, 1) - var(--pad) * 2);
  border: 0; border-left: 3px solid var(--c); border-radius: 6px; padding: 5px 7px; text-align: left; overflow: hidden;
  background: color-mix(in srgb, var(--c) 13%, #fff); color: var(--ailo-fg); display: flex; flex-direction: column; gap: 1px;
  transition: box-shadow .2s, translate .2s; line-height: 1.3; margin-top: 1px;
}
.ev:hover, .ev:focus-visible { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--c) 70%, #000); translate: 0 -1px; z-index: 2; }
.ev b { font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev span { font: 500 10.5px var(--d01-mono); color: var(--ailo-muted); white-space: nowrap; }
.ev em { font-style: normal; font-size: 11px; color: #3d4063; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev--slim { padding: 4px 5px; }
.ev--slim b { font-size: 10.5px; }
.ev--slim span, .ev--slim em { display: none; }
.ev--pending { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, #fff) 0 6px, #fff 6px 10px); outline: 1px dashed var(--c); outline-offset: -1px; }
.cal__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--d01-crit); z-index: 3; pointer-events: none; }
.cal__now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--d01-crit); border: 2px solid #fff; }
.cal__now span { position: absolute; right: 4px; top: -20px; font: 600 10px var(--d01-mono); color: #fff; background: var(--d01-crit); padding: 1px 6px; border-radius: 4px; }

/* ===== Rows ===== */
.row-charts { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: var(--d01-gap); }
.row-data { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--d01-gap); align-items: start; }
.row-bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--d01-gap); }

.row-charts .card { display: flex; flex-direction: column; }
.row-charts .chart { flex: 1 1 auto; }
.chart { position: relative; height: 250px; min-height: 250px; }
.chart--bar { height: 262px; min-height: 262px; }
.card--exp .chart { height: 300px; }

/* today timeline */
.tl { position: relative; display: flex; flex-direction: column; }
.tl li { position: relative; display: grid; grid-template-columns: 46px 1fr auto; gap: 10px; align-items: start; padding: 9px 0 9px 0; border-bottom: 1px solid var(--d01-grid); }
.tl li:last-child { border-bottom: 0; }
.tl time { font-size: 12px; font-weight: 600; color: var(--ailo-muted); padding-top: 1px; }
.tl b { font-size: 13px; font-weight: 600; display: block; line-height: 1.35; }
.tl p { font-size: 11.5px; color: var(--ailo-muted); }
.tl li.is-done b { color: var(--ailo-muted); text-decoration: line-through; text-decoration-color: var(--d01-axis); }
.tl li.is-now { background: var(--d01-ind-50); margin: 0 -10px; padding-inline: 10px; border-radius: 10px; border-bottom-color: transparent; }
.tl li.is-now time { color: var(--ailo-accent); }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: #eef0f6; color: var(--ailo-muted); white-space: nowrap; }
.chip--ok { background: #e6f6e9; color: var(--d01-good-ink); }
.chip--info { background: var(--d01-ind-100); color: var(--d01-ind-700); }
.chip--warn { background: #fff3d6; color: var(--d01-warn-ink); }
.chip--crit { background: #fdecec; color: var(--d01-crit-ink); }

/* ===== Table ===== */
.tbl-card__h { flex-wrap: wrap; }
.tbl-tools { display: flex; gap: 8px; align-items: center; }
.tbl-search { position: relative; }
.tbl-search i { position: absolute; left: 11px; top: 50%; translate: 0 -50%; font-size: 12px; color: #8a8daa; }
.tbl-search input { height: 36px; border: 1px solid var(--ailo-line); border-radius: 9px; padding: 0 12px 0 32px; font-size: 12.5px; width: 210px; max-width: 100%; color: var(--ailo-fg); background: var(--ailo-bg); }
.tbl-search input:focus { outline: none; border-color: var(--ailo-accent); background: #fff; box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.tbl-scroll { overflow-x: auto; margin: 0 calc(clamp(16px, 1.6vw, 22px) * -1); padding: 0 clamp(16px, 1.6vw, 22px); }
.tbl { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ailo-muted); border-bottom: 1px solid var(--ailo-line); padding: 0; background: #fafbfe; }
.tbl th:first-child { border-radius: 8px 0 0 8px; }
.tbl th:last-child { border-radius: 0 8px 8px 0; }
.tbl th button { border: 0; background: transparent; width: 100%; text-align: left; padding: 10px 10px; color: inherit; font-weight: 600; white-space: nowrap; }
.tbl th button i { font-size: 10px; margin-left: 4px; color: var(--d01-axis); }
.tbl th button:hover, .tbl th[aria-sort] button { color: var(--ailo-fg); }
.tbl th[aria-sort] button i { color: var(--ailo-accent); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--d01-grid); vertical-align: middle; white-space: nowrap; }
.tbl td b { font-weight: 600; display: block; }
.tbl td small { font-size: 11.5px; color: var(--ailo-muted); }
.tbl td.mono { font-size: 12px; color: #3d4063; }
.tbl tbody tr:hover td { background: var(--d01-ind-50); }
.lvl { display: inline-block; width: 44px; height: 6px; border-radius: 3px; background: var(--d01-ind-100); margin-right: 8px; vertical-align: middle; overflow: hidden; }
.lvl i { display: block; height: 100%; width: var(--v); background: var(--ailo-accent); border-radius: 3px; }
.lvl.is-low { background: #fbe1e1; }
.lvl.is-low i { background: var(--d01-crit); }
.bdg { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.bdg i { font-size: 10.5px; }
.bdg--ok { background: #e6f6e9; color: var(--d01-good-ink); }
.bdg--warn { background: #fff3d6; color: var(--d01-warn-ink); }
.bdg--crit { background: #fdecec; color: var(--d01-crit-ink); }
.bdg--info { background: var(--d01-ind-100); color: var(--d01-ind-700); }
.tbl-empty { text-align: center; color: var(--ailo-muted); padding: 28px 0; font-size: 13px; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager p { font-size: 12.5px; color: var(--ailo-muted); }
.pager ul { display: flex; gap: 4px; }
.pager nav a, .pager nav span { min-width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 600; color: var(--ailo-muted); padding: 0 6px; }
.pager nav a:hover { background: var(--d01-ind-50); color: var(--ailo-accent); }
.pager nav a.is-on { background: var(--ailo-accent); color: #fff; }

/* ===== Papers ===== */
.papers { display: flex; flex-direction: column; }
.papers li { padding: 13px 0; border-bottom: 1px solid var(--d01-grid); }
.papers li:first-child { padding-top: 2px; }
.papers li:last-child { border-bottom: 0; padding-bottom: 0; }
.papers__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.papers__top b { font-size: 13.5px; font-weight: 600; }
.papers__meta { font-size: 12px; color: var(--ailo-muted); margin: 3px 0 9px; }
.steps { display: flex; gap: 4px; }
.steps li { flex: 1; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--d01-ind-100); }
.steps li.on { background: var(--ailo-accent); }
.steps li.cur { background: repeating-linear-gradient(135deg, var(--ailo-accent) 0 4px, var(--d01-ind-200) 4px 8px); }
.meter { height: 6px; border-radius: 3px; background: var(--d01-ind-100); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--v); background: var(--ailo-accent); border-radius: 3px; }

/* ===== Log ===== */
.log li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--d01-grid); }
.log li:last-child { border-bottom: 0; }
.log p { font-size: 13px; line-height: 1.5; color: #3d4063; }
.log p b { color: var(--ailo-fg); }
.log em { font-style: normal; font-weight: 600; color: var(--d01-ind-700); }
.log time { font-size: 11.5px; color: #8a8daa; padding-top: 2px; }

/* ===== Footer ===== */
.ft { display: flex; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 18px clamp(16px, 2.2vw, 30px) 24px; font-size: 12px; color: var(--ailo-muted); border-top: 1px solid var(--ailo-line); }
.ft__links { display: flex; gap: 16px; }
.ft__links a:hover { color: var(--ailo-accent); }

/* ===== Responsive ===== */
@media (max-width: 1399.98px) {
  .row-charts { grid-template-columns: 1fr 1fr; }
  .row-charts .today { grid-row: span 2; }
  .row-data { grid-template-columns: 1fr; }
  .card--exp .chart { height: 260px; }
}
@media (max-width: 1199.98px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .sb {
    position: fixed; left: 0; top: 0; bottom: 0; height: auto; width: min(290px, 86vw); z-index: 200;
    transform: translateX(-100%); visibility: hidden; transition: transform .32s var(--ailo-ease), visibility .32s;
    box-shadow: 20px 0 40px -20px rgba(22, 23, 58, .35);
  }
  .lab.sb-open .sb { transform: none; visibility: visible; transition: transform .32s var(--ailo-ease), visibility 0s; } /* 열 때 visibility 즉시 → 곧바로 포커스 가능 */
  .sb__close { display: grid; place-items: center; }
  .sb__collapse { display: none; }
  .sb-dim {
    display: block; position: fixed; inset: 0; z-index: 190; background: rgba(22, 23, 58, .42);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .lab.sb-open .sb-dim { opacity: 1; visibility: visible; }
  .tb { gap: 12px; }
  .row-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .tb__search { display: none; }
  .tb__actions { margin-left: auto; }
  .row-charts { grid-template-columns: 1fr; }
  .row-charts .today { grid-row: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:last-child { grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  body { font-size: 13.5px; }
  .tb { height: 60px; }
  .tb__who { display: none; }
  .tb__page { font-size: 15px; }
  .dd__panel { position: fixed; left: 12px; right: 12px; top: 66px; width: auto; }
  .ph__tools { width: 100%; }
  .seg { flex: 1; }
  .seg button { flex: 1; padding: 7px 6px; }
  .btn-ind { width: 100%; }
  .kpi { padding: 13px 14px 10px; }
  .kpi__d small { display: block; width: 100%; }
  .tbl-tools { width: 100%; }
  .tbl-search { flex: 1; }
  .tbl-search input { width: 100%; }
  .tl li { grid-template-columns: 42px 1fr; }
  .tl li .chip { grid-column: 2; justify-self: start; }
  .log li { grid-template-columns: 30px 1fr; }
  .log time { grid-column: 2; padding: 0; }
  .ava { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
  .pager { justify-content: center; }
  .ft { justify-content: center; text-align: center; }
}
