/* =====================================================================
   E-Venz Africa Event Hub — design system
   Ported from the Tailwind theme (tailwind.config.ts + index.css):
   brand #c92737 / #1f1629, Lato, --radius 0.75rem, light + dark themes.
   Self-contained: no CDN, no build step.
   ===================================================================== */

:root {
  --primary: #c92737;
  --primary-600: #b3202f;
  --primary-50: #fef2f2;
  --primary-100: #fee2e2;
  --secondary: #1f1629;
  --secondary-800: #2c2038;

  --bg: #ffffff;
  --bg-alt: #f8f7fb;
  --fg: #101418;
  --muted: #e5e3ea;
  --muted-fg: #6b6880;
  --card: #ffffff;
  --card-fg: #101418;
  --border: #e6eaef;
  --input-bg: #f7f9fa;
  --ring: rgba(201, 39, 55, .35);
  --destructive: #ef2b41;
  --success: #12a05e;
  --warning: #d08700;

  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 2px rgba(16, 20, 24, .06);
  --shadow: 0 2px 8px rgba(16, 20, 24, .08);
  --shadow-lg: 0 12px 32px rgba(16, 20, 24, .12);

  --font-sans: 'Lato', 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --container: 1200px;
  --header-h: 68px;
}

html[data-theme="dark"] {
  --bg: #0b0b0e;
  --bg-alt: #131319;
  --fg: #e8e9ea;
  --muted: #1e1e26;
  --muted-fg: #9b98ab;
  --card: #16161d;
  --card-fg: #e8e9ea;
  --border: #26262f;
  --input-bg: #1b1b23;
  --primary-50: #2a1418;
  --primary-100: #3a181e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }

hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---------------------------------------------------------------- layout */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-alt { background: var(--bg-alt); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 18px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.muted { color: var(--muted-fg); }
.small { font-size: .85rem; }
.tiny { font-size: .78rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 36px; }

.section-head { margin-bottom: 32px; }
.section-head h2 { margin-bottom: 6px; }
.section-head p { color: var(--muted-fg); margin: 0; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--fg); text-decoration: none; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; opacity: .85; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; display: grid; place-items: center; font-size: .82rem; font-weight: 800;
}
.brand em { font-style: normal; color: var(--primary); }

/* An uploaded logo stands in for the wordmark. Height-capped so a
   large upload cannot blow out the header. */
.brand-logo { max-height: 40px; width: auto; max-width: 220px; object-fit: contain; }

.nav { display: flex; align-items: center; gap: 22px; margin-left: 8px; }
.nav a { color: var(--muted-fg); font-weight: 600; font-size: .93rem; text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--fg); text-decoration: none; }
.nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.nav-toggle, .theme-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 38px; height: 38px;
  cursor: pointer; color: var(--fg); font-size: 1rem; line-height: 1;
}
.theme-toggle { display: grid; place-items: center; }
.theme-toggle:hover { background: var(--muted); }

@media (max-width: 900px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px; box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--border); }
  .nav a.active { border-bottom-color: var(--border); }
}

