:root {
  --text: #1d1d1f;
  --text-soft: #3a3a3c;
  --secondary: #6e6e73;
  --tertiary: #8e8e93;
  --separator: rgba(60, 60, 67, 0.16);
  --separator-soft: rgba(60, 60, 67, 0.09);
  --canvas: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.82);
  --solid: #ffffff;
  --accent: #0071e3;
  --accent-pressed: #0062c4;
  --accent-soft: #eaf3ff;
  --green: #248a3d;
  --green-soft: #edf8ef;
  --orange: #b25e09;
  --orange-soft: #fff4e5;
  --red: #d12f3f;
  --red-soft: #fff0f1;
  --radius-sm: 5px;
  --radius-md: 7px;
  --radius-lg: 8px;
  --shadow-hairline: 0 0 0 1px rgba(60, 60, 67, 0.08);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 22px 48px rgba(0, 0, 0, 0.10);
  --font: "Pretendard", system-ui, "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 1180px;
  color: var(--text);
  background: linear-gradient(180deg, #f8f8fa 0, var(--canvas) 44%, #f2f3f6 100%);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; letter-spacing: 0; }
h1 { margin: 0; font-size: 28px; line-height: 1.2; font-weight: 820; }
h2 { margin: 0; font-size: 18px; line-height: 1.28; font-weight: 780; }
h3 { margin: 0; font-size: 15px; line-height: 1.35; font-weight: 760; }
a { color: inherit; text-decoration: none; }
.muted { color: var(--tertiary); }
.subtle { color: var(--secondary); }
.icon {
  width: 17px;
  height: 17px;
  display: block;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
:focus-visible {
  outline: 3px solid rgba(0, 113, 227, 0.28);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.v6-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--separator);
  background: rgba(245,245,247,0.78);
  backdrop-filter: blur(22px) saturate(1.25);
}
.v6-topline {
  height: 66px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 0 30px;
}
.v6-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 236px;
}
.v6-brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  color: white;
  background: linear-gradient(180deg, #2c8dff, var(--accent));
  box-shadow: 0 10px 22px rgba(0, 113, 227, 0.22);
  font-weight: 800;
}
.v6-brand-title { margin: 0; color: var(--text); font-weight: 800; }
.v6-brand-subtitle { margin: 1px 0 0; color: var(--secondary); font-size: 12px; }
.v6-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.v6-nav a,
.v6-pill {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--text-soft);
  font-weight: 720;
  white-space: nowrap;
}
.v6-nav a.active,
.v6-pill.active {
  color: var(--text);
  background: white;
  box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.05);
}
.v6-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.v6-contextbar {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 8px 30px;
  border-top: 1px solid var(--separator-soft);
  background: rgba(255,255,255,0.42);
}
.v6-subnav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.v6-subnav::-webkit-scrollbar { height: 0; }
.v6-subnav button,
.v6-subnav a {
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--secondary);
  padding: 0 11px;
  font-weight: 720;
  white-space: nowrap;
}
.v6-subnav .active { color: var(--text); background: rgba(118,118,128,0.12); }
.v6-shell { max-width: 1500px; margin: 0 auto; padding: 30px; }
.v6-page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.v6-page-head p { margin: 8px 0 0; }
.v6-head-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--radius-md);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-hairline);
  font-weight: 720;
  white-space: nowrap;
  transition: background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}
.btn:hover { transform: translateY(-1px); background: white; box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.06); }
.btn:active { transform: scale(.985); }
.btn.primary { color: white; background: var(--accent); box-shadow: 0 10px 22px rgba(0,113,227,0.22); }
.btn.primary:hover { background: var(--accent-pressed); }
.btn.soft { color: var(--accent); background: var(--accent-soft); }
.btn.icon-only { width: 38px; padding: 0; }

