﻿:root {
  color-scheme: dark;
  --bg: #070b16;
  --panel: rgba(13, 20, 38, 0.92);
  --panel-soft: rgba(17, 28, 52, 0.82);
  --text: #e7f6ff;
  --muted: #8fa9bc;
  --line: rgba(91, 220, 255, 0.18);
  --primary: #00d5ff;
  --primary-strong: #66eaff;
  --primary-soft: rgba(0, 213, 255, 0.12);
  --danger: #ff5f78;
  --danger-soft: rgba(255, 95, 120, 0.14);
  --ok: #35f5b2;
  --ok-soft: rgba(53, 245, 178, 0.12);
  --warn: #ffd166;
  --warn-soft: rgba(255, 209, 102, 0.14);
  --focus: rgba(0, 213, 255, 0.22);
  --violet: #8b5cf6;
  --glow: 0 0 28px rgba(0, 213, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 213, 255, 0.14), transparent 28%),
    radial-gradient(circle at 86% 4%, rgba(139, 92, 246, 0.15), transparent 30%),
    linear-gradient(180deg, #070b16 0%, #0b1020 52%, #070b16 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

button,
textarea,
input,
select {
  font: inherit;
}

button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  background: rgba(9, 16, 31, 0.86);
  color: var(--text);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

button:hover {
  border-color: rgba(0, 213, 255, 0.5);
  background: rgba(0, 213, 255, 0.1);
}

button.primary {
  border-color: var(--primary);
  background: linear-gradient(135deg, #00d5ff, #7c3aed);
  color: #ffffff;
  box-shadow: 0 0 22px rgba(0, 213, 255, 0.24);
}

button.primary:hover {
  background: linear-gradient(135deg, #66eaff, #8b5cf6);
}

button.danger {
  border-color: rgba(255, 95, 120, 0.38);
  background: rgba(255, 95, 120, 0.08);
  color: var(--danger);
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid rgba(91, 220, 255, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  background: rgba(5, 11, 24, 0.86);
  outline: none;
}

textarea:focus,
input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
}

textarea::placeholder,
input::placeholder {
  color: #6f8798;
}

select option {
  background: #0b1020;
  color: var(--text);
}

h1,
h2,
p {
  margin: 0;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(5, 11, 24, 0.94);
  padding: 20px 14px;
  box-shadow: 8px 0 28px rgba(0, 0, 0, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 8px 22px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #00d5ff, #8b5cf6);
  color: #fff;
  font-weight: 800;
}

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

.brand span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-item {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
  padding: 10px 12px;
}

.nav-item.active {
  background: var(--primary-soft);
  border-color: rgba(0, 213, 255, 0.42);
  color: var(--primary-strong);
  font-weight: 700;
  box-shadow: 0 0 18px rgba(0, 213, 255, 0.12);
}

.sidebar-foot {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--panel-soft);
}

.sidebar-foot span,
.muted {
  color: var(--muted);
}

.sidebar-foot strong {
  display: block;
  margin-top: 4px;
}

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

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

.topbar h1 {
  font-size: 25px;
  line-height: 1.2;
}

.topbar p {
  margin-top: 6px;
  color: var(--muted);
}

.top-actions,
.actions,
.settings-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-select {
  width: auto;
  min-width: 104px;
  min-height: 34px;
  padding: 7px 10px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px;
  gap: 8px;
}

.license-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.license-cards-list {
  margin-top: 12px;
  min-height: 126px;
  resize: vertical;
  font-family: Consolas, "Microsoft YaHei", monospace;
}

.view-stack {
  display: grid;
  gap: 14px;
}

.hidden {
  display: none !important;
}

.quick-add,
.metric-card,
.list-card,
.settings-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.quick-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px 116px;
  gap: 14px;
  align-items: end;
  padding: 16px;
}

.quick-add label,
.settings-card label {
  display: grid;
  gap: 8px;
  color: #c9e9f7;
  font-weight: 700;
}

.compact-field {
  min-width: 220px;
}

.inline-select {
  width: 220px;
  min-height: 34px;
  padding: 7px 10px;
}

.inline-check {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  width: auto;
  gap: 8px !important;
  font-weight: 700;
}

.inline-check input {
  width: auto;
}

.wide-field {
  grid-column: 1 / -1;
}

.add-button {
  height: 43px;
}

.add-msg {
  min-height: 20px;
  margin-top: 8px;
}

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

.metric-card {
  padding: 16px;
}

.metric-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.group-board {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--glow);
}

.group-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.group-card {
  display: block;
  width: 100%;
  min-height: 190px;
  padding: 18px;
  text-align: left;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 213, 255, 0.12), rgba(139, 92, 246, 0.1)),
    var(--panel-soft);
}