/* user menu */
.usermenu { position: relative; }
.usermenu-btn {
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px 5px 5px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--fg);
}
.usermenu-btn:hover { border-color: var(--primary); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: 0 0 auto;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
}
.usermenu-panel {
  display: none; position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
}
.usermenu-panel.open { display: block; }
.usermenu-panel a, .usermenu-panel button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--fg); font-size: .9rem; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.usermenu-panel a:hover, .usermenu-panel button:hover { background: var(--muted); text-decoration: none; }
.usermenu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.usermenu-head strong { display: block; font-size: .9rem; }
.usermenu-head span { font-size: .78rem; color: var(--muted-fg); }
.usermenu-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: .93rem; font-weight: 600; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: filter .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 1px; }
.btn:disabled, .btn.disabled { opacity: .55; pointer-events: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: var(--secondary-800); color: #fff; }
.btn-outline { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted-fg); }
.btn-ghost:hover { background: var(--muted); color: var(--fg); }
.btn-danger { background: var(--destructive); color: #fff; }
.btn-danger:hover { filter: brightness(.92); color: #fff; }
.btn-sm { padding: 6px 13px; font-size: .84rem; }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- cards */
.card {
  background: var(--card); color: var(--card-fg);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-body { padding: 22px; }
.card-head { padding: 16px 22px; border-bottom: 1px solid var(--border); font-weight: 700; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--bg-alt); }

/* event card */
.event-card { display: flex; flex-direction: column; height: 100%; transition: transform .18s, box-shadow .18s; }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.event-card .thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--muted);
  display: grid; place-items: center; overflow: hidden;
}
.event-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.event-card .thumb .placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; opacity: .92;
}
.event-card .body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.event-card h3 { font-size: 1.05rem; margin: 0; }
.event-card h3 a { color: var(--fg); }
.event-card h3 a:hover { color: var(--primary); text-decoration: none; }
.event-card .meta { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted-fg); }
.event-card .meta span { display: flex; align-items: center; gap: 7px; }
.event-card .foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  background: var(--muted); color: var(--muted-fg); text-transform: uppercase;
}
.badge-primary   { background: var(--primary-100); color: var(--primary); }
.badge-featured  { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: #fff; }
.badge-success   { background: rgba(18,160,94,.13); color: var(--success); }
.badge-warning   { background: rgba(208,135,0,.14); color: var(--warning); }
.badge-danger    { background: rgba(239,43,65,.13); color: var(--destructive); }
.badge-free      { background: rgba(18,160,94,.13); color: var(--success); }

.badge-float { position: absolute; top: 12px; left: 12px; z-index: 2; }
.badge-float-right { position: absolute; top: 12px; right: 12px; z-index: 2; left: auto; }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(135deg, var(--secondary) 0%, #3a1f36 55%, var(--primary) 130%);
}
.hero .container { position: relative; z-index: 2; padding-top: 76px; padding-bottom: 76px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 14px; color: #fff; }
.hero p.lead { font-size: 1.1rem; max-width: 620px; color: rgba(255,255,255,.86); margin-bottom: 26px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.hero-bg {
  position: absolute; inset: 0; z-index: 1; opacity: .22;
  background-size: cover; background-position: center;
}
.hero-stats { display: flex; gap: 38px; flex-wrap: wrap; margin-top: 38px; }
.hero-stats div strong { display: block; font-size: 1.9rem; line-height: 1.1; }
.hero-stats div span { font-size: .85rem; color: rgba(255,255,255,.72); }

/* ---- home hero: copy beside a stack of real generated flyers ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 48px;
  align-items: center;
}
.hero-copy { min-width: 0; }

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
  font-weight: 700;
  color: rgba(255,255,255,.62);
  margin-bottom: 14px;
}

.hero-search {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin-bottom: 18px;
}
.hero-search input {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}
.hero-search input::placeholder { color: rgba(255,255,255,.6); opacity: 1; }
.hero-search input:focus {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 0 0 3px rgba(255,255,255,.16);
  color: #fff;
}
.hero-search .btn { flex: 0 0 auto; }

/* A text-weight action that still reads as a link on the dark hero. */
.btn-ghost-light {
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255,255,255,.9);
}
.btn-ghost-light:hover { color: #fff; background: rgba(255,255,255,.1); }

.hero-art { position: relative; }

/* Three flyers fanned out. Square source images, so the stack keeps its
   own aspect and never drags the hero taller on a narrow screen. */
.flyer-stack {
  position: relative;
  aspect-ratio: 1 / 1;
  max-width: 400px;
  margin: 0 auto;
}
.flyer-card {
  position: absolute;
  width: 74%;
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.14);
  transition: transform .25s ease;
}
.flyer-card-1 { top: 6%;  left: 0;    transform: rotate(-7deg); z-index: 1; }
.flyer-card-2 { top: 0;   left: 13%;  transform: rotate(-1deg); z-index: 3; }
.flyer-card-3 { top: 12%; left: 26%;  transform: rotate(6deg);  z-index: 2; }

.flyer-stack:hover .flyer-card-1 { transform: rotate(-11deg) translateX(-7px); }
.flyer-stack:hover .flyer-card-3 { transform: rotate(10deg) translateX(7px); }

/* Fewer than three published designs: centre what there is rather than
   leaving the fan leaning into empty space. */
.stack-1 .flyer-card-1 {
  top: 4%; left: 13%; width: 74%; transform: rotate(-2deg);
}
.stack-1:hover .flyer-card-1 { transform: rotate(-4deg); }

.stack-2 .flyer-card-1 { top: 8%; left: 2%;  transform: rotate(-6deg); }
.stack-2 .flyer-card-2 { top: 2%; left: 22%; transform: rotate(3deg); }
.stack-2:hover .flyer-card-1 { transform: rotate(-9deg) translateX(-6px); }
.stack-2:hover .flyer-card-2 { transform: rotate(6deg) translateX(6px); }

/* The showcase row is a 3-up grid; fewer images should not stretch. */
.showcase-art:has(img:only-child) { grid-template-columns: minmax(0, 320px); justify-content: center; }
.showcase-art:has(img:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 260px)); justify-content: center; }