.search-wrap {
  width: 280px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--tertiary);
  box-shadow: var(--shadow-hairline);
}
.search-wrap.wide { width: min(520px, 42vw); border-radius: var(--radius-lg); }
.search {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}
.search::placeholder { color: var(--tertiary); }
.input, .select, .textarea {
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-hairline);
}
.input, .select { height: 38px; padding: 0 11px; }
.textarea { min-height: 112px; padding: 11px; resize: vertical; }
.field { display: grid; gap: 7px; }
.field label { color: var(--text); font-weight: 720; }
.field small { color: var(--tertiary); }

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-soft);
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 780;
}
.hero-title { max-width: 720px; margin: 15px 0 10px; font-size: 34px; line-height: 1.18; font-weight: 820; }
.hero-copy { max-width: 760px; margin: 0; color: var(--secondary); font-size: 15px; }
.hero-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.hero-side {
  display: grid;
  gap: 14px;
  padding-left: 22px;
  border-left: 1px solid var(--separator-soft);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.layout-main { display: grid; grid-template-columns: minmax(0, 1fr) 376px; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.card, .panel {
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-hairline);
  overflow: hidden;
}
.panel.lift { box-shadow: var(--shadow-soft); }
.card-head {
  min-height: 59px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--separator-soft);
}
.card-body { padding: 16px; }
.metric-card {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-hairline);
}
.metric-label { margin: 0; color: var(--secondary); font-weight: 720; }
.metric-value { margin: 3px 0 0; font-size: 25px; line-height: 1.1; font-weight: 820; }
.metric-glyph {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-lg);
  color: var(--accent);
  background: var(--accent-soft);
}
.badge {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}
.badge.ok { color: var(--green); background: var(--green-soft); }
.badge.wait { color: var(--orange); background: var(--orange-soft); }
.badge.risk { color: var(--red); background: var(--red-soft); }
.badge.info { color: var(--accent); background: var(--accent-soft); }
.badge.neutral { color: var(--secondary); background: rgba(118,118,128,0.11); }

.filterbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 13px 14px;
  border-bottom: 1px solid var(--separator-soft);
  background: rgba(245,245,247,0.66);
}
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--separator-soft); text-align: left; vertical-align: middle; }
.table th { color: var(--secondary); background: rgba(245,245,247,0.72); font-size: 12px; font-weight: 760; }
.table tbody tr:hover td { background: rgba(0,113,227,0.026); }
.mobile-list { display: none; }
.list-card {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-hairline);
}
.list-card + .list-card { margin-top: 10px; }
.list-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }

.timeline { display: grid; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 16px;
}
.timeline-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(0,113,227,0.1);
}
.timeline-item:not(:last-child) .timeline-dot::after {
  content: "";
  display: block;
  width: 1px;
  height: 58px;
  margin: 14px auto 0;
  background: var(--separator-soft);
}
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.step {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(118,118,128,0.08);
  color: var(--secondary);
  font-weight: 720;
}
.step.active { color: var(--text); background: var(--accent-soft); }
.step.done { color: var(--green); background: var(--green-soft); }
.step-num {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  box-shadow: var(--shadow-hairline);
  font-size: 12px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--secondary);
}
.empty-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  border-radius: var(--radius-lg);
  color: var(--accent);
  background: var(--accent-soft);
}
.skeleton {
  display: block;
  width: 100%;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eeeeef, #f7f7f9, #eeeeef);
  background-size: 220% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}
.notice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow-hairline);
}
.notice-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--accent);
  background: var(--accent-soft);
}
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.quick-card {
  min-height: 106px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--solid);
  box-shadow: var(--shadow-hairline);
}
.quick-card:hover { box-shadow: var(--shadow-hairline), var(--shadow-soft); }

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  background: linear-gradient(180deg, #f7f7f9 0, #f5f5f7 42%, #f2f3f6 100%);
}
.admin-shell.collapsed { grid-template-columns: 84px minmax(0, 1fr); }
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--separator);
  background: rgba(251, 251, 253, 0.78);
  backdrop-filter: blur(22px) saturate(1.25);
}
.admin-brand { height: 76px; display: flex; align-items: center; gap: 12px; padding: 0 20px; }
.admin-nav { flex: 1; min-height: 0; padding: 4px 10px 16px; overflow: auto; scrollbar-width: none; }
.admin-nav::-webkit-scrollbar { width: 0; height: 0; }
.admin-label { padding: 16px 12px 7px; color: var(--tertiary); font-size: 11px; font-weight: 760; }
.admin-link {
  height: 39px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  color: var(--text-soft);
  font-weight: 680;
}
.admin-link.active { color: var(--text); background: white; box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.05); }
.admin-link-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  color: var(--accent);
  background: var(--accent-soft);
  flex: 0 0 auto;
}
.admin-shell.collapsed .admin-text,
.admin-shell.collapsed .admin-label,
.admin-shell.collapsed .v6-brand-title,
.admin-shell.collapsed .v6-brand-subtitle { display: none; }
.admin-main { min-width: 0; }
.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 0 30px;
  border-bottom: 1px solid var(--separator);
  background: rgba(245,245,247,0.76);
  backdrop-filter: blur(22px) saturate(1.25);
}
.mobile-menu { display: none; }
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  background: rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
}
.drawer-scrim.open { display: block; }

