:root {
  --bg: #f3f6fc;
  --bg-highlight-1: rgba(79, 70, 229, 0.08);
  --bg-highlight-2: rgba(14, 165, 233, 0.08);
  --surface: #ffffff;
  --surface-soft: #f7f9ff;
  --surface-subtle: #eef2ff;
  --border: rgba(148, 163, 184, 0.4);
  --border-strong: rgba(99, 102, 241, 0.45);
  --text: #1f2937;
  --muted: #4b5563;
  --muted-strong: #1f2937;
  --accent: #2563eb;
  --accent-strong: #4338ca;
  --accent-dark: #1d4ed8;
  --success: #16a34a;
  --success-dark: #15803d;
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --danger: #dc2626;
  --shadow: rgba(15, 23, 42, 0.12);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 720px at 10% 0%, var(--bg-highlight-1), transparent 60%),
    radial-gradient(900px 620px at 90% 0%, var(--bg-highlight-2), transparent 70%),
    linear-gradient(180deg, #f8faff 0%, var(--bg) 60%, #eef2ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(24px, 6vw, 48px) clamp(16px, 6vw, 40px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1000px 560px at 85% 12%, rgba(79, 70, 229, 0.08), transparent 70%);
  opacity: 0.8;
}

.app-shell {
  width: min(1100px, 100%);
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 52px);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(580px 360px at 70% -20%, rgba(99, 102, 241, 0.12), transparent);
  pointer-events: none;
}

.page-header {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  color: #101827;
}

.page-lead {
  margin: 0 0 clamp(20px, 4vw, 32px);
  color: rgba(15, 23, 42, 0.72);
  line-height: 1.6;
  max-width: 60ch;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

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

button,
.button,
.cta {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 14px;
  padding: 12px 18px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(99, 102, 241, 0.18));
  color: var(--accent-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, background 160ms ease, color 160ms ease;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}

button:hover,
button:focus-visible,
.button:hover,
.button:focus-visible,
.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.18);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(99, 102, 241, 0.26));
  color: var(--accent);
}

button:focus-visible,
.button:focus-visible,
.cta:focus-visible {
  outline: 2px solid rgba(99, 102, 241, 0.4);
  outline-offset: 3px;
}

button.ghost,
.button.ghost,
.cta.secondary {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.6);
  color: var(--muted);
  box-shadow: none;
}

button.ghost:hover,
.button.ghost:hover,
.cta.secondary:hover,
button.ghost:focus-visible,
.button.ghost:focus-visible,
.cta.secondary:focus-visible {
  color: var(--accent-dark);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

button.success,
.button.success {
  border-color: rgba(34, 197, 94, 0.25);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.16), rgba(22, 163, 74, 0.22));
  color: #166534;
}

button.warning,
.button.warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.24));
  color: #92400e;
}

button.danger,
.button.danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.16), rgba(248, 113, 113, 0.24));
  color: #991b1b;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.6);
  border-radius: 12px;
  padding: 10px 12px;
  transition: border 160ms ease, box-shadow 160ms ease;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.panel {
  background: var(--surface-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  padding: clamp(18px, 2.5vw, 26px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.surface-subtle {
  background: var(--surface-subtle);
}

.chip,
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--accent-dark);
  font-size: 0.9rem;
}

.badge {
  font-size: 0.75rem;
  color: var(--accent-dark);
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.2);
}

.kbd {
  font-family: "JetBrains Mono", "Fira Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.75rem;
  background: rgba(148, 163, 184, 0.16);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  padding: 2px 6px;
  color: var(--muted);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.12);
}

.table thead th {
  text-align: left;
  padding: 12px;
  background: rgba(226, 232, 240, 0.6);
  color: #1f2937;
}

.table tbody td {
  padding: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.small {
  font-size: 0.85rem;
  color: rgba(15, 23, 42, 0.66);
}

.feedback {
  font-size: 0.9rem;
  margin-top: 6px;
}

.feedback.ok {
  color: var(--success);
}

.feedback.warn {
  color: var(--warning);
}

.feedback.err {
  color: var(--danger);
}

.section-title {
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  margin-bottom: 12px;
  color: #111827;
}

.grid {
  display: grid;
  gap: clamp(16px, 3vw, 24px);
}

@media (max-width: 720px) {
  body {
    padding-top: clamp(18px, 8vw, 32px);
  }

  .app-shell {
    border-radius: 20px;
    padding: clamp(20px, 6vw, 32px);
  }
}