.hero-art-note {
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.62);
  margin: 18px 0 0;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-art { order: -1; }
  .flyer-stack { max-width: 300px; }
  .hero-art-note { display: none; }
}

/* ---- value proposition band ------------------------------------------ */
.value-band { padding-top: 46px; padding-bottom: 46px; }
.value h3 { font-size: 1.06rem; margin-bottom: 6px; }
.value-icon {
  font-size: 1.5rem;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: var(--primary-50);
  margin-bottom: 12px;
}

/* ---- flyer showcase --------------------------------------------------- */
.showcase { background: var(--secondary); color: #fff; }
.showcase h2 { color: #fff; }
.showcase .muted { color: rgba(255,255,255,.72); }

.showcase-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .76rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}
.showcase .eyebrow { color: #ff8a95; }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 26px 0; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
  font-size: .92rem;
  color: rgba(255,255,255,.72);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}
.steps li strong { display: block; color: #fff; margin-bottom: 3px; font-size: .97rem; }

.showcase-art {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.showcase-art img {
  width: 100%;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
/* Stagger the middle one so the row reads as a set, not a filmstrip. */
.showcase-art img:nth-child(2) { transform: translateY(-16px); }

@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: 1fr; gap: 34px; }
  .showcase-art img:nth-child(2) { transform: none; }
}

/* ---- categories with counts ------------------------------------------- */
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cat {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  font-size: .9rem;
  font-weight: 600;
  transition: border-color .15s, background .15s, transform .15s;
}
.cat:hover {
  border-color: var(--primary);
  background: var(--primary-50);
  color: var(--primary);
  transform: translateY(-1px);
}
.cat-count {
  font-size: .76rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-fg);
}
.cat:hover .cat-count { background: var(--primary); color: #fff; }

/* ---- closing call to action ------------------------------------------- */
.cta-band .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.justify-center { justify-content: center; }

/* event detail hero */
.event-hero { position: relative; background: var(--secondary); color: #fff; }
.event-hero .cover { position: absolute; inset: 0; opacity: .35; }
.event-hero .cover img { width: 100%; height: 100%; object-fit: cover; }
.event-hero .container { position: relative; z-index: 2; padding: 60px 20px; }
.event-hero h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); }
.event-logo {
  width: 78px; height: 78px; border-radius: var(--radius); background: #fff;
  padding: 7px; box-shadow: var(--shadow); flex: 0 0 auto; margin-bottom: 16px;
}
.event-logo img { width: 100%; height: 100%; object-fit: contain; }
.event-meta-row { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 16px; font-size: .95rem; color: rgba(255,255,255,.9); }
.event-meta-row span { display: flex; align-items: center; gap: 8px; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 6px; color: var(--fg); }
label .req { color: var(--primary); }
label .hint { font-weight: 400; color: var(--muted-fg); }

.input, input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=url], input[type=tel], input[type=search],
select, textarea {
  width: 100%; padding: 10px 13px;
  font-family: inherit; font-size: .93rem; color: var(--fg);
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); background: var(--bg);
}
input::placeholder, textarea::placeholder { color: var(--muted-fg); opacity: .75; }
textarea { min-height: 120px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6880' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; font-weight: 400; margin-bottom: 12px; }
.check input { width: auto; margin: 3px 0 0; flex: 0 0 auto; }
.check label { font-weight: 400; margin: 0; font-size: .9rem; }

.field-error { color: var(--destructive); font-size: .82rem; margin-top: 5px; }
.input-error { border-color: var(--destructive) !important; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

/* filter bar */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 28px; }
.filters .field { margin: 0; min-width: 170px; }
.filters .grow { min-width: 220px; }

/* ---------------------------------------------------------------- alerts */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 18px; border: 1px solid; }
.alert-success { background: rgba(18,160,94,.09); border-color: rgba(18,160,94,.3); color: var(--success); }
.alert-error   { background: rgba(239,43,65,.08); border-color: rgba(239,43,65,.3); color: var(--destructive); }
.alert-info    { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.alert-warning { background: rgba(208,135,0,.09); border-color: rgba(208,135,0,.3); color: var(--warning); }

/* ---------------------------------------------------------------- misc */
.empty { text-align: center; padding: 60px 20px; color: var(--muted-fg); }
.empty .icon { font-size: 2.4rem; opacity: .35; margin-bottom: 10px; }
.empty h3 { color: var(--fg); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--fg); font-size: .88rem; font-weight: 600; text-decoration: none;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .gap { border: 0; }

.prose { font-size: 1rem; line-height: 1.75; }
.prose img { border-radius: var(--radius); margin: 1.4em 0; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 18px;
  border-left: 3px solid var(--primary); color: var(--muted-fg); font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.prose a { text-decoration: underline; }

.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 3px 10px; border-radius: 999px; background: var(--muted); color: var(--muted-fg); font-size: .76rem; font-weight: 600; }
a.tag:hover { background: var(--primary-100); color: var(--primary); text-decoration: none; }

.sidebar-sticky { position: sticky; top: calc(var(--header-h) + 20px); }

.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 32px; align-items: start; }
@media (max-width: 940px) { .detail-grid { grid-template-columns: 1fr; } }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list .k { color: var(--muted-fg); flex: 0 0 92px; }
.info-list .v { font-weight: 600; word-break: break-word; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--secondary); color: rgba(255,255,255,.72); margin-top: 64px; }
.site-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; padding: 52px 0 36px; }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; font-size: .9rem; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .84rem;
}
.social { display: flex; gap: 10px; margin-top: 14px; }
.social a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.1);
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff;
}
.social a:hover { background: var(--primary); }