body.dark {
  --text: #f5f5f7;
  --text-soft: #e6e6ea;
  --secondary: #aeaeb2;
  --tertiary: #8e8e93;
  --separator: rgba(255,255,255,0.18);
  --separator-soft: rgba(255,255,255,0.1);
  --canvas: #111113;
  --surface: rgba(36,36,40,0.78);
  --solid: #1c1c1e;
  --accent: #0a84ff;
  --accent-pressed: #409cff;
  --accent-soft: rgba(10,132,255,0.18);
  --green: #6bd878;
  --green-soft: rgba(52,199,89,0.18);
  --orange: #ffb340;
  --orange-soft: rgba(255,159,10,0.18);
  --red: #ff6961;
  --red-soft: rgba(255,69,58,0.18);
  --shadow-hairline: 0 0 0 1px rgba(255,255,255,0.1);
  --shadow-soft: 0 10px 28px rgba(0,0,0,0.28);
  --shadow-lift: 0 22px 48px rgba(0,0,0,0.36);
  background: #111113;
}
body.dark .admin-shell { background: linear-gradient(180deg, #141416, #111113); }
body.dark .v6-header,
body.dark .admin-sidebar,
body.dark .admin-topbar { background: rgba(28,28,30,0.78); }
body.dark .card,
body.dark .panel,
body.dark .metric-card,
body.dark .quick-card,
body.dark .notice,
body.dark .hero-panel,
body.dark .list-card { background: var(--solid); }
body.dark .btn,
body.dark .search-wrap,
body.dark .input,
body.dark .select,
body.dark .textarea,
body.dark .v6-nav a.active,
body.dark .admin-link.active { background: rgba(44,44,46,0.92); color: var(--text); }
body.dark .btn:hover { background: rgba(58,58,60,0.96); box-shadow: var(--shadow-hairline), 0 8px 18px rgba(0,0,0,0.28); }
body.dark .btn.primary { background: var(--accent); color: #fff; }
body.dark .btn.primary:hover { background: var(--accent-pressed); }
body.dark .admin-link:hover,
body.dark .v6-nav a:hover,
body.dark .quick-card:hover { background: rgba(255,255,255,0.06); }
body.dark .table th,
body.dark .filterbar,
body.dark .step,
body.dark .metric { background: rgba(58,58,60,0.56); }
body.dark .table tbody tr:hover td { background: rgba(10,132,255,0.08); }
body.dark .step-num,
body.dark .metric-glyph,
body.dark .admin-link-icon,
body.dark .notice-icon,
body.dark .empty-icon { background: var(--accent-soft); color: var(--accent); }
body.dark .drawer-scrim { background: rgba(0,0,0,0.46); }

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 900px) {
  body { min-width: 0; }
  .v6-topline { height: auto; grid-template-columns: 1fr auto; padding: 14px 18px; gap: 12px; }
  .v6-nav { grid-column: 1 / -1; justify-content: flex-start; overflow-x: auto; }
  .v6-actions { justify-content: flex-end; }
  .v6-contextbar { grid-template-columns: 1fr; padding: 10px 18px; }
  .v6-shell { padding: 22px 18px 48px; }
  .v6-page-head { display: grid; }
  .hero-panel,
  .layout-main,
  .grid-2,
  .grid-3,
  .grid-4,
  .quick-grid,
  .form-grid { grid-template-columns: 1fr; }
  .hero-panel { padding: 22px; }
  .hero-title { font-size: 28px; }
  .hero-side { padding-left: 0; border-left: 0; border-top: 1px solid var(--separator-soft); padding-top: 18px; }
  .desktop-table { display: none; }
  .mobile-list { display: block; }
  .search-wrap,
  .search-wrap.wide { width: 100%; }
  .admin-shell { display: block; }
  .admin-sidebar {
    position: fixed;
    z-index: 80;
    inset: 0 auto 0 0;
    width: 284px;
    transform: translateX(-104%);
    transition: transform 220ms cubic-bezier(.2,.8,.2,1);
  }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-shell.collapsed .admin-text,
  .admin-shell.collapsed .admin-label,
  .admin-shell.collapsed .v6-brand-title,
  .admin-shell.collapsed .v6-brand-subtitle { display: block; }
  .admin-topbar { min-height: 68px; padding: 0 18px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .mobile-menu { display: inline-flex; }
}
