:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --bg-deep: #edf3f9;
  --panel: #ffffff;
  --panel-2: #f7faff;
  --panel-3: #eef4fb;
  --line: rgba(70, 98, 132, 0.14);
  --line-strong: rgba(70, 98, 132, 0.25);
  --text: #17263a;
  --muted: #60758c;
  --muted-2: #8495a8;
  --blue: #4779e8;
  --blue-2: #315fc9;
  --green: #1fa673;
  --amber: #d99524;
  --red: #dd5263;
  --cyan: #1aa7b8;
  --shadow: 0 22px 70px rgba(44, 72, 106, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 87% 7%, rgba(70, 123, 232, 0.11), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.48; }
input, select { color: var(--text); }

:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  width: 244px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  padding: 1.6rem 1rem 1.15rem;
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 0.7rem 1.75rem;
}

.sidebar-brand > div:last-child { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-brand strong { font-size: 1rem; letter-spacing: 0.01em; }
.sidebar-brand > div:last-child span { color: var(--muted); font-size: 0.84rem; margin-top: 0.2rem; }

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(71, 121, 232, 0.24);
  border-radius: 10px;
  background: linear-gradient(145deg, #eef4ff, #e4edff);
  box-shadow: inset 0 0 18px rgba(71, 121, 232, 0.06);
}

.brand-mark span {
  position: absolute;
  width: 13px;
  height: 2px;
  border-radius: 5px;
  background: var(--blue-2);
  box-shadow: 0 0 10px rgba(71, 121, 232, 0.25);
}
.brand-mark span:first-child { transform: translateY(-5px); }
.brand-mark span:last-child { transform: translateY(5px); }
.brand-mark.large { width: 50px; height: 50px; border-radius: 14px; margin-bottom: 1.4rem; }
.brand-mark.large span { width: 19px; }

.main-nav { display: flex; flex: 1; flex-direction: column; gap: 0.32rem; }

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0.8rem;
  border: 0;
  border-radius: 11px;
  background: transparent;
  padding: 0.72rem 0.8rem;
  color: var(--muted);
  font-size: 0.91rem;
  text-align: left;
  transition: 160ms ease;
}

.nav-item::before {
  position: absolute;
  left: -1rem;
  width: 3px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: var(--blue);
  content: "";
  opacity: 0;
}

