:root {
  color-scheme: light;
  --paper: #f4f5fa;
  --white: #fff;
  --ink: #202039;
  --soft: #5f6479;
  --line: #dce0eb;
  --purple: #5e4bc0;
  --deep: #24243e;
  --lav: #e9e6ff;
  --green: #1d6c58;
  --red: #a63d4f;
  --amber: #866222;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --body:
    'Inter', 'Noto Sans CJK KR', 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --display: 'Barlow Condensed', 'Arial Narrow', var(--body);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.55 var(--body);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #8a78ec;
  outline-offset: 3px;
}
button {
  border: none;
}
h1 {
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.055em;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.045em;
}
h3 {
  font-size: 16px;
  letter-spacing: -0.03em;
}
.muted,
small {
  color: var(--soft);
}
.mono,
time,
.code {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.skip {
  position: fixed;
  top: -80px;
  left: 12px;
  z-index: 20;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
.loading {
  padding: 48px;
}
.layout {
  display: grid;
  grid-template-columns: 225px minmax(0, 1fr);
  min-height: 100dvh;
}
.rail {
  background: var(--deep);
  color: #f5f4ff;
  padding: 30px 19px 19px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 43px;
  height: 43px;
}
.brand strong {
  display: block;
  font: 800 29px/0.95 var(--display);
  letter-spacing: -0.07em;
}
.brand small {
  display: block;
  margin-top: 5px;
  color: #c1bfdc;
  font: 11px var(--mono);
  letter-spacing: 0.035em;
}
.rail nav {
  display: grid;
  gap: 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 10px;
  color: #cecee4;
  font-weight: 600;
}
.nav-link:hover {
  background: #30314e;
  color: #fff;
}
.nav-link[aria-current='page'] {
  background: #45415f;
  color: white;
  box-shadow: inset 3px 0 #aa97ff;
}
.rail-user {
  margin-top: auto;
  border-top: 1px solid #42425a;
  padding-top: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.avatar {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: none;
  border-radius: 11px;
  background: #45425f;
  color: #d7cdff;
  font-weight: 750;
}
.rail-user small {
  display: block;
  color: #c0bed3;
}
.rail-user strong {
  font-size: 13px;
}
.icon-btn {
  margin-left: auto;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  min-height: 40px;
  min-width: 40px;
  border-radius: 8px;
}
.icon-btn:hover {
  background: #ffffff18;
}
.mobile-bar {
  display: none;
}
.main {
  min-width: 0;
  padding: 36px clamp(24px, 4vw, 65px) 60px;
  max-width: 1580px;
  width: 100%;
  margin: 0 auto;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 26px;
}
.top time {
  font-size: 12px;
  color: var(--soft);
  display: block;
  margin-bottom: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 9px 15px;
  border-radius: 9px;
  font-weight: 650;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn:hover {
  border-color: #aa9edb;
}
.primary {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}
.primary:hover {
  background: #5140ab;
}
.danger {
  color: var(--red);
}
.compact {
  font-size: 12px;
  min-height: 33px;
  padding: 5px 10px;
}
.plus {
  font: 24px/0.8 var(--body);
  font-weight: 400;
}
.actions,
.inline {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}
.panel,
.focus-card,
.metric-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}
.focus-card {
  background: #302e49;
  color: white;
  border-color: #302e49;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  padding: clamp(23px, 3vw, 38px);
  margin-bottom: 18px;
  align-items: center;
}
.focus-card .label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d7d1ff;
  font-size: 12px;
  font-weight: 650;
}
.focus-card h2 {
  margin: 10px 0 4px;
  font-size: clamp(21px, 2.6vw, 32px);
  line-height: 1.22;
}
.focus-card p {
  color: #d1cfe1;
  font-size: 13px;
}
.focus-card .insight {
  padding-left: 24px;
  border-left: 1px solid #545169;
}
.focus-card .stat-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.focus-card .stat-line strong {
  font: 700 29px var(--display);
}
.focus-card .stat-line span {
  font-size: 12px;
  color: #d4d0e6;
}
progress {
  display: block;
  width: 100%;
  height: 8px;
  border: none;
  border-radius: 100px;
  overflow: hidden;
  background: #e8e8f2;
  appearance: none;
}
progress::-webkit-progress-bar {
  background: #e8e8f2;
}
progress::-webkit-progress-value {
  background: #7964d1;
  border-radius: 100px;
}
progress::-moz-progress-bar {
  background: #7964d1;
}
.focus-card progress {
  height: 9px;
  margin: 11px 0;
  background: #4c4963;
}
.focus-card progress::-webkit-progress-bar {
  background: #4c4963;
}
.focus-card progress::-webkit-progress-value {
  background: #b2a0fc;
}
.focus-card progress::-moz-progress-bar {
  background: #b2a0fc;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
}
.metric {
  padding: 17px 23px;
}
.metric + .metric {
  border-left: 1px solid var(--line);
}
.metric small {
  display: block;
  font-weight: 600;
}
.metric b {
  font: 720 32px/1.3 var(--display);
  font-variant-numeric: tabular-nums;
}
.metric i {
  font-style: normal;
  margin-left: 6px;
  color: var(--soft);
  font-size: 12px;
}
.panel {
  padding: 23px;
  margin-bottom: 20px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.toolbar {
  display: flex;
  gap: 9px;
  align-items: center;
}
.toolbar input,
.toolbar select {
  width: auto;
  max-width: 195px;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
}
.empty {
  padding: 30px 14px;
  text-align: center;
  border: 1px dashed #d6d6e6;
  border-radius: 11px;
}
.empty strong {
  display: block;
  margin-bottom: 4px;
}
.empty p {
  color: var(--soft);
  font-size: 13px;
}
.scroll {
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.table th {
  color: var(--soft);
  font-size: 11px;
  font-weight: 650;
  padding: 9px 11px;
  background: #f5f5fa;
  white-space: nowrap;
}
.table td {
  border-bottom: 1px solid #e9eaf1;
  padding: 13px 11px;
  vertical-align: middle;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table .time {
  font: 12px var(--mono);
  color: var(--soft);
}
.table .title {
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  padding: 4px 0;
}
.table .title:hover {
  color: var(--purple);
  text-decoration: underline;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  background: #eeeff4;
  color: #51566b;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
  border-radius: 6px;
  font-weight: 700;
}
.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tag.good {
  background: #e0f1e9;
  color: var(--green);
}
.tag.live {
  background: var(--lav);
  color: #5543a3;
}
.tag.warn {
  background: #fbf0d8;
  color: var(--amber);
}
.tag.bad {
  background: #f9e4e8;
  color: var(--red);
}
.table small {
  display: block;
  font-size: 11px;
}
.progress-cell {
  min-width: 75px;
}
.progress-cell progress {
  margin-top: 5px;
  height: 4px;
}
.cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
}
.events {
  list-style: none;
  padding: 0;
  margin: 0;
}
.events li {
  display: grid;
  grid-template-columns: 65px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid #e9eaf1;
}
.events li:last-child {
  border: 0;
}
.events time {
  font-size: 11px;
  color: var(--soft);
}
.events small {
  display: block;
  font-size: 12px;
}
.note {
  padding: 12px 14px;
  background: #f1eefb;
  border-left: 3px solid #8c79d4;
  border-radius: 5px;
  font-size: 13px;
  color: #493d72;
  margin-bottom: 17px;
}
dialog {
  color: var(--ink);
  width: min(640px, calc(100% - 24px));
  max-height: 88dvh;
  overflow: auto;
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 22px 70px #1b183639;
}
dialog::backdrop {
  background: #20203977;
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  background: white;
  border-bottom: 1px solid var(--line);
  padding: 15px 22px;
}
.dialog-head .icon-btn:hover {
  background: var(--paper);
}
.dialog-body {
  padding: 20px 22px;
}
.fields {
  display: grid;
  gap: 15px;
}
.field {
  display: grid;
  gap: 5px;
  align-content: start;
  font-weight: 650;
  font-size: 13px;
}
.field small,
.caption {
  font-size: 12px;
  font-weight: 400;
  color: var(--soft);
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccd0df;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
  padding: 9px 11px;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.choices {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  max-height: 210px;
  overflow: auto;
}
.choice {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 4px;
  font-size: 13px;
}
.choice input,
input[type='checkbox'] {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--purple);
}
fieldset {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
legend {
  font-weight: 650;
  font-size: 13px;
  margin-bottom: 6px;
}
.foot {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.error {
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  white-space: pre-wrap;
}
.preview {
  background: #f4f4fa;
  border-radius: 10px;
  padding: 13px;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
  font-size: 13px;
}
.delivery {
  border-top: 1px solid var(--line);
  padding: 11px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.delivery small {
  display: block;
}
.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(115deg, #24243e 0%, #32304a 44%, #edecf6 44%, #f5f5fa 100%);
}
.login-box {
  width: min(440px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 24px 65px #20203928;
}
.login-box .brand {
  color: var(--ink);
  margin-bottom: 29px;
}
.login-box .brand small {
  color: var(--soft);
}
.login-box h1 {
  font-size: 26px;
  margin-bottom: 19px;
}
.login-box .primary {
  width: 100%;
}
.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  z-index: 4;
  padding: 11px 18px;
  border-radius: 9px;
  background: #28283d;
  color: white;
  box-shadow: 0 6px 24px #24243e22;
}
.notice[hidden],
[hidden] {
  display: none !important;
}
@media (max-width: 970px) {
  .layout {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .rail {
    padding: 23px 12px 15px;
  }
  .main {
    padding: 27px 19px 40px;
  }
  .cols {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .table th,
  .table td {
    padding-left: 8px;
    padding-right: 8px;
  }
}
@media (max-width: 720px) {
  .layout {
    display: block;
  }
  .mobile-bar {
    display: flex;
    background: var(--deep);
    color: white;
    padding: 10px 16px;
    align-items: center;
  }
  .mobile-bar .brand img {
    width: 33px;
    height: 33px;
  }
  .mobile-bar .brand strong {
    font-size: 22px;
  }
  .mobile-bar .brand small {
    display: none;
  }
  .rail {
    display: none;
    position: static;
    height: auto;
  }
  .rail.open {
    display: flex;
    gap: 14px;
  }
  .rail > .brand {
    display: none;
  }
  .rail nav {
    grid-template-columns: repeat(2, 1fr);
  }
  .rail-user {
    margin-top: 0;
  }
  .main {
    padding: 22px 14px 35px;
  }
  .top {
    margin-bottom: 17px;
  }
  .focus-card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px;
  }
  .focus-card .insight {
    border: 0;
    border-top: 1px solid #545169;
    padding: 12px 0 0;
  }
  .metric {
    padding: 12px;
  }
  .metric b {
    font-size: 24px;
  }
  .metric-row {
    margin-bottom: 14px;
  }
  .panel {
    border-radius: 12px;
    padding: 14px;
  }
  .panel-head {
    align-items: flex-start;
  }
  .toolbar {
    width: 100%;
  }
  .toolbar input {
    min-width: 0;
    flex: 1;
    max-width: 100%;
  }
  .toolbar select {
    max-width: 120px;
  }
  .table td {
    font-size: 12px;
  }
  .desktop-col {
    display: none;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .dialog-body {
    padding: 16px;
  }
  .login-box {
    padding: 25px;
  }
  .top .btn {
    padding: 8px 12px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .btn,
  .nav-link {
    transition:
      background 0.14s,
      border-color 0.14s;
  }
  .panel,
  .focus-card {
    animation: arrive 0.18s ease-out;
  }
  @keyframes arrive {
    from {
      opacity: 0.84;
      transform: translateY(3px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
