:root {
  --bg: #eef3fb;
  --panel: #ffffff;
  --ink: #10203a;
  --muted: #687892;
  --nav: #1f275b;
  --nav-accent: #2f78ff;
  --line: #dbe4f2;
  --success: #10b981;
  --danger: #ef4444;
  --hero-a: #5ea8ff;
  --hero-b: #2d6fe8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(94, 168, 255, 0.18), transparent 25%),
    linear-gradient(180deg, #f7faff 0%, var(--bg) 100%);
  color: var(--ink);
}

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

.hidden {
  display: none !important;
}

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

.login-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(16, 32, 58, 0.12);
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.login-card p {
  margin: 0 0 20px;
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #242c66, #1e2557);
  color: #fff;
  padding: 24px 18px;
}

.brand {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 28px;
}

.sidebar nav {
  display: grid;
  gap: 10px;
}

.nav-link {
  color: #eef2ff;
  text-decoration: none;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  background: #171e4b;
  border-left: 4px solid var(--nav-accent);
}

.sidebar-footer {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.main {
  padding: 14px 18px 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.topbar small {
  display: block;
  color: var(--muted);
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)),
    linear-gradient(90deg, var(--hero-b), var(--hero-a));
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -5% -45% 10%;
  height: 160px;
  background: linear-gradient(90deg, rgba(45,111,232,0.9), rgba(94,168,255,0.95));
  border-radius: 100% 0 0 0;
  filter: blur(6px);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero h1 {
  margin: 10px 0 8px;
  font-size: 36px;
}

.subtle,
.muted {
  color: var(--muted);
}

.button,
button {
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  background: #f1f6ff;
  color: var(--ink);
  cursor: pointer;
}

.button.primary,
button.primary {
  background: #2f78ff;
  color: #fff;
}

.button.danger,
button.danger {
  background: #fee2e2;
  color: #991b1b;
}

.cards,
.grid-two,
.grid-three {
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

.cards {
  grid-template-columns: repeat(3, 1fr);
}

.grid-two {
  grid-template-columns: 2fr 1fr;
}

.grid-three {
  grid-template-columns: repeat(3, 1fr);
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(16, 32, 58, 0.06);
}

.card strong {
  display: block;
  margin-top: 14px;
  font-size: 34px;
}

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

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

.inline-actions input,
.inline-actions select {
  flex: 1;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-top: 1px solid var(--line);
  padding: 12px 10px;
  vertical-align: top;
}

.form-grid {
  display: grid;
  gap: 12px;
}

input,
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbff;
}

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

.status-list {
  display: grid;
  gap: 12px;
}

.status-list div {
  display: flex;
  justify-content: space-between;
  padding: 14px;
  border-radius: 12px;
  background: #f7faff;
}

.status-list strong {
  color: var(--success);
}

.campaign-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
  background: #fbfdff;
}

.preview-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.campaign-preview strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.campaign-preview p {
  margin: 0 0 12px;
  color: var(--muted);
}

.preview-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.preview-image {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.notice.error {
  background: #fef2f2;
  color: #991b1b;
}

.notice.success {
  background: #ecfdf5;
  color: #065f46;
}

.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12px;
}

pre.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
}

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

  .cards,
  .grid-two,
  .grid-three {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