.nav-item:hover { background: #f2f6fb; color: var(--text); }
.nav-item.active { background: #eaf1ff; color: #2e5fc8; }
.nav-item.active::before { opacity: 1; }

.sidebar-foot { display: flex; flex-direction: column; gap: 0.9rem; }
.connection-state { display: flex; align-items: center; gap: 0.7rem; border-top: 1px solid var(--line); padding: 1.1rem 0.7rem 0; }
.connection-state > div { display: flex; flex-direction: column; }
.connection-state span:not(.status-dot) { color: var(--muted-2); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.08em; }
.connection-state strong { margin-top: 0.1rem; font-size: 0.82rem; font-weight: 600; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.status-dot.healthy { background: var(--green); box-shadow: 0 0 10px rgba(31, 166, 115, 0.34); }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 10px rgba(217, 149, 36, 0.3); }
.status-dot.error { background: var(--red); }

.workspace { min-height: 100vh; margin-left: 244px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 248, 252, 0.88);
  padding: 1rem clamp(1.2rem, 3vw, 2.5rem);
  backdrop-filter: blur(18px);
}

.topbar h1 { margin: 0.12rem 0 0; font-size: 1.55rem; font-weight: 650; letter-spacing: -0.025em; }
.eyebrow { margin: 0; color: #5579a7; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 1rem; }
.last-refresh { color: var(--muted-2); font-size: 0.78rem; }
.mobile-menu { display: none !important; }

.content { width: min(1500px, 100%); margin: 0 auto; padding: 2rem clamp(1.2rem, 3vw, 2.5rem) 4rem; }
.view { display: none; }
.view.active-view { display: block; animation: view-in 220ms ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } }

.notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
  border: 1px solid rgba(217, 149, 36, 0.26);
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #fff9ec, #fffdf7);
  padding: 1rem 1.15rem;
}
.notice strong { display: block; color: #9b6611; font-size: 0.92rem; }
.notice p { margin: 0.18rem 0 0; color: var(--muted); font-size: 0.84rem; }
.notice-badge { flex: 0 0 auto; border: 1px solid rgba(217, 149, 36, 0.32); border-radius: 99px; padding: 0.28rem 0.58rem; color: #9b6611; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-card {
  position: relative;
  min-height: 142px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 8px 24px rgba(58, 86, 120, 0.055);
}
.stat-card::after { position: absolute; right: -2rem; bottom: -3rem; width: 8rem; height: 8rem; border-radius: 50%; background: rgba(82, 119, 162, 0.05); content: ""; }
.stat-card.accent-green::after { background: rgba(31, 166, 115, 0.08); }
.stat-card.accent-amber::after { background: rgba(217, 149, 36, 0.08); }
.stat-card.accent-blue::after { background: rgba(71, 121, 232, 0.09); }
.stat-label { display: block; color: var(--muted); font-size: 0.82rem; }
.stat-card strong { display: block; margin-top: 0.4rem; font-size: 2.15rem; font-weight: 620; letter-spacing: -0.05em; }
.stat-card small { color: var(--muted-2); font-size: 0.74rem; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin: 2.15rem 0 1rem; }
.section-head h2 { margin: 0; font-size: 1.08rem; letter-spacing: -0.015em; }
.section-head p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.82rem; }
.hero-head { align-items: center; margin-top: 0.25rem; margin-bottom: 1.4rem; }
.hero-head h2 { margin-top: 0.25rem; font-size: 1.65rem; }
.filter-row { display: flex; gap: 0.65rem; }

.search-box {
  display: flex;
  min-width: min(300px, 28vw);
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 0 0.8rem;
  color: var(--muted-2);
}
.search-box:focus-within { border-color: rgba(93, 141, 255, 0.55); box-shadow: 0 0 0 3px rgba(93, 141, 255, 0.08); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; padding: 0.68rem 0; font-size: 0.84rem; }
.search-box input::placeholder { color: var(--muted-2); }

.select-wrap { position: relative; }
.select-wrap::after { position: absolute; top: 50%; right: 0.8rem; width: 7px; height: 7px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); content: ""; pointer-events: none; transform: translateY(-70%) rotate(45deg); }
.select-wrap select { width: 100%; appearance: none; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: var(--panel); padding: 0.68rem 2.25rem 0.68rem 0.85rem; color: var(--muted); font-size: 0.84rem; }
.select-wrap select:focus { border-color: rgba(93, 141, 255, 0.55); box-shadow: 0 0 0 3px rgba(93, 141, 255, 0.08); }