.group-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(0, 213, 255, 0.14);
}

.group-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.group-card-head strong {
  font-size: 18px;
}

.group-card-head span,
.group-card-label {
  color: var(--muted);
  font-size: 12px;
}

.group-card-total {
  margin-top: 20px;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
  color: var(--primary-strong);
}

.group-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.group-stat-grid span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(91, 220, 255, 0.14);
  border-radius: 8px;
  padding: 8px;
  color: var(--muted);
  background: rgba(5, 11, 24, 0.38);
}

.group-stat-grid b {
  color: var(--text);
}

.group-cost-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.group-cost-grid span {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
}

.group-cost-grid b {
  color: var(--primary-strong);
  font-size: 14px;
}

.list-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
}

.list-title strong,
.list-title span {
  display: block;
}

.list-title span {
  margin-top: 3px;
  font-size: 12px;
}


.next-monitor-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(0, 213, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 213, 255, 0.14), rgba(139, 92, 246, 0.12)),
    rgba(10, 18, 34, 0.9);
  color: var(--text);
  box-shadow: 0 0 26px rgba(0, 213, 255, 0.14);
}

.next-monitor-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.next-monitor-card strong {
  display: block;
  font-size: 20px;
  line-height: 1.2;
}

.list-card {
  overflow: hidden;
}

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.refined-list-head {
  align-items: flex-start;
  gap: 18px;
}

.list-toolbar {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter.active {
  border-color: rgba(0, 213, 255, 0.48);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
}

.status-filter.active {
  border-color: rgba(0, 213, 255, 0.48);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

.monitor-table th:nth-child(2),
.monitor-table td:nth-child(2) {
  width: 58%;
}

.monitor-table th:nth-child(3),
.monitor-table td:nth-child(3) {
  width: 110px;
}

.monitor-table th:nth-child(4),
.monitor-table td:nth-child(4) {
  width: 110px;
}

.table-scroll::-webkit-scrollbar,
.detail-json::-webkit-scrollbar,
.modal-panel::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-thumb,
.detail-json::-webkit-scrollbar-thumb,
.modal-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0, 213, 255, 0.22);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(91, 220, 255, 0.12);
  text-align: left;
  vertical-align: top;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: rgba(0, 213, 255, 0.06);
}

