:root {
  font-family: "Open Sans", system-ui, sans-serif;
  --brand-blue: #004f9e;
  --brand-orange: #e86a10;
  --brand-gold: #fdba12;
  --brand-night: #060a11;
  color: #151827;
  background: #f4f6fa;
  line-height: 1.4;
}
.order-detail .detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.order-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:1rem;margin:1rem 0 1.5rem}.order-totals span{padding:.65rem .85rem;border-radius:.65rem;background:#f4f6f9}.ticket-id-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.55rem;margin-bottom:1rem}.ticket-id-list code{padding:.7rem;border-radius:.55rem;background:#f4f6f9;overflow-wrap:anywhere}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.brand {
  padding: 15vh 8vw;
  color: #fff;
  background: linear-gradient(140deg, var(--brand-night) 45%, var(--brand-blue));
}
.brand span,
.eyebrow {
  color: var(--brand-orange);
  text-transform: uppercase;
  font-size: 0.73rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}
.brand h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
}
.panel {
  margin: auto;
  width: min(500px, 90%);
  padding: 2.2rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 20px 60px #0f172a20;
}
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 228px 1fr;
}
.admin-mobile-header,
.sidebar-overlay {
  display: none;
}
.shell > #admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.6rem;
  background: var(--brand-night);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow-y: auto;
}
.logo {
  display: block;
}
.logo img,
.login-logo {
  display: block;
  width: 180px;
  max-width: 100%;
  max-height: 64px;
  object-fit: contain;
  object-position: left center;
}
.login-logo {
  width: min(360px, 80%);
  max-height: 120px;
  margin-bottom: 2rem;
}
.shell nav {
  display: grid;
  gap: 0.35rem;
}
.shell nav strong {
  color: var(--brand-gold);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  margin-top: 0.7rem;
  text-transform: uppercase;
}
:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 3px;
}
.shell nav a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.52rem 0.7rem;
  border-radius: 0.65rem;
}
.shell nav a:hover {
  background: #ffffff16;
}
.shell > #admin-sidebar small {
  color: #9ca3af;
}
.shell > #admin-sidebar > #identity {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.shell > #admin-sidebar > #identity span {
  display: grid;
}
.shell > #admin-sidebar > #identity small {
  font-size: 0.7rem;
}
main#app {
  padding: clamp(1.3rem, 3vw, 2.7rem);
  min-width: 0;
  width: 100%;
  overflow: hidden;
}
h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0.15rem 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.35rem;
}
.muted {
  color: #697386;
}
.toolbar,
.row-actions,
.inline-actions {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar {
  padding: 0.9rem;
  background: #fff;
  border: 1px solid #e6e8ee;
  border-radius: 0.9rem;
  margin-bottom: 1rem;
}
.toolbar input {
  min-width: 280px;
  max-width: 430px;
}
.toolbar select {
  width: auto;
}
.table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 7px 25px #1118270a;
}
.table-wrap.inner {
  box-shadow: none;
  margin-top: 1rem;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
}
th,
td {
  text-align: left;
  padding: 0.72rem 0.8rem;
  border-bottom: 1px solid #eceef2;
  vertical-align: middle;
}
th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #788195;
  background: #fafbfc;
}
td {
  font-size: 0.87rem;
}
td small {
  display: block;
  color: #778196;
  margin-top: 0.2rem;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar.tiny {
  width: 34px;
  height: 34px;
}
.event-thumb {
  display: block;
  width: 82px;
  height: 52px;
  border-radius: 0.5rem;
  object-fit: cover;
  background: #111;
}
.event-thumb.placeholder {
  font-size: 0.65rem;
  color: #8b93a3;
  display: grid;
  place-items: center;
  background: #edf0f4;
}
button,
.button {
  border: 0;
  border-radius: 0.58rem;
  background: #181b25;
  color: #fff;
  padding: 0.62rem 0.9rem;
  font-weight: 750;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.72;
}
.primary {
  background: var(--brand-blue);
  color: #fff;
}
.secondary {
  background: var(--brand-night);
  color: #fff;
}
.ghost {
  background: #f0f2f6;
  color: #343945;
}
.small {
  padding: 0.43rem 0.65rem;
  font-size: 0.76rem;
}
.danger-link {
  background: #fff0f0;
  color: #b42318;
}
.badge {
  display: inline-flex;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: #eceef3;
  color: #4d5567;
}
.badge.active,
.status-published {
  background: #e8f7ee;
  color: #167443;
}
.badge.inactive,
.status-cancelled {
  background: #feecec;
  color: #a62727;
}
.badge.role,
.status-pending {
  background: #fff2df;
  color: #9a5200;
}
.status-past-event,
.status-archived {
  background: #ebedf1;
  color: #596173;
}
label {
  display: block;
  font-weight: 700;
  font-size: 0.78rem;
}
label > span {
  display: block;
  margin-bottom: 0.3rem;
  color: #4b5565;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.62rem 0.7rem;
  border: 1px solid #ccd1da;
  border-radius: 0.55rem;
  background: #fff;
  color: #171923;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px #004f9e22;
  outline: none;
}
.settings-form {
  display: grid;
  gap: 1rem;
}
.settings-form .form-grid {
  align-items: start;
}
.settings-form .form-grid > label:not(.check) {
  display: grid;
  grid-template-rows: minmax(1.2rem, auto) 2.7rem minmax(1rem, auto);
  align-content: start;
}
.settings-form .form-grid > label:not(.check) > input,
.settings-form .form-grid > label:not(.check) > select {
  height: 2.7rem;
}
.settings-form .form-grid > label:not(.check) > small {
  margin-top: 0.3rem;
  color: #697386;
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.5rem;
}
.credential-status {
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  background: #004f9e12;
  color: var(--brand-blue);
}
.layout-create {
  width: 100%;
  margin: 0 0 1rem;
}
.compact-panel {
  width: 100%;
  margin: 0;
}
.seat-preview {
  position: relative;
  width: 100%;
  max-height: 45vh;
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid #ccd1da;
  border-radius: 0.75rem;
  background: linear-gradient(#f7f8fa 1px, transparent 1px),
    linear-gradient(90deg, #f7f8fa 1px, transparent 1px);
  background-size: 20px 20px;
}
.seat-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--brand-blue);
}
.layout-modal-backdrop { position:fixed;inset:0;z-index:1200;background:rgba(7,12,22,.58);display:grid;place-items:center;padding:2vh 2vw; }
.layout-modal { width:min(90vw,1400px);height:min(90vh,900px);background:var(--surface,#fff);border:1px solid var(--border,#dce2ea);border-radius:18px;box-shadow:0 24px 70px rgba(0,0,0,.35);display:flex;flex-direction:column;overflow:hidden; }
.layout-workspace { flex:1;min-height:0;display:grid;grid-template-columns:220px minmax(0,1fr);gap:1rem;padding:1rem;overflow:auto; }
.layout-palette { display:flex;flex-direction:column;gap:.65rem; }
.layout-summary { margin-top:auto;display:flex;flex-direction:column;gap:.35rem;padding:1rem;border-radius:12px;background:var(--soft,#f4f6f8); }
.layout-canvas { position:relative;min-width:650px;min-height:480px;aspect-ratio:20/13;align-self:center;overflow:hidden;border:1px solid var(--border,#ccd5df);border-radius:12px;background-color:#fbfcfe;background-image:linear-gradient(#dfe6ed 1px,transparent 1px),linear-gradient(90deg,#dfe6ed 1px,transparent 1px);background-size:25px 25px; }
.layout-table,.layout-free-seat { position:absolute;transform:translate(-50%,-50%);touch-action:none;user-select:none;cursor:grab; }
.layout-table { width:78px;height:78px;border:2px solid var(--primary,#d29b2f);background:#fff7e4;display:grid;place-items:center;border-radius:50%;font-size:.72rem;font-weight:700; }
.layout-table.square { border-radius:9px; }.layout-table.rectangular { width:120px;height:65px;border-radius:9px; }
.layout-table i { --angle:calc(360deg / var(--count) * var(--seat));position:absolute;width:20px;height:20px;border-radius:50%;background:var(--primary,#d29b2f);transform:rotate(var(--angle)) translateY(-52px) rotate(calc(-1 * var(--angle))); }
.layout-table button,.layout-free-seat button { position:absolute;right:-12px;top:-12px;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:#9d2637;color:#fff; }
.layout-free-seat { min-width:52px;padding:8px;border-radius:15px;background:var(--primary,#d29b2f);color:#17202b;text-align:center;font-size:.65rem;font-weight:700; }
.layout-loading { margin:2rem;flex:1; }.readonly { background:#eef1f4!important;cursor:not-allowed; }
@media(max-width:800px){.layout-workspace{grid-template-columns:1fr}.layout-palette{display:grid;grid-template-columns:1fr 1fr}.layout-summary{grid-column:1/-1}.layout-canvas{min-width:620px}}
textarea {
  min-height: 82px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem 1rem;
}
.form-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.wide {
  grid-column: 1/-1;
}
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.check input {
  width: auto;
}
.form-section {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #eceef2;
}
.form-section h3 {
  margin: 0.2rem 0 0.75rem;
  font-size: 0.92rem;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #10131b99;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal {
  display: flex;
  flex-direction: column;
  width: min(1100px, 96vw);
  max-height: 94vh;
  overflow: hidden;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 25px 90px #0004;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e7e9ee;
}
.modal-head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.45rem;
}
.icon-close {
  background: transparent;
  color: #343945;
  font-size: 1.7rem;
  padding: 0.1rem 0.5rem;
}
.modal-body {
  overflow: auto;
  padding: 1rem 1.25rem;
}
.modal > form {
  overflow: auto;
  padding: 1rem 1.25rem;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e7e9ee;
}
.modal-actions.sticky {
  background: #fff;
}
.tabs {
  display: flex;
  padding: 0 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}
.tabs button {
  border-radius: 0;
  background: transparent;
  color: #687184;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid transparent;
}
.tabs button.active {
  color: #111827;
  border-color: #f97316;
}
.form-error {
  margin: 0.8rem 1.25rem 0;
  padding: 0.7rem 0.85rem;
  border-radius: 0.55rem;
  background: #fff0f0;
  color: #a62727;
  font-size: 0.83rem;
}
.avatar-picker {
  border: 0;
  margin: 1rem 0 0;
  padding: 0;
}
.avatar-picker legend {
  font-weight: 750;
  font-size: 0.78rem;
  margin-bottom: 0.55rem;
}
.avatar-picker {
  display: flex;
  gap: 0.65rem;
}
.avatar-picker label {
  position: relative;
}
.avatar-picker input {
  position: absolute;
  opacity: 0;
}
.avatar-picker img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
}
.avatar-picker input:checked + img {
  border-color: #f97316;
  box-shadow: 0 0 0 2px #ffedd5;
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.image-slot {
  padding: 0.85rem;
  border: 1px solid #e2e5ea;
  border-radius: 0.8rem;
}
.image-slot > div {
  height: 150px;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #f0f2f5;
}
.image-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: #8a93a4;
}
.image-slot h3 {
  margin: 0.75rem 0 0.2rem;
}
.image-slot p {
  min-height: 36px;
  margin: 0.2rem 0 0.7rem;
  color: #6b7280;
  font-size: 0.78rem;
}
.image-drop {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin: 0.7rem 0;
  padding: 0.75rem;
  border: 2px dashed #cbd1db;
  border-radius: 0.65rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.image-drop:hover,
.image-drop:focus,
.image-drop.dragging {
  border-color: #f97316;
  background: #fff7ed;
  outline: none;
}
.image-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.image-drop span {
  font-size: 0.78rem;
}
.image-drop small {
  color: #697386;
  font-weight: 600;
}
.zone-form {
  padding: 0.9rem;
  border: 1px solid #e1e4ea;
  border-radius: 0.8rem;
}

.zone-main-line,
.occurrence-line {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.8rem;
  align-items: end;
}

.zone-mode-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2.75rem;
  gap: 0.4rem;
}

.zone-designer-button {
  width: 2.75rem;
  min-width: 2.75rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
}

.occurrence-line {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.zone-description {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
}

.zone-description textarea {
  min-height: 8rem;
  resize: vertical;
}

.locale-switcher {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.3rem;
  margin: 0.35rem 0;
  padding: 0.3rem;
  border: 1px solid #ffffff1f;
  border-radius: 0.65rem;
  background: #ffffff0a;
}

.locale-switcher button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.38rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: #d5d9e2;
  font-size: 0.72rem;
}

.locale-switcher button.active {
  border-color: var(--brand-gold);
  background: #ffffff18;
  color: #fff;
  box-shadow: inset 0 -2px var(--brand-gold);
}

.locale-switcher button.active::after {
  content: "✓";
  position: absolute;
  top: -0.3rem;
  right: -0.2rem;
  display: grid;
  width: 0.9rem;
  height: 0.9rem;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-gold);
  color: var(--brand-night);
  font-size: 0.58rem;
}

.locale-switcher button.is-processing::after {
  content: "";
  border: 2px solid #ffffff66;
  border-top-color: var(--brand-gold);
  animation: processing-spin 0.7s linear infinite;
}

.locale-switcher button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.metric-grid,
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
  padding: 1.25rem;
  border: 1px solid #e2e5ea;
  border-radius: 0.8rem;
  background: white;
}

.metric-card strong {
  display: block;
  margin-top: 0.5rem;
  font-size: 2rem;
}

.dashboard-page { color:#141821; }
.dashboard-head { display:flex;justify-content:space-between;align-items:flex-end;gap:1.5rem;margin-bottom:1.2rem; }
.dashboard-head h1 { font-size:clamp(1.7rem,2.5vw,2.35rem); }
.dashboard-head p,.dashboard-card header p { margin:.25rem 0 0;color:#727b8b;font-size:.84rem; }
.dashboard-filters { display:flex;gap:1.25rem;padding:.75rem 1rem;border:1px solid #e0e4eb;border-radius:.75rem;background:#fff;color:#6b7280;font-size:.82rem; }
.dashboard-filters strong { color:#171b24; }
.dashboard-period { display:flex;flex-wrap:wrap;align-items:end;justify-content:flex-end;gap:.65rem;padding:.75rem;border:1px solid #e0e4eb;border-radius:.75rem;background:#fff; }
.dashboard-period label { display:grid;gap:.25rem;color:#6b7280;font-size:.72rem;font-weight:700; }
.dashboard-period select,.dashboard-period input,.order-admin-filters select,.order-admin-filters input { min-height:38px;padding:.45rem .6rem;border:1px solid #d9dee7;border-radius:.55rem;background:#fff; }
.dashboard-period .dashboard-auto { display:flex;align-items:center;align-self:center;gap:.4rem;white-space:nowrap; }
.dashboard-period .dashboard-auto input { min-height:0; }
.demo-notice { display:flex;align-items:center;gap:.75rem;margin-bottom:1rem;padding:.7rem 1rem;border:1px solid #f4cd7b;border-radius:.7rem;background:#fff8e7;color:#6b4b08;font-size:.82rem; }
.demo-notice strong { padding:.2rem .45rem;border-radius:.35rem;background:#f7bd3d;color:#2b210c; }
.dashboard-kpis { display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) repeat(2,minmax(100px,.72fr));margin-bottom:1rem;border:1px solid #dfe3e9;border-radius:.8rem;background:#fff;overflow:hidden;box-shadow:0 5px 20px #11182708; }
.dashboard-kpis article { min-height:112px;padding:1.15rem 1.25rem;border-right:1px solid #e4e7ec; }
.dashboard-kpis article:last-child { border:0; }
.dashboard-kpis article > span { display:block;color:#5f6877;font-size:.78rem; }
.dashboard-kpis strong { display:block;margin:.35rem 0;font-size:clamp(1.35rem,2vw,1.8rem);font-weight:650;letter-spacing:-.04em; }
.dashboard-kpis .compact strong { font-size:1.65rem; }
.dashboard-kpis .compact span { max-width:110px;line-height:1.25; }
.trend { font-size:.76rem;font-weight:650; }.trend.up { color:#21844a; }
.dashboard-layout { display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:1rem;align-items:start; }
.dashboard-main { display:grid;gap:1rem;min-width:0; }
.dashboard-charts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem; }
.dashboard-card { margin:0;width:auto;padding:1.25rem;border:1px solid #dfe3e9;border-radius:.8rem;background:#fff;box-shadow:0 5px 20px #11182708; }
.dashboard-card header { display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.9rem; }
.dashboard-card h2 { margin:0;font-size:1rem;font-weight:700; }
.chart-total { font-size:1.25rem;font-weight:700; }
.line-chart { display:block;width:100%;height:230px;overflow:visible;background:repeating-linear-gradient(to bottom,#fff 0,#fff calc(25% - 1px),#e8ebf0 25%); }
.line-chart polyline { fill:none;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round; }
.line-current { stroke:var(--brand-blue);stroke-width:2.2; }.line-previous { stroke:#c0c5cd;stroke-width:1.35; }
.chart-legend { display:flex;gap:1.2rem;margin-top:.7rem;color:#687181;font-size:.72rem; }
.chart-legend span::before { content:"";display:inline-block;width:18px;height:2px;margin-right:.4rem;vertical-align:middle;background:#c0c5cd; }
.chart-legend .current::before { background:var(--brand-blue); }
.sales-funnel { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));min-height:210px; }
.sales-funnel article { display:flex;flex-direction:column;align-items:center;padding:.4rem 1rem;border-right:1px solid #e3e6eb;text-align:center; }
.sales-funnel article:last-child { border:0; }.sales-funnel span { min-height:2.2rem;font-size:.78rem; }.sales-funnel strong { color:#777f8c;font-size:1rem; }
.sales-funnel b { margin-top:.85rem;font-size:1.35rem;font-weight:550; }
.funnel-bar { display:flex;align-items:flex-end;width:100%;height:72px;margin-top:auto;background:#f5f7fa; }
.funnel-bar i { display:block;height:100%;max-width:100%;background:linear-gradient(180deg,#dce8fa,#eef3fb); }
.event-ranking { position:sticky;top:1rem;padding:0;overflow:hidden; }
.event-ranking header { padding:1.25rem 1.25rem .75rem;margin:0; }
.ranking-list { max-height:612px;overflow:auto;padding:0 1.1rem .5rem; }
.ranking-list article { display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:.7rem;align-items:center;padding:.85rem 0;border-bottom:1px solid #e5e7eb; }
.ranking-list img,.event-rank { width:44px;height:44px;border-radius:.45rem;object-fit:cover;background:#ecf1f7; }
.event-rank { display:grid;place-items:center;color:var(--brand-blue);font-weight:750; }
.ranking-list div { display:grid;min-width:0; }.ranking-list div strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem; }.ranking-list div span { color:#7b8492;font-size:.7rem; }
.ranking-list b { font-size:.75rem;white-space:nowrap; }
.event-ranking-action { display:block;margin:0 1.1rem 1.1rem;text-align:center; }
.recent-sales { min-height:300px; }
.recent-sales-list { display:grid; }
.recent-sales-list article { display:grid;grid-template-columns:minmax(0,1.5fr) minmax(80px,.55fr) minmax(90px,.55fr) auto;gap:.8rem;align-items:center;padding:.72rem 0;border-bottom:1px solid #e5e7eb;font-size:.78rem; }
.recent-sales-list article>div { display:grid;min-width:0; }
.recent-sales-list article>div span { overflow:hidden;color:#727b8b;text-overflow:ellipsis;white-space:nowrap; }
.recent-sales-list article>b { text-align:right; }
.recent-sales-action { margin-top:1rem; }
.order-state { display:inline-flex;width:max-content;padding:.25rem .48rem;border-radius:999px;background:#eef1f5;color:#586273;font-size:.68rem;font-style:normal;font-weight:750; }
.order-state.state-confirmed { background:#e8f7ee;color:#237644; }
.order-state.state-pending { background:#fff3d6;color:#8a5a00; }
.order-state.state-cancelled { background:#fce8e8;color:#9e3333; }
.order-admin-filters { display:grid;grid-template-columns:repeat(5,minmax(130px,1fr)) auto auto;gap:.75rem;align-items:end;margin-bottom:1rem;padding:1rem;border:1px solid #e0e4eb;border-radius:.8rem;background:#fff; }
.order-admin-filters label { display:grid;gap:.3rem;color:#626b79;font-size:.72rem;font-weight:750; }
.order-indicators { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:1rem;border:1px solid #dfe3e9;border-radius:.8rem;background:#fff;overflow:hidden; }
.order-indicators article { padding:1rem 1.2rem;border-right:1px solid #e4e7ec; }
.order-indicators article:last-child { border:0; }
.order-indicators span { display:block;color:#687181;font-size:.75rem; }
.order-indicators strong { display:block;margin-top:.25rem;font-size:1.5rem; }
.pagination { display:flex;align-items:center;justify-content:center;gap:1rem;margin-top:1rem;color:#687181;font-size:.78rem; }

.skeleton-region {
  position: relative;
  min-height: 8rem;
  overflow: hidden;
  pointer-events: none;
}
.skeleton-region::after {
  content: "";
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 72%) 40%, transparent 60%) -100% 0 / 50% 100% no-repeat,
    repeating-linear-gradient(180deg, #e8ebf0 0 1rem, #f4f6f9 1rem 2.15rem);
  animation: skeleton-region 1.15s ease-in-out infinite;
}
.dashboard-loading { min-height: min(72vh, 720px);border-radius:.8rem; }
.orders-results { min-width:0; }
.orders-results.skeleton-region { min-height:360px; }
.video-row{display:grid;grid-template-columns:1fr auto auto auto;gap:.5rem;margin:.65rem 0}.access-control{display:grid;gap:1rem}.scanner-panel{max-width:720px;margin:auto;width:100%;padding:1rem;border-radius:1rem;background:#111;color:#fff}.scanner-video{overflow:hidden;aspect-ratio:3/4;border-radius:.8rem;background:#000}.scanner-video video{width:100%;height:100%;object-fit:cover}.scanner-actions{display:flex;gap:.75rem;margin:1rem 0}.scanner-actions button{min-height:52px;flex:1}.scan-result{padding:1rem;border-radius:.7rem;background:#273142;font-size:1.15rem;font-weight:850;text-align:center}.scan-result.allowed{background:#166534}.scan-result.already_used,.scan-result.wrong_event{background:#92400e}.scan-result.invalid,.scan-result.connection{background:#991b1b}.attendance-results td small{display:block;color:var(--muted)}.mobile-only-notice{text-align:center}.mobile-only-notice p{margin:1rem 0 1.5rem}.shell>#admin-sidebar #access-control-link{display:none}@media(max-width:650px){.video-row{grid-template-columns:1fr auto auto}.video-row .danger-link{grid-column:1/-1}}

.is-processing::before {
  content: "";
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.45rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: processing-spin 0.7s linear infinite;
}

.image-slot.loading .image-preview {
  position: relative;
  overflow: hidden;
  background: #e7e9ee;
}

.image-slot.loading .image-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 70%), transparent);
  animation: skeleton 1.1s infinite;
}

@keyframes processing-spin { to { transform: rotate(360deg); } }
@keyframes skeleton { to { transform: translateX(100%); } }
@keyframes skeleton-region { to { background-position:200% 0,0 0; } }

@media (prefers-reduced-motion: reduce) {
  .skeleton-region::after { animation:none; }
  .shell > #admin-sidebar,
  .sidebar-overlay,
  .sidebar-toggle span { transition:none; }
}

@media (max-width: 900px) {
  .zone-main-line,
  .occurrence-line,
  .metric-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-kpis article { border-bottom:1px solid #e4e7ec; }
  .dashboard-layout { grid-template-columns:1fr; }
  .order-admin-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .event-ranking { position:static; }
  .shell > #admin-sidebar #access-control-link { display:flex; }
}
.inline-actions {
  margin-top: 0.75rem;
}
.toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 90;
  padding: 0.8rem 1rem;
  border-radius: 0.65rem;
  background: #17221b;
  color: #fff;
  box-shadow: 0 10px 35px #0003;
}
.toast-error {
  background: #9f2525;
}
@media (max-width: 900px) {
  main#app:has(.access-control-page) { padding:.75rem;height:calc(100dvh - 66px);overflow:hidden; }
  .access-control-page { height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr); }
  .access-control-page .page-head { margin-bottom:.6rem; }
  .access-control-page .page-head h1 { font-size:clamp(1.55rem,7vw,2rem); }
  .access-control { position:relative;min-height:0;height:100%;display:block; }
  .access-control .scanner-panel { position:relative;height:100%;max-width:none;padding:0;border-radius:1rem;overflow:hidden; }
  .access-control .scanner-video { height:100%;min-height:0;aspect-ratio:auto;border-radius:inherit; }
  .access-top-controls,.scanner-bottom-controls { position:absolute;z-index:2;left:.6rem;right:.6rem;padding:.6rem;border:1px solid #ffffff38;border-radius:.85rem;background:#07101ddd;box-shadow:0 8px 24px #0005;backdrop-filter:blur(7px); }
  .access-top-controls { top:.6rem; }
  .scanner-bottom-controls { bottom:.6rem; }
  .access-control .order-admin-filters { grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;margin:0 0 .5rem;padding:0;border:0;background:transparent; }
  .access-control .order-admin-filters label { min-width:0;color:#fff; }
  .access-control .order-admin-filters select { width:100%;min-width:0;min-height:44px;text-overflow:ellipsis; }
  .access-control .order-indicators { grid-template-columns:repeat(3,minmax(0,1fr));margin:0;border-color:#ffffff38;background:#ffffff12; }
  .access-control .order-indicators article { min-width:0;padding:.45rem .35rem;text-align:center;border-color:#ffffff38; }
  .access-control .order-indicators span { overflow:hidden;color:#dbe3ee;font-size:.65rem;text-overflow:ellipsis;white-space:nowrap; }
  .access-control .order-indicators strong { margin-top:.1rem;color:#fff;font-size:1.15rem; }
  .access-control .scanner-actions { gap:.5rem;margin:0 0 .5rem; }
  .access-control .scanner-actions button { min-height:44px; }
  .access-control .scan-result { padding:.65rem;font-size:.9rem; }
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .admin-mobile-header {
    position: sticky;
    z-index: 35;
    top: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    min-height: 58px;
    padding: 0.65rem clamp(1rem, 4vw, 1.5rem);
    background: var(--brand-night);
    color: #fff;
    box-shadow: 0 4px 18px #060a1126;
  }
  .admin-mobile-header > span {
    font-weight: 800;
  }
  .sidebar-toggle {
    display: grid;
    gap: 4px;
    width: 42px;
    height: 42px;
    place-content: center;
    padding: 0;
    border: 1px solid #ffffff2e;
    background: #ffffff12;
  }
  .sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.2s, opacity 0.2s;
  }
  .shell.sidebar-open .sidebar-toggle span:first-child { transform:translateY(6px) rotate(45deg); }
  .shell.sidebar-open .sidebar-toggle span:nth-child(2) { opacity:0; }
  .shell.sidebar-open .sidebar-toggle span:last-child { transform:translateY(-6px) rotate(-45deg); }
  .shell > #admin-sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: min(86vw, 300px);
    height: 100dvh;
    transform: translateX(-100%);
    box-shadow: 12px 0 35px #0005;
    transition: transform 0.24s ease;
  }
  .shell.sidebar-open > #admin-sidebar {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    z-index: 40;
    inset: 0;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #060a1199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }
  .shell.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  main#app {
    grid-row: 2;
    max-width: 100vw;
  }
  .form-grid.compact,
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .login {
    grid-template-columns: 1fr;
  }
  .brand {
    padding: 3rem 2rem;
  }
  .page-head {
    flex-wrap: wrap;
    align-items: start;
  }
  main#app {
    padding: 1rem;
  }
  .toolbar input {
    min-width: 0;
    width: 100%;
  }
  .form-grid,
  .form-grid.compact,
  .image-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-head,.dashboard-filters { align-items:flex-start;flex-direction:column; }
  .dashboard-period { width:100%;justify-content:flex-start; }
  .dashboard-charts,.sales-funnel { grid-template-columns:1fr; }
  .recent-sales-list article { grid-template-columns:1fr auto; }
  .recent-sales-list article>b { text-align:left; }
  .sales-funnel article { display:grid;grid-template-columns:1fr 1fr;min-height:94px;border-right:0;border-bottom:1px solid #e3e6eb;text-align:left; }
  .sales-funnel span { min-height:0; }.sales-funnel strong { text-align:right; }.funnel-bar { grid-column:1/-1;height:12px; }.sales-funnel b { display:none; }
  .line-chart { height:180px; }
  .dashboard-kpis { grid-template-columns:1fr; }
  .order-admin-filters,.order-indicators { grid-template-columns:1fr; }
  .modal-backdrop {
    padding: 0;
  }
  .modal {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .wide {
    grid-column: auto;
  }
}
