/* EventPro 360 — corporate green theme. Mobile-first. */
:root {
  --primary: #16A34A;
  --primary-600: #15803D;
  --primary-700: #166534;
  --primary-50: #F0FDF4;
  --primary-100: #DCFCE7;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-2: #F1F5F9;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --danger: #DC2626;
  --danger-50: #FEF2F2;
  --warning: #B45309;
  --warning-50: #FFFBEB;
  --info: #1D4ED8;
  --info-50: #EFF6FF;
  --gold: #A16207;
  --gold-50: #FEF9C3;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, .10);
  --sidebar-w: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--primary-600); text-decoration: none; }
a:hover { color: var(--primary-700); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5rem; color: var(--ink); }
h1 { font-size: 1.45rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: #fff; padding: .5rem 1rem; z-index: 100; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid rgba(22, 163, 74, .45); outline-offset: 2px; }
.icon { flex-shrink: 0; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .5rem 1rem; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 600; font-size: .9rem; line-height: 1.2; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); color: #fff; }
.btn-outline { background: #fff; border-color: var(--primary); color: var(--primary-600); }
.btn-outline:hover { background: var(--primary-50); }
.btn-light { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-light:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--line-2); }
.btn-wa { background: #25D366; color: #073B1D; }
.btn-wa:hover { background: #1EBE59; color: #073B1D; }
.btn-sm { min-height: 32px; padding: .3rem .7rem; font-size: .82rem; }
.btn-lg { min-height: 48px; padding: .7rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary-600); font: inherit; cursor: pointer; }
.link-btn.danger { color: var(--danger); }

/* ---------- Badges / chips ---------- */
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; line-height: 1.5; white-space: nowrap; border: 1px solid transparent; }
.badge-green { background: var(--primary-100); color: var(--primary-700); }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-gray { background: var(--line-2); color: var(--ink-2); border-color: var(--line); }
.badge-purple { background: #EDE9FE; color: #5B21B6; }
.badge-teal { background: #CCFBF1; color: #115E59; }
.badge-gold { background: linear-gradient(135deg, #FDE68A, #FCD34D); color: #713F12; border-color: #F59E0B; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; background: var(--primary-50); color: var(--primary-700); font-size: .82rem; font-weight: 600; }

/* ---------- Alerts ---------- */
.alert { position: relative; padding: .8rem 2.6rem .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; font-size: .92rem; }
.alert-success { background: var(--primary-50); border-color: #BBF7D0; color: var(--primary-700); }
.alert-danger { background: var(--danger-50); border-color: #FECACA; color: #991B1B; }
.alert-warning { background: var(--warning-50); border-color: #FDE68A; color: #92400E; }
.alert-info { background: var(--info-50); border-color: #BFDBFE; color: #1E40AF; }
.alert-close { position: absolute; right: .5rem; top: .45rem; background: none; border: 0; font-size: 1.3rem; line-height: 1; color: inherit; cursor: pointer; opacity: .6; padding: .2rem .4rem; }
.alert-close:hover { opacity: 1; }
.alert ul { margin: .3rem 0 0 1.1rem; padding: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1rem; }
.card-body { padding: 1.1rem; }
.card-foot { padding: .8rem 1.1rem; border-top: 1px solid var(--line); background: #FCFDFE; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 1.25rem; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.split { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

/* KPI cards */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.25rem; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1300px) { .kpis.kpis-6 { grid-template-columns: repeat(6, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--primary); }
.kpi.kpi-gold::before { background: #F59E0B; } .kpi.kpi-blue::before { background: #3B82F6; } .kpi.kpi-red::before { background: var(--danger); } .kpi.kpi-purple::before { background: #8B5CF6; }
.kpi-label { color: var(--muted); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi-value { font-size: 1.6rem; font-weight: 700; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .8rem; color: var(--muted); margin-top: .15rem; }
a.kpi { color: inherit; text-decoration: none; display: block; }
a.kpi:hover { border-color: var(--primary); }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #FCFDFE; white-space: nowrap; }
.table tbody tr:hover { background: var(--primary-50); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; background: #FCFDFE; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions form { display: inline; }
.sort { color: inherit; } .sort.active { color: var(--primary-700); }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: .8rem; color: var(--muted); }
/* Stack table rows into cards on small screens */
@media (max-width: 719px) {
  table.table.stack thead { display: none; }
  table.table.stack, .table.stack tbody, .table.stack tr, .table.stack td { display: block; width: 100%; }
  .table.stack tr { border-bottom: 1px solid var(--line); padding: .6rem .2rem; }
  .table.stack td { border: 0; padding: .25rem .7rem; display: flex; gap: .75rem; justify-content: space-between; text-align: right; }
  .table.stack td::before { content: attr(data-label); font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; text-align: left; flex-shrink: 0; }
  .table.stack td.actions { justify-content: flex-end; }
  .table.stack td.actions::before { content: none; }
}

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-grid { grid-template-columns: repeat(2, 1fr); } .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .form-grid .span-2 { grid-column: span 2; } .form-grid .span-all { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field label, .label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.req { color: var(--danger); }
.input, select.input, textarea.input { width: 100%; min-height: 42px; padding: .55rem .75rem; border: 1px solid #CBD5E1; border-radius: var(--radius-sm); background: #fff; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea.input { min-height: 90px; resize: vertical; }
.input:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.input.is-invalid { border-color: var(--danger); }
.input[readonly] { background: var(--line-2); }
.field-error { color: var(--danger); font-size: .8rem; }
.hint { color: var(--muted); font-size: .8rem; }
.check { display: flex; align-items: flex-start; gap: .5rem; font-size: .9rem; cursor: pointer; }
.check input { margin-top: .25rem; width: 16px; height: 16px; accent-color: var(--primary); }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1.25rem; }
.hp { position: absolute !important; left: -9999px !important; }

/* Filters bar */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); background: #FCFDFE; }
.filters .field { flex: 1 1 160px; }
.filters .field.grow { flex: 2 1 240px; }
.filters .input { min-height: 38px; padding: .4rem .65rem; }
.filters .btn { min-height: 38px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; padding: .8rem 1.1rem; font-size: .88rem; }
.pages { display: flex; flex-wrap: wrap; gap: .25rem; }
.pages a, .pages span { min-width: 34px; height: 34px; padding: 0 .55rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.pages a:hover { border-color: var(--primary); color: var(--primary-700); text-decoration: none; }
.pages .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pages .disabled { opacity: .45; }
.pages .gap { border: 0; background: none; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty-state svg { color: #CBD5E1; margin-bottom: .5rem; }
.empty-state h3 { color: var(--ink-2); }

/* ---------- Admin shell ---------- */
body.admin { display: block; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
.sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .4); z-index: 30; }
.sidebar.open + .sidebar-backdrop { display: block; }
.sidebar-brand { display: flex; gap: .65rem; align-items: center; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.sidebar-brand strong { display: block; font-size: 1rem; }
.sidebar-brand small { color: var(--muted); font-size: .75rem; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .6rem; }
.sidebar-nav a { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; margin-bottom: 2px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; font-size: .92rem; }
.sidebar-nav a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.sidebar-nav a.active { background: var(--primary-50); color: var(--primary-700); font-weight: 600; }
.sidebar-nav a.active .icon { color: var(--primary); }
.sidebar-nav .count { margin-left: auto; font-style: normal; background: var(--danger); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .45rem; font-weight: 700; }
.sidebar-foot { padding: .9rem 1.1rem; border-top: 1px solid var(--line); font-size: .82rem; }
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); min-height: 58px; }
.topbar-title { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-switch select { max-width: 210px; min-height: 36px; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: .85rem; background: #fff; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); }
.bell em { position: absolute; top: 3px; right: 2px; background: var(--danger); color: #fff; font-style: normal; font-size: .65rem; font-weight: 700; border-radius: 999px; padding: 0 .3rem; min-width: 16px; text-align: center; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: .5rem; cursor: pointer; padding: .2rem .4rem; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 500; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.user-menu .menu { position: absolute; right: 0; top: calc(100% + 6px); width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .4rem; z-index: 50; }
.menu-head { padding: .5rem .6rem .7rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.menu-head small { display: block; color: var(--muted); font-size: .78rem; word-break: break-all; }
.user-menu .menu a, .user-menu .menu button { display: flex; width: 100%; gap: .5rem; align-items: center; padding: .5rem .6rem; border-radius: var(--radius-sm); color: var(--ink-2); background: none; border: 0; font: inherit; font-size: .9rem; cursor: pointer; text-align: left; }
.user-menu .menu a:hover, .user-menu .menu button:hover { background: var(--line-2); text-decoration: none; }
.content { flex: 1; padding: 1rem; width: 100%; max-width: 1400px; }
.footer { padding: 1rem; font-size: .8rem; color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; justify-content: space-between; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: .2rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.hide-mobile { display: none; }
@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .sidebar-backdrop { display: none !important; }
  .shell { margin-left: var(--sidebar-w); }
  .only-mobile { display: none !important; }
  .content { padding: 1.5rem; }
}
@media (min-width: 720px) { .hide-mobile { display: inline; } }
@media (max-width: 560px) { .event-switch select { max-width: 130px; } }

/* Detail lists */
dl.details { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: .5rem 1rem; margin: 0; font-size: .9rem; }
dl.details dt { color: var(--muted); font-weight: 500; }
dl.details dd { margin: 0; word-break: break-word; }

/* Timeline / activity */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.4rem; border-left: 2px solid var(--line); margin-left: .4rem; font-size: .9rem; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--primary); }
.timeline li:last-child { padding-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .78rem; }
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li { display: flex; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.activity-list li:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.dot.out { background: var(--muted); }
.live { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--primary-700); font-weight: 600; }
.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.55); } 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.chart-box { position: relative; height: 260px; }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); }

/* ---------- Check-in ---------- */
.checkin-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .checkin-grid { grid-template-columns: 380px 1fr; } }
/* On phones show the looked-up visitor above the scanner */
@media (max-width: 999px) { .checkin-grid.has-result > div:last-child { order: -1; } }
#qr-reader { width: 100%; border-radius: var(--radius); overflow: hidden; background: #0F172A; min-height: 240px; }
#qr-reader video { border-radius: var(--radius); }
.search-big { display: flex; gap: .5rem; }
.search-big .input { flex: 1; min-width: 0; width: auto; }
.search-big .input { min-height: 48px; font-size: 1.05rem; }
.search-big .btn { min-height: 48px; }
.tabs-mini { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.tabs-mini label { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; cursor: pointer; }
.tabs-mini input { accent-color: var(--primary); }
.visitor-card { border: 2px solid var(--line); border-radius: var(--radius); padding: 1.1rem; background: #fff; }
.visitor-card.vip { border-color: #F59E0B; background: linear-gradient(180deg, #FFFBEB, #fff 50%); }
.visitor-card.ok { border-color: var(--primary); }
.visitor-card.blocked { border-color: var(--danger); background: var(--danger-50); }
.vc-head { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.vc-photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--primary-100); display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: var(--primary-700); flex-shrink: 0; }
.vc-name { font-size: 1.3rem; font-weight: 700; }
.meet-box { margin-top: 1rem; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--primary-50); border: 1px dashed #86EFAC; }
.meet-box strong { color: var(--primary-700); }
.status-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; font-weight: 700; font-size: .85rem; }
.status-pill.in { background: var(--primary-100); color: var(--primary-700); }
.status-pill.out { background: var(--line-2); color: var(--ink-2); }
.status-pill.none { background: var(--warning-50); color: var(--warning); }

/* ---------- Invoice ---------- */
.inv-lines td { vertical-align: middle; }
.inv-lines .input { min-height: 38px; padding: .35rem .5rem; }
.inv-lines .w-desc { min-width: 220px; }
.inv-lines .w-sm { width: 90px; }
.inv-totals { margin-left: auto; max-width: 360px; width: 100%; }
.inv-totals div { display: flex; justify-content: space-between; padding: .3rem 0; font-variant-numeric: tabular-nums; }
.inv-totals .grand { border-top: 2px solid var(--ink); margin-top: .3rem; padding-top: .5rem; font-size: 1.15rem; font-weight: 700; }
.invoice-paper { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; max-width: 900px; margin: 0 auto; box-shadow: var(--shadow); }
.inv-header { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; border-bottom: 3px solid var(--primary); padding-bottom: 1rem; margin-bottom: 1rem; }
.inv-header h2 { color: var(--primary-700); font-size: 1.5rem; letter-spacing: .04em; }
.inv-parties { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; font-size: .9rem; }
@media (min-width: 640px) { .inv-parties { grid-template-columns: 1fr 1fr; } }
.inv-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem; }
.inv-box h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .3rem; }
.inv-words { font-size: .88rem; padding: .6rem .8rem; background: var(--line-2); border-radius: var(--radius-sm); margin-top: .75rem; }
.inv-sign { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; font-size: .85rem; }
.stamp { display: inline-block; padding: .3rem .9rem; border: 3px solid; border-radius: 6px; font-weight: 800; letter-spacing: .1em; transform: rotate(-6deg); }
.stamp.paid { color: var(--primary); } .stamp.cancelled { color: var(--danger); } .stamp.unpaid { color: var(--warning); }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: radial-gradient(circle at 10% 10%, var(--primary-100), transparent 45%), radial-gradient(circle at 90% 90%, #DBEAFE, transparent 45%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2rem 1.6rem; box-shadow: var(--shadow-lg); }
.auth-card .brand { display: flex; gap: .6rem; align-items: center; margin-bottom: 1.4rem; }
.demo-creds { margin-top: 1.25rem; font-size: .8rem; color: var(--muted); background: var(--line-2); padding: .7rem .8rem; border-radius: var(--radius-sm); }
.error-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.25rem; }
.error-card { max-width: 520px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 2.5rem 1.6rem; box-shadow: var(--shadow-lg); }
.error-code { font-size: 3.5rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: .5rem; }
.error-detail { text-align: left; white-space: pre-wrap; background: var(--line-2); padding: .8rem; border-radius: var(--radius-sm); max-height: 260px; overflow: auto; font-size: .75rem; }

/* ---------- Public site ---------- */
body.public { background: #fff; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 1rem; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.logo:hover { text-decoration: none; color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; font-size: .92rem; font-weight: 500; }
.site-nav a:not(.btn) { color: var(--ink-2); }
@media (max-width: 600px) { .site-nav a:not(.btn) { display: none; } }
.hero { background: linear-gradient(135deg, #052E16 0%, #14532D 45%, #16A34A 100%); color: #fff; padding: 3.5rem 0 3rem; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; max-width: 760px; }
.hero p { font-size: 1.1rem; max-width: 640px; color: #DCFCE7; }
.hero .btn-light { border-color: transparent; }
.hero-points { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.5rem; font-size: .9rem; color: #BBF7D0; }
.section { padding: 3rem 0; }
.section-alt { background: var(--bg); }
.section-title { text-align: center; margin-bottom: 2rem; }
.section-title p { color: var(--muted); }
.event-cards { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .event-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .event-cards { grid-template-columns: repeat(3, 1fr); } }
.event-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.event-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.event-card .banner { aspect-ratio: 16/8; background: linear-gradient(135deg, var(--primary-700), var(--primary)); display: flex; align-items: flex-end; padding: 1rem; color: #fff; font-weight: 800; font-size: 1.4rem; background-size: cover; background-position: center; }
.event-card .body { padding: 1.1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.event-card .meta { color: var(--muted); font-size: .88rem; display: flex; flex-direction: column; gap: .2rem; }
.event-card .btn { margin-top: auto; }
.steps { display: grid; gap: 1.25rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(5, 1fr); } }
.step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-bottom: .6rem; }
.step h3 { font-size: 1rem; }
.step p { margin: 0; font-size: .9rem; color: var(--muted); }
.event-hero { background: var(--primary-50); border-bottom: 1px solid #BBF7D0; padding: 2rem 0; }
.event-hero h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
.event-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; color: var(--ink-2); font-size: .95rem; }
.event-layout { display: grid; gap: 2rem; grid-template-columns: 1fr; padding: 2rem 0 3rem; }
@media (min-width: 960px) { .event-layout { grid-template-columns: minmax(0, 1fr) 440px; } .event-layout .register-card { position: sticky; top: 84px; align-self: start; } }
.register-card { border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; background: #fff; box-shadow: var(--shadow-lg); }
.register-card .form-grid { grid-template-columns: 1fr; }
.exhibitor-list { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .exhibitor-list { grid-template-columns: 1fr 1fr; } }
.exhibitor-item { border: 1px solid var(--line); border-radius: 10px; padding: .9rem; display: flex; gap: .75rem; align-items: flex-start; }
.exhibitor-item img, .exh-logo { width: 48px; height: 48px; border-radius: 8px; object-fit: contain; background: var(--primary-50); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: var(--primary-700); }
.site-footer { background: #0B1F14; color: #CBD5E1; padding: 2.5rem 0 1rem; font-size: .9rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #86EFAC; }
.site-footer .muted { color: #94A3B8; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 2fr 1fr; } }
.copyright { border-top: 1px solid #1E3A2A; margin-top: 1.5rem; padding-top: 1rem; font-size: .8rem; color: #94A3B8; }

/* ---------- Digital pass ---------- */
.pass-wrap { padding: 2rem 1rem 3rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; background: var(--bg); }
.pass { width: 100%; max-width: 400px; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.pass-top { background: linear-gradient(135deg, var(--primary-700), var(--primary)); color: #fff; padding: 1.2rem 1.4rem; }
.pass-top h1 { color: #fff; font-size: 1.15rem; margin: 0; }
.pass-top small { color: #DCFCE7; }
.pass.vip .pass-top { background: linear-gradient(135deg, #713F12, #CA8A04 60%, #FACC15); }
.pass-cat { display: inline-block; margin-top: .6rem; padding: .25rem .8rem; border-radius: 999px; background: rgba(255,255,255,.2); font-weight: 800; letter-spacing: .08em; font-size: .8rem; text-transform: uppercase; }
.pass-body { padding: 1.2rem 1.4rem; text-align: center; }
.pass-name { font-size: 1.35rem; font-weight: 800; margin-bottom: .1rem; }
#pass-qr { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 1rem 0 .5rem; }
#pass-qr img, #pass-qr canvas { display: block; }
.pass-no { font-family: ui-monospace, monospace; font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; }
.pass-foot { border-top: 2px dashed var(--line); padding: 1rem 1.4rem; font-size: .85rem; color: var(--ink-2); display: grid; gap: .3rem; }
.pass-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }

/* ---------- Print ---------- */
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; font-size: 12px; }
  .sidebar, .sidebar-backdrop, .topbar, .footer, .no-print, .site-header, .site-footer, .pass-actions, .alert, .filters, .pagination .pages, .page-actions { display: none !important; }
  .shell { margin: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  .card, .invoice-paper, .pass { box-shadow: none !important; border-color: #999 !important; }
  .invoice-paper { padding: 0; border: 0 !important; }
  .table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pass-top, .badge, .inv-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .table-wrap { overflow: visible; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