th {
  background: rgba(5, 11, 24, 0.72);
  color: #9edff2;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

td:first-child,
th:first-child {
  width: 44px;
  text-align: center;
}

.video-cell {
  display: grid;
  gap: 6px;
  min-width: 360px;
}

.compact-video {
  gap: 8px;
  max-width: 760px;
}

.video-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

.video-title-row .enabled-dot,
.video-title-row .disabled-dot {
  margin-top: 8px;
}

.video-title {
  font-weight: 800;
  line-height: 1.45;
}

.video-link {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.video-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.video-tags span:not(.enabled-dot):not(.disabled-dot) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(91, 220, 255, 0.12);
  border-radius: 8px;
  padding: 2px 7px;
  background: rgba(5, 11, 24, 0.28);
}

.enabled-dot,
.disabled-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.enabled-dot {
  background: var(--ok);
}

.disabled-dot {
  background: #52677a;
}

.primary-number {
  font-size: 18px;
  font-weight: 800;
}

.source-name {
  max-width: 220px;
  font-weight: 800;
  line-height: 1.35;
}

.code-line {
  max-width: 520px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  word-break: break-all;
}

.stacked {
  line-height: 1.6;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.badge.ok {
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid rgba(53, 245, 178, 0.24);
}

.badge.fail {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(255, 95, 120, 0.24);
}

.badge.wait {
  background: var(--warn-soft);
  color: var(--warn);
  border: 1px solid rgba(255, 209, 102, 0.24);
}

.row-error {
  color: var(--danger);
  font-size: 13px;
}

.empty {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
}

.settings-card {
  padding: 20px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 20px;
}

.section-title p {
  margin-top: 6px;
  color: var(--muted);
}

.setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.settings-actions {
  margin-top: 16px;
}

.threshold-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.threshold-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 14px;
}

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

.threshold-head strong,
.threshold-head span {
  display: block;
}

.threshold-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.threshold-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.threshold-choice {
  display: inline-flex !important;
  align-items: center;
  gap: 6px !important;
  width: auto;
  min-height: 34px;
  border: 1px solid rgba(91, 220, 255, 0.22);
  border-radius: 999px;
  background: rgba(5, 11, 24, 0.72);
  padding: 6px 10px;
  color: #c9e9f7 !important;
  font-weight: 700 !important;
  cursor: pointer;
}

.threshold-choice input {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 14, 0.72);
}

.modal-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 0 60px rgba(0, 213, 255, 0.18);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.modal-head h2 {
  font-size: 20px;
}

.modal-head p {
  margin-top: 6px;
  max-width: 760px;
  line-height: 1.5;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  padding: 18px;
}

.detail-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
}

.detail-label {
  font-weight: 800;
  color: var(--text);
}

.detail-key {
  margin-top: 3px;
  color: var(--muted);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.detail-value {
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.detail-json-wrap {
  padding: 0 18px 18px;
}

.detail-json-title {
  margin-bottom: 8px;
  font-weight: 800;
}

.detail-json {
  max-height: 360px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #030711;
  color: #d9f7ff;
  padding: 14px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  min-width: 220px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #06111f;
  color: #fff;
  border: 1px solid rgba(0, 213, 255, 0.28);
  box-shadow: 0 0 28px rgba(0, 213, 255, 0.2);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.18s ease;
}

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

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 16%, rgba(0, 213, 255, 0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(139, 92, 246, 0.18), transparent 30%),
    var(--bg);
}

.login-box {
  width: min(420px, calc(100vw - 32px));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 0 46px rgba(0, 213, 255, 0.18);
  padding: 26px;
}

.login-box h1 {
  margin-bottom: 8px;
}

.login-box p {
  color: var(--muted);
  margin-bottom: 18px;
}

.login-box button {
  width: 100%;
  margin-top: 12px;
}

.login-box .status-fail {
  min-height: 22px;
  margin-top: 10px;
  color: var(--danger);
}

.login-box .status-ok {
  color: var(--ok);
}

.submit-box textarea {
  margin-top: 12px;
  min-height: 132px;
  resize: vertical;
}

.submit-box button {
  margin-top: 12px;
}

.submit-body {
  min-height: 100vh;
  color: #eaf8ff;
  background:
    linear-gradient(rgba(4, 9, 19, 0.72), rgba(4, 9, 19, 0.92)),
    radial-gradient(circle at 18% 18%, rgba(0, 213, 255, 0.24), transparent 30%),
    radial-gradient(circle at 82% 12%, rgba(139, 92, 246, 0.22), transparent 34%),
    linear-gradient(135deg, #060a14 0%, #0c1730 48%, #070b16 100%);
  display: block;
}

.submit-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 44px;
}

.submit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
}

.submit-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.submit-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(102, 234, 255, 0.56);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 213, 255, 0.96), rgba(139, 92, 246, 0.94)),
    #09101f;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 0 26px rgba(0, 213, 255, 0.34);
}

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

.submit-brand strong {
  font-size: 18px;
}

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

.submit-badge {
  border: 1px solid rgba(102, 234, 255, 0.26);
  border-radius: 8px;
  padding: 9px 12px;
  color: #9edcff;
  background: rgba(7, 15, 30, 0.72);
  box-shadow: inset 0 0 18px rgba(0, 213, 255, 0.06);
}

