/* ==========================================================================
   Passwerk – Enterprise UI
   Plain CSS, keine Build-Pipeline. Design-Tokens zentral in :root.
   ========================================================================== */

:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --border: #e4e4e9;
  --border-strong: #d1d1d9;
  --text: #17171c;
  --text-2: #4a4a55;
  --muted: #74747f;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef0ff;
  --danger: #d92d20;
  --danger-soft: #fef1f0;
  --success: #12805c;
  --success-soft: #ebf8f2;
  --warning: #b45309;
  --warning-soft: #fff7e6;
  --info-soft: #eef4ff;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 24, .05);
  --shadow: 0 1px 3px rgba(16, 16, 24, .06), 0 8px 24px -12px rgba(16, 16, 24, .12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sidebar: 236px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 .75em; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
img { max-width: 100%; }
.icon { flex-shrink: 0; vertical-align: -3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- App-Shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; font-weight: 700; font-size: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff; display: grid; place-items: center; font-size: 15px;
}
.nav { padding: 8px 12px; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500;
}
.nav a:hover { background: var(--bg); text-decoration: none; color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid var(--border); font-size: 13px; }
.sidebar-foot .org { font-weight: 600; }
.sidebar-foot .who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot form { margin-top: 8px; }

.main { flex: 1; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 32px 0;
  flex-wrap: wrap;
}
.topbar .crumbs { color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.topbar .crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.content { padding: 20px 32px 48px; }
.content.wide { max-width: none; }

/* ---------- Komponenten ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 18px; }
.content > .card + .card, .stack > * + * { margin-top: 16px; }

.grid { display: grid; gap: 16px; }
.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)); }
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.split > *, .grid > * { min-width: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: 500 13.5px var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, box-shadow .12s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #c2c2cc; }
.btn:focus-visible, .input:focus-visible, .select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #f4b5b0; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-icon { width: 30px; padding: 0; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.label { display: block; font-weight: 500; margin-bottom: 5px; font-size: 13px; color: var(--text-2); }
.hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.input, .select, textarea.input {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: 14px var(--font);
  box-shadow: var(--shadow-sm);
}
textarea.input { height: auto; min-height: 76px; padding: 8px 11px; resize: vertical; }
.select { appearance: none; padding-right: 30px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2374747f' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.input.is-invalid, .select.is-invalid { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.input-sm { height: 30px; font-size: 13px; padding: 0 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.color-input { display: flex; gap: 6px; }
.color-input input[type=color] { width: 40px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-left: -1px; box-shadow: none; }
.prefix-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); box-shadow: var(--shadow-sm); }
.prefix-input span { padding: 0 2px 0 11px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.prefix-input .input { border: 0; box-shadow: none; background: transparent; padding-left: 2px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: var(--bg); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge-green { background: var(--success-soft); color: var(--success); border-color: #c4ecd9; }
.badge-red { background: var(--danger-soft); color: var(--danger); border-color: #f8cdc9; }
.badge-amber { background: var(--warning-soft); color: var(--warning); border-color: #fbe0a9; }
.badge-indigo { background: var(--accent-soft); color: var(--accent); border-color: #d9dcff; }

.flash { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid; font-size: 13.5px; }
.flash-success { background: var(--success-soft); border-color: #c4ecd9; color: #0b5e43; }
.flash-error { background: var(--danger-soft); border-color: #f8cdc9; color: #a3231a; }
.flash-info { background: var(--info-soft); border-color: #d3e0ff; color: #2c3e8f; }
.flash .close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row-link { color: var(--text); font-weight: 500; }

.stat { padding: 16px 18px; }
.stat .k { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat .v { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--muted); font-size: 12.5px; }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty h3 { color: var(--text); margin-bottom: 6px; font-size: 15px; }
.empty .btn { margin-top: 12px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.copy-field { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
pre.code { margin: 0; padding: 14px; background: #15151c; color: #e5e5f0; border-radius: var(--radius-sm); overflow-x: auto; font: 12.5px/1.6 var(--mono); }

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { width: auto; }
.toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.toolbar .search .input { width: 100%; padding-left: 32px; }
.toolbar .search .icon { position: absolute; left: 10px; top: 10px; color: var(--muted); }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 54px; }
.spark span { flex: 1; background: var(--accent-soft); border-radius: 3px 3px 0 0; min-height: 3px; position: relative; }
.spark span.on { background: #a5abf7; }
.spark span:hover { background: var(--accent); }

.tpl-swatch { width: 34px; height: 22px; border-radius: 5px; border: 1px solid rgba(0,0,0,.08); flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mb-0 { margin-bottom: 0; }
.flex { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; }
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }
details.disclosure > summary { cursor: pointer; color: var(--text-2); font-weight: 500; list-style: none; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "▸"; display: inline-block; margin-right: 6px; transition: transform .15s; }
details.disclosure[open] > summary::before { transform: rotate(90deg); }

/* ---------- Auth & Public ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 50% -10%, #e9eafe 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brand { justify-content: center; padding: 0 0 18px; font-size: 18px; }
.auth-card .card-body { padding: 26px; }
.auth-card h1 { font-size: 19px; margin-bottom: 4px; }
.auth-foot { text-align: center; margin-top: 16px; color: var(--muted); font-size: 13.5px; }

.public-page { min-height: 100vh; background: var(--bg); display: flex; flex-direction: column; }
.public-main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 40px 20px; }
.public-foot { text-align: center; padding: 20px; color: var(--muted); font-size: 12.5px; }
.public-foot a { color: var(--muted); }
.public-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: center; }
.public-hero h1 { font-size: 28px; letter-spacing: -.02em; line-height: 1.2; }
.public-hero .lead { color: var(--text-2); font-size: 15.5px; margin-top: 10px; }
.wallet-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.wallet-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 18px 0 14px; border-radius: 10px;
  background: #000; color: #fff; font-weight: 600; font-size: 14.5px;
  border: 1px solid #000;
}
.wallet-btn:hover { text-decoration: none; background: #1d1d22; }
.wallet-btn small { display: block; font-weight: 400; font-size: 11px; opacity: .8; line-height: 1.1; }
.wallet-btn span { line-height: 1.15; }
.wallet-btn.google { background: #fff; color: #1f1f1f; border-color: #747775; }
.wallet-btn.google:hover { background: #f6f6f6; }
.wallet-btn.disabled { opacity: .4; pointer-events: none; }
.qr-box { display: flex; gap: 16px; align-items: center; margin-top: 26px; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-width: 420px; }
.qr-box .qr { width: 112px; height: 112px; flex-shrink: 0; }
.qr-box p { margin: 0; color: var(--text-2); font-size: 13.5px; }

/* ---------- Template-Builder ---------- */
.builder { display: grid; grid-template-columns: minmax(380px, 490px) minmax(0, 1fr); min-height: 100vh; }
.builder-form { border-right: 1px solid var(--border); background: var(--surface); }
.builder-form .section { padding: 18px 24px; border-bottom: 1px solid var(--border); }
.builder-form .section h2 { font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.builder-form .section h2 small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.builder-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.builder-head .crumbs { color: var(--muted); font-size: 12.5px; }
.builder-head h1 { font-size: 17px; }
.builder-preview { position: sticky; top: 0; height: 100vh; overflow: auto; padding: 22px 24px 40px; background: #eceef3; background-image: radial-gradient(#d9dbe3 1px, transparent 1px); background-size: 16px 16px; }
.preview-pair { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; align-items: flex-start; }
.preview-col { width: 300px; }
.preview-col h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.preview-note { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 18px; }

.row-editor { display: grid; gap: 8px; }
.row-item { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.row-item .row-main { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; }
.row-item .row-sub { display: grid; grid-template-columns: 1.3fr 1fr; gap: 6px; }
.row-item .row-ctrl { display: flex; gap: 2px; }
.ph-row { display: grid; grid-template-columns: 1fr 1fr 96px auto; gap: 6px; align-items: center; }
.ph-flags { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px dashed #b7bbf3; background: var(--accent-soft); color: var(--accent); font: 12px var(--mono); cursor: pointer; }
.chip:hover { background: #e0e3ff; }
.chip.sys { border-color: var(--border-strong); background: var(--surface-2); color: var(--text-2); }
.image-slot { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.image-slot + .image-slot { margin-top: 8px; }
.image-slot .thumb { width: 72px; height: 48px; border-radius: 6px; background: var(--surface-2) center/contain no-repeat; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.image-slot .meta { min-width: 0; }
.image-slot .meta strong { display: block; font-size: 13px; }
.image-slot .meta .hint { margin: 0 0 6px; }
.image-slot input[type=file] { font-size: 12.5px; max-width: 100%; }
.limit-warn { color: var(--warning); font-size: 12.5px; }

/* ---------- Pass-Vorschau: Apple ---------- */
.apple-pass {
  --fg: #fff; --bg: #1e1b4b; --lbl: #a5b4fc;
  width: 100%; max-width: 320px; border-radius: 13px; overflow: hidden;
  background: var(--bg); color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 14px 34px -10px rgba(0,0,0,.35);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  position: relative;
}
.apple-pass.coupon::before, .apple-pass.coupon::after { content: ""; position: absolute; left: 0; right: 0; height: 6px; background: radial-gradient(circle at 5px -1px, #eceef3 4px, transparent 4.5px) repeat-x; background-size: 10px 6px; }
.apple-pass.coupon::before { top: 0; }
.apple-pass.coupon::after { bottom: 0; transform: scaleY(-1); }
.apple-pass.eventTicket { -webkit-mask: radial-gradient(circle at 50% 0, transparent 13px, #000 13.5px); mask: radial-gradient(circle at 50% 0, transparent 13px, #000 13.5px); }
.ap-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; min-height: 46px; }
.ap-logo { max-height: 30px; max-width: 110px; object-fit: contain; }
.ap-logotext { font-size: 15px; font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-header { display: flex; gap: 12px; margin-left: auto; text-align: right; }
.ap-f { min-width: 0; }
.ap-f .l { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--lbl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-f .v { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap-header .ap-f .v { font-size: 15px; }
.ap-strip { position: relative; height: 123px; background: rgba(255,255,255,.06) center/cover no-repeat; display: flex; align-items: flex-end; }
.ap-strip.tall { height: 144px; }
.ap-strip.short { height: 98px; }
.ap-strip .ap-primary { padding: 10px 14px; }
.ap-primary .v { font-size: 30px; font-weight: 300; letter-spacing: -.01em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 270px; }
.ap-primary .l { font-size: 11px; color: var(--lbl); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ap-body-primary { padding: 6px 14px 10px; display: flex; justify-content: space-between; gap: 10px; }
.ap-body-primary .ap-thumb { width: 64px; height: 64px; border-radius: 6px; background: center/cover no-repeat; flex-shrink: 0; }
.ap-boarding { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 10px; }
.ap-boarding .ap-primary .v { font-size: 34px; }
.ap-boarding .arrow { font-size: 22px; opacity: .8; }
.ap-row { display: flex; gap: 12px; padding: 4px 14px 8px; }
.ap-row .ap-f { flex: 1; }
.ap-row .ap-f:last-child:not(:first-child) { text-align: right; }
.ap-barcode { padding: 14px 0 16px; display: flex; justify-content: center; }
.ap-barcode .box { background: #fff; border-radius: 6px; padding: 9px 9px 5px; text-align: center; color: #000; }
.ap-barcode .alt { font-size: 10.5px; margin-top: 3px; font-family: -apple-system, sans-serif; }
.ap-barcode svg { display: block; margin: 0 auto; }
.ap-voided { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.35); font-weight: 700; letter-spacing: .1em; font-size: 20px; color: #fff; }
.ap-info { text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 8px; }

/* ---------- Pass-Vorschau: Google ---------- */
.google-pass {
  --bg: #1e1b4b; --fg: #fff;
  width: 100%; max-width: 320px; border-radius: 20px; overflow: hidden;
  background: var(--bg); color: var(--fg);
  font-family: "Google Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 14px 34px -10px rgba(0,0,0,.35);
  position: relative;
}
.gp-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.gp-logo { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.25) center/cover no-repeat; flex-shrink: 0; }
.gp-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-divider { height: 1px; background: currentColor; opacity: .18; margin: 8px 18px; }
.gp-sub { padding: 2px 18px 0; font-size: 12px; opacity: .8; }
.gp-header { padding: 0 18px 10px; font-size: 24px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-rows { padding: 0 18px; }
.gp-row { display: flex; gap: 12px; padding: 6px 0; }
.gp-row .gp-f { flex: 1; min-width: 0; }
.gp-row .gp-f:last-child:not(:first-child) { text-align: right; }
.gp-row .gp-f:nth-child(2):not(:last-child) { text-align: center; }
.gp-f .l { font-size: 11px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-f .v { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gp-barcode { display: flex; justify-content: center; padding: 16px 0 18px; }
.gp-barcode .box { background: #fff; border-radius: 12px; padding: 12px 12px 8px; color: #202124; text-align: center; }
.gp-barcode .alt { font-size: 11px; margin-top: 4px; }
.gp-hero { height: 106px; background: center/cover no-repeat; }
.gp-voided { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 999px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .builder { grid-template-columns: 1fr; }
  .builder-preview { position: static; height: auto; border-top: 1px solid var(--border); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .public-hero { grid-template-columns: 1fr; }
  .public-hero .preview-col { margin: 0 auto; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--border); }
  .nav { display: flex; padding: 0 8px; }
  .nav a span { display: none; }
  .sidebar-foot { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .builder-form .section, .builder-head { padding-left: 16px; padding-right: 16px; }
  .builder { min-width: 0; }
  .builder-form { min-width: 0; }
  .row-item .row-main, .row-item .row-sub, .ph-row { grid-template-columns: 1fr; }
  .qr-box { display: none; }
}
