:root {
  --accent: #635bff;
  --bg: #f6f7fb;
  --card: #fff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --danger: #ef4444;
  --ok: #16a34a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

#app {
  display: flex;
  min-height: 100vh;
}

/* ================= Sidebar ================= */

.sidebar {
  width: 280px;
  background: #0d1020;
  color: white;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  margin: 0 auto 10px;
}

.brand-subtitle,
.sidebar-footer span {
  margin: 0;
  color: #a9aec8;
  font-size: 13px;
}

.mini-logo{
  width:220px;
  height:auto;
  margin:0 auto 24px;
  display:flex;
  justify-content:center;
  align-items:center;
}

.mini-logo img{
  width:100%;
  height:auto;
  object-fit:contain;
  display:block;
}

nav {
  display: grid;
  gap: 8px;
}

.nav-btn {
  background: transparent;
  color: #c9cce0;
  border: 0;
  text-align: left;
  padding: 13px 14px;
  border-radius: 14px;
  cursor: pointer;
}

.nav-btn.active,
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 13px;
  display: grid;
  gap: 4px;
}

/* ================= Main ================= */

.main {
  flex: 1;
  padding: 28px;
  overflow: auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  margin: 0 0 6px;
}

.topbar h2 {
  font-size: 30px;
  margin: 0;
}

.top-actions {
  display: flex;
  gap: 10px;
}

/* ================= Buttons ================= */

.primary,
.ghost,
.danger,
.event-card button,
.invite-actions button,
.ticket-options button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: white;
}

.ghost {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.danger {
  background: var(--danger);
  color: white;
}

.full {
  width: 100%;
  margin-top: 12px;
}

/* ================= Pages ================= */

.page {
  display: none;
}

.page.active {
  display: block;
}

/* ================= Cards ================= */

.hero-card,
.panel,
.upload-box,
.ticket-shop,
.final-ticket,
.scan-result,
.event-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .06);
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #fff, #eef0ff);
}

.hero-card h3 {
  font-size: 28px;
  margin: 0 0 8px;
}

.hero-card p {
  color: var(--muted);
  margin: 0;
}

/* ================= Status ================= */

.live-pill,
.tag,
.status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #ecfdf5;
  color: var(--ok);
}

.tag {
  background: #eef2ff;
  color: var(--accent);
}

.tag.live,
.status.live {
  background: #ecfdf5;
  color: var(--ok);
}

.status.ok {
  background: #ecfdf5;
  color: var(--ok);
}

/* ================= Stats ================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  font-size: 30px;
  display: block;
  margin: 8px 0;
}

.stat small {
  color: var(--muted);
}

/* ================= Layout ================= */

.two-col,
.invite-preview,
.shop-layout,
.scanner-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
}

