:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --sidebar: #0f172a;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 20px rgba(15, 23, 42, 0.045);
  --radius: 8px;
  --radius-sm: 6px;
  --mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --sans: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  margin-bottom: 0;
  letter-spacing: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  background: var(--sidebar);
  color: #e2e8f0;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.brand-block strong,
.brand-block span {
  display: block;
}

.brand-block span {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.main-nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: var(--radius);
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.nav-item svg {
  width: 17px;
  height: 17px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding: 18px 20px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar h1 {
  font-size: 23px;
  line-height: 1.15;
}

.topbar-actions,
.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-menu {
  position: relative;
  display: inline-flex;
}

.export-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 15;
  display: grid;
  width: 156px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.export-menu__panel button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
  text-align: left;
}

.export-menu__panel button:hover {
  background: var(--surface-soft);
}

.export-menu__panel svg {
  width: 16px;
  height: 16px;
  color: var(--muted);
  stroke-width: 2.2;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button,
.table-action,
.secret-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}

.primary-button {
  padding: 0 12px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

.primary-button:hover {
  background: var(--primary-dark);
}

.ghost-button {
  padding: 0 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
}

.ghost-button:hover,
.icon-button:hover,
.table-action:hover,
.secret-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.danger-button {
  padding: 0 11px;
  background: var(--danger);
  color: #ffffff;
  font-weight: 700;
}

.icon-button,
.table-action,
.secret-toggle {
  width: auto;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.table-action {
  position: relative;
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  font-size: 12px;
  font-weight: 650;
}

.table-action span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.primary-button svg,
.ghost-button svg,
.danger-button svg,
.icon-button svg,
.table-action svg,
.secret-toggle svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
}

.primary-button.is-loading svg,
.ghost-button.is-loading svg,
.table-action.is-loading svg {
  animation: spin 700ms linear infinite;
}

.primary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled,
.icon-button:disabled,
.table-action:disabled {
  cursor: wait;
  opacity: 0.62;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
  box-shadow: var(--shadow);
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-item {
  min-height: 56px;
  padding: 9px 12px;
  background: var(--surface);
}

.summary-item span,
.summary-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.summary-item strong {
  display: block;
  margin-top: 5px;
  font-size: 19px;
  line-height: 1;
}

.summary-item b {
  font: inherit;
}

.rail-track {
  display: grid;
  grid-template-columns: repeat(60, minmax(2px, 1fr));
  gap: 2px;
  height: 10px;
  align-items: end;
  margin-top: -4px;
}

.rail-tick {
  min-width: 2px;
  height: 5px;
  border-radius: 2px;
  background: #dbe3ef;
}

.rail-tick.is-active {
  background: var(--primary);
}

.rail-tick.is-warn {
  background: var(--warning);
}

.rail-tick.is-down {
  background: var(--danger);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel {
  padding: 13px 14px;
  min-width: 0;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.panel-title h2 {
  font-size: 16px;
}

.panel-title h3 {
  font-size: 15px;
}

.panel-title span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.gsc-diagnostic-strip {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(360px, auto);
  gap: 10px;
  align-items: stretch;
  margin: 0 0 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.gsc-diagnostic-state {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.gsc-diagnostic-state div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.gsc-diagnostic-state strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gsc-diagnostic-state span:not(.status-pill),
.gsc-diagnostic-kpis span {
  color: var(--muted);
  font-size: 12px;
}

.gsc-diagnostic-kpis {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) repeat(2, minmax(98px, 1fr));
  gap: 8px;
}

.gsc-diagnostic-kpis div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.gsc-diagnostic-kpis strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel--site-list .panel-heading {
  margin-bottom: 0;
  padding-bottom: 10px;
}

.site-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 49px;
  margin: 0 0 10px;
  padding: 7px 0;
  border-top: 1px solid #edf1f6;
}

.site-status-tabs,
.site-display-tools {
  display: flex;
  align-items: center;
}

.site-status-tabs {
  gap: 2px;
}

.site-status-tab {
  display: inline-flex;
  min-width: 52px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background 140ms ease, color 140ms ease;
}

.site-status-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.site-status-tab.active {
  background: #edf4ff;
  color: var(--primary-dark);
}

.site-status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--muted-2);
}

.site-status-dot--ok {
  background: var(--success);
}

.site-status-dot--warn {
  background: var(--warning);
}

.site-status-dot--down {
  background: var(--danger);
}

.site-display-tools {
  min-width: 0;
  justify-content: flex-end;
  gap: 6px;
}

.site-view-switch {
  display: inline-grid;
  flex: none;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  padding: 2px;
  border-radius: var(--radius-sm);
  background: #eef2f7;
}

.site-view-switch button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.site-view-switch button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.site-view-switch svg {
  width: 14px;
  height: 14px;
  flex: none;
  stroke-width: 2;
}

.site-tools-divider {
  width: 1px;
  height: 22px;
  margin: 0 2px;
  background: var(--border);
}

.site-sort-control {
  display: inline-flex;
  min-width: 150px;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.site-sort-control > svg {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--muted);
  stroke-width: 2;
}

.site-sort-control select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.site-control-icon {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.site-control-icon:hover {
  border-color: var(--border);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: var(--surface);
}

.data-table {
  min-width: 980px;
}

th {
  padding: 8px 10px;
  background: #f9fbfd;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

td {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fbfdff;
}

.site-group-row td {
  padding: 0;
  border-top-color: var(--border-strong);
  background: #f7f9fc;
}

.site-group-row:hover,
.site-group-row:hover td {
  background: #f3f6fa;
}

.site-group-toggle {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 18px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.site-group-toggle > svg {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.site-group-name {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.site-group-name strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-group-name > span {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-group-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-group-meta > b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.site-group-child td:first-child {
  padding-left: 36px;
  box-shadow: inset 3px 0 0 #dbe4f0;
}

.site-title {
  display: grid;
  gap: 2px;
}

.site-title strong {
  font-size: 13px;
  font-weight: 700;
}

.site-title span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill--ok {
  background: rgba(5, 150, 105, 0.1);
  color: var(--success);
}

.status-pill--warn {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.status-pill--down {
  background: rgba(220, 38, 38, 0.1);
  color: var(--danger);
}

.bar-cell {
  min-width: 92px;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.bar-fill {
  display: block;
  width: var(--value);
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--primary));
}

.bar-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
}

.actions-cell {
  display: flex;
  gap: 4px;
  white-space: nowrap;
}

.table-action[data-action="delete"] {
  color: var(--danger);
}

.trend-value {
  color: var(--success);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.trend-value.is-down {
  color: var(--danger);
}

.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 13px;
}

.admin-permission-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 12px 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.admin-permission-strip div {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.admin-permission-strip strong {
  font-size: 13px;
}

.admin-permission-strip span {
  color: var(--muted);
  font-size: 12px;
}

.permission-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 420px;
}

.permission-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.alert-command {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

.alert-command__primary,
.alert-notify-card,
.alert-block {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.alert-command__primary {
  display: grid;
  gap: 1px;
  align-self: start;
  overflow: hidden;
  padding: 0;
  border-color: var(--border);
  background: var(--border);
}

.alert-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
}

.alert-summary-item {
  position: relative;
  min-height: 54px;
  overflow: hidden;
  padding: 9px 11px 9px 12px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
}

.alert-summary-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--border-strong);
  content: "";
}

.alert-summary-item--down {
  background: #fffafa;
}

.alert-summary-item--down::before {
  background: var(--danger);
}

.alert-summary-item--warn {
  background: #fffaf2;
}

.alert-summary-item--warn::before {
  background: var(--warning);
}

.alert-summary-item span,
.alert-report-item span,
.alert-notify-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.alert-summary-item strong {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
}

.alert-report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
}

.alert-report-item {
  min-height: 48px;
  padding: 8px 11px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
}

.alert-report-item strong,
.alert-notify-metric strong {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 15px;
}

.alert-notify-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.75fr) minmax(150px, 0.4fr) minmax(0, 1.35fr);
  align-self: start;
  align-content: stretch;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  background: var(--surface);
}

.alert-notify-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.alert-notify-card__head h3 {
  font-size: 15px;
}

.alert-notify-card__head span:not(.status-pill) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.alert-notify-metric {
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.alert-layout {
  display: grid;
  gap: 8px;
}

.alert-block {
  padding: 11px;
}

.panel-heading--compact {
  margin-bottom: 10px;
}

.panel-heading--compact .panel-title h3 {
  font-size: 15px;
}

.alert-block .table-wrap {
  box-shadow: none;
}

.alert-table {
  min-width: 1100px;
}

.alert-history-table {
  min-width: 900px;
}

.alert-table th:first-child,
.alert-table td:first-child {
  min-width: 132px;
}

.alert-table th:nth-child(2),
.alert-table td:nth-child(2) {
  min-width: 176px;
}

.alert-table th:last-child,
.alert-table td:last-child {
  min-width: 52px;
  width: 52px;
}

.alert-block--rules .alert-table {
  min-width: 1040px;
  table-layout: fixed;
}

.alert-block--rules .alert-table th:first-child,
.alert-block--rules .alert-table td:first-child {
  width: 128px;
  min-width: 128px;
}

.alert-block--rules .alert-table th:nth-child(2),
.alert-block--rules .alert-table td:nth-child(2) {
  width: 176px;
  min-width: 176px;
}

.alert-block--rules .alert-table th:nth-child(8),
.alert-block--rules .alert-table td:nth-child(8) {
  width: 130px;
}

.alert-block--rules .alert-table th:nth-child(10),
.alert-block--rules .alert-table td:nth-child(10),
.alert-block--rules .alert-table th:nth-child(11),
.alert-block--rules .alert-table td:nth-child(11) {
  width: 50px;
  min-width: 50px;
  text-align: center;
}

.alert-block--rules .rule-scope-grid,
.alert-block--rules .compact-input {
  min-width: 0;
}

.alert-block--rules .toggle-switch {
  justify-content: center;
}

.alert-block--rules .toggle-switch span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.rule-scope-grid {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.alert-history-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.alert-site-chip {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.alert-site-chip span,
.alert-site-chip em {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.alert-site-chip strong {
  font-family: var(--mono);
  font-size: 16px;
}

.alert-site-chip--empty {
  grid-column: 1 / -1;
}

.alert-row--down td:first-child {
  box-shadow: inset 4px 0 0 var(--danger);
}

.alert-row--warn td:first-child {
  box-shadow: inset 4px 0 0 var(--warning);
}

.mail-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.mail-log {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.mail-log-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.mail-log-head strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.mail-log-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mail-log-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.mail-log-item div {
  min-width: 0;
}

.mail-log-item strong,
.mail-log-item span {
  overflow-wrap: anywhere;
}

.mail-log-item div > span,
.mail-log-item--empty {
  color: var(--muted);
  font-size: 12px;
}

.mail-log-item--empty {
  display: block;
}

.backup-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.backup-summary-item {
  position: relative;
  min-height: 52px;
  padding: 8px 12px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
}

.backup-summary-item::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--primary);
  content: "";
}

.backup-summary-item--warn {
  border-left-color: transparent;
}

.backup-summary-item--warn::before {
  background: var(--warning);
}

.backup-summary-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.backup-summary-item strong {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
}

.backup-subnav {
  display: flex;
  gap: 4px;
  margin: -13px -14px 0;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.backup-subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.backup-subtab:hover {
  color: var(--text);
}

.backup-subtab.active {
  border-bottom-color: var(--primary);
  color: var(--primary-dark);
}

.backup-subtab svg {
  width: 16px;
  height: 16px;
}

.backup-view-panel {
  padding-top: 12px;
}

.backup-view-panel[hidden] {
  display: none;
}

.backup-view-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.backup-view-toolbar--end {
  justify-content: flex-end;
}

.backup-history-filter {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(54px, 1fr));
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.backup-history-filter button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.backup-history-filter button.active {
  background: var(--surface);
  color: var(--primary-dark);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.backup-list-head,
.backup-list-row {
  display: grid;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.backup-config-grid {
  grid-template-columns: minmax(210px, 1.2fr) minmax(240px, 1.45fr) minmax(170px, 0.85fr) minmax(135px, 0.65fr) minmax(148px, auto);
}

.backup-activity-grid {
  grid-template-columns: minmax(185px, 0.85fr) minmax(170px, 0.8fr) minmax(260px, 1.35fr) minmax(135px, 0.6fr) minmax(184px, auto);
}

.backup-list-head {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.backup-config-list,
.backup-activity-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.backup-list-row {
  min-height: 72px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 140ms ease;
}

.backup-list-row:last-child {
  border-bottom: 0;
}

.backup-list-row:hover {
  background: #f8fbff;
}

.backup-list-primary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.backup-row-icon,
.backup-kind-marker {
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
}

.backup-kind-marker--backup {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.backup-kind-marker--restore {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(217, 119, 6, 0.08);
  color: var(--warning);
}

.backup-row-icon svg,
.backup-kind-marker svg {
  width: 17px;
  height: 17px;
}

.backup-list-stack,
.backup-list-status {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.backup-list-stack strong,
.backup-list-stack span,
.backup-list-status small {
  overflow-wrap: anywhere;
}

.backup-list-stack strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.backup-list-stack span,
.backup-list-status small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.backup-list-status {
  justify-items: start;
}

.backup-list-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}

.table-action.is-danger {
  color: var(--danger);
}

.backup-list-empty {
  display: grid;
  min-height: 174px;
  padding: 24px;
  place-items: center;
  align-content: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
}

.backup-list-empty svg {
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  color: var(--muted-2);
}

.backup-list-empty strong {
  color: var(--text);
  font-size: 13px;
}

.backup-list-empty span {
  font-size: 12px;
}

.backup-path {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-family: var(--mono);
  font-size: 12px;
}

.backup-dialog {
  width: min(860px, calc(100vw - 32px));
}

.restore-dialog {
  width: min(640px, calc(100vw - 32px));
}

.backup-dialog-body {
  display: grid;
  gap: 8px;
  max-height: min(680px, calc(100vh - 190px));
  overflow: auto;
  padding: 12px 14px;
}

.backup-config-section {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.backup-discovery-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.06);
}

.backup-discovery-bar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.backup-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.backup-field-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.backup-field-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.backup-field-wide {
  grid-column: 1 / -1;
}

.backup-dialog-body input,
.backup-dialog-body select,
.backup-dialog-body textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.backup-dialog-body input,
.backup-dialog-body select {
  height: 38px;
  padding: 0 11px;
}

.backup-dialog-body textarea {
  min-height: 82px;
  padding: 10px 11px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.backup-enable {
  align-self: end;
  min-height: 38px;
}

.email-dialog-body {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.email-dialog-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.email-dialog-status div {
  min-width: 0;
}

.email-dialog-status span,
.email-section-head span,
.email-config-section label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.email-dialog-status strong {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.15;
}

.email-config-section {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.email-section-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.email-section-head i {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--primary);
}

.email-section-head h4 {
  font-size: 14px;
}

.email-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.email-field-grid label,
.mail-recipient-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.email-field-wide {
  grid-column: 1 / -1;
}

.email-dialog-body input,
.email-dialog-body select,
.email-dialog-body textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.email-dialog-body input,
.email-dialog-body select {
  height: 38px;
  padding: 0 11px;
}

.email-dialog-body textarea {
  min-height: 82px;
  padding: 10px 11px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.mail-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mail-retry-field {
  display: inline-grid;
  grid-template-columns: auto 70px;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.email-dialog-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
}

.email-dialog-note i {
  width: 16px;
  height: 16px;
  color: var(--success);
}

.admin-dialog-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
}

.admin-account-section {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.admin-field-grid label,
.admin-role-row {
  display: grid;
  gap: 7px;
}

.admin-field-grid label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-field-grid input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.admin-field-wide {
  grid-column: 1 / -1;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-height: 68px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.permission-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.permission-option span {
  display: grid;
  gap: 3px;
}

.permission-option strong {
  font-size: 13px;
}

.permission-option em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.admin-account-section.is-disabled {
  opacity: 0.68;
}

.scope-control-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scope-control-grid .toggle-switch {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.scope-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.scope-resource-grid > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.scope-resource-grid > div > strong {
  font-size: 12px;
}

.scope-check-list {
  display: grid;
  gap: 5px;
  max-height: 160px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.scope-check-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 38px;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.scope-check-item:hover {
  background: var(--surface-soft);
}

.scope-check-item input {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.scope-check-item span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.scope-check-item strong,
.scope-check-item em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scope-check-item strong {
  font-size: 12px;
}

.scope-check-item em,
.scope-empty {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.compact-input {
  width: 100%;
  min-width: 74px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
}

.compact-input--short {
  min-width: 78px;
}

.compact-input--time {
  min-width: 126px;
  font-family: var(--mono);
}

.compact-input:disabled {
  background: #eef2f7;
  color: var(--muted-2);
}

.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.toggle-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.site-dialog {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.discovery-dialog {
  width: min(980px, calc(100vw - 32px));
}

.discovery-dialog .dialog-card {
  display: grid;
  max-height: calc(100vh - 42px);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.site-discovery-body {
  display: grid;
  min-height: 280px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px 16px;
  overflow: hidden;
}

.site-discovery-status {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.site-discovery-status > span {
  font-weight: 700;
}

.site-discovery-select-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-weight: 650;
}

.site-discovery-select-all input,
.site-discovery-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.site-discovery-list {
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-discovery-row {
  display: grid;
  min-height: 62px;
  grid-template-columns: 24px minmax(210px, 1.35fr) minmax(160px, 1fr) minmax(130px, 0.8fr) 88px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
}

.site-discovery-row:last-child {
  border-bottom: 0;
}

.site-discovery-row:hover {
  background: var(--surface-soft);
}

.site-discovery-row.is-existing {
  background: #f9fbfd;
  color: var(--muted);
}

.site-discovery-check {
  display: grid;
  place-items: center;
}

.site-discovery-domain,
.site-discovery-meta,
.site-discovery-path {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.site-discovery-domain strong,
.site-discovery-meta strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-discovery-domain span,
.site-discovery-meta span,
.site-discovery-path span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-discovery-path code {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-discovery-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.site-discovery-badge.is-existing {
  background: #eef2f7;
  color: var(--muted);
}

.site-discovery-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.data-dialog {
  width: min(1180px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.site-dialog::backdrop {
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(3px);
}

.data-dialog::backdrop {
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(3px);
}

.dialog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 64px rgba(15, 23, 42, 0.2);
}

.data-dialog-card {
  max-height: calc(100vh - 42px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  background: var(--surface);
}

.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.dialog-body {
  display: grid;
  gap: 9px;
  padding: 14px 16px;
}

.dialog-body label {
  display: grid;
  gap: 7px;
}

.dialog-body label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dialog-body input,
.dialog-body select,
.dialog-body textarea {
  width: 100%;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.dialog-body input,
.dialog-body select {
  height: 38px;
}

.dialog-body textarea {
  min-height: 120px;
  padding: 10px 11px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.gsc-account-form {
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: var(--surface);
}

.gsc-account-brief {
  display: grid;
  align-content: start;
  gap: 11px;
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--border);
  background: var(--surface-soft);
}

.gsc-account-brief__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--text);
  color: #ffffff;
}

.gsc-account-brief__icon svg {
  width: 17px;
  height: 17px;
}

.gsc-account-brief strong,
.gsc-upload-head strong {
  display: block;
  color: var(--text);
  font-size: 14px;
}

.gsc-account-brief span,
.gsc-upload-head span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.gsc-account-steps {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: gsc-step;
}

.gsc-account-steps li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  counter-increment: gsc-step;
}

.gsc-account-steps li::before {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 50%;
  background: #ffffff;
  color: var(--primary);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  content: counter(gsc-step);
}

.gsc-account-status {
  margin: 2px 0 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
}

.gsc-account-main {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.gsc-upload-panel,
.gsc-properties-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.gsc-upload-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.gsc-upload-panel textarea {
  min-height: 126px;
  background: #ffffff;
}

.gsc-properties-field textarea {
  min-height: 100px;
  background: #ffffff;
}

.field-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.field-status {
  min-height: 22px;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.field-status.is-ok {
  color: var(--success);
}

.field-status.is-error {
  color: var(--danger);
}

.login-form .field-status {
  margin: -2px 0 0;
}

.login-form .field-status.is-error {
  color: var(--danger);
}

.config-list {
  display: block;
  margin: 0;
}

.config-list dt,
.config-list dd {
  margin: 0;
}

.detail-section {
  display: grid;
  gap: 8px;
}

.detail-section + .detail-section {
  margin-top: 12px;
}

.detail-section h4 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.detail-item {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.detail-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong,
.detail-item code {
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.detail-section--alert .detail-item {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.06);
}

.secret-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.secret-toggle {
  flex: 0 0 auto;
  width: auto;
  min-width: 52px;
  height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.danger-zone {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(220, 38, 38, 0.22);
  border-radius: var(--radius);
  background: rgba(220, 38, 38, 0.06);
}

.danger-zone svg {
  width: 28px;
  height: 28px;
  color: var(--danger);
}

.danger-zone p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.restore-preflight {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.restore-preflight-head,
.preflight-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.restore-preflight-head span {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.restore-preflight-target {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.restore-preflight-target strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.restore-preflight-list {
  display: grid;
  gap: 7px;
}

.preflight-row {
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.preflight-row strong {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.preflight-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.preflight-row--ok strong {
  color: var(--success);
}

.preflight-row--failed strong {
  color: var(--danger);
}

.preflight-row--skipped strong {
  color: var(--warning);
}

.dialog-actions {
  justify-content: end;
  margin: 0;
  padding: 12px 16px 14px;
}

.data-detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.5fr);
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.detail-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.detail-identity div {
  min-width: 0;
}

.detail-identity strong,
.detail-identity span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-identity strong {
  font-family: var(--mono);
  font-size: 13px;
}

.detail-identity span:not(.status-pill) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.data-detail-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.data-detail-toolbar label,
.rules-grid label {
  display: grid;
  gap: 6px;
}

.data-detail-toolbar span,
.rules-grid label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.data-detail-toolbar input,
.data-detail-toolbar select,
.rules-grid input,
.rules-grid textarea {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.data-detail-toolbar label {
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.rules-grid textarea {
  min-height: 118px;
  padding: 10px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
}

.data-detail-tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.detail-tab {
  min-height: 38px;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.detail-tab.active {
  border-bottom-color: var(--primary);
  color: var(--text);
}

.data-detail-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 14px;
  background: #f8fafc;
}

.detail-pane {
  display: none;
}

.detail-pane.active {
  display: grid;
  gap: 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.metric-tile {
  min-height: 92px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.metric-tile span,
.metric-tile small,
.detail-meta {
  color: var(--muted);
  font-size: 12px;
}

.metric-tile strong {
  display: block;
  margin: 7px 0 5px;
  font-family: var(--mono);
  font-size: 21px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.compare-block {
  display: grid;
  gap: 4px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.compare-block span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.compare-block b {
  color: var(--text);
  font-family: var(--mono);
}

.compare-block--good .compare-direction {
  color: var(--success);
}

.compare-block--bad .compare-direction {
  color: var(--danger);
}

.compare-block--flat .compare-direction {
  color: var(--muted);
}

.detail-section-head,
.table-tools,
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-section-head h4 {
  margin: 0;
  font-size: 15px;
}

.detail-section-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.metric-switch {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.metric-chip {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.metric-chip.active {
  background: var(--primary);
  color: #ffffff;
}

.trend-chart {
  display: block;
  min-height: 190px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(226, 232, 240, 0.7) 1px, transparent 1px) 0 0 / 100% 25%,
    var(--surface);
  box-shadow: none;
}

.line-chart {
  display: block;
  width: 100%;
  min-height: 190px;
}

.chart-grid {
  stroke: #e2e8f0;
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line--current,
.chart-dot--current {
  stroke: var(--primary);
}

.chart-line--compare,
.chart-dot--compare {
  stroke: var(--success);
}

.chart-line--compare {
  stroke-dasharray: 6 6;
}

.chart-dot {
  fill: var(--surface);
  stroke-width: 2;
}

.chart-label,
.chart-axis {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend strong {
  color: var(--text);
}

.legend-line {
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
}

.legend-line--compare {
  background: repeating-linear-gradient(90deg, var(--success) 0 5px, transparent 5px 8px);
}

.detail-table {
  min-width: 860px;
}

.detail-table th:first-child,
.detail-table td:first-child {
  min-width: 360px;
}

.url-link {
  color: var(--primary-dark);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.url-link:hover {
  text-decoration: underline;
}

.table-tools {
  min-height: 38px;
}

.table-search {
  width: min(280px, 100%);
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.sort-button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

.sort-button:hover {
  color: var(--primary-dark);
}

.pagination-bar {
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
}

.pagination-bar > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-bar strong {
  color: var(--text);
  font-family: var(--mono);
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.rules-grid .toggle-switch {
  align-content: start;
  justify-content: start;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.rules-workbench {
  display: grid;
  grid-template-columns: minmax(286px, 0.72fr) minmax(0, 1.28fr);
  gap: 10px;
}

.rules-policy,
.rules-editor,
.rules-footer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
}

.rules-policy {
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
}

.rules-policy-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.rules-policy-head h4,
.rule-editor-head h4 {
  margin: 0;
  font-size: 15px;
}

.rules-policy-head p,
.rule-editor-head p,
.rule-switch-row small,
.rule-number-row small,
.rules-footer span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.rule-switch-row,
.rule-number-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 56px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.rule-switch-row {
  cursor: pointer;
}

.rule-switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.rule-switch-ui {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 150ms ease;
}

.rule-switch-ui::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 150ms ease;
  content: "";
}

.rule-switch-row input:checked + .rule-switch-ui {
  background: var(--primary);
}

.rule-switch-row input:checked + .rule-switch-ui::after {
  transform: translateX(18px);
}

.rule-switch-row strong,
.rule-number-row strong,
.rules-footer strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}

.rule-number-row {
  grid-template-columns: minmax(0, 1fr) 92px;
}

.rule-number-row input {
  width: 92px;
  text-align: center;
  font-family: var(--mono);
  font-weight: 700;
}

.rules-editor {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.rule-editor-block {
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  background: #ffffff;
}

.rule-editor-block--exclude {
  border-left-color: var(--warning);
}

.rule-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}

.rule-editor-head > span {
  flex: 0 0 auto;
  align-self: start;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
}

.rule-editor-block--exclude .rule-editor-head > span {
  background: rgba(217, 119, 6, 0.12);
  color: var(--warning);
}

.rule-editor-block textarea {
  width: 100%;
  min-height: 118px;
  padding: 10px;
  border: 0;
  background: #ffffff;
  color: var(--text);
  resize: vertical;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.rule-help-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.06);
  color: var(--muted);
  font-size: 12px;
}

.rule-help-strip svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.rule-help-strip code {
  color: var(--text);
  font-family: var(--mono);
}

.rules-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
}

.rules-footer .dialog-actions {
  padding: 0;
}

.data-detail-actions {
  padding: 0;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: var(--radius);
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.24);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, #0f172a 0 50%, transparent 50%),
    var(--bg);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(420px, 1fr);
  min-height: 100vh;
}

.login-brief {
  display: grid;
  align-content: space-between;
  gap: 32px;
  min-height: 100vh;
  padding: 34px;
  background: var(--sidebar);
  color: #e2e8f0;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-brand strong,
.login-brand span {
  display: block;
}

.login-brand span {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 12px;
}

.login-brief__content {
  max-width: 520px;
}

.login-brief__content .eyebrow {
  color: #93c5fd;
}

.login-brief__content h1 {
  max-width: 460px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.06;
}

.login-brief__content p:not(.eyebrow) {
  margin: 0;
  color: #cbd5e1;
  font-size: 15px;
  line-height: 1.75;
}

.login-signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  max-width: 520px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius);
  background: rgba(148, 163, 184, 0.18);
}

.login-signal {
  position: relative;
  min-height: 86px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.92);
}

.login-signal::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #64748b;
  content: "";
}

.login-signal--ok::before {
  background: var(--success);
}

.login-signal--warn::before {
  background: var(--warning);
}

.login-signal span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 750;
}

.login-signal strong {
  display: block;
  margin-top: 10px;
  color: #ffffff;
  font-family: var(--mono);
  font-size: 22px;
}

.login-audit-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  max-width: 520px;
  height: 46px;
  align-items: end;
}

.login-audit-strip span {
  height: 18px;
  border-radius: 3px 3px 0 0;
  background: rgba(96, 165, 250, 0.3);
}

.login-audit-strip span:nth-child(3n + 1) {
  height: 32px;
  background: rgba(37, 99, 235, 0.86);
}

.login-audit-strip span:nth-child(4n) {
  height: 24px;
  background: rgba(5, 150, 105, 0.82);
}

.login-audit-strip span:nth-child(9) {
  height: 38px;
  background: rgba(217, 119, 6, 0.92);
}

.login-panel {
  align-self: center;
  justify-self: center;
  width: min(430px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 22px 58px rgba(15, 23, 42, 0.12);
}

.login-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.login-panel__head h2 {
  font-size: 22px;
}

.login-form {
  display: grid;
  gap: 13px;
  padding: 18px 0 16px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.login-form input:not([type="checkbox"]) {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-options a {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.login-options a:hover {
  text-decoration: underline;
}

.login-submit {
  width: 100%;
  min-height: 42px;
}

.login-security-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.login-security-list div {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.login-security-list i {
  width: 17px;
  height: 17px;
  color: var(--primary);
}

.login-security-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1180px) {
  .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .backup-list-head {
    display: none;
  }

  .backup-config-list,
  .backup-activity-list {
    border-top: 1px solid var(--border);
    border-radius: var(--radius);
  }

  .backup-config-grid,
  .backup-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backup-list-actions {
    grid-column: 2;
  }
}

@media (max-width: 860px) {
  .site-discovery-row {
    grid-template-columns: 24px minmax(190px, 1fr) minmax(130px, 0.8fr) 82px;
  }

  .site-discovery-path {
    display: none;
  }

  .login-page {
    background: var(--bg);
  }

  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brief {
    min-height: auto;
    padding: 24px;
  }

  .login-brief__content h1 {
    font-size: 32px;
  }

  .login-panel {
    align-self: start;
    margin: 20px 0 28px;
  }

  .app-shell {
    width: 100%;
    overflow-x: hidden;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    min-width: 0;
    padding: 16px;
  }

  .topbar,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-history-filter {
    align-self: flex-start;
  }

  .backup-config-grid,
  .backup-activity-grid {
    grid-template-columns: 1fr;
  }

  .backup-list-actions {
    grid-column: 1;
    justify-content: flex-start;
  }

  .topbar-actions {
    min-width: 0;
    width: 100%;
  }

  .topbar-actions .ghost-button,
  .topbar-actions .primary-button {
    flex: 1;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .alert-notify-card {
    grid-template-columns: 1fr;
  }

  .mail-log-list {
    grid-template-columns: 1fr;
  }

  .alert-report-grid,
  .alert-history-grid,
  .backup-summary,
  .admin-permission-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .data-detail-toolbar,
  .data-detail-hero,
  .metric-grid,
  .gsc-diagnostic-strip,
  .gsc-account-form,
  .rules-grid,
  .rules-workbench {
    grid-template-columns: 1fr;
  }

  .gsc-diagnostic-kpis {
    grid-template-columns: 1fr;
  }

  .gsc-account-brief {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .gsc-upload-head {
    align-items: stretch;
    flex-direction: column;
  }

  .data-detail-tabs {
    overflow-x: auto;
  }

  .detail-section-head,
  .table-tools,
  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .metric-switch {
    overflow-x: auto;
  }

  .rules-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .rules-footer .dialog-actions {
    justify-content: stretch;
  }

  .table-wrap {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .site-control-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .site-display-tools {
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  body {
    overflow-x: hidden;
  }

  .site-status-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .site-status-tab {
    min-width: 0;
    padding: 0 5px;
  }

  .site-display-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px 32px;
  }

  .site-view-switch,
  .site-tools-divider {
    grid-column: 1 / -1;
  }

  .site-view-switch {
    width: 100%;
  }

  .site-tools-divider {
    display: none;
  }

  .site-sort-control {
    min-width: 0;
  }

  .site-sort-control select {
    min-width: 0;
    width: 100%;
  }

  .login-brief {
    padding: 20px 16px;
  }

  .login-signal-grid,
  .login-security-list {
    grid-template-columns: 1fr;
  }

  .login-audit-strip {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .login-audit-strip span:nth-child(n + 9) {
    display: none;
  }

  .login-panel {
    width: calc(100vw - 24px);
    padding: 16px;
  }

  .workspace {
    padding: 12px;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .export-menu,
  #exportButton {
    width: 40px;
    min-width: 40px;
  }

  #exportButton {
    padding: 0;
  }

  #exportButton span,
  #exportButton svg:last-child {
    display: none;
  }

  .topbar-actions {
    display: grid;
    max-width: 100%;
    grid-template-columns: 40px 1fr;
  }

  .topbar-actions > * {
    min-width: 0;
  }

  #addSiteButton {
    width: 100%;
  }

  .topbar-actions .primary-button,
  .topbar-actions #logoutButton {
    grid-column: 1 / -1;
  }

  .alert-summary {
    grid-template-columns: 1fr;
  }

  .alert-report-grid,
  .alert-history-grid,
  .backup-summary {
    grid-template-columns: 1fr;
  }

  .backup-subnav {
    overflow-x: auto;
  }

  .backup-subtab {
    flex: 1 0 auto;
    justify-content: center;
  }

  .backup-history-filter {
    width: 100%;
  }

  .backup-list-row {
    padding: 12px;
  }

  .email-dialog-body {
    grid-template-columns: 1fr;
  }

  .email-field-grid {
    grid-template-columns: 1fr;
  }

  .backup-field-grid {
    grid-template-columns: 1fr;
  }

  .email-dialog-status {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-permission-strip,
  .admin-field-grid,
  .permission-grid,
  .scope-control-grid,
  .scope-resource-grid {
    grid-template-columns: 1fr;
  }

  .gsc-account-main,
  .gsc-account-brief {
    padding: 14px;
  }

  .gsc-account-steps li {
    align-items: start;
  }

  .field-tools {
    display: grid;
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 12px;
  }

  .rail-track {
    grid-template-columns: repeat(30, minmax(4px, 1fr));
  }

  .rail-tick:nth-child(n + 31) {
    display: none;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dialog-actions button {
    width: 100%;
  }

  .site-discovery-body {
    min-height: 360px;
    padding: 10px 12px;
  }

  .site-discovery-status {
    align-items: stretch;
    flex-direction: column;
  }

  .site-discovery-row {
    grid-template-columns: 22px minmax(0, 1fr) 72px;
    gap: 8px;
    padding: 10px;
  }

  .site-discovery-meta {
    display: none;
  }
}
