* {
  box-sizing: border-box;
}

:root {
  --brand-bg-light: #ebfdff;
  --brand-deep: #05445e;
  --brand-primary: #75e6da;
  --brand-secondary: #147e93;
  --accent-yellow: #ecc00c;
  --accent-green: #75d481;
  --accent-red: #ff5757;
  --accent-gray: #9db3c1;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(117, 230, 218, 0.45), transparent 55%),
    radial-gradient(900px 500px at 110% 0%, rgba(20, 126, 147, 0.24), transparent 60%),
    linear-gradient(180deg, #f8feff 0%, var(--brand-bg-light) 45%, #f5fdff 100%);
  color: var(--brand-deep);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.header h1 {
  margin: 0;
  font-size: 34px;
  color: var(--brand-deep);
  letter-spacing: 0.3px;
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.header p {
  margin-top: 8px;
  color: #2b6f7a;
  font-size: 16px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
}

.tab {
  background: linear-gradient(135deg, #ffffff 0%, #eafcff 100%);
  border: 1px solid rgba(20, 126, 147, 0.22);
  color: #0f5063;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 160ms ease;
  box-shadow: 0 6px 14px rgba(20, 126, 147, 0.08);
}

.tab.active {
  background: linear-gradient(135deg, var(--brand-primary) 0%, #5dded0 55%, #3cc8d1 100%);
  border-color: rgba(20, 126, 147, 0.45);
  color: #04394f;
  box-shadow: 0 10px 22px rgba(20, 126, 147, 0.2);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 254, 255, 0.97) 100%);
  border: 1px solid rgba(20, 126, 147, 0.2);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
  box-shadow:
    0 12px 28px rgba(20, 126, 147, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.details-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.inline-status {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: #0f5063;
  font-weight: 600;
}

.inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

select,
input,
button {
  border-radius: 10px;
  border: 1px solid rgba(20, 126, 147, 0.26);
  background: linear-gradient(180deg, #ffffff 0%, #f4fcff 100%);
  color: var(--brand-deep);
  padding: 10px;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand-primary) 0%, #55d8c9 100%);
  border-color: rgba(20, 126, 147, 0.35);
  color: #033f53;
  width: fit-content;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(20, 126, 147, 0.22);
}

button:hover {
  background: linear-gradient(135deg, #88ece2 0%, #66dfd2 100%);
  border-color: rgba(20, 126, 147, 0.45);
  transform: translateY(-1px);
}

button:disabled,
input:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.hint {
  color: #36798a;
  font-size: 13px;
}

pre {
  background: linear-gradient(180deg, #f7fdff 0%, #eefbff 100%);
  border: 1px solid rgba(20, 126, 147, 0.2);
  border-radius: 10px;
  padding: 12px;
  max-height: 380px;
  overflow: auto;
}

.time-widget {
  display: flex;
  gap: 10px;
  align-items: center;
}

.slug-picker {
  display: flex;
  gap: 10px;
  align-items: center;
}

#slug-select {
  width: 100%;
}

.slug-chips {
  min-height: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slug-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #effeff 0%, #daf8f4 100%);
  color: #094b60;
  border: 1px solid rgba(20, 126, 147, 0.26);
  border-radius: 16px;
  padding: 6px 10px;
  font-size: 13px;
  box-shadow: 0 4px 10px rgba(20, 126, 147, 0.08);
}

.slug-chip button {
  background: transparent;
  border: 0;
  color: var(--brand-deep);
  padding: 0;
  line-height: 1;
  font-size: 16px;
}

.audit-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 300px at 15% 20%, rgba(117, 230, 218, 0.45), transparent 70%),
    radial-gradient(700px 400px at 85% 80%, rgba(20, 126, 147, 0.34), transparent 70%),
    rgba(235, 253, 255, 0.76);
  backdrop-filter: blur(10px) brightness(0.9) saturate(1.05);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

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

.spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 24px;
}

.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 5px solid rgba(5, 68, 94, 0.15);
  border-top-color: var(--brand-secondary);
  border-right-color: var(--brand-primary);
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(20, 126, 147, 0.28);
}

#audit-overlay-text {
  margin: 10px 0 0;
}

.overlay-status {
  color: #05445e;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.2px;
  text-align: center;
  max-width: 88vw;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

#audit-result.result-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 84px;
  white-space: normal;
  font-size: 17px;
  font-weight: 600;
}

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #04394f;
  font-weight: 600;
  border: 1px solid rgba(20, 126, 147, 0.3);
  background: linear-gradient(135deg, rgba(235, 253, 255, 0.98), rgba(180, 245, 237, 0.98));
  box-shadow: 0 12px 26px rgba(20, 126, 147, 0.2);
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
}

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

.toast.error {
  border-color: rgba(181, 50, 50, 0.35);
  background: linear-gradient(135deg, rgba(255, 239, 239, 0.98), rgba(255, 216, 216, 0.98));
  color: #7a1f1f;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
