:root {
  --bg: #080b10;
  --panel: #0f141c;
  --panel-2: #141b25;
  --line: rgba(255,255,255,.09);
  --text: #f4f7fb;
  --muted: #8f9bad;
  --accent: #52b7ff;
  --accent-soft: rgba(82,183,255,.14);
  --good: #3ddc97;
  --warn: #ffbd59;
  --bad: #ff6577;
  --prod: #ff5f45;
  --radius: 16px;
  font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 7px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 50% 20%, rgba(48,120,180,.2), transparent 38%), #080b10; }
.auth-card { width: min(430px, 100%); padding: 40px; border: 1px solid var(--line); border-radius: 24px; background: rgba(15,20,28,.94); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.brand-mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(145deg, #65c3ff, #3578ff); color: #07101b; font-size: 28px; font-weight: 900; box-shadow: 0 12px 30px rgba(63,151,255,.28); margin-bottom: 22px; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px; margin: 0; font-size: 20px; }
.auth-card h1 { margin: 0 0 8px; font-size: 28px; }
.stack { display: grid; gap: 16px; margin-top: 28px; }
label { display: grid; gap: 8px; color: #cbd3df; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #090d13; color: var(--text); padding: 11px 12px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: rgba(82,183,255,.65); box-shadow: 0 0 0 3px rgba(82,183,255,.1); }
textarea { min-height: 90px; resize: vertical; }
.form-error { min-height: 20px; color: var(--bad); font-size: 13px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: #0b0f15; padding: 22px 16px; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; border-bottom: 1px solid var(--line); }
.sidebar-brand strong { display: block; font-size: 14px; }
.sidebar-brand span { color: var(--muted); font-size: 11px; }
.nav { display: grid; gap: 5px; margin-top: 20px; }
.nav button { border: 0; border-radius: 10px; padding: 11px 12px; text-align: left; color: var(--muted); background: transparent; font-weight: 700; }
.nav button span { display: inline-block; width: 24px; color: #67758a; }
.nav button:hover, .nav button.active { background: var(--accent-soft); color: var(--text); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 18px 8px 0; }
.sidebar-footer strong { display: block; font-size: 13px; }
.sidebar-footer span { color: var(--muted); font-size: 11px; }
.text-button { padding: 8px 0 0; border: 0; color: #8592a5; background: transparent; font-size: 12px; }
.main { min-width: 0; padding: 26px 30px 50px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: center; }
.topbar h2 { margin: 0; font-size: 24px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.environment-switch { display: flex; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: #090d13; }
.environment-switch button { border: 0; border-radius: 8px; padding: 8px 12px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.environment-switch button.active { background: var(--accent-soft); color: var(--accent); }
[data-profile="PRODUCTION"] .environment-switch button.active { background: rgba(255,95,69,.16); color: #ff806d; }
.button { border: 1px solid transparent; border-radius: 10px; padding: 9px 14px; color: var(--text); background: #1a2230; font-weight: 800; font-size: 13px; }
.button:hover { filter: brightness(1.1); }
.button.primary { background: var(--accent); color: #06111c; }
[data-profile="PRODUCTION"] .button.primary { background: var(--prod); color: #190805; }
.button.ghost { border-color: var(--line); background: transparent; }
.button.danger { background: rgba(255,101,119,.15); color: #ff8897; border-color: rgba(255,101,119,.2); }
.button.warning { background: rgba(255,189,89,.13); color: #ffc873; }
.button.small { padding: 7px 9px; font-size: 11px; }
.button.wide { width: 100%; padding: 12px; }
.environment-banner { margin-top: 22px; padding: 12px 16px; border-radius: 11px; display: flex; align-items: center; gap: 12px; font-size: 12px; }
.environment-banner.local { border: 1px solid rgba(82,183,255,.18); background: rgba(82,183,255,.08); }
.environment-banner.production { border: 1px solid rgba(255,95,69,.32); background: rgba(255,95,69,.11); }
.environment-banner span { color: var(--muted); }
.content { margin-top: 22px; }
.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 12px; }
.summary-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.summary-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.summary-card strong { display: block; margin-top: 5px; font-size: 24px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 14px; }
.toolbar-left, .toolbar-right { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input { width: auto; min-width: 150px; padding: 8px 10px; }
.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.server-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(21,28,39,.96), rgba(13,18,26,.96)); overflow: hidden; transition: transform .15s, border-color .15s; }
.server-card:hover { transform: translateY(-2px); border-color: rgba(82,183,255,.28); }
[data-profile="PRODUCTION"] .server-card:hover { border-color: rgba(255,95,69,.35); }
.server-card-header { padding: 17px 18px 13px; display: flex; justify-content: space-between; gap: 14px; }
.server-card h3 { margin: 0 0 5px; font-size: 16px; }
.server-meta { color: var(--muted); font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 7px; border-radius: 20px; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.status.ONLINE { color: var(--good); }
.status.OFFLINE, .status.ERROR { color: var(--bad); }
.status.PENDING, .status.MAINTENANCE, .status.DRAINING { color: var(--warn); }
.status.STARTING, .status.STOPPING { color: var(--accent); }
.server-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact { padding: 12px 18px; background: var(--panel); min-width: 0; }
.fact span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 4px; }
.fact strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.server-card-footer { padding: 13px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.055); color: #aab5c5; font-size: 10px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.panel + .panel { margin-top: 14px; }
.panel-header { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-body { padding: 18px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.detail-item { padding: 12px; border-radius: 10px; background: var(--panel-2); }
.detail-item span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.detail-item strong { font-size: 12px; word-break: break-word; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 12px; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; letter-spacing: .05em; background: rgba(255,255,255,.018); }
tr:last-child td { border-bottom: 0; }
.process-name { font-weight: 800; }
.process-sub { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.action-row { display: flex; gap: 5px; flex-wrap: wrap; }
.empty { padding: 50px 25px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 25px; background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.modal { width: min(620px, 100%); max-height: calc(100vh - 50px); overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: #101620; box-shadow: 0 30px 90px rgba(0,0,0,.65); }
.modal-header { padding: 20px 22px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; font-size: 18px; }
.modal-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; }
.modal-body { padding: 20px 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.modal-footer { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.code-box { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #070a0f; color: #a8d7ff; white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.warning-box { padding: 12px; border: 1px solid rgba(255,95,69,.28); border-radius: 9px; background: rgba(255,95,69,.09); color: #ffb0a3; font-size: 12px; }
.toast-root { position: fixed; z-index: 200; right: 22px; bottom: 22px; display: grid; gap: 9px; }
.toast { width: min(360px, calc(100vw - 44px)); padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #18212e; box-shadow: 0 15px 40px rgba(0,0,0,.45); font-size: 12px; }
.toast.error { border-color: rgba(255,101,119,.35); color: #ff98a5; }
.probe-ok { color: var(--good); }
.probe-fail { color: var(--bad); }
.back-button { border: 0; color: var(--muted); background: transparent; padding: 0; }
.server-card-actions { display: flex; align-items: center; gap: 9px; }
.process-page .summary-grid { margin-bottom: 2px; }
.process-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(120deg, rgba(82,183,255,.08), rgba(255,255,255,.015)); }
[data-profile="PRODUCTION"] .process-intro { background: linear-gradient(120deg, rgba(255,95,69,.09), rgba(255,255,255,.015)); }
.process-intro strong { display: block; font-size: 15px; }
.process-intro span:not(.live-dot) { display: block; max-width: 900px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.process-toolbar { margin-top: 16px; }
.process-list-panel table { min-width: 1320px; }
.process-list-panel .panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.table-link { padding: 0; border: 0; color: var(--accent); background: transparent; font-weight: 800; text-align: left; }
.table-link:hover { text-decoration: underline; }
.process-path { display: inline-block; max-width: 250px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.agent-error-panel { display: grid; gap: 7px; margin: 0 0 14px; padding: 13px; border: 1px solid rgba(255,101,119,.28); border-radius: 13px; background: rgba(255,101,119,.07); }
.agent-error-panel > strong { color: #ff98a5; font-size: 12px; }
.agent-error-panel button { display: grid; grid-template-columns: minmax(120px, 210px) 1fr; gap: 12px; width: 100%; padding: 9px 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 9px; color: var(--text); background: rgba(0,0,0,.16); text-align: left; }
.agent-error-panel button span { font-weight: 800; }
.agent-error-panel button small { overflow: hidden; color: #ffb2bc; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1050px) {
  .summary-grid { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { grid-template-columns: repeat(4, 1fr); }
  .nav button { text-align: center; font-size: 11px; }
  .nav button span { display: none; }
  .sidebar-footer { display: none; }
  .main { padding: 20px 15px 40px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { width: 100%; flex-wrap: wrap; }
  .process-intro { align-items: flex-start; flex-direction: column; }
  .agent-error-panel button { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
}

/* Phase 2 monitoring */
.monitoring-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(120deg, rgba(82,183,255,.08), rgba(255,255,255,.015)); }
[data-profile="PRODUCTION"] .monitoring-intro { background: linear-gradient(120deg, rgba(255,95,69,.09), rgba(255,255,255,.015)); }
.monitoring-intro strong { display: block; font-size: 15px; }
.monitoring-intro span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.monitoring-server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.monitoring-server-card { display: block; width: 100%; padding: 0; overflow: hidden; text-align: left; color: var(--text); border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(21,28,39,.98), rgba(13,18,26,.98)); }
.monitoring-server-card:hover { transform: translateY(-2px); border-color: rgba(82,183,255,.35); }
[data-profile="PRODUCTION"] .monitoring-server-card:hover { border-color: rgba(255,95,69,.42); }
.monitoring-server-card.stale { opacity: .72; }
.monitoring-server-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 17px 12px; }
.monitoring-server-head strong { display: block; font-size: 15px; }
.monitoring-server-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.live-dot { color: var(--good) !important; font-size: 9px !important; font-weight: 900; letter-spacing: .08em; }
.live-dot::before { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; content: ""; }
.live-dot.offline { color: var(--bad) !important; }
.monitoring-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--line); gap: 1px; }
.monitoring-mini-grid > div { min-width: 0; padding: 11px 9px; background: var(--panel); }
.monitoring-mini-grid span { display: block; color: var(--muted); font-size: 9px; }
.monitoring-mini-grid strong { display: block; margin-top: 4px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.monitoring-updated { display: block; padding: 9px 17px 11px; color: var(--muted); font-size: 10px; }
.good { color: var(--good) !important; }
.bad { color: var(--bad) !important; }
.unknown { color: var(--muted) !important; }
.monitoring-toolbar { margin-top: 0; }
.range-switch { padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: rgba(0,0,0,.18); }
.monitoring-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { min-width: 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); }
.metric-card > span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; }
.metric-card > strong { display: block; margin-top: 6px; overflow: hidden; font-size: 22px; text-overflow: ellipsis; }
.metric-card > small { display: block; margin-top: 5px; overflow: hidden; color: #8896aa; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.chart-card { min-width: 0; padding: 14px 15px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.chart-card.wide-chart { grid-column: 1 / -1; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.chart-head strong { font-size: 13px; }
.chart-head span { color: var(--muted); font-size: 10px; }
.chart-card canvas { display: block; width: 100%; height: 220px; }
.monitoring-panel { margin-top: 14px; }

@media (max-width: 1200px) {
  .monitoring-summary-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}
@media (max-width: 900px) {
  .monitoring-summary-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-card.wide-chart { grid-column: auto; }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: repeat(3, 1fr); }
  .monitoring-intro { align-items: flex-start; flex-direction: column; }
  .monitoring-summary-grid { grid-template-columns: 1fr 1fr; }
  .monitoring-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .range-switch { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
}
@media (max-width: 460px) {
  .monitoring-summary-grid { grid-template-columns: 1fr; }
}

/* Phase 3 logs, audit, incidents and alerts */
.phase3-intro { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(120deg, rgba(82,183,255,.08), rgba(255,255,255,.015)); }
[data-profile="PRODUCTION"] .phase3-intro { background: linear-gradient(120deg, rgba(255,95,69,.09), rgba(255,255,255,.015)); }
.phase3-intro > div:first-child strong { display: block; font-size: 15px; }
.phase3-intro > div:first-child span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.live-indicator { display: inline-flex; align-items: center; gap: 7px; color: var(--good); font-size: 11px; font-weight: 900; }
.live-indicator::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: live-pulse 1.3s infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; align-items: end; }
.filter-grid.compact { grid-template-columns: repeat(5, minmax(120px, 1fr)); }
.filter-grid label { min-width: 0; }
.filter-keyword { grid-column: span 2; }
.filter-actions { display: flex; align-items: center; gap: 8px; align-self: end; }
.log-summary, .incident-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.log-summary > span { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--muted); font-size: 11px; }
.log-summary > span strong { margin-left: 6px; color: var(--text); font-size: 15px; }
.warning-text { color: var(--warn) !important; }
.log-table-wrap { max-height: calc(100vh - 390px); overflow: auto; }
.log-table { min-width: 980px; }
.log-row, .clickable-row { cursor: pointer; transition: background .12s; }
.log-row:hover, .clickable-row:hover { background: rgba(82,183,255,.055); }
.log-message { max-width: 650px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.log-level { display: inline-flex; min-width: 66px; justify-content: center; padding: 4px 7px; border-radius: 7px; font-size: 10px; font-weight: 900; }
.log-level.CONSOLE { color: #9ed7ff; background: rgba(82,183,255,.12); }
.log-level.WARNING { color: #ffd07e; background: rgba(255,189,89,.12); }
.log-level.ERROR { color: #ff93a1; background: rgba(255,101,119,.13); }
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.error-stack { color: #ff9aa7; border-color: rgba(255,101,119,.24); background: rgba(255,101,119,.06); }
.incident-list { display: grid; gap: 10px; padding: 14px; }
.incident-row { cursor: pointer; transition: background .12s; }
.incident-row:hover td { background: rgba(82,183,255,.045); }
.incident-row.CRITICAL td:first-child { box-shadow: inset 3px 0 var(--bad); }
.incident-row.WARNING td:first-child { box-shadow: inset 3px 0 var(--warn); }
.incident-row.INFO td:first-child { box-shadow: inset 3px 0 var(--accent); }
.incident-row.RECOVERED td:first-child { box-shadow: inset 3px 0 var(--good); }
.incident-row.RECOVERED { opacity: .86; }
.incident-row small { display: inline-block; margin-top: 4px; color: var(--muted); }
.alert-level { display: inline-flex; justify-content: center; min-width: 82px; padding: 6px 8px; border-radius: 8px; font-size: 10px; font-weight: 900; }
.alert-level.CRITICAL { color: #ff9aa7; background: rgba(255,101,119,.13); }
.alert-level.WARNING { color: #ffd07e; background: rgba(255,189,89,.12); }
.alert-level.INFO { color: #9ed7ff; background: rgba(82,183,255,.12); }
.alert-level.RECOVERED { color: #83efbd; background: rgba(61,220,151,.12); }
.channel-grid { display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); gap: 9px; margin-bottom: 16px; }
.check-label { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); font-size: 11px; }
.check-label input { width: auto; margin: 0; }
.check-label small { color: var(--muted); font-size: 9px; }
.settings-table { margin-top: 14px; border: 1px solid var(--line); border-radius: 10px; }
.settings-table input { min-width: 86px; padding: 8px; }
.alert-root { position: fixed; z-index: 190; top: 18px; right: 18px; display: grid; gap: 9px; width: min(420px, calc(100vw - 36px)); pointer-events: none; }
.alert-popup { pointer-events: auto; width: 100%; display: grid; gap: 4px; padding: 14px 16px; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; color: var(--text); background: rgba(16,22,32,.97); box-shadow: 0 18px 55px rgba(0,0,0,.52); backdrop-filter: blur(8px); animation: alert-in .18s ease-out; }
.alert-popup.WARNING { border-left-color: var(--warn); }
.alert-popup.CRITICAL { border-left-color: var(--bad); }
.alert-popup.RECOVERED { border-left-color: var(--good); }
.alert-popup-level { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.alert-popup strong { font-size: 13px; }
.alert-popup > span:not(.alert-popup-level), .alert-popup small { color: var(--muted); font-size: 10px; }
.alert-popup small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes alert-in { from { opacity: 0; transform: translateY(-8px); } }

@media (max-width: 1100px) {
  .filter-grid, .filter-grid.compact { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}
@media (max-width: 760px) {
  .phase3-intro { align-items: flex-start; flex-direction: column; }
  .filter-grid, .filter-grid.compact { grid-template-columns: 1fr 1fr; }
  .filter-keyword { grid-column: 1 / -1; }
  .filter-actions { grid-column: 1 / -1; }
  .log-summary, .incident-summary-grid { grid-template-columns: 1fr 1fr; }
  .channel-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .filter-grid, .filter-grid.compact, .log-summary, .incident-summary-grid { grid-template-columns: 1fr; }
  .filter-keyword, .filter-actions { grid-column: auto; }
}

/* Phase 4 game, user and cashier operations control */
.phase4-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(120deg, rgba(135,94,255,.12), rgba(82,183,255,.05)); }
[data-profile="PRODUCTION"] .phase4-intro { background:linear-gradient(120deg, rgba(255,95,69,.12), rgba(255,189,89,.035)); }
.phase4-intro > div:first-child strong { display:block; font-size:15px; }
.phase4-intro > div:first-child span { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.operations-store-status { min-width:220px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; background:rgba(0,0,0,.18); }
.operations-store-status strong, .operations-store-status span { display:block; }
.operations-store-status strong { font-size:11px; letter-spacing:.05em; }
.operations-store-status span { margin-top:3px; color:var(--muted); font-size:9px; }
.operations-store-status.ready { border-color:rgba(61,220,151,.32); }
.operations-store-status.ready strong { color:var(--good); }
.operations-store-status.fallback { border-color:rgba(255,189,89,.35); }
.operations-store-status.fallback strong { color:var(--warn); }
.operations-summary-grid { display:grid; grid-template-columns:repeat(3, minmax(180px,1fr)); gap:12px; margin-bottom:14px; }
.operations-control-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:14px; margin-bottom:14px; align-items:start; }
.operations-panel { margin-bottom:14px; }
.operations-panel .panel-header p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.operations-global-form { grid-template-columns:repeat(4, minmax(130px,1fr)); }
.operations-global-form .full, .operations-control-grid .full, .announcement-form-grid .full { grid-column:1 / -1; }
.operations-control-grid .form-grid { grid-template-columns:repeat(2, minmax(120px,1fr)); }
.announcement-form-grid { display:grid; grid-template-columns:repeat(3, minmax(150px,1fr)); gap:12px; }
.form-actions { display:flex; justify-content:flex-end; gap:8px; }
.version-badge { display:inline-flex; align-items:center; justify-content:center; min-width:44px; padding:5px 8px; border:1px solid var(--line); border-radius:8px; color:var(--muted); background:rgba(0,0,0,.16); font-size:10px; }
.mode-badge, .service-type { display:inline-flex; min-width:74px; justify-content:center; padding:5px 7px; border-radius:8px; font-size:9px; font-weight:900; }
.mode-badge.OPEN, .mode-badge.NORMAL, .mode-badge.ACTIVE { color:#83efbd; background:rgba(61,220,151,.12); }
.mode-badge.BLOCKED, .mode-badge.EMERGENCY, .mode-badge.EMERGENCY_STOP, .mode-badge.DISABLED { color:#ff9aa7; background:rgba(255,101,119,.13); }
.mode-badge.SAFE, .mode-badge.DRAINING, .mode-badge.SCHEDULED, .mode-badge.READ_ONLY { color:#ffd07e; background:rgba(255,189,89,.12); }
.mode-badge.DRAFT, .mode-badge.NONE, .mode-badge.DEPOSIT_ONLY, .mode-badge.WITHDRAW_ONLY { color:#9ed7ff; background:rgba(82,183,255,.12); }
.service-type.GAME { color:#c8adff; background:rgba(135,94,255,.14); }
.service-type.FRONT, .service-type.LOBBY { color:#9ed7ff; background:rgba(82,183,255,.12); }
.service-type.CASHIER { color:#ffd07e; background:rgba(255,189,89,.12); }
.row-stale { opacity:.62; }
.operations-confirm .warning-box { display:grid; gap:5px; margin-bottom:14px; padding:12px 13px; border:1px solid rgba(255,101,119,.28); border-radius:10px; background:rgba(255,101,119,.07); }
.operations-confirm .warning-box strong { color:#ffadb8; }
.operations-confirm .warning-box span { color:var(--muted); font-size:10px; }
.announcement-list { border-top:1px solid var(--line); }
.announcement-list td small { display:inline-block; max-width:520px; margin-top:4px; overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.operations-page .toolbar-right input { min-width:240px; }
.operations-page textarea { resize:vertical; }

@media (max-width: 1250px) {
  .operations-control-grid { grid-template-columns:1fr 1fr; }
  .operations-control-grid > :first-child { grid-column:1 / -1; }
  .operations-global-form { grid-template-columns:repeat(3, minmax(130px,1fr)); }
}
@media (max-width: 900px) {
  .operations-summary-grid { grid-template-columns:repeat(2, minmax(150px,1fr)); }
  .operations-global-form, .announcement-form-grid { grid-template-columns:repeat(2, minmax(130px,1fr)); }
}
@media (max-width: 760px) {
  .phase4-intro { align-items:flex-start; flex-direction:column; }
  .operations-store-status { width:100%; }
  .operations-control-grid { grid-template-columns:1fr; }
  .operations-control-grid > :first-child { grid-column:auto; }
  .operations-summary-grid, .operations-global-form, .announcement-form-grid, .operations-control-grid .form-grid { grid-template-columns:1fr; }
  .operations-global-form .full, .operations-control-grid .full, .announcement-form-grid .full { grid-column:auto; }
  .operations-page .toolbar-right { width:100%; }
  .operations-page .toolbar-right input { min-width:0; width:100%; }
}

/* Phase 5 maintenance, backup and restore */
.phase5-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(120deg, rgba(255,189,89,.12), rgba(82,183,255,.05)); }
[data-profile="PRODUCTION"] .phase5-intro { background:linear-gradient(120deg, rgba(255,95,69,.14), rgba(255,189,89,.04)); }
.phase5-intro > div:first-child strong { display:block; font-size:15px; }
.phase5-intro > div:first-child span { display:block; max-width:850px; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.55; }
.maintenance-grid { display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:14px; margin-bottom:14px; align-items:start; }
.phase5-form { grid-template-columns:repeat(2,minmax(140px,1fr)); }
.phase5-form .full { grid-column:1 / -1; }
.phase5-form select[multiple] { min-height:96px; }
.checkbox-row { display:flex; flex-wrap:wrap; gap:8px 12px; padding:10px; border:1px solid var(--line); border-radius:10px; background:rgba(0,0,0,.12); }
.checkbox-row label { display:flex; flex-direction:row; align-items:center; gap:5px; font-size:10px; }
.checkbox-row input { width:auto; }
.active-maintenance { margin-bottom:14px; border-color:rgba(255,189,89,.34); }
.maintenance-progress { height:7px; margin:0 18px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.06); }
.maintenance-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg, var(--warn), var(--good)); transition:width .35s ease; }
.panel-footer-actions { display:flex; justify-content:flex-end; gap:8px; padding:0 18px 16px; }
.maintenance-page td.good { color:var(--good); }
.maintenance-page td.warn { color:var(--warn); }
.maintenance-page td.bad { color:var(--bad); }
@media (max-width:1250px) { .maintenance-grid { grid-template-columns:1fr 1fr; } .maintenance-grid > :first-child { grid-column:1 / -1; } }
@media (max-width:760px) { .phase5-intro { align-items:flex-start; flex-direction:column; } .maintenance-grid,.phase5-form { grid-template-columns:1fr; } .maintenance-grid > :first-child,.phase5-form .full { grid-column:auto; } }

/* Phase 6 deployment, version, rollback and environment management */
.phase6-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(120deg, rgba(61,220,151,.11), rgba(82,183,255,.06)); }
[data-profile="PRODUCTION"] .phase6-intro { background:linear-gradient(120deg, rgba(255,95,69,.14), rgba(135,94,255,.05)); }
.phase6-intro > div:first-child strong { display:block; font-size:15px; }
.phase6-intro > div:first-child span { display:block; max-width:880px; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.55; }
.deployment-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:12px; margin-bottom:14px; }
.deployment-grid { display:grid; grid-template-columns:repeat(3,minmax(260px,1fr)); gap:14px; margin-bottom:14px; align-items:start; }
.deployment-grid .panel { height:100%; }
.phase6-form { grid-template-columns:repeat(2,minmax(130px,1fr)); }
.phase6-form .full { grid-column:1 / -1; }
.phase6-form textarea { min-height:92px; resize:vertical; }
.phase6-form input[type="file"] { min-height:42px; padding:8px; }
.phase6-form .check-label { min-height:38px; }
.deployment-active { margin-bottom:14px; border-color:rgba(255,189,89,.32); }
.deploy-progress { width:100%; min-width:90px; height:6px; margin-bottom:4px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.07); }
.deploy-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--accent),var(--good)); transition:width .3s ease; }
.deployment-page code { font-size:10px; overflow-wrap:anywhere; }
.deployment-page td small { color:var(--muted); }
.deployment-page .table-wrap { overflow:auto; }
.deployment-page table { min-width:880px; }
.deployment-page .panel-header p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.deployment-page .warning-box { padding:10px 12px; border:1px solid rgba(255,189,89,.25); border-radius:9px; background:rgba(255,189,89,.06); color:var(--muted); font-size:10px; line-height:1.5; }
@media (max-width:1300px) { .deployment-grid { grid-template-columns:1fr 1fr; } .deployment-grid > :first-child { grid-column:1 / -1; } }
@media (max-width:900px) { .deployment-summary-grid { grid-template-columns:1fr 1fr; } .deployment-grid { grid-template-columns:1fr; } .deployment-grid > :first-child { grid-column:auto; } }
@media (max-width:760px) { .phase6-intro { align-items:flex-start; flex-direction:column; } .phase6-form { grid-template-columns:1fr; } .phase6-form .full { grid-column:auto; } }
@media (max-width:460px) { .deployment-summary-grid { grid-template-columns:1fr; } }

/* Phase 7: automatic recovery, leak detection and operations analysis */
.recovery-page .danger-panel { border-color: rgba(255, 90, 90, .45); box-shadow: inset 0 1px 0 rgba(255, 90, 90, .08); }
.recovery-page .recovery-policy-form { padding: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.recovery-page code { display: inline-block; max-width: 440px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; white-space: nowrap; }
.recovery-page table small { display: inline-block; max-width: 520px; color: var(--muted); line-height: 1.45; white-space: normal; }
.recovery-page .metric-card strong.bad { color: #ff7777; }
.recovery-page .metric-card strong.warn { color: #ffbd68; }
.recovery-page .metric-card strong.good { color: #60d39d; }
@media (max-width: 900px) { .recovery-page .recovery-policy-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .recovery-page .recovery-policy-form { grid-template-columns: 1fr; } }

/* Phase 8: Stress Test, operations statistics and final dashboard */
.final-dashboard-head, .phase8-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; padding:15px 17px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(135deg, rgba(82,183,255,.10), rgba(99,230,190,.04)); }
.final-dashboard-head strong, .phase8-intro strong { display:block; font-size:15px; }
.final-dashboard-head span, .phase8-intro span { display:block; margin-top:4px; color:var(--muted); font-size:11px; }
.period-switch { display:flex; padding:3px; border:1px solid var(--line); border-radius:10px; background:rgba(0,0,0,.16); }
.period-switch button { border:0; border-radius:7px; padding:7px 12px; color:var(--muted); background:transparent; cursor:pointer; }
.period-switch button.active { color:var(--text); background:rgba(82,183,255,.18); }
.dashboard-kpi-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-bottom:12px; }
.dashboard-kpi { min-width:0; padding:14px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.dashboard-kpi.primary { border-color:rgba(82,183,255,.38); background:linear-gradient(145deg,rgba(82,183,255,.14),var(--panel)); }
.dashboard-kpi span,.dashboard-kpi small { display:block; color:var(--muted); font-size:10px; }
.dashboard-kpi strong { display:block; margin:7px 0 5px; font-size:21px; letter-spacing:-.04em; }
.infra-health-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.infra-health-grid>div { padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.018); }
.infra-health-grid span,.infra-health-grid small { display:block; color:var(--muted); font-size:10px; }
.infra-health-grid strong { display:block; margin:5px 0 3px; font-size:15px; }
.final-chart-grid .chart-card canvas { height:190px; }
.dashboard-columns { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-bottom:14px; }
.stress-runner-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.stress-runner-card { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; min-height:150px; padding:15px; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.stress-runner-card.disabled { opacity:.64; }
.stress-runner-card h3 { margin:8px 0 5px; font-size:14px; }
.stress-runner-card p { margin:0 0 7px; color:var(--muted); font-size:11px; line-height:1.5; }
.stress-runner-card small { display:block; max-width:260px; overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.runner-state { display:inline-flex; padding:4px 7px; border:1px solid var(--line); border-radius:999px; color:var(--muted); font-size:9px; }
.runner-state.ready { border-color:rgba(99,230,190,.35); color:#63e6be; background:rgba(99,230,190,.08); }
.stress-progress { width:150px; height:7px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.07); }
.stress-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#52b7ff,#63e6be); }
.failure-cell { max-width:260px; white-space:normal; }
.result-file-list { display:grid; gap:7px; max-height:260px; overflow:auto; }
.result-file { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:9px 11px; border:1px solid var(--line); border-radius:9px; color:var(--text); text-decoration:none; }
.result-file:hover { border-color:rgba(82,183,255,.4); background:rgba(82,183,255,.06); }
.result-file span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.result-file small { flex:none; color:var(--muted); }
.report-preview { max-height:360px; overflow:auto; }

@media (max-width: 1500px) {
  .dashboard-kpi-grid,.infra-health-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 1100px) {
  .stress-runner-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-columns { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .final-dashboard-head,.phase8-intro { align-items:flex-start; flex-direction:column; }
  .dashboard-kpi-grid,.infra-health-grid,.stress-runner-grid { grid-template-columns:1fr; }
  .period-switch { width:100%; }
  .period-switch button { flex:1; }
  .stress-progress { width:100px; }
}

/* Phase 5: separately scheduled, localized maintenance messages */
.maintenance-message-panel { margin-bottom:14px; border-color:rgba(82,183,255,.28); }
.maintenance-message-panel .panel-header p { max-width:820px; }
.maintenance-message-form { padding-top:14px; }
.maintenance-message-help { padding:10px 12px; border:1px solid rgba(82,183,255,.20); border-radius:10px; background:rgba(82,183,255,.055); color:var(--muted); font-size:10px; line-height:1.55; }
.maintenance-message-language-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.maintenance-message-language-grid label { min-width:0; padding:10px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.015); }
.maintenance-message-language-grid label > span { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:7px; color:var(--text); font-size:10px; font-weight:800; }
.maintenance-message-language-grid label > span small { color:var(--muted); font-size:9px; font-weight:700; }
.maintenance-message-language-grid textarea { width:100%; min-height:68px; resize:vertical; line-height:1.5; }
.maintenance-message-list { border-top:1px solid var(--line); }
.maintenance-message-list table { min-width:920px; }
.maintenance-message-list td:last-child { white-space:nowrap; }
.maintenance-message-list .button + .button { margin-left:5px; }
.mode-badge.UPCOMING { color:#9ed7ff; background:rgba(82,183,255,.12); }
.mode-badge.ENDED { color:var(--muted); background:rgba(255,255,255,.06); }
@media (max-width:1180px) { .maintenance-message-language-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) { .maintenance-message-language-grid { grid-template-columns:1fr; } .maintenance-message-panel .panel-header { align-items:flex-start; flex-direction:column; } }

/* Controller self memory diagnostics */
.controller-memory-page { display:grid; gap:14px; }
.memory-intro { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:16px 18px; border:1px solid var(--line); border-radius:14px; background:linear-gradient(120deg, rgba(82,183,255,.11), rgba(135,94,255,.055)); }
.memory-intro strong { display:block; font-size:15px; }
.memory-intro span { display:block; max-width:900px; margin-top:4px; color:var(--muted); font-size:11px; line-height:1.55; }
.memory-live { display:grid; justify-items:end; gap:5px; min-width:150px; }
.memory-live .live-indicator { color:var(--good); }
.memory-live small { color:var(--muted); font-size:9px; }
.memory-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:10px; }
.memory-kpi { min-width:0; padding:14px 15px; border:1px solid var(--line); border-radius:13px; background:var(--panel); }
.memory-kpi span,.memory-kpi small { display:block; color:var(--muted); font-size:10px; }
.memory-kpi strong { display:block; margin:7px 0 5px; font-size:20px; letter-spacing:-.03em; }
.memory-kpi.good { border-color:rgba(61,220,151,.3); }
.memory-kpi.warn { border-color:rgba(255,189,89,.38); background:rgba(255,189,89,.045); }
.memory-kpi.bad { border-color:rgba(255,101,119,.42); background:rgba(255,101,119,.055); }
.memory-kpi.good strong { color:var(--good); }
.memory-kpi.warn strong,.memory-table .warn { color:var(--warn); }
.memory-kpi.bad strong,.memory-table .bad { color:var(--bad); }
.memory-table { min-width:1060px; }
.memory-table td { vertical-align:top; }
.memory-table td > small { display:block; margin-top:4px; color:var(--muted); font-size:9px; }
.memory-table code { color:#a9dcff; font-size:10px; }
.memory-value { font-weight:900; font-variant-numeric:tabular-nums; }
.memory-top { padding:6px 9px; border:1px solid rgba(82,183,255,.23); border-radius:8px; color:#9ed7ff; background:rgba(82,183,255,.06); font-size:10px; }
.memory-details summary { cursor:pointer; color:#9ed7ff; font-size:10px; font-weight:800; white-space:nowrap; }
.memory-detail-meta { display:flex; flex-wrap:wrap; gap:5px; margin:8px 0; }
.memory-detail-meta span { display:inline-flex; gap:5px; padding:4px 6px; border:1px solid var(--line); border-radius:6px; color:var(--muted); background:rgba(255,255,255,.018); font-size:8px; }
.memory-detail-meta b { color:var(--text); font-weight:800; }
.memory-breakdown { display:grid; gap:4px; min-width:270px; max-width:420px; margin-top:7px; padding:7px; border:1px solid var(--line); border-radius:8px; background:rgba(0,0,0,.16); }
.memory-breakdown > div { display:grid; grid-template-columns:minmax(110px,1fr) auto auto; gap:8px; align-items:center; font-size:8px; }
.memory-breakdown span { overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }
.memory-breakdown b { color:var(--text); font-variant-numeric:tabular-nums; }
.memory-breakdown small { color:var(--muted); }
.memory-activity-wrap { max-height:520px; overflow:auto; }
.memory-notes { display:grid; gap:5px; padding:11px 13px; border:1px solid rgba(255,189,89,.20); border-radius:10px; background:rgba(255,189,89,.035); }
.memory-notes span { color:var(--muted); font-size:9px; line-height:1.5; }
.memory-panel .panel-header p { margin:4px 0 0; color:var(--muted); font-size:10px; line-height:1.5; }
@media (max-width:1300px) { .memory-kpi-grid { grid-template-columns:repeat(2,minmax(170px,1fr)); } }
@media (max-width:760px) { .memory-intro { align-items:flex-start; flex-direction:column; } .memory-live { justify-items:start; } .memory-kpi-grid { grid-template-columns:1fr; } }

/* 1s controller memory flow logger */
.memory-flow-panel { border-color:rgba(82,183,255,.22); }
.memory-flow-actions { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.memory-flow-summary { display:flex; flex-wrap:wrap; gap:8px; padding:10px 12px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:rgba(255,255,255,.012); }
.memory-flow-summary span { display:inline-flex; align-items:center; gap:6px; padding:5px 7px; border:1px solid var(--line); border-radius:7px; color:var(--muted); font-size:9px; }
.memory-flow-summary b { color:var(--text); font-weight:800; }
.memory-flow-summary em { font-style:normal; font-weight:900; }
.memory-flow-summary .memory-flow-error { flex:1 1 320px; border-color:rgba(255,101,119,.28); color:var(--bad); }
.memory-flow-live-wrap { max-height:520px; overflow:auto; }
.memory-flow-table { min-width:1380px; }
.memory-flow-phase { display:inline-flex; align-items:center; padding:3px 6px; border:1px solid var(--line); border-radius:6px; color:var(--muted); font-size:9px; font-weight:900; white-space:nowrap; }
.memory-flow-phase.MEMORY_SURGE { color:var(--bad); border-color:rgba(255,101,119,.28); background:rgba(255,101,119,.05); }
.memory-flow-phase.FUNCTION_ALLOC { color:var(--warn); border-color:rgba(255,189,89,.28); background:rgba(255,189,89,.05); }
.memory-flow-phase.GC_RELEASE,.memory-flow-phase.MEMORY_RELEASE { color:var(--good); border-color:rgba(61,220,151,.28); background:rgba(61,220,151,.05); }
.memory-flow-files { padding:10px 12px 12px; border-top:1px solid var(--line); }
.memory-flow-files summary { cursor:pointer; color:#9ed7ff; font-size:10px; font-weight:850; }
.memory-flow-files .table-wrap { margin-top:9px; max-height:360px; }
.button.compact { min-height:26px; padding:4px 8px; font-size:9px; }
@media (max-width:760px) { .memory-flow-actions { justify-content:flex-start; } .memory-flow-summary { align-items:flex-start; flex-direction:column; } }

/* Maintenance page bundle: HTML/CSS/images are stored before the reservation becomes active. */
.maintenance-page-bundle { display:grid; gap:10px; padding:14px; border:1px solid rgba(255,43,139,.24); border-radius:12px; background:rgba(255,43,139,.045); }
.maintenance-page-bundle-head { display:grid; gap:4px; }
.maintenance-page-bundle-head strong { color:var(--text); font-size:11px; font-weight:900; }
.maintenance-page-bundle-head span { color:var(--muted); font-size:9px; line-height:1.55; }
.maintenance-page-bundle-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.maintenance-page-bundle-grid label { min-width:0; }
.maintenance-page-bundle-grid input[type="file"] { padding:8px; }
.maintenance-page-bundle-help { padding:10px 11px; border:1px solid rgba(255,255,255,.07); border-radius:9px; background:rgba(0,0,0,.14); color:var(--muted); font-size:9px; line-height:1.65; }
.maintenance-page-bundle-help code { color:#f5acd0; font-size:9px; }
@media (max-width:700px) { .maintenance-page-bundle-grid { grid-template-columns:1fr; } }