.newsletter { display: flex; gap: 8px; margin-top: 12px; }
.newsletter input { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); color: #fff; }
.newsletter input::placeholder { color: rgba(255,255,255,.5); }
.newsletter input:focus { background: rgba(255,255,255,.14); border-color: #fff; box-shadow: none; }

@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .site-footer .cols { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- auth pages */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 48px 20px; background: var(--bg-alt); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 620px; }
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-head p { color: var(--muted-fg); margin: 0; font-size: .93rem; }
.auth-foot { text-align: center; margin-top: 20px; font-size: .9rem; color: var(--muted-fg); }

.role-switch { display: flex; gap: 0; background: var(--muted); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 20px; }
.role-switch label {
  flex: 1; text-align: center; padding: 8px; border-radius: calc(var(--radius-sm) - 2px);
  font-size: .88rem; font-weight: 600; cursor: pointer; margin: 0; color: var(--muted-fg);
}
.role-switch input { display: none; }
.role-switch input:checked + label { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }

.pw-meter { height: 4px; border-radius: 2px; background: var(--muted); margin-top: 7px; overflow: hidden; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }

/* ---------------------------------------------------------------- pricing */
.price-card { display: flex; flex-direction: column; height: 100%; position: relative; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.price-card .ribbon {
  position: absolute; top: 0; right: 22px; background: var(--primary); color: #fff;
  font-size: .7rem; font-weight: 700; padding: 4px 11px; border-radius: 0 0 6px 6px; text-transform: uppercase; letter-spacing: .05em;
}
.price-card .amount { font-size: 2.3rem; font-weight: 800; line-height: 1; margin: 12px 0 4px; }
.price-card .amount small { font-size: .9rem; font-weight: 500; color: var(--muted-fg); }
.price-card ul { list-style: none; margin: 18px 0; padding: 0; flex: 1 1 auto; }
.price-card li { padding: 7px 0 7px 26px; position: relative; font-size: .9rem; }
.price-card li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.price-card li.off { color: var(--muted-fg); }
.price-card li.off::before { content: '×'; color: var(--muted-fg); }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 860px)  { .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px)  {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
}

@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; }
}

