:root {
  color-scheme: light;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  color: #182232;
  background: #f2f5f7;
  font-synthesis: none;
  --navy: #152a42;
  --navy-2: #203b58;
  --ink: #182232;
  --muted: #718093;
  --line: #dfe5ea;
  --green: #16a06c;
  --mint: #dff5eb;
  --orange: #f39a43;
  --red: #dd5c61;
  --shadow: 0 8px 30px rgba(30, 46, 64, .07);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #f2f5f7; }
button, select { font: inherit; }
button { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.topbar { height: 74px; background: var(--navy); color: white; display: flex; align-items: center; padding: 0 28px; position: sticky; top: 0; z-index: 20; }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: #27bc84; margin-right: 11px; }
.brand-mark svg { width: 23px; height: 23px; stroke-width: 2.2; }
.wordmark { font: 800 17px/1 Arial, sans-serif; letter-spacing: .12em; }
.wordmark span { color: #40c996; }
.topbar-status { margin-left: 34px; padding-left: 24px; border-left: 1px solid rgba(255,255,255,.15); font-size: 12px; color: #cbd6e0; display: flex; align-items: center; gap: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #45d49f; box-shadow: 0 0 0 4px rgba(69,212,159,.13); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.clock { text-align: right; display: flex; flex-direction: column; }
.clock strong { font: 700 14px Manrope, sans-serif; }
.clock span { font-size: 9px; color: #91a2b3; letter-spacing: .08em; }
.avatar { border: 1px solid rgba(255,255,255,.2); background: #29445f; color: white; width: 36px; height: 36px; border-radius: 50%; font: 700 11px Manrope, sans-serif; cursor: pointer; }

.app-shell { min-height: calc(100vh - 74px); display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 26px 18px 18px; display: flex; flex-direction: column; position: sticky; top: 74px; height: calc(100vh - 74px); }
.sidebar nav { display: grid; gap: 7px; }
.nav-link { border: 0; background: transparent; height: 47px; padding: 0 13px; display: flex; gap: 13px; align-items: center; border-radius: 8px; color: #687788; cursor: pointer; text-align: left; font-size: 13px; transition: .2s ease; }
.nav-link svg { width: 18px; }
.nav-link:hover { background: #f2f6f7; color: var(--navy); }
.nav-link.active { color: #fff; background: var(--navy); box-shadow: 0 8px 18px rgba(21,42,66,.16); }
.boundary-card { margin-top: auto; padding: 17px; background: #f2f7f5; border: 1px solid #dcebe5; border-radius: 10px; }
.boundary-card strong { display: block; margin-top: 6px; font-size: 13px; }
.boundary-card p { color: #718079; font-size: 10px; line-height: 1.7; margin: 5px 0 12px; }
.outline-badge { border: 1px solid #b7c5cd; padding: 4px 7px; color: #607484; border-radius: 4px; font: 700 8px Manrope, sans-serif; letter-spacing: .08em; }
.sidebar-foot { margin-top: 17px; padding: 0 3px; color: #99a5ae; display: flex; justify-content: space-between; font: 700 8px Manrope, sans-serif; letter-spacing: .1em; }

.content { padding: 42px clamp(24px, 3.6vw, 58px) 60px; min-width: 0; max-width: 1680px; width: 100%; margin: 0 auto; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.eyebrow { color: #82909d; font: 800 8px/1.4 Manrope, sans-serif; letter-spacing: .18em; }
.view-head h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.035em; margin: 7px 0 7px; }
.view-head p { color: var(--muted); margin: 0; font-size: 12px; }
.primary-button, .secondary-button { height: 44px; border-radius: 7px; padding: 0 17px; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 700; font-size: 12px; transition: .2s ease; }
.primary-button { border: 0; color: white; background: var(--navy); box-shadow: 0 6px 16px rgba(21,42,66,.18); }
.primary-button:hover { background: var(--navy-2); transform: translateY(-1px); }
.primary-button:disabled { opacity: .65; cursor: wait; transform: none; }
.secondary-button { background: white; border: 1px solid var(--line); color: var(--navy); }
.secondary-button:hover:not(:disabled) { border-color: #aab8c2; box-shadow: var(--shadow); }
.secondary-button:disabled { color: #a8b2ba; cursor: not-allowed; }
.primary-button svg, .secondary-button svg { width: 17px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.metric-card { background: white; border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: flex; align-items: center; gap: 14px; box-shadow: 0 2px 4px rgba(30,45,60,.02); }
.metric-icon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.metric-icon svg { width: 18px; }
.metric-icon.navy { color: #244561; background: #e8eef3; }
.metric-icon.green { color: #15875e; background: var(--mint); }
.metric-icon.orange { color: #cd7728; background: #fff0df; }
.metric-icon.red { color: #bf4e55; background: #fde8e9; }
.metric-card > div:last-child { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; }
.metric-card span { grid-column: 1 / -1; font-size: 10px; color: #7d8994; }
.metric-card strong { font: 800 22px Manrope, sans-serif; margin-top: 2px; }
.metric-card small { color: #8b979f; font-size: 9px; }

.panel { background: white; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.panel-head { min-height: 72px; border-bottom: 1px solid #e8edf0; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-head h2 { font-size: 15px; letter-spacing: -.02em; margin: 4px 0 0; }
.soft-badge { background: #eef4f3; color: #447063; border-radius: 4px; padding: 5px 8px; font: 700 8px Manrope, sans-serif; letter-spacing: .08em; }
.text-button { border: 0; background: none; color: #74818d; font-size: 10px; cursor: pointer; display: flex; align-items: center; gap: 3px; }
.text-button svg { width: 14px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 14px; }

.queue-flow { padding: 8px 20px 15px; }
.store-card { display: grid; grid-template-columns: 28px 40px minmax(120px,1fr) minmax(130px,.6fr) 70px; gap: 12px; align-items: center; min-height: 74px; border-bottom: 1px solid #edf1f3; position: relative; }
.store-card:last-child { border: 0; }
.store-index { font: 800 9px Manrope, sans-serif; color: #a6b0b9; }
.store-avatar { width: 38px; height: 38px; border-radius: 10px; background: #e7edf2; color: #284761; display: grid; place-items: center; font: 800 11px Manrope, sans-serif; }
.store-card:nth-of-type(3) .store-avatar { background: #f5e9dc; color: #9b673b; }
.store-info, .store-session, .store-result { display: flex; flex-direction: column; min-width: 0; }
.store-info strong { font-size: 12px; }
.store-info span { color: #91a0aa; font: 500 9px Manrope, sans-serif; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-session span { color: #9aa6af; font: 800 7px Manrope, sans-serif; letter-spacing: .12em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.store-session code { color: #536776; font-size: 9px; margin-top: 4px; }
.store-result { align-items: flex-end; gap: 4px; }
.store-result small { color: #9aa5ad; font-size: 8px; }
.state-pill { min-width: 51px; text-align: center; border-radius: 10px; padding: 4px 7px; background: #edf6f2; color: #21805f; font-size: 8px; font-weight: 700; }
.state-pill.running { background: #e7eff8; color: #35678e; animation: pulse 1s infinite; }
.state-pill.failed { background: #fde9ea; color: #c34e54; }
.queue-line { position: absolute; }
.isolation-note { border-radius: 8px; background: #f3f8f6; margin: 0 20px 20px; padding: 13px 15px; display: flex; align-items: center; gap: 11px; }
.isolation-note > span { width: 25px; height: 25px; color: #16835e; background: #dcefe7; border-radius: 50%; display: grid; place-items: center; }
.isolation-note svg { width: 13px; }
.isolation-note div { display: flex; flex-direction: column; }
.isolation-note strong { font-size: 10px; }
.isolation-note p { margin: 2px 0 0; font-size: 8px; color: #72847d; }
.isolation-note code { margin-left: auto; color: #548172; font-size: 8px; }

.activity-list { list-style: none; margin: 0; padding: 11px 20px 18px; }
.activity-list li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 9px; padding: 10px 0; align-items: start; border-bottom: 1px solid #edf1f3; }
.activity-list li:last-child { border: 0; }
.activity-dot { width: 7px; height: 7px; border-radius: 50%; background: #8ba0b0; margin-top: 3px; box-shadow: 0 0 0 3px #edf2f5; }
.activity-dot.success, .activity-dot.reauthenticated { background: var(--green); box-shadow: 0 0 0 3px #e1f3ec; }
.activity-dot.failed, .activity-dot.retry, .activity-dot.session-expired { background: var(--red); box-shadow: 0 0 0 3px #fbe5e6; }
.activity-list div { min-width: 0; }
.activity-list strong { display: block; color: #526272; font-size: 9px; margin-bottom: 2px; }
.activity-list p { color: #7e8993; font-size: 9px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-list time { font: 600 8px Manrope, sans-serif; color: #a2adb5; }

.screens-panel { margin-top: 14px; }
.update-time { color: #8c99a3; font-size: 9px; }
.screen-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 20px; }
.screen-grid article { min-width: 0; display: grid; grid-template-columns: 25px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 0 17px; border-right: 1px solid #e7ecef; }
.screen-grid article:first-child { padding-left: 0; }
.screen-grid article:last-child { border: 0; padding-right: 0; }
.screen-number { font: 800 8px Manrope, sans-serif; color: #97a4ae; }
.screen-grid article div { min-width: 0; }
.screen-grid strong { display: block; font-size: 10px; }
.screen-grid code { display: block; color: #96a1aa; font-size: 7px; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; }
.method { color: #668092; font: 800 7px Manrope, sans-serif; background: #eef3f5; padding: 4px; border-radius: 3px; }
.screen-ok { grid-column: 2 / 4; display: flex; align-items: center; gap: 3px; color: #19835e; font-size: 8px; margin-top: 7px; }
.screen-ok svg { width: 11px; }

.runner-grid { display: grid; grid-template-columns: minmax(370px,.8fr) minmax(440px,1.2fr); gap: 14px; }
.scenario-list { padding: 8px 20px; }
.scenario-option { min-height: 76px; display: grid; grid-template-columns: 34px minmax(0,1fr) 16px; gap: 10px; align-items: center; border-bottom: 1px solid #edf1f3; cursor: pointer; }
.scenario-option input { position: absolute; opacity: 0; pointer-events: none; }
.scenario-number { font: 800 9px Manrope, sans-serif; color: #a0abb4; }
.scenario-option strong { display: block; font-size: 11px; }
.scenario-option small { display: block; color: #8a969f; font-size: 8px; margin-top: 4px; }
.scenario-option i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid #b9c3ca; position: relative; }
.scenario-option.selected i { border-color: var(--green); }
.scenario-option.selected i::after { content: ""; width: 6px; height: 6px; background: var(--green); border-radius: 50%; position: absolute; inset: 3px; }
.scenario-option.selected strong { color: #126c4f; }
.runner-config { padding: 15px 20px 20px; display: flex; justify-content: space-between; align-items: center; }
.runner-config label { color: #85919a; font-size: 9px; }
.runner-config label strong { color: #3f5060; }
.attempt-dots { display: flex; gap: 5px; }
.attempt-dots span { width: 22px; height: 22px; border-radius: 5px; background: #eef3f5; color: #6f7e89; display: grid; place-items: center; font: 700 8px Manrope, sans-serif; }
.terminal-panel { background: #14283d; border-color: #14283d; color: white; overflow: hidden; }
.terminal-head { height: 46px; background: #0f2133; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 17px; }
.terminal-head strong { font: 600 9px ui-monospace, monospace; color: #92a5b6; }
.terminal-head > span { justify-self: end; font: 700 7px Manrope, sans-serif; color: #53d4a4; letter-spacing: .1em; }
.terminal-lights { display: flex; gap: 5px; }
.terminal-lights span { width: 7px; height: 7px; border-radius: 50%; background: #52687a; }
.terminal-lights span:nth-child(2) { background: #d1934d; }
.terminal-lights span:nth-child(3) { background: #42a879; }
.terminal-body { min-height: 320px; }
.terminal-panel .activity-list { padding: 12px 22px 4px; }
.terminal-panel .activity-list li { border-color: rgba(255,255,255,.07); }
.terminal-panel .activity-list strong { color: #74d8b1; font-family: ui-monospace, monospace; }
.terminal-panel .activity-list p { color: #b5c2cd; font-family: ui-monospace, monospace; }
.terminal-panel .activity-list time { color: #60778a; }
.terminal-empty { padding: 16px 22px; color: #5e7487; font: 9px ui-monospace, monospace; }
.run-history { margin-top: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 10px; }
th { text-align: left; color: #8996a0; font: 700 8px Manrope, sans-serif; letter-spacing: .05em; background: #f7f9fa; }
th, td { padding: 13px 20px; border-bottom: 1px solid #edf1f3; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td code { color: #506676; font-size: 9px; }
.table-status, .eligible, .blocked { border-radius: 10px; padding: 4px 8px; font-size: 8px; font-weight: 700; }
.table-status.success, .eligible { color: #21805f; background: #e5f4ed; }
.table-status.failed, .blocked { color: #c34e54; background: #fce9ea; }

.archive-layout { display: grid; grid-template-columns: minmax(300px,.72fr) minmax(500px,1.28fr); gap: 14px; }
.history-items { max-height: 610px; overflow: auto; }
.history-item { width: 100%; min-height: 78px; padding: 12px 17px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto 15px; gap: 10px; align-items: center; border: 0; border-bottom: 1px solid #edf1f3; background: white; cursor: pointer; text-align: left; }
.history-item:hover, .history-item.active { background: #f1f7f5; }
.history-item.active { box-shadow: inset 3px 0 var(--green); }
.store-avatar.small { width: 34px; height: 34px; }
.history-item strong { display: block; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item small { display: block; color: #8f9ba4; font: 8px ui-monospace, monospace; margin-top: 4px; }
.history-item time { color: #8c99a2; font-size: 8px; }
.history-item svg { width: 12px; color: #9aa6af; }
.detail-panel { padding-bottom: 20px; overflow: hidden; }
.detail-head { padding: 23px 24px; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e7ecef; }
.detail-head h2 { font-size: 18px; margin: 11px 0 4px; }
.detail-head p { color: #7f8c96; font-size: 9px; margin: 0; }
.validation-seal { display: flex; align-items: center; gap: 8px; color: #17835e; }
.validation-seal > svg { width: 27px; height: 27px; padding: 5px; border: 1px solid #9ed3be; border-radius: 50%; }
.validation-seal span { display: flex; flex-direction: column; }
.validation-seal strong { font: 800 8px Manrope, sans-serif; letter-spacing: .1em; }
.validation-seal small { color: #7c9189; font-size: 7px; max-width: 180px; margin-top: 3px; }
.detail-metrics { display: grid; grid-template-columns: repeat(4,1fr); padding: 22px 24px; border-bottom: 1px solid #e7ecef; }
.detail-metrics div { padding: 0 18px; border-right: 1px solid #e5eaed; display: grid; grid-template-columns: 1fr auto; }
.detail-metrics div:first-child { padding-left: 0; }
.detail-metrics div:last-child { border: 0; }
.detail-metrics span { grid-column: 1/-1; color: #84909a; font-size: 8px; }
.detail-metrics strong { font: 800 19px Manrope, sans-serif; margin-top: 5px; }
.detail-metrics small { align-self: end; color: #929da5; font-size: 8px; }
.detail-metrics .up { color: #16835e; }
.detail-sections { padding: 18px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.detail-sections > div { padding: 14px; background: #f6f8f9; border-radius: 7px; display: flex; flex-direction: column; }
.detail-sections strong { font-size: 10px; margin-top: 7px; }
.detail-sections small { color: #89959e; font-size: 8px; margin-top: 3px; }
.raw-preview { margin: 0 24px; border: 1px solid #dfe5e9; border-radius: 7px; overflow: hidden; }
.raw-preview > div { min-height: 38px; padding: 0 12px; background: #f5f7f8; display: flex; align-items: center; justify-content: space-between; }
.raw-preview > div span { display: flex; align-items: center; gap: 6px; font: 700 8px Manrope, sans-serif; color: #627380; }
.raw-preview > div i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.raw-preview > div strong { color: #8b979f; font-size: 8px; }
.raw-preview pre { margin: 0; padding: 14px; height: 117px; overflow: auto; color: #80909c; background: #fff; font-size: 8px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-panel { min-height: 300px; display: grid; place-items: center; color: #8b98a1; font-size: 11px; }

.settings-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; }
.field-row { min-height: 86px; padding: 18px 20px; border-bottom: 1px solid #edf1f3; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.field-row > span { display: flex; flex-direction: column; }
.field-row strong { font-size: 11px; }
.field-row small { color: #8c98a1; font-size: 8px; margin-top: 4px; }
.field-row select { width: 96px; height: 34px; padding: 0 9px; background: #f7f9fa; border: 1px solid #dce3e7; border-radius: 5px; font-size: 10px; color: #425665; }
.required-fields { padding: 22px 20px; }
.required-fields > div { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: 14px; }
.required-fields > div span { font-size: 8px; color: #62737f; display: flex; align-items: center; gap: 4px; }
.required-fields svg { width: 11px; color: var(--green); }
.safety-panel ol { list-style: none; padding: 8px 22px 20px; margin: 0; }
.safety-panel li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 15px 0; border-bottom: 1px solid #edf1f3; }
.safety-panel li:last-child { border: 0; }
.safety-panel li > span { font: 800 9px Manrope, sans-serif; color: #8ca098; }
.safety-panel strong { font-size: 10px; }
.safety-panel p { color: #87939c; font-size: 8px; margin: 3px 0 0; }

.toast { position: fixed; z-index: 50; right: 25px; bottom: 25px; min-width: 300px; padding: 13px 16px; border-radius: 8px; display: flex; align-items: center; gap: 10px; color: white; background: #1c7558; box-shadow: 0 12px 30px rgba(20,42,55,.25); font-size: 11px; animation: toast-in .25s ease; }
.toast.error { background: #a94349; }
.toast svg { width: 16px; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@keyframes pulse { 50% { opacity: .55; } }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2,1fr); }
  .dashboard-grid, .archive-layout { grid-template-columns: 1fr; }
  .screen-grid { grid-template-columns: repeat(2,1fr); gap: 18px 0; }
  .screen-grid article:nth-child(2) { border: 0; }
  .history-items { max-height: 350px; }
}

@media (max-width: 820px) {
  .app-shell { grid-template-columns: 70px minmax(0,1fr); }
  .sidebar { padding: 22px 10px; align-items: center; }
  .nav-link { width: 46px; justify-content: center; padding: 0; }
  .nav-link span, .boundary-card, .sidebar-foot { display: none; }
  .content { padding: 30px 20px 50px; }
  .runner-grid, .settings-grid { grid-template-columns: 1fr; }
  .store-card { grid-template-columns: 25px 38px 1fr 65px; }
  .store-session { display: none; }
}

@media (max-width: 590px) {
  .topbar { padding: 0 16px; }
  .topbar-status, .clock { display: none; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; width: 100%; height: 64px; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); }
  .sidebar nav { display: flex; width: 100%; justify-content: space-around; }
  .nav-link { height: 46px; }
  .content { padding: 25px 15px 90px; }
  .view-head { align-items: stretch; flex-direction: column; }
  .view-head .primary-button, .view-head .secondary-button { justify-content: center; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { padding: 13px; gap: 9px; }
  .metric-icon { width: 33px; height: 33px; }
  .metric-card strong { font-size: 17px; }
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .store-card { grid-template-columns: 34px minmax(0,1fr) 55px; }
  .store-index { display: none; }
  .store-info span { max-width: 140px; }
  .isolation-note code { display: none; }
  .screen-grid { grid-template-columns: 1fr; }
  .screen-grid article, .screen-grid article:first-child, .screen-grid article:last-child { padding: 10px 0; border: 0; border-bottom: 1px solid #e7ecef; }
  .archive-layout { grid-template-columns: minmax(0,1fr); }
  .detail-head { flex-direction: column; }
  .detail-metrics { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .detail-metrics div:nth-child(2) { border: 0; }
  .detail-metrics div:nth-child(3) { padding-left: 0; }
  .detail-sections { grid-template-columns: 1fr; }
  .required-fields > div { grid-template-columns: repeat(2,1fr); }
  .toast { left: 15px; right: 15px; bottom: 80px; min-width: 0; }
}
