/* BEATS Produtora — identidade preto / roxo / cinza claro */
:root {
  --bg: #000;
  --surface: #0e0e11;
  --surface-2: #16161b;
  --border: #25252c;
  --purple: #7a2db9;
  --purple-hi: #9d5ce6;
  --purple-glow: rgba(122, 45, 185, 0.35);
  --gray: #d4d4da;
  --white: #fff;
  --muted: #8a8a94;
  --ok: #2bd47d;
  --bad: #ff4d5e;
  --warn: #ffb020;
  --radius: 18px;
  --display: 'Michroma', 'Montserrat', sans-serif;
  --body: 'Montserrat', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--gray);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body.glow {
  background:
    radial-gradient(900px 500px at 50% -10%, rgba(122, 45, 185, 0.22), transparent 70%),
    var(--bg);
}
h1, h2, h3 { color: var(--white); margin: 0; line-height: 1.2; }
a { color: var(--purple-hi); }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 520px; }

/* Topbar */
.topbar { display: flex; align-items: center; justify-content: center; padding: 28px 16px 20px; }
/* O PNG do logo tem fundo preto; "lighten" o funde com qualquer fundo escuro/gradiente. */
.logo { height: 44px; width: auto; display: block; mix-blend-mode: lighten; }

.eyebrow {
  display: inline-block;
  color: var(--purple-hi);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--white);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { border-color: #3a3a44; }
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--purple);
  border-color: var(--purple);
  box-shadow: 0 8px 28px var(--purple-glow);
}
.btn-primary:hover { background: #8a3bcc; border-color: #8a3bcc; }
.btn-block { width: 100%; padding: 16px; font-size: 16px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn-ghost { background: transparent; }

/* Formulário */
.form { display: grid; gap: 16px; margin-top: 16px; }
.form h2 { font-size: 16px; font-weight: 700; }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--gray); }
.form label small { color: var(--muted); font-weight: 500; }
input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--white);
  border-radius: 12px;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }
