:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #dde4ee;
  --text: #111827;
  --muted: #5b6472;
  --primary: #0f766e;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.topbar { background: #0f172a; color: #fff; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { color: #fff; font-weight: 700; font-size: 1.1rem; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { color: #dbeafe; }
.main-content { padding: 28px 0; }
.footer { padding: 24px 0 40px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 6px 20px rgba(15, 23, 42, .05); }
.narrow { max-width: 640px; margin: 0 auto; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-head, .hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.section-head h1, .section-head h2, .hero h1, .card h1, .card h2, .card h3 { margin: 0; }
.muted { color: var(--muted); }
.muted-card { background: #f8fafc; }
label { display: grid; gap: 8px; font-weight: 600; }
input, select, textarea, button { font: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="number"], input[type="color"], select, textarea {
  width: 100%; border: 1px solid #c8d1dc; border-radius: 10px; padding: 12px 14px; background: #fff;
}
input[type="color"] { min-height: 48px; padding: 4px; }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.checkbox input { width: auto; }
.top-gap { margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.alert { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.stats-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 20px 0; }
.stat { display: grid; gap: 8px; }
.stat strong { font-size: 2rem; }
.preview-card { text-align: center; }
.qr-preview { width: 100%; min-height: 290px; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #fff, #f8fafc); border: 1px dashed #cbd5e1; border-radius: 14px; padding: 16px; }
.public-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.public-card { width: min(900px, 100%); background: white; border-radius: 20px; padding: 28px; box-shadow: 0 14px 50px rgba(15, 23, 42, .08); }
.public-body img, .public-body iframe, .public-body video { max-width: 100%; }
code { background: #eff6ff; padding: 2px 6px; border-radius: 6px; }
hr { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar-inner, .hero, .section-head { flex-direction: column; align-items: flex-start; }
}
