/* App de ventas de Romina. Mismo sistema visual que el CRM (public_web/app.css): fondo oscuro, Inter,
   naranja PickME en acciones. Maquetas aprobadas por Luis (25 nov): docs/maquetas_vendedora/. */
:root {
  --bg-app: #0e0e10; --bg-surface: #171719; --bg-card: #1f1f23; --bg-input: #26262b; --border: #2e2e34;
  --text: #fefefe; --text-2: #a1a1aa; --text-3: #71717a; --brand: #f08757; --brand-soft: rgba(240, 135, 87, 0.14);
  --green: #4ade80; --green-soft: rgba(74, 222, 128, 0.12); --red: #f87171; --red-soft: rgba(248, 113, 113, 0.12);
  --amber: #fbbf24; --amber-soft: rgba(251, 191, 36, 0.12); --blue: #60a5fa; --blue-soft: rgba(96, 165, 250, 0.12);
  --nav-h: 84px; --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-top: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg-app); }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; color: var(--text); min-height: 100vh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
[hidden] { display: none !important; }

/* En PC y tablet la app queda centrada con el ancho de un celular grande. */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
.screen { padding: calc(var(--safe-top) + 14px) 16px calc(var(--nav-h) + var(--safe-bottom) + 24px); display: flex; flex-direction: column; gap: 10px; }
.screen.is-sub { padding-bottom: calc(110px + var(--safe-bottom)); }
.loading, .empty { color: var(--text-3); font-size: 0.88rem; text-align: center; padding: 40px 12px; line-height: 1.5; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; margin-bottom: 4px; }
.top img { height: 22px; }
.top .title { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
.top .title.is-center { font-size: 1.1rem; text-align: center; flex: 1; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #2c2c31; display: grid; place-items: center; font-weight: 700; font-size: 0.85rem; color: var(--text-2); flex: none; }
.back { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-card); display: grid; place-items: center; flex: none; }
.spacer { width: 36px; flex: none; }

.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; }
.label { font-size: 0.72rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.hello { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.sub { font-size: 0.85rem; color: var(--text-2); margin-top: 4px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpis.two { grid-template-columns: 1fr 1fr; }
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; min-width: 0; }
.kpi b { display: block; font-size: 1.45rem; font-weight: 800; margin-top: 6px; }
.kpi span { font-size: 0.7rem; color: var(--text-3); }
.bar { height: 8px; border-radius: 99px; background: #2c2c31; overflow: hidden; margin: 10px 0 8px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--brand); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.small { font-size: 0.8rem; color: var(--text-2); }
.strong { color: var(--text); }
.tiny { font-size: 0.72rem; color: var(--text-3); }
.money { font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.7rem; font-weight: 600; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.chip svg { width: 12px; height: 12px; }
.c-0 { background: #2c2c31; color: var(--text-2); }
.c-1 { background: var(--blue-soft); color: var(--blue); }
.c-2 { background: var(--brand-soft); color: var(--brand); }
.c-3 { background: var(--amber-soft); color: var(--amber); }
.c-4 { background: var(--green-soft); color: var(--green); }
.c-warn { background: var(--red-soft); color: var(--red); }
.split { display: flex; flex-direction: column; gap: 10px; }
.split > .row + .row, .split > .cita + .cita { padding-top: 10px; border-top: 1px solid var(--border); }

.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 13px 14px; display: flex; flex-direction: column; gap: 7px; text-align: left; width: 100%; }
.item:active { background: #29292e; }
.item h4 { font-size: 0.95rem; font-weight: 700; overflow-wrap: anywhere; }
.weeks { display: flex; align-items: center; gap: 8px; }
.weeks .bar { flex: 1; height: 5px; margin: 0; }
.search { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 0 13px; color: var(--text-3); }
.search input { flex: 1; background: none; border: none; outline: none; padding: 12px 0; font-size: 0.92rem; color: var(--text); min-width: 0; }
.tabs { display: flex; gap: 6px; }
.tab { font-size: 0.8rem; font-weight: 600; padding: 8px 13px; border-radius: 99px; background: var(--bg-card); color: var(--text-2); border: 1px solid var(--border); }
.tab.on { background: var(--text); color: #111; border-color: var(--text); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .flabel { font-size: 0.8rem; color: var(--text-2); font-weight: 500; }
.input { background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 12px 13px; font-size: 16px; color: var(--text); width: 100%; outline: none; }
.input:focus { border-color: var(--brand); }
.input::placeholder { color: var(--text-3); }
textarea.input { min-height: 76px; resize: vertical; }
.opts { display: flex; gap: 8px; }
.opt { flex: 1; text-align: center; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-input); font-size: 0.82rem; font-weight: 600; color: var(--text-2); line-height: 1.25; }
.opt.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 14px; background: var(--brand); color: #1a1a1a; font-weight: 700; font-size: 0.95rem; width: 100%; padding: 0 12px; text-decoration: none; }
.btn svg { stroke: #1a1a1a; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost svg { stroke: var(--text); }
.btn:disabled { opacity: 0.5; }
.alert { border-radius: 12px; padding: 12px 13px; font-size: 0.84rem; line-height: 1.4; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; margin-top: 1px; }
.alert.warn { background: var(--amber-soft); color: #fcd34d; }
.alert.warn svg { stroke: #fcd34d; }
.alert.err { background: var(--red-soft); color: #fca5a5; }
.alert.err svg { stroke: #fca5a5; }
.note { background: var(--brand-soft); border-left: 3px solid var(--brand); border-radius: 10px; padding: 11px 12px; font-size: 0.88rem; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.note b { display: block; font-size: 0.72rem; color: var(--brand); margin-bottom: 3px; }
.timeline { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.timeline i { flex: 1; height: 6px; border-radius: 99px; background: #2c2c31; }
.timeline i.on { background: var(--brand); }
.cita { display: flex; align-items: center; gap: 12px; }
.cita .d { width: 44px; text-align: center; background: var(--bg-input); border-radius: 10px; padding: 6px 0; flex: none; }
.cita .d b { display: block; font-size: 1.05rem; font-weight: 800; }
.cita .d span { font-size: 0.62rem; color: var(--text-3); text-transform: uppercase; font-weight: 600; }
.cita > div:nth-child(2) { flex: 1; min-width: 0; }

.cal-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.cal-head b { font-size: 0.95rem; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.days .h { font-size: 0.66rem; color: var(--text-3); font-weight: 600; padding-bottom: 2px; }
.day { height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 0.88rem; font-weight: 600; color: var(--text-3); }
.day.ok { color: var(--text); background: var(--bg-input); }
.day.sel { background: var(--brand); color: #1a1a1a; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { text-align: center; padding: 12px 0; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-input); font-size: 0.86rem; font-weight: 600; }
.slot.sel { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }

.com { display: flex; flex-direction: column; gap: 6px; padding: 13px 0; }
.com + .com { border-top: 1px solid var(--border); }
.com .why { font-size: 0.76rem; color: var(--text-3); line-height: 1.4; }
.com b { font-size: 0.92rem; overflow-wrap: anywhere; }
.section-title { font-size: 0.72rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin: 6px 2px 0; }

/* Barra de abajo: íconos y la pestaña elegida en una píldora con su nombre (como el CRM de Luis). */
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; height: calc(var(--nav-h) + var(--safe-bottom)); background: var(--bg-surface); border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 18px calc(8px + var(--safe-bottom)); z-index: 10; }
.nav .it { height: 50px; min-width: 48px; display: flex; align-items: center; justify-content: center; gap: 0; border-radius: 99px; color: var(--text-3); padding: 0 10px; }
.nav .it span { max-width: 0; overflow: hidden; white-space: nowrap; font-size: 0.84rem; font-weight: 600; transition: max-width 0.25s ease; }
.nav .it.on { background: #2c2c31; color: var(--text); padding: 0 15px; gap: 7px; }
.nav .it.on span { max-width: 120px; }
.nav .it.on svg { stroke: var(--brand); }
.nav .plus { width: 52px; height: 52px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; }
.nav .plus svg { stroke: #1a1a1a; }
.actions { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; padding: 12px 16px calc(14px + var(--safe-bottom)); background: var(--bg-surface); border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 8px; z-index: 10; }
svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px); background: #2c2c31; color: var(--text); padding: 11px 16px; border-radius: 12px; font-size: 0.86rem; font-weight: 500; z-index: 30; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.menu { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.menu .sheet { width: 100%; max-width: 480px; background: var(--bg-surface); border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
@media (prefers-reduced-motion: reduce) { .nav .it span { transition: none; } }
