:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --ink: #17211b;
  --muted: #6d756f;
  --line: #dfe5df;
  --green: #1f8a55;
  --teal: #137c7a;
  --blue: #2f6fbd;
  --amber: #c7891f;
  --red: #bd4b3f;
  --shadow: 0 18px 50px rgba(23, 33, 27, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px 18px;
  background: #17211b;
  color: #f7fbf7;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #3fb979, #45a3ff);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: #a9b7ae;
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c9d4cd;
  cursor: pointer;
  text-align: left;
  padding: 0 14px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #afbbb4;
}

.sidebar-footer strong {
  display: block;
  margin-top: 8px;
  color: white;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 12px;
  font-size: 15px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-select {
  min-height: 42px;
  max-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: white;
  color: var(--ink);
}

.primary-button,
.icon-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  padding: 0 18px;
  background: var(--ink);
  color: white;
  font-weight: 700;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.icon-button {
  width: 42px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 20px;
}

.workspace {
  display: grid;
  gap: 20px;
}

.hidden {
  display: none;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-panel,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-panel {
  display: grid;
  min-height: 144px;
  align-content: space-between;
  padding: 18px;
}

.metric-panel span {
  color: var(--muted);
  font-size: 14px;
}

.metric-panel strong {
  font-size: 34px;
}

.metric-panel.strong {
  background: #effaf3;
  border-color: #b9dfc8;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eee9;
}

.progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 0.3s ease;
}

.progress.neutral i {
  background: var(--amber);
}

.dashboard-grid,
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.panel {
  padding: 20px;
}

.guide-panel,
.config-note {
  border: 1px solid #cfe1d6;
  border-radius: 8px;
  background: #f3fbf6;
  color: #354139;
}

.guide-panel {
  padding: 16px 18px;
}

.guide-panel h2,
.config-note strong {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.guide-panel p,
.config-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.config-note {
  margin-top: 14px;
  padding: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.inner-head {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f5ee;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.flow div {
  min-height: 128px;
  padding: 16px;
  border-radius: 8px;
  background: #f6f8f6;
  border: 1px solid var(--line);
}

.flow b {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
}

.flow span {
  color: #354139;
  font-weight: 700;
}

.activity-list,
.dimension-list,
.rule-list {
  display: grid;
  gap: 12px;
}

.activity {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity:last-child {
  border-bottom: 0;
}

.activity strong {
  display: block;
  margin-bottom: 4px;
}

.activity span,
.summary {
  color: var(--muted);
  line-height: 1.6;
}

.dimension {
  display: grid;
  gap: 8px;
}

.dimension-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.split-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.task-grid,
.monitor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.artifact-list {
  display: grid;
  gap: 14px;
}

.artifact {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.artifact h3 {
  margin: 0;
}

.artifact pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #354139;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

.task-card,
.monitor-card,
.rule {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.task-card,
.monitor-card {
  display: grid;
  gap: 14px;
  min-height: 176px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.task-card h3,
.monitor-card h3 {
  margin: 0;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  cursor: pointer;
  color: var(--ink);
  text-decoration: none;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  cursor: pointer;
  font-weight: 800;
}

.danger-button:hover:not(:disabled) {
  border-color: #fdba74;
  background: #ffedd5;
  transform: translateY(-1px);
}

.danger-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.rule {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
}

.switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #d1d8d2;
  padding: 3px;
}

.switch i {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: white;
}

.switch.on {
  background: var(--green);
}

.switch.on i {
  margin-left: auto;
}

.project-form {
  display: grid;
  gap: 12px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 150px 130px auto auto;
  gap: 10px;
  margin-bottom: 16px;
}

.inline-form.monitor-form {
  grid-template-columns: 180px minmax(260px, 1fr) auto;
}

.inline-form input,
.inline-form select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fbfcfb;
}

.project-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-form input,
.project-form textarea,
.project-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--ink);
  background: #fbfcfb;
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  grid-template-columns: none !important;
  gap: 10px !important;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.checkbox-row.compact {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.project-form textarea {
  min-height: 84px;
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ops-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.ops-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ops-row span {
  color: var(--muted);
}

.upgrade-box {
  display: none;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf8;
  color: var(--muted);
  line-height: 1.6;
}

.upgrade-box.show {
  display: block;
}

.upgrade-box strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.upgrade-form {
  margin-top: 16px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
}

.upgrade-box code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
}

.channel-list {
  display: grid;
  gap: 10px;
}

.sov-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sov-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.sov-card strong {
  font-size: 22px;
}

.sov-card span {
  color: var(--muted);
  font-size: 13px;
}

.channel-row,
.check-row,
.citation-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.channel-row p,
.check-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.check-row {
  grid-template-columns: 120px minmax(0, 1fr);
}

.citation-list {
  display: grid;
  gap: 10px;
}

.citation-row {
  grid-template-columns: minmax(180px, 1fr) 140px 120px;
}

.citation-row a {
  color: var(--blue);
  word-break: break-all;
}

.check-mark {
  font-weight: 800;
}

.check-mark.ok {
  color: var(--green);
}

.check-mark.warn {
  color: var(--amber);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  transform: translateY(24px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 27, 0.58);
}

.login-overlay.hidden {
  display: none;
}

.login-panel {
  display: grid;
  width: min(420px, 100%);
  gap: 16px;
  padding: 24px;
  border-radius: 8px;
  background: white;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.25);
}

.login-brand {
  color: var(--ink);
  padding: 0;
}

.login-brand span {
  color: var(--muted);
}

.login-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-panel input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

@media (max-width: 1100px) {
  .metric-grid,
  .task-grid,
  .monitor-grid,
  .flow,
  .sov-grid,
  .inline-form,
  .inline-form.monitor-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 14px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: auto;
  }

  .nav-item {
    text-align: center;
    white-space: nowrap;
  }

  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 20px 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .topbar-select {
    width: 100%;
    max-width: none;
  }

  .metric-grid,
  .task-grid,
  .monitor-grid,
  .flow,
  .split-list,
  .inline-form,
  .inline-form.monitor-form,
  .channel-row,
  .citation-row,
  .sov-grid {
    grid-template-columns: 1fr;
  }
}

/* Commercial UI refresh */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #111827;
  --muted: #64748b;
  --muted-strong: #475569;
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --green: #0f766e;
  --teal: #0d9488;
  --blue: #2563eb;
  --amber: #b7791f;
  --red: #b42318;
  --nav: #0f172a;
  --nav-soft: #182235;
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.16);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

body {
  background:
    linear-gradient(180deg, rgba(241, 245, 249, 0.88), rgba(248, 250, 252, 0.96) 280px),
    var(--bg);
  color: var(--ink);
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  gap: 22px;
  padding: 22px 16px;
  background: var(--nav);
  color: #f8fafc;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand {
  min-height: 58px;
  padding: 6px 8px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #0d9488, #2563eb);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.brand strong {
  font-size: 16px;
  line-height: 1.25;
}

.brand span {
  color: #94a3b8;
}

.nav-list {
  gap: 4px;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
  min-height: 44px;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 12px;
  width: 3px;
  height: 20px;
  border-radius: 999px;
  background: transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(1px);
}

.nav-item.active {
  background: var(--nav-soft);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-item.active::before {
  background: #2dd4bf;
}

.sidebar-footer {
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.sidebar-footer span {
  font-size: 12px;
}

.main {
  padding: 30px clamp(22px, 3vw, 40px) 48px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -30px calc(clamp(22px, 3vw, 40px) * -1) 24px;
  padding: 24px clamp(22px, 3vw, 40px) 18px;
  background: rgba(246, 247, 249, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  backdrop-filter: blur(12px);
}

.topbar h1,
h1 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: 0;
}

.eyebrow {
  color: var(--teal);
  letter-spacing: 0;
}

.topbar-actions {
  gap: 8px;
}

.topbar-select,
.inline-form input,
.inline-form select,
.project-form input,
.project-form textarea,
.project-form select,
.login-panel input {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.topbar-select:focus,
.inline-form input:focus,
.inline-form select:focus,
.project-form input:focus,
.project-form textarea:focus,
.project-form select:focus,
.login-panel input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.58);
  box-shadow: var(--focus);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button {
  border-radius: 8px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.primary-button {
  background: #111827;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.14);
}

.primary-button:hover:not(:disabled) {
  background: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.18);
}

.secondary-button,
.icon-button {
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  background: #f8fafc;
  transform: translateY(-1px);
}

.icon-button {
  font-size: 18px;
}

.workspace {
  gap: 18px;
}

.guide-panel,
.config-note {
  position: relative;
  overflow: hidden;
  border-color: #bfdbfe;
  background: #f8fbff;
  color: var(--muted-strong);
}

.guide-panel::before,
.config-note::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--blue);
}

.guide-panel {
  padding: 16px 18px 16px 20px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.05);
}

.guide-panel h2,
.config-note strong {
  color: #1e3a8a;
  font-size: 14px;
}

.guide-panel p,
.config-note p,
.summary {
  color: var(--muted-strong);
}

.metric-grid {
  gap: 16px;
}

.metric-panel,
.panel,
.task-card,
.monitor-card,
.table-wrap {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.metric-panel,
.panel {
  background: var(--surface);
}

.metric-panel {
  min-height: 132px;
  padding: 18px 18px 16px;
}

.metric-panel::after {
  content: "";
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: var(--teal);
}

.metric-panel:nth-child(2)::after {
  background: var(--blue);
}

.metric-panel:nth-child(3)::after {
  background: #7c3aed;
}

.metric-panel:nth-child(4)::after {
  background: var(--amber);
}

.metric-panel span {
  color: var(--muted);
  font-weight: 700;
}

.metric-panel strong {
  color: #0f172a;
  font-size: 34px;
  letter-spacing: 0;
}

.metric-panel.strong {
  border-color: #99f6e4;
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
}

.progress {
  height: 7px;
  background: #e2e8f0;
}

.progress i {
  background: linear-gradient(90deg, #0d9488, #2563eb);
}

.section-head {
  align-items: flex-start;
  margin-bottom: 16px;
}

.section-head h2 {
  color: #0f172a;
  font-size: 19px;
}

.status-pill,
.badge {
  min-height: 26px;
  border: 1px solid #ccfbf1;
  background: #f0fdfa;
  color: var(--green);
  white-space: nowrap;
}

.panel {
  padding: 20px;
}

.dashboard-grid,
.two-column {
  gap: 18px;
}

.flow {
  gap: 10px;
}

.flow div {
  min-height: 122px;
  background: var(--surface-soft);
  border-color: var(--line);
}

.flow b {
  background: #0f172a;
}

.activity {
  padding: 12px 0;
}

.activity strong,
.artifact h3,
.task-card h3,
.monitor-card h3 {
  color: #0f172a;
}

.activity span,
.artifact pre,
ul {
  color: var(--muted-strong);
}

.artifact,
.task-card,
.monitor-card,
.sov-card,
.channel-row,
.check-row,
.citation-row,
.rule,
.upgrade-box {
  background: var(--surface-soft);
  border-color: var(--line);
}

.artifact,
.sov-card,
.channel-row,
.check-row,
.citation-row {
  transition: border-color 0.14s ease, background 0.14s ease, transform 0.14s ease;
}

.artifact:hover,
.sov-card:hover,
.channel-row:hover,
.check-row:hover,
.citation-row:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.task-card,
.monitor-card {
  min-height: 168px;
}

.table-wrap {
  background: #ffffff;
}

th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

td {
  color: #1f2937;
}

tr:hover td {
  background: #f8fafc;
}

.project-form label {
  color: var(--muted-strong);
}

.checkbox-row.compact {
  background: #ffffff;
}

.toast {
  background: #0f172a;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
}

.login-overlay {
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(8px);
}

.login-panel {
  border: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    background: #f6f7f9;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    min-height: auto;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .brand {
    min-height: 46px;
  }

  .nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    grid-template-columns: none;
    gap: 6px;
    padding-bottom: 2px;
  }

  .nav-item {
    width: auto;
    min-height: 38px;
    padding: 0 10px;
  }

  .nav-item::before {
    display: none;
  }

  .main {
    padding: 18px 14px 34px;
  }

  .topbar {
    position: static;
    margin: 0 0 18px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 42px 42px;
  }

  #runAgentBtn {
    grid-column: 1 / -1;
  }

  .panel,
  .metric-panel,
  .guide-panel {
    padding: 16px;
  }

  .metric-panel {
    min-height: 118px;
  }
}
