html {
  font-size: 16px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #1c2430;
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.45), transparent 32%),
    linear-gradient(135deg, #f7f2e8 0%, #edf4ff 52%, #f3f8f2 100%);
}

.app-header {
  padding: 1.2rem 1.5rem 0;
}

.app-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 38px rgba(53, 76, 110, 0.08);
  backdrop-filter: blur(14px);
}

.app-nav__brand {
  color: #1c2430;
  font-weight: 700;
  text-decoration: none;
}

.app-nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.app-nav__links a {
  color: #425168;
  text-decoration: none;
}

.app-main {
  padding: 1.5rem;
}

.hero {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 170px);
  padding: 2.5rem 0;
}

.hero__content,
.panel {
  width: min(980px, 100%);
  padding: 2.5rem;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 20px 60px rgba(53, 76, 110, 0.12);
  backdrop-filter: blur(14px);
}

.panel {
  margin: 0 auto;
}

.panel--wide {
  width: min(1240px, 100%);
}

.panel--subtle {
  padding: 1.4rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(28, 36, 48, 0.04);
}

.panel--compact {
  margin-top: 1.25rem;
}

.panel__header {
  margin-bottom: 1.5rem;
}

.panel__header--row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
}

.panel__eyebrow,
.hero__eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #1c2430;
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.hero h1,
.panel h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.hero p,
.panel p {
  margin-bottom: 0;
  font-size: 1.02rem;
  line-height: 1.8;
  color: #425168;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero__meta span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(28, 36, 48, 0.08);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid--search {
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  margin-top: 1.5rem;
}

.form-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid__full {
  grid-column: 1 / -1;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: end;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.form-hint {
  display: block;
  margin-top: 0.35rem;
  color: #64748b;
  font-size: 0.9rem;
}

.table-shell {
  overflow-x: auto;
  margin-top: 1.5rem;
}

.table-shell--card {
  padding: 0.5rem 0.75rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 1px rgba(28, 36, 48, 0.05);
}

.admin-table th,
.admin-table td {
  white-space: nowrap;
}

.admin-table--center th,
.admin-table--center td {
  text-align: center;
  vertical-align: middle;
}

.actions-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.actions-inline--tight .btn {
  min-width: 96px;
}

.actions-inline form {
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.75rem;
}

.dashboard-card {
  display: block;
  padding: 1.4rem;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(236, 244, 255, 0.88));
  border: 1px solid rgba(28, 36, 48, 0.08);
  box-shadow: 0 14px 34px rgba(53, 76, 110, 0.08);
}

.dashboard-card strong {
  display: block;
  margin-top: 0.75rem;
  font-size: 1.9rem;
}

.dashboard-card p {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.dashboard-card__label {
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(28, 36, 48, 0.08);
  font-size: 0.9rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 1rem;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 1.75rem;
}

.stat-card {
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 32px rgba(53, 76, 110, 0.07);
}

.stat-card span {
  display: inline-block;
  color: #64748b;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.stat-card strong {
  display: block;
  margin-top: 0.55rem;
  font-size: 1.18rem;
  line-height: 1.4;
}

.stat-card p {
  margin-top: 0.7rem;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.65;
}

.mono-text {
  font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
  word-break: break-all;
}

.llm-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.85fr);
  gap: 1.25rem;
  align-items: start;
}

.llm-layout__main {
  display: grid;
  gap: 1rem;
}

.field-grid {
  display: grid;
  gap: 1rem;
}

.field-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.prompt-card {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.prompt-card__textarea {
  min-height: 164px;
  resize: vertical;
}

.panel-stack {
  gap: 1rem;
}

.sticky-panel {
  position: sticky;
  top: 1rem;
}

.form-check-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(28, 36, 48, 0.08);
  border-radius: 18px;
  background: rgba(236, 244, 255, 0.6);
}

.form-check-block .form-check-input {
  margin-top: 0;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.section-header p {
  margin: 0;
  color: #556273;
}

.callout {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(28, 36, 48, 0.08);
}

.callout--success {
  background: rgba(220, 252, 231, 0.9);
}

.callout--info {
  background: rgba(239, 246, 255, 0.92);
}

.danger-zone {
  margin-top: 1rem;
}

.danger-zone__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 768px) {
  .panel__header--row {
    flex-direction: column;
  }

  .form-grid--search,
  .form-grid--two,
  .dashboard-grid,
  .split-layout,
  .stats-strip,
  .llm-layout,
  .field-grid--two,
  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .danger-zone__row {
    flex-direction: column;
    align-items: stretch;
  }
}