input::placeholder { color: #55555e; }

.qty-row, .total { display: flex; align-items: center; justify-content: space-between; }
.qty-row span { font-size: 13px; font-weight: 600; }
.stepper { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.stepper button { width: 44px; height: 44px; background: none; border: 0; color: var(--white); font-size: 20px; }
.stepper output { min-width: 32px; text-align: center; color: var(--white); font-weight: 700; }
.total { border-top: 1px dashed var(--border); padding-top: 16px; }
.total strong { font-family: var(--display); font-size: 22px; color: var(--white); }
.form-error { margin: 0; color: var(--bad); font-size: 13px; font-weight: 600; }
.fine { margin: 0; text-align: center; color: var(--muted); font-size: 12px; }

/* Evento */
.event-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid #3a1f55;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(157, 92, 230, .06) 22px 24px),
    linear-gradient(135deg, #1a0b2a 0%, #0b0610 60%);
}
.event-card h1 { font-family: var(--display); font-size: 26px; letter-spacing: .02em; margin: 10px 0 14px; text-transform: uppercase; }
.event-meta { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.event-meta li::first-letter { text-transform: uppercase; }
.price { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.price span { color: var(--muted); font-size: 13px; }
.price strong { font-family: var(--display); color: var(--white); font-size: 20px; }

/* Status chips */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--gray);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.wait { color: var(--warn); }
.chip.live { color: var(--ok); }
.chip.off { color: var(--bad); }
.pulse .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 currentColor; opacity: 1; } 50% { box-shadow: 0 0 0 6px transparent; opacity: .5; } }

.banner-demo {
  border: 1px dashed var(--warn);
  color: var(--warn);
  background: rgba(255, 176, 32, .06);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  display: grid; gap: 10px;
}

.qr-frame { background: #fff; border-radius: 16px; padding: 14px; width: min(100%, 280px); margin: 0 auto; }
.qr-frame img { display: block; width: 100%; height: auto; image-rendering: pixelated; }

/* Cabeçalho + menu da equipe (painel, clientes) */
.head { display: flex; align-items: center; gap: 20px; padding: 22px 0; flex-wrap: wrap; }
.head .logo { height: 34px; }
.head-ev { display: grid; gap: 2px; padding-left: 20px; border-left: 1px solid var(--border); }
.head-ev strong { color: var(--white); font-size: 15px; }
.head-ev span { color: var(--muted); font-size: 12px; }
.head-ev span::first-letter { text-transform: uppercase; }
.head-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.staff-nav { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow-x: auto; max-width: 100%; }
.staff-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap; transition: color .2s, background .2s; }
.staff-nav a:hover { color: var(--white); }
.staff-nav a.on { background: var(--purple); color: #fff; box-shadow: 0 6px 20px var(--purple-glow); }
.staff-nav svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Celular: cabeçalho compacto + barra de abas fixa embaixo, como um app */
@media (max-width: 720px) {
  body.app { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .card { padding: 18px; }
  .head { gap: 8px 14px; padding: max(14px, env(safe-area-inset-top)) 0 14px; }
  .head .logo { height: 26px; }
  .head-ev { order: 3; width: 100%; border-left: 0; padding-left: 0; }
  .head-actions { margin-left: auto; }
  .staff-nav {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; max-width: none;
    justify-content: space-around; overflow: visible;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border: 0; border-top: 1px solid var(--border); border-radius: 0;
    background: rgba(14, 14, 17, .92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  }
  .staff-nav a { flex: 1; flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 11px; border-radius: 12px; }
  .staff-nav a.on { background: rgba(122, 45, 185, .22); color: #fff; box-shadow: none; }
  .staff-nav a.on svg { stroke: var(--purple-hi); }
  .staff-nav svg { width: 22px; height: 22px; }
  .staff-nav .ext { display: none; }
}

/* Abas de festa */
.festa-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 16px; scrollbar-width: none; }
.festa-tabs::-webkit-scrollbar { display: none; }
.festa-tabs button {
  flex: none; display: inline-flex; align-items: baseline; gap: 8px;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--gray); font-weight: 700; font-size: 13px; letter-spacing: .02em; white-space: nowrap;
}
.festa-tabs button small { color: var(--muted); font-weight: 600; font-size: 11px; }
.festa-tabs button.past { opacity: .6; }
.festa-tabs button.on { background: var(--purple); border-color: var(--purple); color: #fff; opacity: 1; box-shadow: 0 6px 20px var(--purple-glow); }
.festa-tabs button.on small { color: rgba(255, 255, 255, .75); }
.festa-tabs button.add { border-style: dashed; color: var(--purple-hi); background: transparent; }

/* Janela (criar/editar festa) */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: rise .2s ease; }
.modal-card { width: min(100%, 460px); max-height: calc(100dvh - 32px); overflow: auto; display: grid; gap: 14px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 18px; }
.modal-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.modal-card .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-card label.check { display: flex; align-items: center; gap: 10px; }
.modal-card label.check input { width: 20px; height: 20px; accent-color: var(--purple); }
.modal .x { background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1; padding: 0 4px; }
input[type="date"], input[type="time"] { color-scheme: dark; }

/* Convite para instalar o app */
.install {
  position: fixed; z-index: 29; left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px;
  background: var(--surface-2); border: 1px solid #3a1f55; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .6); font-size: 13px; animation: rise .3s ease;
}
.install img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.install p { margin: 0; flex: 1; }
.install b { color: var(--white); }
.install .btn { padding: 9px 14px; flex: none; }
.install .x { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 4px 6px; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

/* Campo de telefone com DDI */
.field { display: grid; gap: 6px; }
.field > label { font-size: 13px; font-weight: 600; color: var(--gray); }
.field > label small { color: var(--muted); font-weight: 500; }
.phone { position: relative; display: flex; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; transition: border-color .2s, box-shadow .2s; }
.phone:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }
.phone input { border: 0; background: transparent; box-shadow: none !important; padding-left: 10px; }
.ddi { display: flex; align-items: center; gap: 8px; flex: none; background: none; border: 0; border-right: 1px solid var(--border); color: var(--white); padding: 0 12px 0 14px; font-weight: 600; font-size: 15px; }
.ddi img, .ddi-menu img { width: 24px; height: 17px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(255,255,255,.12); }
.ddi svg { width: 12px; height: 12px; stroke: var(--muted); fill: none; stroke-width: 2.5; transition: transform .2s; }
.ddi[aria-expanded="true"] svg { transform: rotate(180deg); }
.ddi-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: min(320px, 100%); background: var(--surface-2); border: 1px solid #33333c; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.6); overflow: hidden; }
.ddi-menu input { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; font-size: 14px; padding: 12px 14px; }
.ddi-menu input:focus { box-shadow: none; }
.ddi-menu ul { list-style: none; margin: 0; padding: 6px; max-height: 260px; overflow: auto; }
.ddi-menu li { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--gray); }
.ddi-menu li:hover, .ddi-menu li.active { background: rgba(122,45,185,.25); color: var(--white); }
.ddi-menu li span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.ddi-menu .none { display: block; color: var(--muted); cursor: default; }

/* Login da equipe */
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: radial-gradient(700px 400px at 50% 0%, rgba(122,45,185,.25), transparent 70%), var(--bg); }
.login-card { width: min(100%, 380px); display: grid; gap: 16px; }
.login-card .logo { height: 34px; margin: 0 auto 4px; }
.login-card h1 { font-size: 18px; }
.login-card p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.login-card label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }

.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