.submit-panel {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 18px;
}

.submit-hero,
.submit-card,
.submit-result-card {
  border: 1px solid rgba(102, 234, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 16, 32, 0.78);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.24), 0 0 34px rgba(0, 213, 255, 0.08);
  backdrop-filter: blur(14px);
}

.submit-hero {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  background:
    linear-gradient(155deg, rgba(0, 213, 255, 0.16), transparent 42%),
    linear-gradient(335deg, rgba(139, 92, 246, 0.18), transparent 46%),
    rgba(8, 16, 32, 0.78);
  position: relative;
  overflow: hidden;
}

.submit-hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(102, 234, 255, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.submit-kicker {
  color: #66eaff;
  font-size: 12px;
  font-weight: 800;
}

.submit-hero h1 {
  margin-top: 12px;
  font-size: 44px;
  line-height: 1.12;
}

.submit-hero p:not(.submit-kicker) {
  margin-top: 16px;
  color: #a9c0d0;
  line-height: 1.8;
}

.submit-card {
  padding: 24px;
}

.submit-card label {
  display: block;
  margin-bottom: 10px;
  color: #dff7ff;
  font-weight: 800;
}

.submit-card textarea {
  min-height: 178px;
  resize: vertical;
  line-height: 1.7;
}

.submit-card button {
  width: 100%;
  margin-top: 14px;
  min-height: 44px;
  font-weight: 800;
}

.submit-card button:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.submit-message {
  min-height: 24px;
  margin-top: 12px;
  color: #a9c0d0;
}

.submit-message.ok {
  color: var(--ok);
}

.submit-message.warn {
  color: var(--warn);
}

.submit-message.fail {
  color: var(--danger);
}

.submit-results {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.submit-result-card {
  min-height: 190px;
  padding: 18px;
}

.submit-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(102, 234, 255, 0.14);
}

.submit-result-head h2 {
  font-size: 16px;
}

.submit-result-head span {
  color: #66eaff;
  font-weight: 800;
}

.submit-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.submit-list li {
  min-width: 0;
  border: 1px solid rgba(102, 234, 255, 0.13);
  border-radius: 8px;
  padding: 10px;
  background: rgba(5, 11, 24, 0.54);
  color: #9fb8c9;
  word-break: break-all;
}

.submit-list a {
  color: #b8f3ff;
  text-decoration: none;
}

.submit-list a:hover {
  color: #fff;
}

.submit-list.empty li {
  border-style: dashed;
  color: #7892a4;
}

@media (max-width: 860px) {
  .submit-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .submit-panel,
  .submit-results {
    grid-template-columns: 1fr;
  }

  .submit-results {
    grid-column: auto;
  }

  .submit-hero {
    min-height: 300px;
    padding: 26px;
  }

  .submit-hero h1 {
    font-size: 34px;
  }
}

body.theme-warm {
  color-scheme: light;
  --bg: #f7f3ef;
  --panel: #ffffff;
  --panel-soft: #fbf7f2;
  --text: #2a211d;
  --muted: #7c6f66;
  --line: #eadfd5;
  --primary: #d85b3f;
  --primary-strong: #b94731;
  --primary-soft: #fff1ec;
  --danger: #b42318;
  --danger-soft: #fff0eb;
  --ok: #0f766e;
  --ok-soft: #eaf7f3;
  --warn: #9a6a00;
  --warn-soft: #fff7df;
  --focus: rgba(216, 91, 63, 0.14);
  --glow: 0 1px 0 rgba(42, 33, 29, 0.03);
  background: var(--bg);
}

body.theme-warm button {
  background: #fff;
  box-shadow: none;
}

body.theme-warm button:hover {
  border-color: #d5b6a5;
  background: #fffaf6;
}

body.theme-warm button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

body.theme-warm button.primary:hover {
  background: var(--primary-strong);
}

body.theme-warm button.danger {
  border-color: #f2c7bb;
  background: #fff;
  color: var(--danger);
}

body.theme-warm textarea,
body.theme-warm input,
body.theme-warm select {
  border-color: #dccdc2;
  background: #fff;
}

body.theme-warm textarea::placeholder,
body.theme-warm input::placeholder {
  color: #9a8d83;
}

body.theme-warm select option {
  background: #fff;
  color: var(--text);
}

body.theme-warm .sidebar {
  background: #fffaf6;
  box-shadow: none;
}

body.theme-warm .brand-mark {
  background: #2a211d;
}

body.theme-warm .nav-item.active {
  border-color: #f1c4b6;
  box-shadow: none;
}

body.theme-warm .quick-add,
body.theme-warm .metric-card,
body.theme-warm .group-board,
body.theme-warm .group-card,
body.theme-warm .list-card,
body.theme-warm .settings-card {
  box-shadow: 0 1px 0 rgba(42, 33, 29, 0.03);
  backdrop-filter: none;
}

body.theme-warm .group-card {
  background: #fffaf6;
}

body.theme-warm .group-card:hover {
  border-color: #f1c4b6;
  box-shadow: 0 10px 24px rgba(216, 91, 63, 0.1);
}

body.theme-warm .group-card-total {
  color: var(--primary-strong);
}

body.theme-warm .group-stat-grid span {
  border-color: #f1e7df;
  background: #ffffff;
}

body.theme-warm .quick-add label,
body.theme-warm .settings-card label {
  color: #4b3d35;
}

body.theme-warm .next-monitor-card {
  border-color: #f1c4b6;
  background: #fff4ed;
  box-shadow: none;
}

body.theme-warm .filter.active,
body.theme-warm .status-filter.active {
  border-color: #f1c4b6;
}

body.theme-warm th,
body.theme-warm td {
  border-bottom-color: #f1e7df;
}

body.theme-warm .clickable-row:hover td {
  background: #fffaf6;
}

body.theme-warm th {
  background: #fbf7f2;
  color: #6f625a;
}

body.theme-warm .disabled-dot {
  background: #c6b8ae;
}

body.theme-warm .threshold-choice {
  border-color: #dccdc2;
  background: #fff;
  color: #4b3d35 !important;
}

body.theme-warm .modal {
  background: rgba(42, 33, 29, 0.36);
}

body.theme-warm .modal-panel {
  box-shadow: 0 18px 48px rgba(42, 33, 29, 0.18);
}

body.theme-warm .detail-json {
  background: #2a211d;
  color: #fff7ed;
}

body.theme-warm .toast {
  background: #2a211d;
  border: none;
  box-shadow: none;
}

body.theme-warm.login-body,
body.theme-warm .login-body {
  background: var(--bg);
}

body.theme-warm .login-box {
  box-shadow: 0 14px 34px rgba(42, 33, 29, 0.1);
}

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

  .sidebar {
    position: static;
    height: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .next-monitor-card {
    grid-template-columns: 1fr;
  }

  .quick-add,
  .setting-grid,
  .threshold-panels,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .wide-field {
    grid-column: auto;
  }

  .list-head,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Warm public submit page */
body.submit-body {
  min-height: 100vh;
  display: block;
  color: #2d211c;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 183, 117, 0.28), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(255, 126, 95, 0.16), transparent 28%),
    linear-gradient(180deg, #fff8f0 0%, #fff3e8 46%, #f8eadb 100%);
}

body.submit-body .submit-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
}

body.submit-body .submit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

body.submit-body .submit-logo {
  width: 44px;
  height: 44px;
  border-color: rgba(205, 92, 56, 0.18);
  background: linear-gradient(135deg, #ef6b4a, #f4b35f);
  box-shadow: 0 14px 30px rgba(205, 92, 56, 0.22);
}

body.submit-body .submit-brand strong {
  color: #261a16;
}

body.submit-body .submit-brand span {
  color: #927369;
}

body.submit-body .submit-badge {
  border-color: #f0cdbd;
  color: #9a4f38;
  background: rgba(255, 255, 255, 0.72);
}

body.submit-body .submit-panel {
  display: grid;
  grid-template-columns: minmax(460px, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

body.submit-body .submit-hero,
body.submit-body .submit-card,
body.submit-body .submit-result-card {
  border: 1px solid #efd5c7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(132, 72, 46, 0.08);
}

body.submit-body .submit-card {
  grid-column: 1;
  grid-row: 1 / span 2;
  padding: 26px;
}

body.submit-body .submit-card label {
  color: #3b2a24;
}

body.submit-body .submit-card textarea {
  min-height: 260px;
  border-color: #edc9b8;
  background: #fffaf5;
  color: #2d211c;
}

body.submit-body .submit-card textarea:focus {
  border-color: #e76945;
  box-shadow: 0 0 0 3px rgba(231, 105, 69, 0.14);
}

body.submit-body .submit-card textarea::placeholder {
  color: #ad9085;
}

body.submit-body .submit-input {
  width: 100%;
  min-height: 44px;
  margin: 8px 0 14px;
  border: 1px solid #edc9b8;
  border-radius: 10px;
  background: #fffaf5;
  color: #2d211c;
  padding: 0 14px;
  font: inherit;
  outline: none;
}

body.submit-body .submit-input:focus {
  border-color: #e76945;
  box-shadow: 0 0 0 3px rgba(231, 105, 69, 0.14);
}

body.submit-body .submit-card button {
  min-height: 46px;
  border: 0;
  background: linear-gradient(135deg, #e95f3d, #f2a65a);
  color: #fff;
  box-shadow: 0 12px 26px rgba(222, 97, 56, 0.22);
}

body.submit-body .submit-card button:hover {
  background: linear-gradient(135deg, #d94f31, #ec9850);
}

body.submit-body .submit-card .ghost-button {
  margin-top: 10px;
  border: 1px solid rgba(190, 112, 67, 0.28);
  background: rgba(255, 252, 246, 0.72);
  color: #7a3b24;
  box-shadow: none;
}

body.submit-body .submit-status {
  margin-left: 8px;
  color: #a9542f;
  font-size: 12px;
  font-weight: 800;
}

body.submit-body .submit-message {
  color: #80665c;
}

body.submit-body .submit-message.ok {
  color: #0f766e;
}

body.submit-body .submit-message.warn {
  color: #a16207;
}

body.submit-body .submit-message.fail {
  color: #b42318;
}

body.submit-body .submit-hero {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(255, 239, 224, 0.95), rgba(255, 255, 255, 0.88)),
    #fff8f0;
}

body.submit-body .submit-hero::before {
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #e95f3d, #f4b35f);
}

body.submit-body .submit-kicker {
  color: #c85c3f;
}

body.submit-body .submit-hero h1 {
  color: #261a16;
  font-size: 30px;
}

body.submit-body .submit-hero p:not(.submit-kicker) {
  color: #80665c;
}

body.submit-body .submit-results {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: 1fr;
  gap: 12px;
}

body.submit-body .submit-result-card {
  min-height: 130px;
}

body.submit-body .submit-result-head {
  border-bottom-color: #f1d7c9;
}

body.submit-body .submit-result-head h2 {
  color: #2d211c;
}

body.submit-body .submit-result-head span {
  color: #c85c3f;
}

body.submit-body .submit-list li {
  border-color: #f2d9cb;
  background: #fffaf5;
  color: #8a7167;
}

body.submit-body .submit-list a {
  color: #b94d32;
}

body.submit-body .submit-list a:hover {
  color: #7f301f;
}

body.submit-body .submit-item-meta {
  width: 100%;
  margin-top: 6px;
  color: #8a6b5a;
  font-size: 12px;
  line-height: 1.5;
}

body.submit-body .submit-list.empty li {
  color: #a88d82;
}

@media (max-width: 900px) {
  body.submit-body .submit-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.submit-body .submit-panel {
    grid-template-columns: 1fr;
  }

  body.submit-body .submit-card,
  body.submit-body .submit-hero,
  body.submit-body .submit-results {
    grid-column: auto;
    grid-row: auto;
  }

  body.submit-body .submit-card textarea {
    min-height: 210px;
  }

  body.submit-body .submit-hero h1 {
    font-size: 28px;
  }
}

