:root {
  --bg-top: #edf8ff;
  --bg-bottom: #fff9ef;
  --ink: #18212f;
  --muted: #5c6a7d;
  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.78);
  --accent: #0284c7;
  --accent-2: #0891b2;
  --ok: #059669;
  --fail: #dc2626;
  --shadow: 0 16px 50px rgba(15, 23, 42, 0.12);
  --radius: 20px;
  --panel-soft: rgba(255, 255, 255, 0.7);
  --table-bg: rgba(255, 255, 255, 0.56);
  --line-soft: rgba(24, 33, 47, 0.12);
  --backdrop-dim: rgba(15, 23, 42, 0.28);
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
}

[data-theme="dark"] {
  --bg-top: #09111d;
  --bg-bottom: #0f1a2b;
  --ink: #e5edf8;
  --muted: #9fb0c8;
  --glass: rgba(13, 24, 39, 0.62);
  --glass-border: rgba(153, 183, 224, 0.22);
  --accent: #38bdf8;
  --accent-2: #0ea5e9;
  --ok: #34d399;
  --fail: #f87171;
  --shadow: 0 18px 52px rgba(2, 6, 23, 0.6);
  --panel-soft: rgba(12, 22, 36, 0.72);
  --table-bg: rgba(12, 22, 36, 0.72);
  --line-soft: rgba(159, 176, 200, 0.24);
  --backdrop-dim: rgba(2, 6, 23, 0.6);
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: linear-gradient(170deg, var(--bg-top), var(--bg-bottom));
  transition: background 220ms ease, color 220ms ease;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent), white 22%);
  outline-offset: 2px;
}

.page-shell {
  position: relative;
  max-width: 1260px;
  margin: 0 auto;
  padding: clamp(14px, 2.2vw, 28px);
  overflow: visible;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(44px);
  opacity: 0.5;
  pointer-events: none;
  animation: drift 12s ease-in-out infinite alternate;
}

.orb-a {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -90px;
  background: radial-gradient(circle, #67e8f9, #22d3ee);
}

.orb-b {
  width: 290px;
  height: 290px;
  bottom: -120px;
  left: -70px;
  background: radial-gradient(circle, #fdba74, #fb7185);
  animation-duration: 16s;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(24, 33, 47, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 47, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.panel {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: clamp(16px, 2.2vw, 28px);
}

.brand-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.brand-strip a {
  display: inline-flex;
  border-radius: 10px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(2, 132, 199, 0.35);
}

.brand-tag {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "Sora", sans-serif;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-family: "Sora", sans-serif;
}

h1,
h2,
h3 {
  font-family: "Sora", sans-serif;
  margin: 8px 0;
}

h1 {
  font-size: clamp(1.8rem, 3.3vw, 2.8rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 65ch;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 28px rgba(8, 145, 178, 0.4);
}

.btn-soft {
  color: var(--ink);
  background: var(--panel-soft);
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: #b6e4ff;
}

.pulse {
  animation: pulse 1.2s infinite;
}

.metrics {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}

.metric {
  padding: 14px 16px;
}

.metric p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.metric h2 {
  margin: 8px 0 4px;
  font-size: 1.7rem;
}

.ok h2,
.ok-text {
  color: var(--ok);
}

.fail h2,
.fail-text {
  color: var(--fail);
}

.warning h2 {
  color: #d97706;
}

.workspace {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
}

.history-panel,
.results-panel {
  padding: 16px;
}

.results-panel {
  min-width: 0;
}

.tilt-card {
  transform: perspective(1000px) rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry));
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(480px, 100%);
  padding: 24px;
}

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

.section-title-row h3 {
  margin: 0;
}

.chip {
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.history-list {
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.history-item {
  appearance: none;
  color: var(--ink);
  font: inherit;
  width: 100%;
  display: flex;
  justify-content: space-between;
  text-align: left;
  margin-bottom: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: all 160ms ease;
}

.history-item:hover {
  transform: translateX(3px);
  border-color: rgba(2, 132, 199, 0.35);
}

.history-item.active {
  border-color: rgba(2, 132, 199, 0.6);
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.35);
}

.history-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.history-item strong {
  color: var(--ink);
  font-family: "Sora", sans-serif;
  font-size: 14px;
}

.history-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-size: 12px;
}

.filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filters input[type="search"] {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 220px;
}

.filters input[type="search"]::placeholder {
  color: var(--muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.toggle-check {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.table-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 620px;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line-soft);
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  background: var(--table-bg);
  table-layout: fixed;
}

thead th {
  text-align: left;
  font-size: 12px;
  padding: 10px;
  color: var(--muted);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
  background: var(--panel-soft);
  z-index: 2;
}

tbody td {
  padding: 11px 10px;
  border-top: 1px solid var(--line-soft);
  vertical-align: top;
  font-size: 14px;
  overflow-wrap: anywhere;
}

tbody td p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

tr.status-ok {
  background: rgba(5, 150, 105, 0.07);
}

tr.status-fail {
  background: rgba(220, 38, 38, 0.06);
}

.admin-results thead th:first-child,
.admin-results tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--panel-soft);
}

.admin-results thead th:first-child {
  z-index: 3;
}

.admin-results thead th:nth-child(1) {
  width: 20%;
}
.admin-results thead th:nth-child(2) {
  width: 9%;
}
.admin-results thead th:nth-child(3) {
  width: 8%;
}
.admin-results thead th:nth-child(4) {
  width: 11%;
}
.admin-results thead th:nth-child(5) {
  width: 9%;
}
.admin-results thead th:nth-child(6) {
  width: 43%;
}

.empty {
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  padding: 12px 14px;
  border-radius: 14px;
  color: #fff;
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 28;
  background: var(--backdrop-dim);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: min(940px, 100%);
  padding: 20px;
  max-height: min(86vh, 900px);
  overflow: auto;
}

.modal-automation,
.modal-manage {
  display: grid;
  gap: 12px;
}

.modal-manage .section-title-row,
.modal-automation .section-title-row {
  margin-bottom: 0;
}

.add-form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.add-form label,
.form-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.add-form input,
.add-form textarea,
.field-input {
  border: 1px solid color-mix(in srgb, var(--line-soft), transparent 35%);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft), white 10%), var(--panel-soft));
  color: var(--ink);
  border-radius: 14px;
  padding: 11px 12px;
  min-height: 44px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