.panel-head,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.panel h3,
.section-head h3 {
  margin: 0;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

/* ================= Progress ================= */

.progress-list {
  display: grid;
  gap: 18px;
}

.progress-list > div {
  display: grid;
  grid-template-columns: 120px 1fr 70px;
  gap: 12px;
  align-items: center;
}

.bar {
  height: 10px;
  background: #eef0f4;
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* ================= Activity ================= */

.activity {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.activity li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.activity b {
  display: block;
}

.activity span {
  color: var(--muted);
  font-size: 14px;
}

/* ================= Event Cards ================= */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.event-card h3 {
  margin: 16px 0 6px;
}

.event-card p {
  color: var(--muted);
}

.event-card button {
  width: 100%;
  background: #f3f4f6;
}

/* ================= Forms ================= */

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

input {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: #fbfbfd;
}

.upload-box {
  text-align: center;
  margin-bottom: 18px;
  border-style: dashed;
}

/* ================= Tables ================= */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 13px;
}

th {
  color: var(--muted);
  font-size: 13px;
}

/* ================= Invitation ================= */

.invite-card {
  background: #101427;
  color: white;
  border-radius: 30px;
  padding: 34px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(16, 20, 39, .2);
}

.invite-card .mini-logo {
  margin: 0 auto 20px;
}

.invite-card .eyebrow {
  color: #b7b2ff;
}

.qr-box {
  width: 140px;
  height: 140px;
  background: repeating-linear-gradient(
    45deg,
    #111 0 8px,
    #fff 8px 16px
  );
  border: 12px solid white;
  border-radius: 18px;
  margin: 22px auto;
  color: transparent;
}

.invite-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.invite-actions button {
  font-size: 12px;
}

.custom-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

/* ================= Ticket Shop ================= */

.ticket-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.ticket-options button {
  background: #f3f4f6;
}

.ticket-options .selected {
  background: var(--accent);
  color: white;
}

.seating {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.seat {
  aspect-ratio: 1;
  border-radius: 10px;
  border: 0;
  background: #dcfce7;
  color: #166534;
  font-weight: 900;
  cursor: pointer;
}

.seat.reserved {
  background: #fee2e2;
  color: #991b1b;
  cursor: not-allowed;
}

.seat.selected {
  background: #fef3c7;
  color: #92400e;
}

/* ================= Final Ticket ================= */

.final-ticket {
  text-align: center;
  background: #111827;
  color: white;
}

.final-ticket span,
.final-ticket small {
  color: #aeb4c5;
}

/* ================= Scanner ================= */

.scanner-layout {
  align-items: stretch;
}

.scanner-panel p {
  color: var(--muted);
}

#reader {
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: #f9fafb;
  margin: 18px 0;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.scan-result {
  display: grid;
  place-items: center;
  text-align: center;
}

.scan-result.accepted {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.scan-result.rejected {
  background: #fef2f2;
  border-color: #fecaca;
}

.scan-result h2 {
  font-size: 38px;
  margin: 8px 0;
}

/* ================= Responsive ================= */

@media (max-width: 900px) {

  #app {
    display: block;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .sidebar-logo {
    width: 150px;
  }

  .main {
    padding: 18px;
  }

  .topbar,
  .hero-card {
    display: block;
  }

  .top-actions {
    margin-top: 14px;
  }

  .stats-grid,
  .two-col,
  .invite-preview,
  .shop-layout,
  .scanner-layout,
  .cards-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .progress-list > div {
    grid-template-columns: 1fr;
  }

  .invite-actions {
    grid-template-columns: 1fr;
  }
}

/* ================= Login Demo ================= */
body.app-locked #app {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(99,91,255,.28), transparent 34%),
    linear-gradient(135deg, #0d1020, #111827);
}

.login-card {
  width: min(430px, 100%);
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 30px;
  padding: 34px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

.login-logo {
  width: 210px;
  display: block;
  margin: 0 auto 24px;
}

.login-card h1 {
  font-size: 30px;
  margin: 0 0 10px;
}

.login-hint {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.6;
}

.login-card label {
  display: block;
  margin: 14px 0 7px;
  font-weight: 800;
  font-size: 13px;
}

.login-error {
  min-height: 20px;
  color: var(--danger);
  font-weight: 800;
  margin: 12px 0 0;
}

.demo-credentials {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #f3f4f6;
  display: grid;
  gap: 4px;
}

.demo-credentials span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

@media (max-width: 520px) {
  .login-card {
    padding: 24px;
  }

  .login-logo {
    width: 170px;
  }
}


/* ================= Phase 2: Event Wizard + Details ================= */
.wizard-shell{display:grid;grid-template-columns:320px 1fr;gap:18px;align-items:stretch}.wizard-side{background:#0d1020;color:white;border-radius:30px;padding:28px;box-shadow:0 24px 70px rgba(13,16,32,.18)}.wizard-side h3{font-size:26px;margin:0 0 24px;line-height:1.2}.wizard-steps{display:grid;gap:12px}.wizard-step{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.08);color:#c9cce0;border-radius:18px;padding:14px;text-align:left;cursor:pointer}.wizard-step b{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.1);color:white}.wizard-step.active{background:var(--accent);color:white}.wizard-main{min-height:450px;display:flex;flex-direction:column}.wizard-pane{display:none}.wizard-pane.active{display:block}.form-grid.two{grid-template-columns:1fr 1fr}.wizard-actions{display:flex;justify-content:space-between;margin-top:auto;padding-top:24px}.ticket-class,.toggle-row,.gate-row{display:grid;grid-template-columns:1fr 1fr auto;gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}.toggle-row{grid-template-columns:1fr auto}.muted-copy,.center-note{color:var(--muted)}.event-detail-hero{min-height:210px;border-radius:34px;padding:30px;background:linear-gradient(135deg,rgba(13,16,32,.94),rgba(99,91,255,.78)),url('assets/images/logo.png');background-size:520px,340px;background-position:center,right 40px center;background-repeat:no-repeat;color:white;display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:18px;box-shadow:0 30px 90px rgba(13,16,32,.18)}.event-detail-hero h2{font-size:38px;margin:0 0 8px}.event-detail-hero p:not(.eyebrow){color:#d7d9ea;margin:0}.detail-tabs{display:flex;gap:10px;overflow:auto;margin-bottom:18px}.detail-tabs button{border:1px solid var(--line);background:white;border-radius:999px;padding:10px 14px;font-weight:800;cursor:pointer;white-space:nowrap}.detail-tabs button.active{background:var(--accent);color:white}.real-qr{width:190px;height:190px;margin:0 auto 12px;display:grid;grid-template-columns:repeat(17,1fr);grid-template-rows:repeat(17,1fr);gap:2px;background:white;padding:12px;border-radius:22px;box-shadow:0 18px 50px rgba(15,23,42,.08)}.real-qr i{border-radius:2px;background:#111827}.real-qr i.empty{background:#fff}.center-note{text-align:center;margin:0}.gate-row{grid-template-columns:90px 1fr 90px}.event-card,.stat,.panel,.hero-card{transition:transform .18s ease,box-shadow .18s ease}.event-card:hover,.stat:hover,.panel:hover,.hero-card:hover{transform:translateY(-3px);box-shadow:0 24px 65px rgba(15,23,42,.1)}
@media (max-width:900px){.wizard-shell{grid-template-columns:1fr}.form-grid.two{grid-template-columns:1fr}.event-detail-hero{display:block;background-size:520px,260px}.event-detail-hero h2{font-size:28px}.ticket-class{grid-template-columns:1fr}.gate-row{grid-template-columns:1fr}}