/* =====================================================================
   Dashboard shell (client + admin)
   ===================================================================== */
.dash { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 0; min-height: calc(100vh - var(--header-h)); }

.dash-side {
  background: var(--bg-alt); border-right: 1px solid var(--border);
  padding: 22px 0; position: sticky; top: var(--header-h); align-self: start;
  max-height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.dash-side h5 {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted-fg); margin: 20px 20px 8px; font-weight: 700;
}
.dash-side h5:first-child { margin-top: 0; }
.dash-side a {
  display: flex; align-items: center; gap: 10px; padding: 9px 20px;
  color: var(--fg); font-size: .9rem; font-weight: 500; text-decoration: none;
  border-left: 3px solid transparent;
}
.dash-side a:hover { background: var(--muted); text-decoration: none; }
.dash-side a.active { border-left-color: var(--primary); color: var(--primary); background: var(--primary-50); font-weight: 700; }
.dash-side .count { margin-left: auto; font-size: .72rem; background: var(--primary); color: #fff; border-radius: 999px; padding: 1px 7px; font-weight: 700; }

.dash-main { padding: 28px 30px 60px; min-width: 0; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 1.6rem; margin: 0 0 4px; }
.dash-head p { margin: 0; color: var(--muted-fg); font-size: .92rem; }

@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side {
    position: static; max-height: none; padding: 12px 0;
    display: flex; overflow-x: auto; gap: 2px; border-right: 0; border-bottom: 1px solid var(--border);
  }
  .dash-side h5 { display: none; }
  .dash-side a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; padding: 9px 14px; }
  .dash-side a.active { border-left: 0; border-bottom-color: var(--primary); }
  .dash-main { padding: 20px; }

  /* The sidebar turns into a horizontal scroller here, so the identity
     block would sit awkwardly at the end of the tab strip. The header's
     user menu already covers this on small screens. */
  .dash-user { display: none; }
}

/* ---- signed-in identity, pinned under the sidebar nav ----------------- */
.dash-user {
  margin: 22px 14px 0;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.dash-user .avatar {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .85rem;
}
.dash-user .who { min-width: 0; line-height: 1.25; }
.dash-user .who strong {
  display: block; font-size: .84rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dash-user .who span { font-size: .72rem; color: var(--muted-fg); }
.dash-user a.signout {
  margin-left: auto; flex: 0 0 auto;
  font-size: .74rem; color: var(--muted-fg); padding: 4px;
}
.dash-user a.signout:hover { color: var(--primary); }

/* ---- section headings ------------------------------------------------
   Every dashboard page repeated the same flex row with an inline-styled
   h2. One class instead, so they cannot drift apart. */
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 0 0 14px;
}
.section-title h2 { font-size: 1.15rem; margin: 0; }
.section-title p { margin: 2px 0 0; font-size: .85rem; color: var(--muted-fg); }
.section-title + .table-wrap, .section-title + .grid { margin-top: 0; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  display: block;
}
.stat .label { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); font-weight: 700; }
.stat .value { font-size: 1.7rem; font-weight: 800; line-height: 1.2; margin-top: 3px; }
.stat .value.sm { font-size: 1.3rem; }