[data-theme="dark"] .add-form input,
[data-theme="dark"] .add-form textarea,
[data-theme="dark"] .field-input {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.add-form input::placeholder {
  color: var(--muted);
}

.add-form textarea,
.field-input textarea,
textarea.field-input {
  resize: vertical;
  min-height: 92px;
  line-height: 1.35;
}

.add-form input:hover,
.add-form textarea:hover,
.field-input:hover {
  border-color: color-mix(in srgb, var(--accent), var(--line-soft) 72%);
}

.add-form input:focus,
.add-form textarea:focus,
.field-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent), white 10%);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent), transparent 78%),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.add-form input:read-only,
.add-form textarea:read-only,
.field-input:read-only {
  cursor: text;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel-soft), white 4%), color-mix(in srgb, var(--panel-soft), transparent 10%));
  border-color: color-mix(in srgb, var(--line-soft), transparent 20%);
}

.add-form input:disabled,
.add-form textarea:disabled,
.field-input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn.disabled {
  opacity: 0.65;
  pointer-events: none;
  cursor: not-allowed;
}

.modal-actions {
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.site-manager-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 12px;
}

.automation-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 12px;
}

.automation-card {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.automation-card h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
}

.automation-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.automation-card input[type="number"] {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  color: var(--ink);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
  font-size: 14px;
  font-family: "Sora", sans-serif;
}

.automation-list {
  max-height: 360px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.automation-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(140px, 180px) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  border-radius: 10px;
  padding: 10px;
}

.automation-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.automation-row strong {
  color: var(--ink);
  font-family: "Sora", sans-serif;
}

.automation-interval-input {
  width: 100%;
}

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

.subhead {
  margin-bottom: 8px;
}

.subhead h4 {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--ink);
}

.site-list-add {
  width: 100%;
  margin-bottom: 10px;
}

.site-list-scroll {
  max-height: 340px;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.site-row {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  padding: 10px;
  cursor: pointer;
  transition: all 160ms ease;
}

.site-row:hover {
  transform: translateX(2px);
}

.site-row.active {
  border-color: rgba(2, 132, 199, 0.55);
  box-shadow: inset 0 0 0 1px rgba(2, 132, 199, 0.35);
}

.site-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  word-break: break-all;
}

.site-row strong {
  color: var(--ink);
  font-family: "Sora", sans-serif;
}

