/*
 * Panel del organizador de Proximitty Eventos (/organizador/*).
 * Mobile first: una columna a 375px. Marca: botón principal negro; azul #0071e3
 * solo en foco, selección y progreso (ver static/css/index/brand.css).
 */

:root {
  --bg: #f5f5f7; --card: #fff; --ink: #1d1d1f; --ink-2: #424245; --muted: #6e6e73;
  --line: #d2d2d7; --hair: rgba(0, 0, 0, .08); --fill: #f2f2f4;
  --blue: #0071e3; --blue-soft: rgba(0, 113, 227, .10);
  --ok: #1f7a4a; --ok-soft: #e7f4ec; --warn: #b45309; --warn-soft: #fff4e5;
  --danger: #c62828; --danger-soft: #fdecea;
  --gutter: 16px; --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body.org { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
:where(.org) :where(h1, h2, h3, p, ul, ol) { margin: 0; }
:where(.org) :where(ul, ol) { padding: 0; list-style: none; }
:where(.org) a { color: inherit; text-decoration: none; }
:where(.org) :where(button, input, select) { font: inherit; color: inherit; }
:where(.org) button { cursor: pointer; }
.org :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.wrap { width: min(100% - var(--gutter) * 2, 560px); margin-inline: auto; }
[hidden] { display: none !important; }

/* ── Encabezado ── */
.hd { position: sticky; top: 0; z-index: 10; background: rgba(245, 245, 247, .86); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--hair); }
.hd__bar { height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; min-height: 44px; }
.brand img { width: 84px; height: auto; }
.brand span { padding-left: 9px; border-left: 1px solid var(--line); font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 600; }
.hd__link { font-size: 15px; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-size: 15px; color: var(--ink); background: none; border: 0; padding: 0; }

/* ── Tipografía ── */
.main { padding: 24px 0 calc(40px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 500; }
.title { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.lead { margin-top: 8px; color: var(--muted); font-size: 16px; }
.h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); }
.center { text-align: center; }
.link { font-weight: 600; text-decoration: underline; }

/* ── Avisos ── */
.alert { padding: 12px 14px; border-radius: 14px; font-size: 14px; font-weight: 500; }
.alert--error { background: var(--danger-soft); color: var(--danger); }
.alert--ok { background: var(--ok-soft); color: var(--ok); }

/* ── Tarjetas y formularios ── */
.card { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid var(--hair); }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field + .field { margin-top: 16px; }
.label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input { width: 100%; min-width: 0; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
.input::placeholder { color: #a1a1a6; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input[type="date"].input { -webkit-appearance: none; appearance: none; display: block; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.row2 label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-size: 16px; font-weight: 600; text-align: center; }
.btn:hover { background: #000; }
.btn:disabled { opacity: .6; cursor: default; }
.btn--text { background: none; color: var(--ink); min-height: 44px; font-weight: 500; }
.btn--text:hover { background: none; text-decoration: underline; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f5f5f7; }
.btn--sm { width: auto; min-height: 40px; font-size: 14px; padding: 0 16px; }
.actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.legal { font-size: 12px; color: var(--muted); text-align: center; }
.legal a { text-decoration: underline; }
.pw { position: relative; }
.pw .input { padding-right: 84px; }
.pw__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--ink-2); font-size: 14px; font-weight: 500; }

/* ── Pasos ── */
.steps { display: grid; gap: 8px; }
.steps__bar { height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.steps__bar i { display: block; height: 100%; width: 33%; background: var(--blue); border-radius: 4px; transition: width .25s ease; }
.steps__txt { font-size: 13px; color: var(--muted); font-weight: 500; }
.step { display: grid; gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }

/* ── Planes ── */
.plans { display: grid; gap: 12px; }
.plan { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; cursor: pointer; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.plan:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.plan__name { font-size: 16px; font-weight: 650; }
.plan__cap { grid-column: 1; font-size: 14px; color: var(--muted); }
.plan__price { grid-row: 1 / span 2; grid-column: 2; font-size: 20px; font-weight: 700; letter-spacing: -.02em; text-align: right; }
.plan__price small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan__tag { position: absolute; top: -9px; left: 16px; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.note { padding: 12px 14px; border-radius: 14px; background: var(--fill); color: var(--ink-2); font-size: 14px; }

/* ── Interruptores (checkbox nativo) ── */
.toggles { padding: 4px 20px; }
.toggle { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 0; cursor: pointer; }
.toggle + .toggle { border-top: 1px solid var(--hair); }
.toggle__t { font-size: 16px; font-weight: 600; }
.toggle__d { margin-top: 2px; font-size: 14px; color: var(--muted); }
.switch { -webkit-appearance: none; appearance: none; margin: 0; width: 51px; height: 31px; border-radius: 999px; background: #e9e9eb; position: relative; flex-shrink: 0; cursor: pointer; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .18); transition: transform .2s; }
.switch:checked { background: var(--blue); }
.switch:checked::after { transform: translateX(20px); }

/* ── Pedido ── */
.lines { display: grid; gap: 12px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.line span:first-child { color: var(--muted); }
.line span:last-child { text-align: right; font-weight: 500; }
.line--total { padding-top: 12px; border-top: 1px solid var(--hair); font-size: 17px; }
.line--total span:first-child, .line--total span:last-child { color: var(--ink); font-weight: 700; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--muted); text-align: center; }

/* ── Panel ── */
.ev-head { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .06); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
.tabs.has-more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.tabs.has-more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
.tabs.has-more-left.has-more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.tab { flex-shrink: 0; min-height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; color: var(--ink-2); font-size: 15px; font-weight: 500; }
.tab.is-active { background: var(--ink); color: #fff; }
.tab[aria-disabled="true"] { color: #a1a1a6; cursor: default; }
.banner { display: grid; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.banner .h2 { color: #fff; }
.banner p { color: rgba(255, 255, 255, .72); font-size: 14px; }
.check li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--hair); }
.check li:first-child { border-top: 0; }
.dot { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.dot--done { background: var(--ok); border-color: var(--ok); color: #fff; }
.check__t { font-size: 15px; font-weight: 600; }
.check__d { font-size: 13px; color: var(--muted); }
.check__a { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
.check__s { font-size: 12px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 14px 16px; }
.stat__n { font-size: 28px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.stat__l { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat--alert .stat__n { color: var(--warn); }
.meter { margin-top: 14px; display: grid; gap: 8px; }
.meter__bar { height: 8px; border-radius: 8px; background: var(--fill); overflow: hidden; }
.meter__bar i { display: block; height: 100%; background: var(--blue); border-radius: 8px; }
.meter__row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.big { font-size: 40px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.big small { font-size: 20px; color: var(--muted); font-weight: 600; letter-spacing: -.02em; }
.list-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; min-height: 56px; padding: 8px 0; border-top: 1px solid var(--hair); }
.list-row:first-child { border-top: 0; }
.list-row__t { font-size: 15px; font-weight: 600; }
.list-row__d { font-size: 13px; color: var(--muted); }
.list-row__a { font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; background: none; border: 0; padding: 0; }
.success { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 32px 0 8px; }
.success__icon { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.success__icon--wait { background: var(--fill); color: var(--muted); }

/* ── Mis eventos ── */
.events { display: grid; gap: 10px; }
.event-item { display: grid; gap: 6px; padding: 16px 18px; background: var(--card); border: 1px solid var(--hair); border-radius: 18px; }
.event-item:hover { border-color: var(--line); }
.event-item__name { font-size: 17px; font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 32px 20px; }

/* ── Enlace para copiar ── */
.link-box { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: var(--fill); }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 14px var(--font); color: var(--ink-2); }

/* ── Inscripción: campos e importar ── */
.fields .toggle { padding: 12px 0; }
.fields .toggle__t { font-size: 15px; }
.lock { font-size: 12px; color: var(--muted); }
.drop { position: relative; display: grid; justify-items: center; gap: 8px; width: 100%; padding: 26px 16px; border: 1.5px dashed var(--line); border-radius: 18px; background: var(--fill); text-align: center; cursor: pointer; }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.drop strong { font-size: 15px; }
.drop span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row-error { display: grid; gap: 2px; padding: 10px 0; border-top: 1px solid var(--hair); }
.row-error:first-child { border-top: 0; }
.row-error b { font-size: 14px; }
.row-error span { font-size: 13px; color: var(--danger); }
.kv { display: grid; gap: 10px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ── Personas ── */
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 40px; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.filters::-webkit-scrollbar { display: none; }
.filter { flex-shrink: 0; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.filter.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.filter b { font-weight: 600; opacity: .7; }
.people { background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius); padding: 4px 16px; }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 64px; padding: 8px 0; border-top: 1px solid var(--hair); }
.person:first-child { border-top: 0; }
.person__link { display: contents; }
.person__avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--fill) center / cover no-repeat; display: grid; place-items: center; font-weight: 600; color: var(--ink-2); font-size: 15px; }
.person__name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person__meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status--approved { background: var(--ok-soft); color: var(--ok); }
.status--pending { background: var(--warn-soft); color: var(--warn); }
.status--invited, .status--rejected { background: var(--fill); color: var(--muted); }
.approve { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgba(0, 0, 0, .32); }
.sheet-backdrop__close { position: absolute; inset: 0; }
.sheet { position: relative; width: 100%; max-width: 560px; margin-inline: auto; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 20px calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 16px; max-height: 88vh; overflow-y: auto; }
.sheet__grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); justify-self: center; }
.sheet__head { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.sheet__head .person__avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 20px; }
.sheet__close { min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.danger-link { color: var(--danger); font-weight: 600; font-size: 15px; background: none; border: 0; min-height: 44px; width: 100%; }

@media (max-width: 359px) {
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .title { font-size: 27px; }
}

/* Operación del evento y directorio: controles legibles en una sola columna. */
.org textarea { font: inherit; resize: vertical; }
.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.section-row > * { min-width: 0; overflow-wrap: anywhere; }
.brand-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: contain; background: var(--fill); }
.color-row { display: flex; align-items: center; gap: 12px; }
.color-input { flex: none; width: 64px; height: 50px; padding: 5px; cursor: pointer; }
.color-hex { font: 500 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em; color: var(--ink-2); }
.brand-preview { padding: 24px; border-radius: 20px; display: grid; gap: 14px; overflow-wrap: anywhere; }
.brand-preview .eyebrow { color: inherit; opacity: .7; }
.brand-preview strong { font-size: 25px; letter-spacing: -.03em; }
.brand-preview .chip { width: fit-content; background: rgba(128,128,128,.2); color: inherit; }
.scanner-video { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--ink); border-radius: 16px; }
.scan-result { background: var(--warn-soft); border-radius: 16px; padding: 18px; }
.scan-result--ok { background: var(--ok-soft); }
.directory-person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.directory-person > div { min-width: 0; overflow-wrap: anywhere; }
.profile-initial { display: grid; place-items: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 16px; background: var(--fill); font-weight: 700; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px; }
.directory-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.exhibitor-group { padding-left: 12px; border-left: 3px solid var(--line); }
.sponsor-strip { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: center; padding: 16px; background: #fff; border-radius: 16px; }
.sponsor-strip img { display: block; width: auto; max-width: 120px; max-height: 44px; object-fit: contain; }

/* ── Acceso: hora de cada ingreso ── */
.entry__time { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