/* A badge riding inside a table cell next to text. */
.badge-xs { font-size: .62rem; }
.stat .sub { font-size: .78rem; color: var(--muted-fg); }
.stat.accent { border-color: var(--primary); }
.stat.accent .value { color: var(--primary); }

/* A tile that leads somewhere should say so on hover. */
a.stat { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.stat:hover {
  text-decoration: none;
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
a.stat:hover .value { color: var(--primary); }

/* Work that is actually waiting on someone, as opposed to a number that is
   merely informational. */
.stat.attention {
  border-color: var(--warning);
  background: linear-gradient(0deg, color-mix(in srgb, var(--warning) 7%, var(--card)), var(--card));
}
.stat.attention .value { color: var(--warning); }
.stat.attention .label::after {
  content: " •";
  color: var(--warning);
}

/* ---- activity feed inside a card -------------------------------------- */
.feed { display: flex; flex-direction: column; }
.feed-item { padding: 12px 22px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-item:hover { background: var(--bg-alt); }

/* Groups a run of tiles under a quiet caption. */
.stat-group-label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted-fg); font-weight: 700;
  margin: 0 0 10px;
}

/* data tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th {
  text-align: left; padding: 11px 14px; background: var(--bg-alt);
  border-bottom: 1px solid var(--border); font-size: .74rem;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--bg-alt); }

/* Row actions stay out of the way until the row is hovered — on a long
   table a button on every row is visual noise. Always visible on touch,
   where there is no hover to reveal them. */
@media (hover: hover) and (min-width: 861px) {
  table.data tbody .row-actions .btn-ghost { opacity: 0; transition: opacity .12s; }
  table.data tbody tr:hover .row-actions .btn-ghost,
  table.data tbody tr:focus-within .row-actions .btn-ghost { opacity: 1; }
}
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .actions { white-space: nowrap; text-align: right; }
table.data .actions .btn { margin-left: 4px; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ---- filter tabs ------------------------------------------------------ */
.tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .87rem; font-weight: 600;
  color: var(--muted-fg);
  border: 1px solid transparent;
}
.tab:hover { background: var(--muted); color: var(--fg); text-decoration: none; }
.tab.active {
  background: var(--primary-50);
  border-color: var(--primary);
  color: var(--primary);
}
.tab .count {
  font-size: .72rem; font-weight: 700;
  background: var(--muted); color: var(--muted-fg);
  border-radius: 999px; padding: 0 7px;
}
.tab.active .count { background: var(--primary); color: #fff; }

/* ---- contact message inbox -------------------------------------------- */
.msg-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.msg { border-bottom: 1px solid var(--border); }
.msg:last-child { border-bottom: 0; }

.msg > summary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto;
  gap: 14px; align-items: center;
  padding: 13px 18px;
  cursor: pointer;
  list-style: none;
}
.msg > summary::-webkit-details-marker { display: none; }
.msg > summary:hover { background: var(--bg-alt); }
.msg[open] > summary { background: var(--bg-alt); border-bottom: 1px solid var(--border); }

/* Unread reads as unread: heavier text and a marker down the edge. */
.msg.unread > summary { box-shadow: inset 3px 0 0 var(--primary); }
.msg.unread .msg-subject { font-weight: 700; color: var(--fg); }

.msg-from { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.msg-from strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-from span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.msg-subject {
  min-width: 0; font-size: .9rem; color: var(--muted-fg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-meta { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }

.msg-body { padding: 16px 18px 20px; }
.msg-text {
  font-size: .92rem; line-height: 1.6;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

@media (max-width: 720px) {
  .msg > summary { grid-template-columns: 1fr; gap: 6px; }
  .msg-meta { justify-content: flex-start; }
}

/* ---- uploaded asset preview in settings ------------------------------- */
.asset-preview {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-alt);
}
.asset-preview img {
  max-height: 54px; max-width: 160px; width: auto;
  border-radius: 4px; background: #fff; padding: 4px;
}
.asset-preview.wide img { max-width: 260px; max-height: 76px; object-fit: cover; }
.asset-preview .check { margin: 0; font-size: .82rem; }

/* ---- flyer design chooser -------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tpl-option {
  position: relative; display: block;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--card); color: var(--fg);
  transition: border-color .15s, transform .15s;
}
.tpl-option:hover { border-color: var(--primary); transform: translateY(-2px); text-decoration: none; }
.tpl-option.chosen { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.tpl-option img, .tpl-blank { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tpl-blank { background: linear-gradient(135deg, var(--secondary), var(--primary)); }
.tpl-name { display: block; padding: 7px 8px; font-size: .78rem; text-align: center; }
.tpl-tick {
  position: absolute; top: 7px; right: 7px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: .8rem; font-weight: 700;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- reuse-a-design disclosure ---------------------------------------- */
.reuse { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.reuse > summary { cursor: pointer; color: var(--muted-fg); }
.reuse > summary:hover { color: var(--primary); }
.reuse select { max-width: 210px; }

/* ---- flyer preview before generating ---------------------------------- */
.preview-wrap { position: relative; max-width: 460px; margin: 0 auto; }
.preview-img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
}
.preview-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,.62); color: #fff;
  font-size: .7rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(3px);
}

/* ---- storage usage breakdown ------------------------------------------ */
.storage-bar {
  display: flex; height: 12px; border-radius: 999px; overflow: hidden;
  background: var(--muted); margin-bottom: 10px;
}
.storage-bar .seg { display: block; height: 100%; }

.storage-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item .dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }

/* One colour per category, so the bar and legend agree. */
.seg-flyers      { background: #c92737; }
.seg-photos      { background: #2d5f7c; }
.seg-misc        { background: #6b6880; }
.seg-logos       { background: #12a05e; }
.seg-blog        { background: #d08700; }
.seg-backgrounds { background: #7c5a2d; }
.seg-heroes      { background: #3f6b4a; }
.seg-banners     { background: #6b3f5e; }
.seg-thumbs      { background: #9b98ab; }
.seg-qrcodes     { background: #3d4b7c; }
.seg-tickets     { background: #b3202f; }
.seg-previews    { background: #c9c6d4; }

/* ---- custom field definitions in the designer ------------------------- */
.cf-panel > summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cf-panel > summary::-webkit-details-marker { display: none; }
.cf-panel > summary::after { content: '+'; color: var(--muted-fg); font-weight: 700; }
.cf-panel[open] > summary::after { content: '−'; }

.cf-row {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.cf-row:last-child { border-bottom: 0; padding-bottom: 0; }
.cf-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* ---- payment gateway cards -------------------------------------------- */
.gw > details > summary { cursor: pointer; list-style: none; }
.gw > details > summary::-webkit-details-marker { display: none; }
.gw-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.gw-name { display: inline-flex; align-items: center; gap: 8px; }
.gw-blurb { font-weight: 400; max-width: 46ch; text-align: right; }
.gw-live { border-color: var(--success); }
.gw-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.gw-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }

@media (max-width: 720px) { .gw-blurb { text-align: left; } }

/* ---- payment method choice at checkout -------------------------------- */
.pay-choice { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.pay-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; cursor: pointer; font-size: .9rem;
}
.pay-option + .pay-option { border-top: 1px solid var(--border); }
.pay-option input { margin-top: 3px; flex: 0 0 auto; width: auto; }
.pay-option strong { display: block; }

/* ---- platform gateway allowlist --------------------------------------- */
.gw-allow { display: grid; gap: 2px; }
.gw-allow-row { padding: 9px 10px; border-radius: var(--radius-sm); align-items: flex-start; margin: 0; }
.gw-allow-row:hover { background: var(--bg-alt); }
.gw-allow-row input[disabled] + span { opacity: .55; }
.gw-allow-row strong { margin-right: 6px; }

/* toolbar above tables */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.toolbar .field { margin: 0; }
.toolbar .field input, .toolbar .field select { min-width: 160px; }

/* form sections */
.form-section { margin-bottom: 26px; }
.form-section > h3 { font-size: 1.05rem; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }

.help { font-size: .8rem; color: var(--muted-fg); margin-top: 4px; }

.sticky-actions {
  position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--border);
  padding: 14px 0; margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; z-index: 10;
}

/* image preview */
.img-preview {
  width: 100%; max-width: 260px; aspect-ratio: 16/9; border: 1px dashed var(--border);
  border-radius: var(--radius-sm); background: var(--muted); overflow: hidden;
  display: grid; place-items: center; color: var(--muted-fg); font-size: .8rem; margin-bottom: 8px;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }

/* =====================================================================
   Utilities
   Consolidated from repeated inline styles so the same intent always
   produces the same result, and both themes stay in step.
   ===================================================================== */

/* Inline forms — used wherever a single-button action sits in a table row. */
.inline-form { display: inline; }

/* Semantic text colours */
.text-danger  { color: var(--destructive); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }

/* A ghost button that reads as destructive without shouting */
.btn-ghost.btn-danger-text { color: var(--destructive); background: transparent; }
.btn-ghost.btn-danger-text:hover { background: rgba(239, 43, 65, .1); color: var(--destructive); }
.btn-outline.btn-danger-text { color: var(--destructive); border-color: var(--destructive); }
.btn-outline.btn-danger-text:hover { background: rgba(239, 43, 65, .08); color: var(--destructive); }

/* Codes, references and ticket numbers */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.strike { text-decoration: line-through; }

/* A badge small enough to sit inline beside a table cell's title */
.badge-xs { font-size: .62rem; padding: 2px 7px; }

/* Display icons for empty states and result screens */
.icon-lg { font-size: 2.4rem; line-height: 1; }
.icon-xl { font-size: 3rem; line-height: 1; }

/* Roomier card body for confirmation and empty-state panels */
.card-body-lg { padding: 42px 28px; }
@media (max-width: 560px) { .card-body-lg { padding: 30px 20px; } }

/* Compact card body for the small stat cards above a form */
.card-body-sm { padding: 14px 18px; }

/* Images that fill their box */
.img-cover   { width: 100%; height: 100%; object-fit: cover; }
.img-contain { width: 100%; height: 100%; object-fit: contain; }

/* Consistent heading sizes inside dashboard sections */
.h-section { font-size: 1.2rem; margin: 0 0 16px; }
.h-panel   { font-size: 1.4rem; }

/* Colour swatch inputs need a usable hit area */
input[type="color"] {
  height: 44px;
  padding: 4px;
  cursor: pointer;
  max-width: 180px;
}

/* Range inputs inherit almost nothing by default */
input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  padding: 0;
  background: transparent;
  border: 0;
}
input[type="range"]:focus { outline: none; box-shadow: none; }

/* File inputs — make them look like part of the system */
input[type="file"] {
  padding: 8px 10px;
  font-size: .88rem;
  cursor: pointer;
}
input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 6px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Disabled inputs should read as unavailable, not broken */
input:disabled, select:disabled, textarea:disabled {
  opacity: .6;
  cursor: not-allowed;
  background: var(--muted);
}

/* QR panels on tickets and verification screens */
.qr-box {
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--muted);
  color: var(--muted-fg);
  font-size: .78rem;
  text-align: center;
}

/* Anything that must never widen the page */
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Respect a reduced-motion preference across the whole app */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Keyboard focus must always be visible, including on links and rows */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 3px;
}