.danger {
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

.form-note {
  margin-top: 4px;
  font-size: 12px;
}

.loading-line {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.site-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}

.site-link:hover {
  text-decoration: underline;
}

.final-url-cell {
  font-family: "Sora", sans-serif;
}

.url-preview {
  display: inline-block;
  max-width: calc(100% - 56px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.url-preview.expanded {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.tiny-link {
  margin-left: 8px;
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  cursor: pointer;
  font-family: "Sora", sans-serif;
}

.tiny-link:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 55%);
}

.sync-caption {
  margin: 0 0 12px;
  font-size: 12px;
}

.sync-caption code {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  border-radius: 6px;
  padding: 1px 4px;
  color: var(--accent);
}

.skeleton-row {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.3s linear infinite;
}

.public-trust {
  margin-top: 18px;
  padding: 16px;
}

.public-metrics {
  margin-top: 10px;
}

.trust-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.trust-head h3 {
  margin: 0;
}

.trust-note {
  margin-top: 10px;
}

.public-table-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.public-table-controls input[type="search"] {
  min-width: 200px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--panel-soft);
  color: var(--ink);
}

.public-status-link {
  display: inline-block;
  width: max-content;
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  text-decoration: none;
  font-family: "Sora", sans-serif;
}

.public-status-link:hover {
  border-color: color-mix(in srgb, var(--accent), transparent 55%);
}

.legend-row {
  margin-top: 10px;
  display: flex;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

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

.fail-dot {
  background: var(--fail);
}

.status-badge {
  display: inline-block;
  min-width: 46px;
  text-align: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
}

.status-badge.status-ok {
  color: var(--ok);
  border-color: rgba(5, 150, 105, 0.4);
}

.status-badge.status-fail {
  color: var(--fail);
  border-color: rgba(220, 38, 38, 0.42);
}

.public-footer {
  margin-top: 14px;
  padding: 12px 14px;
}

.public-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.5;
}

.public-footer .footer-meta {
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11px;
  color: var(--muted);
}

.app-footer {
  margin: 16px auto 24px;
  padding: 12px 16px;
  text-align: center;
}

.app-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-footer .footer-meta {
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11px;
}

.public-about {
  margin-top: 14px;
  padding: 16px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}

.about-item {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  border-radius: 12px;
  padding: 10px 12px;
}

.about-item summary {
  cursor: pointer;
  font-family: "Sora", sans-serif;
  font-size: 14px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.about-item summary::-webkit-details-marker {
  display: none;
}

.about-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.about-item[open] summary::after {
  content: "-";
}

.about-item p {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.about-item a {
  color: var(--accent);
}

.about-item code {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  border-radius: 6px;
  padding: 0 4px;
}

.ribbon {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8px, 1fr));
  gap: 3px;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
  background: var(--panel-soft);
  border: 1px solid var(--line-soft);
}

.ribbon-cell {
  height: 28px;
  border-radius: 4px;
  transition: transform 130ms ease, filter 130ms ease;
}

.ribbon-cell:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.status-ok.ribbon-cell {
  background: linear-gradient(180deg, rgba(5, 150, 105, 0.88), rgba(5, 150, 105, 0.45));
}

.status-fail.ribbon-cell {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.9), rgba(220, 38, 38, 0.45));
}

.toast.ok {
  background: linear-gradient(135deg, #059669, #10b981);
}

.toast.error {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.reveal-up {
  animation: revealUp 600ms ease both;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 220ms;
}

.toast-fade-enter-active,
.toast-fade-leave-active {
  transition: all 220ms ease;
}

.toast-fade-enter-from,
.toast-fade-leave-to {
  transform: translateY(8px);
  opacity: 0;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}

@keyframes drift {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(18px);
  }
}

@keyframes revealUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .history-panel {
    order: 2;
  }

  .results-panel {
    order: 1;
  }

  .automation-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    width: min(980px, 100%);
  }
}

@media (max-width: 900px) {
  .page-shell {
    padding: clamp(12px, 3vw, 20px);
  }

  .hero {
    padding: 16px;
  }

  .brand-strip {
    flex-wrap: wrap;
  }

  .history-list {
    max-height: 420px;
  }

  .table-wrap {
    max-height: 72vh;
  }
}

@media (max-width: 820px) {
  .hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions .btn {
    flex: 1 1 auto;
  }

  .automation-list {
    max-height: 280px;
  }
}

@media (max-width: 680px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .filters input[type="search"] {
    min-width: 100%;
  }

  .filters {
    gap: 10px;
  }

  .public-table-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .public-table-controls input[type="search"] {
    min-width: 100%;
  }

  .site-manager-grid {
    grid-template-columns: 1fr;
  }

  .automation-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .modal-card {
    padding: 14px;
    max-height: 92vh;
  }

  .section-title-row {
    align-items: flex-start;
  }

  .table-wrap {
    max-height: 68vh;
  }

  .responsive-table table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    border-top: 1px solid var(--line-soft);
    padding: 8px 8px 10px;
    background: var(--table-bg);
    border-radius: 14px;
    margin-bottom: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }

  .responsive-table tbody td {
    border-top: 0;
    padding: 6px 2px;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 8px;
    align-items: start;
  }

  .responsive-table tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: "Sora", sans-serif;
  }

  .responsive-table .status-badge {
    justify-self: start;
  }

  .admin-results thead th:first-child,
  .admin-results tbody td:first-child {
    position: static;
    background: transparent;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .tilt-card {
    transform: none;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 14px;
  }

  .history-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .history-stats {
    flex-direction: row;
    align-items: center;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
}
