:root {
  --ink: #15202b;
  --ink-soft: #3d4f5f;
  --paper: #f4efe6;
  --paper-2: #fffdf8;
  --line: #e4d9c8;
  --accent: #c45c26;
  --accent-2: #1f6f64;
  --ok: #1f6f64;
  --warn: #b45309;
  --danger: #9f1239;
  --sidebar: #101820;
  --radius: 14px;
  --shadow: 0 18px 40px rgba(21, 32, 43, 0.08);
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body.app-body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
}

a { color: var(--accent-2); }
.brand-mark {
  font-family: var(--display);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
}

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px;
  background: var(--sidebar);
  color: #efe7d8;
  padding: 1.25rem 0.9rem;
  flex-shrink: 0;
}
.sidebar a {
  color: #d7cbb6;
  text-decoration: none;
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .55rem .8rem;
  border-radius: 10px;
  font-size: .95rem;
}
.sidebar a:hover, .sidebar a.active { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .section-label {
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8d7f6c;
  padding: 1rem .8rem .35rem;
}
.main-wrap { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.content { padding: 1.4rem 1.5rem 3rem; }
.card-soft {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat {
  padding: 1rem 1.1rem;
}
.stat .label { color: var(--ink-soft); font-size: .82rem; }
.stat .value { font-family: var(--display); font-size: 1.8rem; line-height: 1.1; }
.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #a84b1d; color: #fff; }
.qr-thumb { width: 56px; height: 56px; background: #fff; border-radius: 8px; }
.table thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-soft);
}
.badge-status { text-transform: capitalize; }
.status-active { background: #d9f3ee; color: #0f4f47; }
.status-inactive, .status-draft { background: #f1e6d6; color: #6b4f2a; }
.status-expired, .status-archived { background: #fde2e7; color: #9f1239; }
.status-scheduled { background: #e7e3f7; color: #4338ca; }
.wizard-steps { display: flex; gap: .4rem; flex-wrap: wrap; }
.wizard-steps .step {
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .85rem;
  background: #fff;
  cursor: pointer;
}
.wizard-steps .step.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.preview-pane {
  position: sticky;
  top: 1rem;
  padding: 1rem;
}
.req { color: var(--danger); font-weight: 700; }
.type-fields { display: none; }
.type-fields.is-active { display: block; }
.template-sample {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem;
  text-align: center;
}
.template-sample img { width: 140px; height: 140px; object-fit: contain; }
.hero {
  background:
    radial-gradient(circle at 10% 10%, rgba(196,92,38,.18), transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(31,111,100,.16), transparent 35%),
    var(--paper);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.landing-card { max-width: 480px; margin: 2rem auto; }
@media (max-width: 991px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .preview-pane { position: static; }
}