.container-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.container-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #f8fbff);
  padding: 1.1rem;
  transition: border-color 160ms ease, transform 160ms ease;
}
.container-card:hover { border-color: rgba(71, 121, 232, 0.26); box-shadow: 0 10px 28px rgba(58, 86, 120, 0.07); transform: translateY(-1px); }
.container-main { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem; }
.container-identity { display: flex; min-width: 0; align-items: center; gap: 0.82rem; }
.container-cube { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(71, 121, 232, 0.2); border-radius: 11px; background: #edf3ff; color: #4779e8; }
.container-copy { min-width: 0; }
.container-copy h3 { overflow: hidden; margin: 0; font-size: 0.94rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.container-copy p { overflow: hidden; margin: 0.18rem 0 0; color: var(--muted-2); font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.state-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 0.4rem; border: 1px solid var(--line); border-radius: 99px; padding: 0.28rem 0.55rem; color: var(--muted); font-size: 0.7rem; }
.state-badge .status-dot { width: 6px; height: 6px; }
.state-badge.running { border-color: rgba(31, 166, 115, 0.2); background: #edf9f4; color: #16815a; }
.state-badge.stopped { border-color: rgba(217, 149, 36, 0.2); background: #fff8ea; color: #a86e10; }
.container-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; margin: 1rem 0; }
.meta-item { min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #f7faff; padding: 0.55rem 0.65rem; }
.meta-item span { display: block; color: var(--muted-2); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em; }
.meta-item strong { display: block; overflow: hidden; margin-top: 0.16rem; color: #4c6178; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.7rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.container-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid var(--line); padding-top: 0.85rem; }

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  transition: 150ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.spin { animation: spin 850ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.button-primary { border-color: rgba(71, 121, 232, 0.2); background: linear-gradient(135deg, #5a86e8, #3e6fd8); color: white; box-shadow: 0 8px 24px rgba(49, 91, 182, 0.18); }
.button-primary:hover:not(:disabled) { filter: brightness(1.08); }
.button-secondary { border-color: var(--line); background: var(--panel-2); color: #4c6178; }
.button-secondary:hover:not(:disabled), .button-ghost:hover:not(:disabled) { border-color: var(--line-strong); background: var(--panel-3); }
.button-ghost { border-color: var(--line); background: transparent; color: var(--muted); }
.button-danger { border-color: rgba(221, 82, 99, 0.24); background: #fff2f4; color: #c83f52; }
.button-danger:hover:not(:disabled) { background: #ffe8eb; }
.button-wide { width: 100%; }
.container-actions .button { min-height: 34px; padding: 0.42rem 0.65rem; font-size: 0.74rem; }
.container-actions .delete-button { margin-left: auto; padding-inline: 0.55rem; }

.empty-state { display: flex; min-height: 260px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.empty-icon { display: grid; width: 52px; height: 52px; place-items: center; border: 1px solid var(--line); border-radius: 15px; background: var(--panel); color: var(--muted-2); }
.empty-icon .icon { width: 1.5rem; height: 1.5rem; }
.empty-state h3 { margin: 1rem 0 0.25rem; color: #41566d; font-size: 0.95rem; }
.empty-state p { margin: 0; font-size: 0.82rem; }

.schedule-help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1.15rem; }
.schedule-help > div { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; border: 1px solid var(--line); border-radius: 11px; background: #ffffff; padding: 0.75rem 0.9rem; }
.schedule-help strong { font-size: 0.76rem; font-weight: 600; }
.schedule-help span { color: var(--muted); font-size: 0.72rem; }
code { border: 1px solid rgba(71, 121, 232, 0.16); border-radius: 5px; background: #eef4ff; padding: 0.1rem 0.28rem; color: #315fc9; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.schedule-list { display: grid; gap: 0.75rem; }
.schedule-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.6fr) minmax(160px, 0.6fr) auto; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(140deg, #ffffff, #f8fbff); padding: 1rem 1.1rem; }
.schedule-title { display: flex; min-width: 0; align-items: center; gap: 0.75rem; }
.schedule-title > div { min-width: 0; }
.schedule-title h3 { overflow: hidden; margin: 0; font-size: 0.88rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-title p { overflow: hidden; margin: 0.15rem 0 0; color: var(--muted-2); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.schedule-clock { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(71, 121, 232, 0.18); border-radius: 10px; background: #edf3ff; color: #4779e8; }
.schedule-detail span { display: block; color: var(--muted-2); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; }
.schedule-detail strong { display: block; margin-top: 0.12rem; color: #4c6178; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem; font-weight: 500; }
.schedule-last { font-family: inherit !important; }
.schedule-buttons { display: flex; justify-content: flex-end; gap: 0.4rem; }
.icon-button { display: inline-grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); }
.icon-button:hover { border-color: var(--line-strong); background: var(--panel-3); color: var(--text); }
.mini-action { width: 32px; height: 32px; }

.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #ffffff; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { border-bottom: 1px solid var(--line); padding: 0.8rem 1rem; color: var(--muted-2); font-size: 0.67rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
td { border-bottom: 1px solid rgba(70, 98, 132, 0.08); padding: 0.85rem 1rem; color: #4c6178; font-size: 0.77rem; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbff; }
.result-pill { display: inline-flex; border-radius: 99px; padding: 0.22rem 0.48rem; font-size: 0.67rem; }
.result-pill.success { background: #edf9f4; color: #16815a; }
.result-pill.error { background: #fff0f2; color: #c83f52; }
.empty-row { padding: 3rem; color: var(--muted); text-align: center; font-size: 0.84rem; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: 1rem; }
.settings-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #ffffff, #f8fbff); padding: 1.4rem; }
.settings-card h3 { margin: 0; font-size: 1rem; }
.settings-card p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.8rem; }
.settings-icon { display: grid; width: 42px; height: 42px; place-items: center; float: left; margin: 0 0.9rem 0.9rem 0; border: 1px solid rgba(71, 121, 232, 0.18); border-radius: 11px; background: #edf3ff; color: #4779e8; }
.settings-form { display: grid; clear: both; grid-template-columns: 1fr 1fr; gap: 0.8rem; padding-top: 1.1rem; }
.settings-form label:first-child { grid-column: 1 / -1; }
.settings-form label { color: var(--muted); font-size: 0.74rem; }
.settings-form input, .form-grid input { width: 100%; margin-top: 0.38rem; border: 1px solid var(--line); border-radius: 9px; outline: 0; background: #ffffff; padding: 0.68rem 0.75rem; }
.settings-form input:focus, .form-grid input:focus { border-color: rgba(93, 141, 255, 0.55); box-shadow: 0 0 0 3px rgba(93, 141, 255, 0.08); }
.settings-form .field-error { grid-column: 1 / -1; }
.settings-form .button { justify-self: start; }
.deployment-card > div:first-child { display: flex; align-items: center; gap: 0.5rem; }
.mini-label { color: var(--muted-2); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; }
.deployment-card h3 { margin-top: 1rem; }
.deployment-card dl { margin: 1.1rem 0; }
.deployment-card dl div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 0.62rem 0; font-size: 0.76rem; }
.deployment-card dt { color: var(--muted); }
.deployment-card dd { margin: 0; color: #4c6178; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.safe-copy { border-left: 2px solid rgba(54, 211, 148, 0.38); padding-left: 0.8rem; }

.login-view { position: relative; display: grid; min-height: 100vh; overflow: hidden; place-items: center; padding: 1.5rem; background: radial-gradient(circle at 50% -20%, #dce9ff 0, #f4f8fd 42%, #edf3f9 100%); }
.login-glow { position: absolute; border-radius: 50%; filter: blur(1px); opacity: 0.42; }
.login-glow-one { top: 8%; left: 14%; width: 17rem; height: 17rem; background: radial-gradient(circle, rgba(69, 122, 236, 0.12), transparent 68%); }
.login-glow-two { right: 10%; bottom: 5%; width: 22rem; height: 22rem; background: radial-gradient(circle, rgba(40, 178, 160, 0.1), transparent 68%); }
.login-card { position: relative; z-index: 1; width: min(430px, 100%); border: 1px solid rgba(70, 98, 132, 0.14); border-radius: 24px; background: rgba(255, 255, 255, 0.94); padding: 2.2rem; box-shadow: var(--shadow); }
.login-card h1 { margin: 0.35rem 0 0; font-size: 2rem; letter-spacing: -0.045em; }
.login-copy { margin: 0.75rem 0 1.6rem; color: var(--muted); font-size: 0.88rem; }
.login-form label { color: #4c6178; font-size: 0.78rem; }
.password-wrap { position: relative; margin-top: 0.42rem; }
.password-wrap input { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #ffffff; padding: 0.8rem 4rem 0.8rem 0.85rem; }
.password-wrap input:focus { border-color: rgba(93, 141, 255, 0.6); box-shadow: 0 0 0 3px rgba(93, 141, 255, 0.08); }
.text-button { position: absolute; top: 50%; right: 0.75rem; border: 0; background: transparent; color: var(--blue-2); font-size: 0.72rem; transform: translateY(-50%); }
.field-error { min-height: 1.2rem; margin: 0.45rem 0; color: #c83f52; font-size: 0.72rem; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 0.45rem; margin-top: 1.1rem; color: var(--muted-2); font-size: 0.7rem; }

.modal { width: min(650px, calc(100vw - 2rem)); border: 1px solid var(--line-strong); border-radius: 20px; background: #ffffff; padding: 0; color: var(--text); box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(36, 52, 72, 0.36); backdrop-filter: blur(4px); }
.modal form { padding: 1.4rem; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.modal-head h2 { margin: 0.25rem 0 0; font-size: 1.2rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-grid label { color: var(--muted); font-size: 0.74rem; }
.form-grid .select-wrap { margin-top: 0.38rem; }
.full-span { grid-column: 1 / -1; }
.field-help { display: block; margin-top: 0.38rem; color: var(--muted-2); font-size: 0.68rem; }
.switch-label { display: flex; align-items: center; gap: 0.6rem; align-self: end; min-height: 40px; }
.switch-label input { position: absolute; opacity: 0; pointer-events: none; }
.switch { position: relative; width: 36px; height: 20px; border-radius: 99px; background: #c9d4e0; transition: 150ms ease; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #ffffff; content: ""; transition: 150ms ease; }
.switch-label input:checked + .switch { background: #4779e8; }
.switch-label input:checked + .switch::after { background: white; transform: translateX(16px); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.confirm-modal { width: min(430px, calc(100vw - 2rem)); text-align: center; }
.confirm-icon { display: grid; width: 48px; height: 48px; place-items: center; margin: 0 auto 1rem; border-radius: 14px; }
.confirm-icon.danger { border: 1px solid rgba(221, 82, 99, 0.22); background: #fff0f2; color: #c83f52; }
.confirm-modal h2 { margin: 0; font-size: 1.1rem; }
.confirm-modal p { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.82rem; }
.force-label { display: flex; align-items: center; gap: 0.5rem; margin-top: 1rem; border: 1px solid rgba(221, 82, 99, 0.16); border-radius: 9px; background: #fff7f8; padding: 0.65rem; color: #a84855; font-size: 0.72rem; text-align: left; }

.toast-region { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 100; display: flex; width: min(360px, calc(100vw - 2.2rem)); flex-direction: column; gap: 0.6rem; }
.toast { border: 1px solid var(--line-strong); border-radius: 11px; background: #ffffff; padding: 0.8rem 0.95rem; color: #31465e; font-size: 0.78rem; box-shadow: 0 12px 36px rgba(44, 72, 106, 0.16); animation: toast-in 180ms ease; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.sidebar-backdrop { display: none; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container-list { grid-template-columns: 1fr; }
  .schedule-card { grid-template-columns: minmax(0, 1fr) minmax(140px, .55fr) auto; }
  .schedule-card .schedule-detail:nth-child(3) { display: none; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform 180ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 25; display: block; background: rgba(45, 61, 82, 0.3); opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .workspace { margin-left: 0; }
  .mobile-menu { display: inline-grid !important; margin-right: 0.8rem; }
  .mobile-menu span { width: 15px; height: 1px; background: currentColor; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .last-refresh { display: none; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .content { padding-top: 1.2rem; }
  .topbar { min-height: 78px; }
  .topbar h1 { font-size: 1.25rem; }
  .topbar .eyebrow { display: none; }
  .topbar-actions .button span { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .stat-card { min-height: 118px; padding: 1rem; }
  .stat-card strong { font-size: 1.75rem; }
  .section-head { align-items: stretch; flex-direction: column; }
  .filter-row { width: 100%; }
  .search-box { min-width: 0; flex: 1; }
  .container-meta { grid-template-columns: 1fr; }
  .schedule-help { grid-template-columns: 1fr; }
  .schedule-card { grid-template-columns: minmax(0, 1fr) auto; }
  .schedule-card .schedule-detail { display: none; }
  .settings-form, .form-grid { grid-template-columns: 1fr; }
  .settings-form label:first-child, .full-span { grid-column: auto; }
  .login-card { padding: 1.5rem; }
  .notice { align-items: flex-start; flex-direction: column; }
}

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