:root {
  --primary: #6b2e8a;
  --secondary: #f06292;
  --gradient: linear-gradient(135deg, #6b2e8a 0%, #f06292 100%);
  --bg: #f8f2fb;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --text: #24172d;
  --muted: #6f5a79;
  --border: rgba(107, 46, 138, 0.14);
  --shadow: 0 18px 50px rgba(107, 46, 138, 0.14);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(240, 98, 146, 0.28), transparent 28%),
    radial-gradient(circle at bottom right, rgba(107, 46, 138, 0.2), transparent 24%),
    var(--bg);
}

.page-shell {
  width: min(1400px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.app-header,
.panel,
.hero-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-slot {
  width: min(320px, 42vw);
  height: 88px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.eyebrow,
.pill {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

.header-actions,
.quick-actions,
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.layout-grid {
  display: grid;
  gap: 20px;
}

.hero-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.hero-copy h2 {
  margin: 10px 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
}

.hero-cards {
  display: grid;
  gap: 12px;
}

.stat-card,
.info-card {
  border-radius: 14px;
  background: var(--surface-strong);
  border: 1px solid rgba(107, 46, 138, 0.08);
  padding: 16px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
}

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-grid,
.cards-grid {
  display: grid;
  gap: 16px;
}

.card-form,
.compact-form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

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

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(107, 46, 138, 0.12);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

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

.primary-btn {
  color: white;
  background: var(--gradient);
}

.secondary-btn {
  color: white;
  background: #4f255f;
}

.ghost-btn,
.nav-btn {
  color: var(--primary);
  background: rgba(107, 46, 138, 0.08);
}

.nav-btn.active {
  color: white;
  background: var(--gradient);
}

.json-box,
.list-box {
  margin: 0;
  border-radius: 12px;
  background: #f7f1fa;
  border: 1px solid rgba(107, 46, 138, 0.08);
  padding: 12px;
  min-height: 88px;
  overflow: auto;
}

.list-box .item {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(107, 46, 138, 0.08);
}

.list-box .item:last-child {
  border-bottom: 0;
}

.list-box .actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status-banner {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(240, 98, 146, 0.12);
  color: #7a1848;
}

.hidden {
  display: none !important;
}

@media (min-width: 900px) {
  .logo-slot {
    width: 320px;
  }

  .hero-panel {
    grid-template-columns: 1.4fr 1fr;
    align-items: stretch;
  }

  .hero-cards,
  .auth-grid,
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1180px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
