/* Blue — app. Colores de la marca (foto de perfil): azul #3f6fe0 → #2340b0, tinta #1e3a8a. */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #111a33;
  --ink-2: #4b5675;
  --ink-3: #8a93ad;
  --line: #e3e7f0;
  --brand: #2f5bd8;
  --brand-2: #2340b0;
  --brand-soft: #e8eefc;
  --mine: linear-gradient(135deg, #3a68e2, #2444b6);
  --mine-ink: #ffffff;
  --danger: #c4383a;
  --ok: #1f8a5b;
  --shadow: 0 1px 2px rgba(17, 26, 51, .05), 0 4px 16px rgba(17, 26, 51, .06);
  --radius: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1220;
    --surface: #161d30;
    --surface-2: #1d2640;
    --ink: #eef1fa;
    --ink-2: #b3bcd6;
    --ink-3: #7b86a6;
    --line: #26304b;
    --brand: #6b93ff;
    --brand-2: #4d78f0;
    --brand-soft: #1e2a4d;
    --mine: linear-gradient(135deg, #3d6be6, #2a4cc4);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8;
      stroke-linecap: round; stroke-linejoin: round; }

/* --- entrada ------------------------------------------------------------------- */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  background:
    radial-gradient(1200px 500px at 50% -10%, var(--brand-soft), transparent 70%),
    var(--bg);
}
.login-card { width: 100%; max-width: 360px; text-align: center; }
.login-logo { border-radius: 24px; box-shadow: 0 10px 30px rgba(35, 64, 176, .25); }
.login h1 {
  margin: 20px 0 4px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-sub { margin: 0 0 32px; color: var(--ink-2); }
.code-form { display: grid; gap: 12px; text-align: left; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.code-input {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: 600 26px/1 var(--font);
  letter-spacing: .3em;
  text-align: center;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.code-input::placeholder { color: var(--ink-3); opacity: .5; }
.code-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.code-input.invite { font-size: 17px; letter-spacing: .02em; }
.hint { margin: 0; font-size: 13px; color: var(--ink-3); }
.error { margin: 0; font-size: 14px; color: var(--danger); }
.btn-primary {
  margin-top: 4px;
  padding: 15px;
  border: 0;
  border-radius: 14px;
  background: var(--mine);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(35, 64, 176, .25);
  transition: transform .1s, opacity .15s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .6; }
.btn-link {
  text-decoration: none;
  text-align: center;
  margin-top: 20px;
  border: 0;
  background: none;
  color: var(--brand);
  font-weight: 500;
}

/* --- conversación ---------------------------------------------------------------- */
.chat {
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 760px;
  margin: 0 auto;
}
.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.avatar { border-radius: 12px; }
.who { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.who strong { font-size: 17px; letter-spacing: -0.01em; }
.company {
  font-size: 13px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-2);
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.small { width: 32px; height: 32px; font-size: 14px; }
.icon-btn svg circle { fill: currentColor; stroke: none; }
.menu {
  position: absolute;
  top: calc(100% - 4px);
  right: 12px;
  min-width: 210px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
}
.menu button, .menu a {
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
}
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu .danger { color: var(--danger); }

.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 16px 0;
  padding: 10px 10px 10px 14px;
  background: var(--brand-soft);
  border-radius: 14px;
  font-size: 14px;
  color: var(--ink-2);
}
.banner span { flex: 1; }
.btn-small {
  padding: 7px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overscroll-behavior: contain;
}
.day {
  align-self: center;
  margin: 14px 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.msg { display: flex; flex-direction: column; max-width: 84%; animation: rise .22s ease-out; }
.msg.blue { align-self: flex-start; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg + .msg.blue, .msg + .msg.me { margin-top: 2px; }
.msg.me + .msg.blue, .msg.blue + .msg.me { margin-top: 10px; }
.bubble {
  padding: 11px 15px;
  border-radius: var(--radius);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.blue .bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow);
}
.me .bubble {
  background: var(--mine);
  color: var(--mine-ink);
  border-bottom-right-radius: 6px;
}
.time { margin: 3px 6px 0; font-size: 11px; color: var(--ink-3); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.choice {
  padding: 9px 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, transform .1s;
}
.choice:hover { background: var(--brand-soft); }
.choice:active { transform: scale(.97); }
.choice:disabled { opacity: .5; }
.filecard {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 12px 14px;
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow);
}
.me .filecard { background: color-mix(in srgb, var(--surface) 92%, var(--brand)); }
.filecard .ficon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}
.filecard .fname { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.filecard .fsub { font-size: 12px; color: var(--ink-3); }
.photo { margin-top: 6px; max-width: 240px; border-radius: 16px; display: block; }
.typing { display: inline-flex; gap: 4px; padding: 15px 16px; }
.typing i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-3);
  animation: blink 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.empty {
  margin: auto;
  max-width: 300px;
  text-align: center;
  color: var(--ink-3);
}
.empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 18px; }

/* --- escribir --------------------------------------------------------------------- */
.composer {
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.send-form, .recorder {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.recorder { align-items: center; padding-left: 4px; }
#text {
  flex: 1;
  min-height: 40px;
  max-height: 160px;
  padding: 9px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 16px/1.4 var(--font);
  resize: none;
  outline: none;
}
#text::placeholder { color: var(--ink-3); }
.attach { cursor: pointer; border-radius: 50%; }
.send-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--mine);
  color: #fff;
  flex: none;
  transition: transform .1s;
}
.send-btn:active { transform: scale(.94); }
.send-btn svg { width: 20px; height: 20px; }
.send-btn .i-send { display: none; fill: currentColor; stroke: none; }
.send-form.has-text .send-btn .i-mic { display: none; }
.send-form.has-text .send-btn .i-send { display: block; }
#rec-send svg { fill: currentColor; stroke: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger);
           animation: pulse 1.2s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.rec-label { flex: 1; color: var(--ink-3); font-size: 14px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  box-shadow: var(--shadow);
  z-index: 10;
}

@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --- vistas ---------------------------------------------------------------------- */
.view { min-height: 100%; }
.btn-link.small { margin: 0; font-size: 14px; }
.topbar .back { margin-left: -8px; }
.topbar-title { flex: 1; margin: 0; font-size: 19px; letter-spacing: -0.01em; }

/* --- bienvenida ------------------------------------------------------------------ */
.welcome {
  display: flex;
  flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}
.welcome-top { display: flex; align-items: center; gap: 16px; }
.progress { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--mine);
                 border-radius: inherit; transition: width .35s ease; }
.welcome-body { flex: 1; display: flex; flex-direction: column; padding-top: 9vh; }
.w-avatar { border-radius: 16px; box-shadow: 0 8px 22px rgba(35, 64, 176, .22); }
.w-section { margin: 22px 0 0; font-size: 13px; font-weight: 700; letter-spacing: .06em;
             text-transform: uppercase; color: var(--brand); }
.welcome h1 { margin: 6px 0 10px; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.w-sub { margin: 0 0 26px; color: var(--ink-2); white-space: pre-line; }
.w-input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  font: 18px/1.3 var(--font);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea.w-input { min-height: 110px; resize: none; }
.w-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: var(--brand); }
.chip.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.swatch { display: inline-block; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%;
          vertical-align: -2px; }
.options { display: grid; gap: 10px; }
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, transform .1s;
}
.option:active { transform: scale(.99); }
.option .o-icon { font-size: 24px; width: 32px; text-align: center; }
.option .o-text { flex: 1; display: flex; flex-direction: column; }
.option .o-text strong { font-size: 16px; }
.option .o-text small { color: var(--ink-3); font-size: 13px; margin-top: 1px; }
.option .o-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid; place-items: center; color: transparent; font-size: 14px; font-weight: 700;
}
.option.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); }
.option.on .o-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.yesno .option { justify-content: center; font-size: 17px; font-weight: 600; }
.upload-zone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 18px;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, var(--line));
  border-radius: 18px;
  background: var(--surface);
  color: var(--brand);
  font-weight: 600;
  cursor: pointer;
}
.upload-zone small { color: var(--ink-3); font-weight: 400; }
.w-actions { margin-top: auto; padding-top: 28px; display: grid; gap: 4px; }
.w-actions .btn-link { margin-top: 6px; }

/* --- inicio ----------------------------------------------------------------------- */
.home {
  max-width: 760px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(110px + env(safe-area-inset-bottom));
}
.home-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; }
.h-greeting { margin: 4px 0 2px; color: var(--ink-3); font-size: 15px; }
.h-company { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.025em; }
.home .banner { margin: 16px 0 0; }
.setup-card {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  margin-top: 18px;
  padding: 16px;
  border: 0;
  border-radius: 18px;
  background: var(--mine);
  color: #fff;
  text-align: left;
  box-shadow: 0 10px 26px rgba(35, 64, 176, .25);
}
.setup-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.setup-card small, #h-setup-left { font-size: 13px; opacity: .85; }
.setup-ring {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, .18); font-size: 18px;
}
.chev { font-size: 26px; opacity: .7; line-height: 1; }
.section-title {
  margin: 28px 2px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.today-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hl {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  text-align: left;
}
.hl:first-child { border-top: 0; }
.hl .hl-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px;
               background: var(--surface-2); font-size: 17px; flex: none; }
.hl.warn .hl-icon { background: #fdecec; }
.hl.info .hl-icon { background: var(--brand-soft); }
.hl .hl-text { flex: 1; }
.hl.warn .hl-text { font-weight: 600; }
.today-empty { padding: 18px 16px; color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 620px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .12s, border-color .15s;
}
.card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.card:active { transform: scale(.98); }
.card .c-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: auto;
  border-radius: 13px; background: var(--brand-soft); font-size: 21px;
}
.card strong { margin-top: 12px; font-size: 16px; letter-spacing: -0.01em; }
.card small { color: var(--ink-3); font-size: 12.5px; line-height: 1.3; }
.card .badge {
  position: absolute; top: 14px; right: 14px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ask-bar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(760px, 100%);
  display: flex; gap: 8px; align-items: center;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 65%, transparent);
}
.ask {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-3);
  text-align: left;
  box-shadow: var(--shadow);
}
.ask img { border-radius: 50%; }
.send-btn.big { width: 48px; height: 48px; box-shadow: 0 8px 20px rgba(35, 64, 176, .3); }

/* --- listas ------------------------------------------------------------------------- */
.list { max-width: 760px; margin: 0 auto; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.list .topbar { position: sticky; top: 0; }
.list-tools { padding: 14px 16px 4px; display: grid; gap: 10px; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest:empty, .when select[hidden] { display: none; }
.chip { font: inherit; font-size: .9rem; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); color: inherit; cursor: pointer; }
.when { display: flex; gap: 8px; }
.when select { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface, transparent); color: inherit; }
.segmented { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
.seg {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px; font-weight: 600;
}
.seg[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.search {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 15px var(--font);
  outline: none;
}
.search:focus { border-color: var(--brand); }
.list-total { margin: 10px 18px 6px; color: var(--ink-3); font-size: 13px; }
.list-total strong { color: var(--ink); }
.rows {
  margin: 0 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rows:empty { display: none; }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.r-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-amount { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.r-meta { color: var(--ink-3); font-size: 13px; }
.pill {
  justify-self: end;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand);
}
.pill.ok { background: #e3f4ec; color: var(--ok); }
.pill.warn { background: #fdecec; color: var(--danger); }
.pill.muted { background: var(--surface-2); color: var(--ink-3); }
.list-empty { margin: 40px 24px; text-align: center; color: var(--ink-3); }
.list-empty strong { display: block; color: var(--ink); font-size: 17px; margin-bottom: 6px; }
.list-empty .btn-small { margin-top: 16px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill.ok { background: #143327; }
  :root:not([data-theme="light"]) .pill.warn,
  :root:not([data-theme="light"]) .hl.warn .hl-icon { background: #3a1a1e; }
}
.pill::first-letter { text-transform: uppercase; }

/* --- detalle, gastos y agenda ------------------------------------------------------- */
.sub { max-width: 760px; margin: 0 auto; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
.sub .topbar { position: sticky; top: 0; }
.sub-body { padding: 8px 16px; }
.btn-small.ghost { background: var(--surface-2); color: var(--ink); text-decoration: none; }
label.btn-small { cursor: pointer; }
.doc-hero { padding: 18px 4px 8px; }
.doc-hero h2 { margin: 12px 0 2px; font-size: 22px; letter-spacing: -0.01em; }
.doc-total { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -0.02em;
             font-variant-numeric: tabular-nums; }
.doc-meta { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.doc-hero .pill { display: inline-block; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
           margin: 14px 0 4px; }
.act {
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-weight: 600;
  font-size: 15px;
  box-shadow: var(--shadow);
}
.act.primary { background: var(--mine); color: #fff; border-color: transparent; }
.act:disabled { opacity: .5; }
.section-title.first { margin-top: 14px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.line { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 13px 16px;
        border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line small { color: var(--ink-3); font-size: 13px; }
.line .amt { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; }
.sum { display: flex; justify-content: space-between; padding: 9px 16px; color: var(--ink-2);
       font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); }
.sum.total { color: var(--ink); font-weight: 700; font-size: 17px; }
.timeline .tl { display: flex; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); }
.timeline .tl:first-child { border-top: 0; }
.tl small { display: block; color: var(--ink-3); font-size: 12px; }
.tl-undo { margin-left: auto; align-self: center; padding: 6px 10px; border: 1px solid var(--line);
           border-radius: 8px; background: none; color: var(--ink-2); font: inherit; font-size: 13px; }
.stat { margin: 18px 4px 6px; }
.stat-label { margin: 0; color: var(--ink-3); font-size: 14px; }
.stat-value { margin: 2px 0; font-size: 36px; font-weight: 700; letter-spacing: -0.02em;
              font-variant-numeric: tabular-nums; }
.stat-sub { margin: 0; color: var(--ink-2); font-size: 14px; }
.bars { display: grid; gap: 10px; margin: 16px 0 4px; }
.bar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 14px; }
.bar .track { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: var(--surface-2);
              overflow: hidden; }
.bar .fill { height: 100%; border-radius: inherit; background: var(--mine); }
.bar b { font-variant-numeric: tabular-nums; }
.rows.flush { margin: 0; }
.row.button { border: 0; width: 100%; background: none; text-align: left; font: inherit; color: inherit;
              border-top: 1px solid var(--line); cursor: pointer; }
.row.button:first-child { border-top: 0; }
.draft { display: flex; align-items: center; border-top: 1px solid var(--line); }
.draft:first-child { border-top: 0; }
.draft .row.button { border-top: 0; flex: 1; min-width: 0; }
.draft .btn-small { margin-right: 12px; white-space: nowrap; }
.check {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 13px 16px; border: 0; border-top: 1px solid var(--line); background: none;
  text-align: left; font: inherit; color: inherit;
}
.check:first-child { border-top: 0; }
.check .box { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--ink-3);
              flex: none; display: grid; place-items: center; font-size: 13px; color: transparent; }
.check.done .box { background: var(--ok); border-color: var(--ok); color: #fff; }
.check.done .t { text-decoration: line-through; color: var(--ink-3); }
.check .t { flex: 1; }
.check small { color: var(--ink-3); font-size: 13px; }
.check small.late { color: var(--danger); font-weight: 600; }
.day-block { margin-bottom: 14px; }
.day-name { margin: 18px 4px 8px; font-weight: 700; font-size: 15px; }
.day-name span { color: var(--ink-3); font-weight: 500; }
.event { display: flex; gap: 14px; align-items: baseline; }
.event .hour { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); min-width: 44px; }
.event.past { opacity: .5; }
.muted-note { padding: 16px; color: var(--ink-3); }
.act:last-child:nth-child(odd) { grid-column: 1 / -1; }
.w-input.other { margin-top: 12px; font-size: 16px; }
.form-fields { display: grid; gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field .w-input { font-size: 16px; padding: 13px 15px; }
.yesno .option { text-align: center; line-height: 1.25; }
.design-card {
  position: relative; display: block; margin: -6px 0 18px;
  border-radius: 16px; overflow: hidden; border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(17, 26, 51, .12); background: #fff;
  max-height: 38vh;
}
.design-card img { display: block; width: 100%; }
.design-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  padding: 7px 12px; border-radius: 999px; background: rgba(17, 26, 51, .78); color: #fff;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.option.center { justify-content: center; font-weight: 600; }
.designs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; margin: 0 -2px;
  scrollbar-width: none;
}
.designs::-webkit-scrollbar { display: none; }
.design-pick {
  position: relative; scroll-snap-align: center; padding: 0; border: 2px solid var(--line);
  border-radius: 18px; background: var(--surface); overflow: hidden; text-align: left;
  box-shadow: var(--shadow); transition: border-color .15s, transform .12s;
}
.design-pick img { display: block; width: 100%; aspect-ratio: 1 / 0.87; object-fit: cover;
                   object-position: top; background: #fff; border-bottom: 1px solid var(--line); }
.design-cap { display: flex; flex-direction: column; padding: 10px 14px 12px; }
.design-cap strong { font-size: 15px; }
.design-cap small { color: var(--ink-3); font-size: 13px; }
.design-pick .o-check { position: absolute; top: 10px; right: 10px; background: var(--surface); }
.design-pick.on { border-color: var(--brand); }
.design-pick.on .o-check { background: var(--brand); border-color: var(--brand); color: #fff; }
.own-design { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--surface-2); }
.own-title { margin: 0 0 4px; font-weight: 700; }
.own-sub { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.upload-zone.small { padding: 16px; flex-direction: row; justify-content: center; gap: 10px; }
.own-result { display: grid; gap: 12px; }
.design-result { width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--brand-soft);
           border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Datos de la empresa */
.logo-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.logo-row .btn-small { margin-left: auto; }
.logo-thumb { max-height: 48px; max-width: 140px; object-fit: contain; }
#empresa .muted-note { padding: 0 0 8px; }
#empresa .upload-zone { margin-top: 12px; }
#empresa #e-form .btn-primary { margin-top: 16px; }
#empresa #e-more { display: block; margin: 20px auto 0; }

/* personal */
#p-alerts { margin-top: 16px; }
.row.worker:hover { background: none; }
.p-actions { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 10px; }
.p-hours { grid-column: 1 / -1; align-items: center; margin-top: 10px; }
.p-hours .p-day { flex-basis: 100%; margin-bottom: 4px; }
.toast-btn { margin-left: 10px; padding: 2px 10px; border: 1px solid currentColor; border-radius: 999px;
             background: none; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.p-hours .p-other { width: 130px; padding: 8px 12px; font-size: 15px; }
.p-form { display: grid; gap: 10px; padding: 16px; margin-bottom: 16px; }
.p-form[hidden] { display: none; }
.p-form .btn-small { justify-self: start; padding: 10px 18px; }

/* Clientes: lo que se cargará de su lista */
.import-preview { display: grid; gap: 6px; padding: 16px; }
.import-preview .muted-note { margin: 0; }
.import-preview .p-actions { margin-top: 8px; }

/* Lista de precios */
.r-unit { color: var(--ink-3); font-weight: 400; font-size: 13px; }
.danger-text { color: var(--danger); margin-top: 18px; width: 100%; }

/* Ficha del cliente: hacerle una factura o un presupuesto */
.make-actions { display: grid; gap: 8px; margin: 4px 0 14px; }
.make-actions .btn-small { padding: 12px; font-size: 15px; }

/* ==================================================================================
   Aspecto 2026: letra con carácter, color por sección, fondo con luz y todo más suave.
   Va al final para mandar sobre lo anterior.
   ================================================================================== */
:root {
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
          "Segoe UI", Roboto, sans-serif;
  --bg: #f4f6fb;
  --line: #e7eaf3;
  --radius: 22px;
  --shadow: 0 1px 1px rgba(17, 26, 51, .03), 0 2px 6px rgba(17, 26, 51, .04),
            0 12px 32px -12px rgba(17, 26, 51, .10);
  --shadow-lift: 0 2px 4px rgba(17, 26, 51, .04), 0 18px 40px -14px rgba(35, 64, 176, .28);
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* color de cada sección: tinta y fondo suave */
  --t-facturas: #2f5bd8;     --t-facturas-bg: #e8eefc;
  --t-presupuestos: #7c4ddb; --t-presupuestos-bg: #f0e9fd;
  --t-cobros: #12936a;       --t-cobros-bg: #e2f5ee;
  --t-gastos: #e07a1f;       --t-gastos-bg: #fdf0e3;
  --t-fotos: #0e8f9b;        --t-fotos-bg: #ddf3f5;
  --t-agenda: #d9437a;       --t-agenda-bg: #fce8f0;
  --t-personal: #0e8fa3;     --t-personal-bg: #e0f4f7;
  --t-clientes: #4757d6;     --t-clientes-bg: #e9ebfc;
  --t-precios: #c2890c;      --t-precios-bg: #fbf3dc;
  --t-resumen: #2f5bd8;      --t-resumen-bg: #e8eefc;
  --t-tareas: #12936a;       --t-tareas-bg: #e2f5ee;
  --t-papeleo: #5b6b8c;      --t-papeleo-bg: #e9edf5;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1c;
    --surface: #141a2b;
    --surface-2: #1b2338;
    --line: #232c45;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 30px -12px rgba(0, 0, 0, .5);
    --shadow-lift: 0 18px 40px -14px rgba(0, 0, 0, .7);
    --t-facturas: #7ea0ff;     --t-facturas-bg: #1c2747;
    --t-presupuestos: #b195f5; --t-presupuestos-bg: #2a2147;
    --t-cobros: #4fd1a1;       --t-cobros-bg: #123329;
    --t-gastos: #f5a45b;       --t-gastos-bg: #3a2616;
    --t-fotos: #57cdd8;        --t-fotos-bg: #12323a;
    --t-agenda: #f285ad;       --t-agenda-bg: #3a1d2a;
    --t-personal: #5fd0e0;     --t-personal-bg: #12303a;
    --t-clientes: #8f9bff;     --t-clientes-bg: #222649;
    --t-precios: #f0c65a;      --t-precios-bg: #352b12;
    --t-resumen: #7ea0ff;      --t-resumen-bg: #1c2747;
    --t-tareas: #4fd1a1;       --t-tareas-bg: #123329;
    --t-papeleo: #a9b8d6;      --t-papeleo-bg: #1f2840;
  }
}
.tint-facturas     { --t: var(--t-facturas);     --tb: var(--t-facturas-bg); }
.tint-presupuestos { --t: var(--t-presupuestos); --tb: var(--t-presupuestos-bg); }
.tint-cobros       { --t: var(--t-cobros);       --tb: var(--t-cobros-bg); }
.tint-gastos       { --t: var(--t-gastos);       --tb: var(--t-gastos-bg); }
.tint-fotos        { --t: var(--t-fotos);        --tb: var(--t-fotos-bg); }
.tint-agenda       { --t: var(--t-agenda);       --tb: var(--t-agenda-bg); }
.tint-personal     { --t: var(--t-personal);     --tb: var(--t-personal-bg); }
.tint-clientes     { --t: var(--t-clientes);     --tb: var(--t-clientes-bg); }
.tint-precios      { --t: var(--t-precios);      --tb: var(--t-precios-bg); }
.tint-resumen      { --t: var(--t-resumen);      --tb: var(--t-resumen-bg); }
.tint-tareas       { --t: var(--t-tareas);       --tb: var(--t-tareas-bg); }
.tint-papeleo      { --t: var(--t-papeleo);      --tb: var(--t-papeleo-bg); }

body { font-feature-settings: "ss01", "cv11"; letter-spacing: -0.005em; }
h1, h2, h3, strong, .r-who, .r-amount, .stat-value { letter-spacing: -0.02em; }

/* Fondo con un poco de luz arriba, sin distraer */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: 340px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(500px 260px at 10% -40px, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(420px 240px at 95% -60px, color-mix(in srgb, #7c4ddb 12%, transparent), transparent 70%);
}

/* Iconos */
.ico {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--tb, var(--brand-soft)); color: var(--t, var(--brand));
  font-size: 20px;
}
.ico svg { width: 22px; height: 22px; stroke-width: 1.9; }
.hl .hl-icon.ico { width: 38px; height: 38px; border-radius: 12px; }
.hl .hl-icon.ico svg { width: 20px; height: 20px; }
.hl.warn .hl-icon.ico { background: #fdecec; color: var(--danger); }

/* Inicio */
.h-greeting { font-weight: 500; }
.h-company { font-size: 32px; font-weight: 800; letter-spacing: -0.035em; }
.section-title {
  margin: 30px 4px 12px;
  font-size: 17px; font-weight: 700;
  text-transform: none; letter-spacing: -0.015em;
  color: var(--ink);
}
.setup-card {
  border-radius: var(--radius);
  background:
    radial-gradient(240px 120px at 100% 0, rgba(255, 255, 255, .22), transparent 70%),
    linear-gradient(135deg, #4a76ee, #2340b0 70%, #5b3fc4);
  box-shadow: var(--shadow-lift);
}
.today-card, .rows, .panel { border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow); }
.hl { padding: 15px 16px; transition: background .15s; }
.hl:hover { background: var(--surface-2); }
.hl .chev, .row .chev { color: var(--ink-3); }

.cards { gap: 14px; }
.card {
  min-height: 148px; padding: 18px;
  border-radius: var(--radius);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.card::after {  /* un toque de su color en la esquina */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(160px 110px at 100% 100%, color-mix(in srgb, var(--t, var(--brand)) 10%, transparent), transparent 70%);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift);
              border-color: color-mix(in srgb, var(--t, var(--brand)) 35%, var(--line)); }
.card:active { transform: scale(.97); transition-duration: .08s; }
.card .c-icon.ico { margin-bottom: auto; }
.card strong { font-size: 17px; font-weight: 700; }
.card .badge { background: var(--tb, var(--surface-2)); color: var(--t, var(--ink-2)); }

/* Barra para hablar con Blue: flotante y con cristal */
.ask {
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: var(--shadow-lift);
}

/* Pantallas de dentro */
.topbar { border-bottom-color: transparent; box-shadow: 0 1px 0 var(--line); }
.topbar-title { font-weight: 700; letter-spacing: -0.02em; }
.row { padding-top: 15px; padding-bottom: 15px; transition: background .15s; }
.r-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.pill { font-weight: 600; border-radius: 999px; }
.search {
  border-radius: 16px; background: var(--surface); box-shadow: var(--shadow);
  border-color: transparent;
}
.search:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.stat-value { font-weight: 800; letter-spacing: -0.035em; }
.btn-primary {
  border-radius: 16px; font-weight: 700;
  background: linear-gradient(135deg, #4a76ee, #2340b0);
  box-shadow: 0 10px 24px -10px rgba(35, 64, 176, .6);
  transition: transform .15s var(--ease), box-shadow .2s;
}
.btn-primary:hover { box-shadow: 0 14px 30px -10px rgba(35, 64, 176, .7); }
.btn-small { border-radius: 12px; font-weight: 600; }
.w-input, .code-input { border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.w-input:focus, .code-input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.chip { border-radius: 999px; transition: all .15s; }
.list-empty strong { font-size: 18px; font-weight: 700; }

/* Entrar en cada pantalla con un movimiento corto */
.view:not([hidden]) > :not(.ask-bar):not(.topbar):not(.menu) { animation: view-in .32s var(--ease) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view:not([hidden]) > * { animation: none !important; }
  .card, .card:hover { transition: none; transform: none; }
}

/* En el ordenador: más aire */
@media (min-width: 900px) {
  .home { padding-top: 40px; }
  .h-company { font-size: 40px; }
}

/* Listas con la inicial del cliente */
.row.has-av { grid-template-columns: auto 1fr auto; align-items: center; }
.av {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 42px; height: 42px; margin-right: 2px;
  border-radius: 50%;
  background: var(--tb); color: var(--t);
  font-size: 14px; font-weight: 700; letter-spacing: 0;
}

/* Botones de la ficha con icono y la historia como una línea de tiempo */
.act { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
       border-radius: 16px; transition: transform .15s var(--ease), box-shadow .2s; }
.act svg { width: 19px; height: 19px; flex: none; }
.act:active { transform: scale(.97); }
.act.primary { background: linear-gradient(135deg, #4a76ee, #2340b0);
               box-shadow: 0 10px 24px -10px rgba(35, 64, 176, .6); }
.timeline .tl { position: relative; border-top: 0; padding: 10px 16px; }
.tl-dot { flex: none; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%;
          background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.timeline .tl:not(:last-child) .tl-dot::after {
  content: ""; position: absolute; left: 20.5px; top: 28px; bottom: -8px; width: 1px; background: var(--line);
}
.timeline .tl:first-child { padding-top: 14px; }
.timeline .tl:last-child { padding-bottom: 14px; }
.btn-small:not(.ghost) { background: linear-gradient(135deg, #4a76ee, #2340b0); color: #fff; }
#gastos .bar .fill { background: linear-gradient(90deg, #f5a45b, var(--t-gastos)); }
#personal .stat-value { color: var(--t-personal); }

/* Papeleo */
#papeleo .stat-value { color: var(--t-papeleo); }
.pp-ask { padding: 18px 16px; }
.pp-ask h2 { margin: 0 0 6px; font-size: 19px; }
.pp-ask p { margin: 0 0 16px; color: var(--ink-3); font-size: 14px; }
.pp-row { border-top: 1px solid var(--line); }
.pp-row:first-child { border-top: 0; }
.pp-row .check { border-top: 0; padding-bottom: 6px; }
.pp-row .t { display: flex; flex-direction: column; gap: 2px; }
.pp-row .t strong { font-weight: 600; }
.pp-who { font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
          background: var(--surface-2); color: var(--ink-2, inherit); }
.pp-tag { font-size: 12px; color: var(--ink-3); }
.pp-num { color: var(--brand); border-color: var(--brand-soft); font-weight: 600; }
.pp-numbers { margin: 0 16px 14px 50px; padding: 14px; border-radius: 14px;
              background: var(--surface-2); display: grid; gap: 12px; }
.pp-period { color: var(--ink-3); }
.pn-block { display: grid; gap: 4px; }
.pn-head { font-weight: 700; font-size: 14px; }
.pn-line, .pn-result { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.pn-line span { color: var(--ink-2); }
.pn-result { padding-top: 10px; border-top: 1px solid var(--line); font-size: 16px; }
.pn-result strong { font-size: 18px; }
.pn-warn { margin: 0; font-size: 13px; color: var(--ink-2); }
.pn-zip { display: block; text-align: center; text-decoration: none; }
@media (max-width: 420px) { .pp-numbers { margin-left: 16px; } }
.pp-note { padding: 14px 4px 0; color: var(--ink-3); font-size: 13px; line-height: 1.45; }
.vf-note { margin: 10px 4px 0; }

.pp-off { margin-bottom: 10px; padding: 8px 16px; }
.pp-off summary { font-weight: 600; cursor: pointer; padding: 4px 0; }
.pp-off-row { border-top: 1px solid var(--line); padding: 10px 0; display: grid; gap: 3px; }
.pp-off-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp-tag.mine { color: var(--accent, #1f6feb); font-weight: 600; }
#pp-off-q { width: 100%; margin: 6px 0 10px; }

/* papeleo sencillo: elegir, abrir cada cosa y añadir lo tuyo */
.pp-head .box { flex: none; cursor: pointer; background: none; color: transparent; font: inherit; }
.pp-head .box.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.pp-head .box:disabled { opacity: .5; cursor: default; }
.pp-open { border: 0; background: none; text-align: left; font: inherit; color: inherit; padding: 0; cursor: pointer; }
.pp-more-info { padding: 0 16px 14px 50px; color: var(--ink-2, var(--ink-3)); font-size: 14px; display: grid; gap: 8px; justify-items: start; }
.pp-more-info p { margin: 0; line-height: 1.45; }
.pp-more-info .pp-numbers { margin: 0; justify-self: stretch; }
.pp-switch { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); cursor: pointer; }
.pp-switch:first-child { border-top: 0; }
.pp-switch .t { flex: 1; display: grid; gap: 2px; }
.pp-switch small { color: var(--ink-3); font-size: 13px; }
.pp-switch input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.pp-more { margin: 12px 0; }
.pp-more summary { cursor: pointer; font-weight: 600; padding: 8px 4px; }
#pp-save { width: 100%; margin-top: 12px; }
.pp-add { padding: 14px 16px; display: grid; gap: 10px; }
.pp-add input, .pp-add select { width: 100%; font: inherit; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface, transparent); color: inherit; }
.pp-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#pp-custom { margin-top: 10px; }
.pp-custom-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); }
.pp-custom-row:first-child { border-top: 0; }
.pp-custom-row .t { flex: 1; display: grid; gap: 2px; }
.pp-custom-row small { color: var(--ink-3); font-size: 13px; }
#pp-restart { margin-top: 12px; }
.pp-more-info[hidden], .pp-more[hidden] { display: none; }
.p-invite .muted-note { flex-basis: 100%; }

/* --- salir: diálogo que explica cómo volver a entrar ------------------------------ */
.login-card .btn-link { display: block; margin: 14px auto 0; }
.dialog {
  width: min(400px, calc(100% - 32px));
  padding: 24px 20px 18px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(17, 26, 51, .45);
}
.dialog::backdrop { background: rgba(13, 18, 32, .45); }
.dialog h2 { margin: 0 0 8px; font-size: 20px; }
.dialog p { margin: 0 0 14px; color: var(--ink-2); line-height: 1.45; }
.dialog .w-input { margin: 6px 0 12px; font-size: 17px; }
.dialog-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.dialog-actions .btn-link { margin: 0; padding: 12px; }
.dialog-actions .btn-primary { width: auto; padding-inline: 22px; }
.dialog .btn-link.small { display: block; margin: 10px 0 0; }

/* --- fotos de trabajos --- */
.f-group { margin-top: 18px; }
.f-group h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; display: flex; justify-content: space-between; gap: 8px; }
.f-group h3 small { color: var(--ink-3); font-weight: 500; }
.f-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.f-side .btn-small { padding: 4px 10px; font-size: 13px; }
#c-photos-box .upload-zone { margin-top: 10px; }
.f-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.f-grid:empty { display: none; }
.f-tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 0; padding: 0; display: block; }
.f-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.f-tile .f-tag { position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; }
.f-tile.reading img { opacity: .55; }
.f-tile.reading::after { content: "Mirando…"; position: absolute; inset: auto 0 0 0; padding: 6px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.f-send { display: grid; gap: 12px; margin-bottom: 14px; }
.f-send-count { margin: 0; font-weight: 700; }
.f-strip { display: flex; gap: 6px; overflow-x: auto; }
.f-strip img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; }
.p-img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 16px; background: var(--surface-2); display: block; }
.p-text { margin: 12px 0; font-size: 16px; }
.p-fields { margin-top: 16px; }
#p-remove { margin-top: 22px; color: var(--danger); }
#d-photos { margin-bottom: 10px; }

/* Resumen: lo que entra, lo que sale y lo que queda */
#resumen .tone-ok { color: var(--ok); }
#resumen .tone-warn { color: var(--danger); }
.r-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 6px; }
.r-totals div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
                background: var(--surface); box-shadow: var(--shadow); }
.r-totals span { display: block; color: var(--ink-3); font-size: 13px; }
.r-totals b { font-size: 18px; font-variant-numeric: tabular-nums; }
.r-collect { margin: 6px 4px 0; color: var(--ink-2); font-size: 14px; }
.r-legend { display: flex; align-items: center; gap: 6px; margin: -4px 4px 8px; color: var(--ink-3);
            font-size: 13px; }
.r-legend i { display: inline-block; width: 12px; height: 8px; border-radius: 4px; margin-left: 6px; }
.r-legend i:first-child { margin-left: 0; }
#resumen i.in { background: var(--t-resumen); }
#resumen i.out { background: var(--t-gastos); }
.r-month { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px;
           padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.r-month:last-child { border-bottom: 0; }
.r-m { color: var(--ink-2); font-size: 14px; text-transform: capitalize; }
.r-bars { display: grid; gap: 3px; }
.r-bars i { display: block; height: 7px; min-width: 2px; border-radius: 4px; }
.r-month b { font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }
.r-month b.neg { color: var(--danger); }
#r-months { border: 1px solid var(--line); background: var(--surface); }
#r-customers .fill { background: var(--t-resumen); }
#r-cats .fill { background: linear-gradient(90deg, #f5a45b, var(--t-gastos)); }
.r-notes p { margin: 16px 4px 0; color: var(--ink-3); font-size: 13px; line-height: 1.45; }

/* Firmas */
.s-intro { margin: 4px 4px 14px; }
.s-form { display: grid; gap: 8px; padding: 16px; margin-bottom: 14px; }
.s-file { margin: 0 0 4px; font-weight: 600; word-break: break-word; }
.s-label { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }
.s-form .btn-primary { margin-top: 8px; }
.link-btn { border: 0; background: none; color: var(--ink-2); font: inherit; font-size: 14px;
            padding: 8px; text-decoration: underline; }
.s-row { grid-template-columns: 1fr auto; }
.s-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.s-acts .chip { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px;
                background: var(--surface-2); color: var(--ink); font: inherit; font-size: 13px; }
.s-acts .chip.muted { color: var(--ink-3); background: none; }
.s-ask { width: 100%; justify-content: center; }
.s-hint { margin: 6px 4px 0; }
#d-sign .rows { margin-bottom: 10px; }

/* Proveedores */
.g-suppliers { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius);
               background: var(--surface); }
.v-aliases { margin: 6px 4px 0; }
.v-hint { margin: 0 4px 10px; }
.v-merge-go { width: 100%; margin-top: 10px; justify-content: center; }
#v-form .btn-primary { margin-top: 12px; }

/* Facturas de antes de Blue */
.old-link { display: block; margin: 10px 16px 0; padding: 12px 16px; border-radius: 14px;
            background: var(--surface-2); color: var(--ink); text-decoration: none; font-weight: 600; }
.o-check { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 4px 0; }
.o-check input { width: 20px; height: 20px; }
.o-save-all { margin: 0 0 12px; }
.o-card { margin-bottom: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.o-card .o-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.o-card label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-3); }
.o-card .w-input { width: 100%; min-width: 0; box-sizing: border-box; }
.o-card .o-row > * { min-width: 0; }
.o-card label.o-check { display: flex; align-self: end; padding-bottom: 14px; color: var(--ink); font-size: 15px; }
.o-problems { margin: 0; color: var(--danger); font-size: 14px; font-weight: 600; }
.o-ok { margin: 0; color: var(--ok); font-size: 14px; font-weight: 600; }
.o-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.o-card .o-row.o-date { grid-template-columns: 1.5fr 1fr; }

/* =====================================================================================
   Diseño «menta»: blanco cálido, azul marino para el texto y verde menta de acento.
   ===================================================================================== */
:root {
  --bg: #f6f7f6;
  --surface: #ffffff;
  --surface-2: #f0f3f3;
  --ink: #15213b;
  --ink-2: #4a5568;
  --ink-3: #8a93a3;
  --line: #e8ecec;
  --brand: #22886b;
  --brand-2: #15213b;
  --brand-soft: #e4f5ee;
  --mint: #82dcc0;
  --mint-2: #4fbf9c;
  --navy: #1d2a47;
  --tile: #eef3f5;
  --mine: linear-gradient(135deg, #2a3a5e, #15213b);
  --shadow: 0 1px 2px rgba(21, 33, 59, .04), 0 6px 18px rgba(21, 33, 59, .05);
  --shadow-lift: 0 2px 4px rgba(21, 33, 59, .03), 0 18px 36px -16px rgba(21, 33, 59, .22);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1422; --surface: #161e30; --surface-2: #1c263b;
    --ink: #eef2f7; --ink-2: #b4bccb; --ink-3: #7c8699; --line: #263149;
    --brand: #6fd6b5; --brand-2: #eef2f7; --brand-soft: #173a33;
    --navy: #2b3a5c; --tile: #1e2940;
    --mine: linear-gradient(135deg, #34507f, #22355a);
  }
}
body::before {
  background:
    radial-gradient(520px 280px at 8% -60px, color-mix(in srgb, #9fd8ff 22%, transparent), transparent 70%),
    radial-gradient(460px 300px at 100% 40px, color-mix(in srgb, var(--mint) 18%, transparent), transparent 70%);
}
.btn-primary { background: var(--mine); box-shadow: 0 10px 24px -12px rgba(21, 33, 59, .6); }
.btn-primary:hover { box-shadow: 0 14px 30px -12px rgba(21, 33, 59, .7); }
.send-btn { background: var(--mine) !important; }

/* --- Blue, la mascota (esfera de cristal con anillo) ------------------------------- */
.orb { display: inline-block; flex: none; line-height: 0; }
.orb-svg { width: 100%; height: 100%; overflow: visible; stroke: none; }
.orb-xs { width: 26px; height: 26px; }
.orb-sm { width: 40px; height: 40px; }
.orb-md { width: 64px; height: 64px; }
.orb-xl { width: 120px; height: 120px; }
.orb-hero { width: 100%; height: 100%; }
.orb.avatar, .orb.w-avatar, .orb.login-logo { border-radius: 0; box-shadow: none; }
.orb-ring { fill: none; stroke-width: 4; stroke-linecap: round; }
.orb-ring.back { opacity: .7; }
.orb-shadow { fill: #6aa9c9; opacity: .18; }
.orb-face path, .orb-face .o-bar { fill: none; stroke: #18223a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.orb-face .o-dot { fill: #18223a; stroke: none; }
.orb-float { animation: orb-float 4.5s ease-in-out infinite; transform-origin: 60px 62px; }
.orb-xs .orb-float, .orb-sm .orb-float { animation: none; }
@keyframes orb-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.orb-face .o-eye, .orb-face .o-dot { transform-box: fill-box; transform-origin: center; }
[data-orb="feliz"] .o-eye, [data-orb="guino"] .o-dot { animation: orb-blink 5s infinite; }
@keyframes orb-blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.15); } }
[data-orb="pensando"] .o-dot { animation: orb-think 1.2s ease-in-out infinite; }
[data-orb="escuchando"] .o-bar { transform-box: fill-box; transform-origin: center; animation: orb-wave .9s ease-in-out infinite; }
.o-t2 { animation-delay: .15s !important; }
.o-t3 { animation-delay: .3s !important; }
@keyframes orb-think { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes orb-wave { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .orb-float, .orb-face * { animation: none !important; } }
.typing { align-items: center; }
.typing .orb { margin-right: 6px; }
.typing-text { display: none; margin-left: 8px; font-size: 14px; color: var(--ink-2); }
.typing.with-text .typing-text { display: inline; }

/* --- Inicio ---------------------------------------------------------------------- */
.home { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.home-head { display: flex; align-items: center; gap: 10px; }
.brand-mark { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo-mark svg, .logo-ico svg { width: 100%; height: 100%; stroke: none; }
.brand-word { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; color: var(--brand-2); line-height: 1; }
.brand-tag {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
  margin-left: 6px; padding-left: 12px; border-left: 1px solid var(--line);
  color: var(--ink-2); font-size: 11.5px; line-height: 1.25;
}
.brand-company { color: var(--ink-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell, .me-btn {
  position: relative; display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--ink);
}
.bell svg { width: 25px; height: 25px; }
.me-btn {
  background: linear-gradient(135deg, #2c3d63, #15213b); color: #fff;
  font-weight: 700; font-size: 17px; box-shadow: 0 0 0 3px var(--surface), var(--shadow-lift);
}
.dot-n {
  position: absolute; top: 2px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--mint); color: #12352a; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}

.hero { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 14px; }
.hero-text { min-width: 0; position: relative; }
.h-hello { margin: 0; font-size: 36px; line-height: 1.05; font-weight: 800; letter-spacing: -0.045em; color: var(--ink); }
.h-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 18px; line-height: 1.3; }
.swoosh { display: block; width: 90px; height: 12px; margin: 4px 0 0 70px; }
.swoosh path { fill: none; stroke: var(--mint-2); stroke-width: 2.6; stroke-linecap: round; }
.hero-orb { position: relative; flex: none; width: 150px; height: 150px; margin: -8px -10px -14px 0; }
.sparks { position: absolute; left: 4px; top: -2px; width: 34px; height: 34px; }
.sparks path { stroke: #5fb6e8; stroke-width: 3.2; stroke-linecap: round; }

.ask-hero {
  position: relative; display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow-lift);
}
.ask-mic {
  position: relative; z-index: 1; display: grid; place-items: center; flex: none;
  width: 52px; height: 52px; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b4f0dc, var(--mint) 55%, var(--mint-2));
  color: #14303a; box-shadow: 0 8px 18px -8px rgba(60, 170, 135, .7);
  transition: transform .15s var(--ease);
}
.ask-mic:active { transform: scale(.94); }
.ask-mic svg { width: 24px; height: 24px; stroke-width: 2.1; }
.ask-text {
  flex: 1; min-width: 0; align-self: stretch; padding: 0 52px 0 14px;
  border: 0; border-left: 1px solid var(--line); background: none;
  color: var(--ink-3); text-align: left; font-size: 16.5px;
}
.ask-text::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.ask-go {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--mine); color: #fff; pointer-events: none;
}
.ask-go svg { width: 20px; height: 20px; stroke-width: 2.4; }

.quick { display: flex; gap: 8px; margin: 14px -18px 0; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.quick::-webkit-scrollbar { display: none; }
.quick:empty { display: none; }
.quick-chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 10px 16px 10px 13px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 14.5px; font-weight: 500;
  box-shadow: var(--shadow); transition: transform .15s var(--ease);
}
.quick-chip:active { transform: scale(.97); }
.q-ico svg { width: 19px; height: 19px; display: block; }

/* Cuadrícula de 3 en 3, iconos de línea en azul marino */
.home .setup-card { background: var(--mine); }
.home section[aria-label="Tu trabajo"] { margin-top: 18px; }
.home .cards { grid-template-columns: repeat(3, 1fr); gap: 10px; }
.home .card {
  min-height: 0; padding: 12px 10px 12px 12px; gap: 1px;
  border: 1px solid var(--line); border-radius: 18px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.home .card::after { display: none; }
.home .card:hover { border-color: color-mix(in srgb, var(--mint-2) 45%, var(--line)); }
.home .card .c-icon.ico, .home .card .logo-ico {
  width: 42px; height: 42px; margin: 0 0 10px; border-radius: 13px;
  background: var(--tile); color: var(--ink);
}
.home .card .logo-ico { padding: 7px; }
.home .card .c-icon svg { width: 23px; height: 23px; stroke-width: 1.7; }
.home .card strong { margin-top: 0; font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.home .card small { font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.c-go {
  position: absolute; top: 12px; right: 10px;
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-2);
}
.c-go svg { width: 14px; height: 14px; stroke-width: 2.4; }
.home .card .badge { top: auto; bottom: 10px; right: 10px; background: var(--brand-soft); color: var(--brand); font-size: 11px; }
.home .card:has(.badge) small { padding-right: 0; }

/* Tu negocio hoy */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; }
.home .section-title { margin: 28px 2px 12px; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.see-more { color: var(--brand); font-weight: 600; font-size: 15px; text-decoration: none; }
.stats { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; }
.stat {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 12px; min-height: 84px; padding: 14px;
  border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  box-shadow: var(--shadow); text-align: left;
}
.s-ico { position: relative; z-index: 1; color: var(--mint-2); flex: none; }
.s-ico svg { width: 28px; height: 28px; stroke-width: 3; }
.s-ico.mint svg { stroke-width: 1.9; }
.s-txt { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.s-txt b { font-size: 22px; font-weight: 800; letter-spacing: -0.035em; color: var(--ink); line-height: 1.1; white-space: nowrap; }
.s-txt small { color: var(--ink-2); font-size: 13.5px; }
.s-wave { position: absolute; right: 0; bottom: 0; width: 55%; height: 70%; }
.s-wave path { fill: color-mix(in srgb, var(--mint) 35%, transparent); stroke: none; }
.home .today-card { margin-top: 10px; }

/* Barra de abajo */
.tabbar {
  position: fixed; z-index: 20; left: 0; right: 0; margin: 0 auto;
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(740px, calc(100% - 20px));
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  padding: 8px 6px; border: 1px solid var(--line); border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: var(--shadow-lift);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0 6px; border: 0; background: none; color: var(--ink-2); font-size: 12px; font-weight: 500;
}
.tab svg { width: 25px; height: 25px; }
.tab.on { color: var(--ink); font-weight: 700; }
.tab.on svg { stroke: var(--mint-2); }
.tab[data-tab="inicio"].on svg { fill: var(--mint-2); }
.tab.on::after { content: ""; position: absolute; bottom: -4px; width: 34px; height: 3px; border-radius: 3px; background: var(--mint-2); }
.tab .dot-n { top: -4px; right: calc(50% - 22px); }
.tab-plus {
  justify-self: center; display: grid; place-items: center;
  width: 60px; height: 60px; margin-top: -26px; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b4f0dc, var(--mint) 55%, var(--mint-2));
  color: #14303a; box-shadow: 0 0 0 5px var(--bg), 0 12px 24px -8px rgba(60, 170, 135, .7);
  transition: transform .2s var(--ease);
}
.tab-plus svg { width: 28px; height: 28px; stroke-width: 2.4; }
.tab-plus.open { transform: rotate(45deg); }
.plus-sheet {
  position: fixed; z-index: 19; left: 0; right: 0; margin: 0 auto;
  bottom: calc(96px + env(safe-area-inset-bottom)); width: min(320px, calc(100% - 40px));
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  box-shadow: var(--shadow-lift); animation: view-in .2s var(--ease) both;
}
.plus-title { grid-column: 1 / -1; margin: 0 2px 4px; font-weight: 700; }
.plus-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2);
  font-weight: 600; font-size: 14px; text-align: left;
}
.plus-item .ico { width: 36px; height: 36px; border-radius: 11px; background: var(--surface); color: var(--ink); }

@media (max-width: 380px) {
  .h-hello { font-size: 31px; }
  .h-sub { font-size: 16px; }
  .hero-orb { width: 124px; height: 124px; }
  .brand-tag { display: none; }
  .home .card small { font-size: 11.5px; }
}
@media (min-width: 900px) {
  .h-hello { font-size: 46px; }
  .hero-orb { width: 190px; height: 190px; }
}
.view:not([hidden]) > .tabbar { animation: none; }
.ask-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home .card small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home .card .c-icon { position: relative; }
.home .card .c-icon .dot-n { top: -6px; right: -8px; }
@media (max-width: 380px) { .ask-text { font-size: 15px; padding-left: 10px; } .ask-hero { gap: 8px; } }
.stat { gap: 10px; padding: 14px 12px; } .stat-money .s-txt b { font-size: clamp(17px, 5vw, 22px); }

/* Tarjetas iguales: columnas del mismo ancho aunque el nombre sea largo */
.home .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home .card strong { font-size: clamp(13px, 3.9vw, 15.5px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Blue en el centro de la barra de abajo */
.tab-blue {
  justify-self: center; display: grid; place-items: center;
  width: 64px; height: 64px; margin-top: -28px; padding: 0; border: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff, #e9f3f8 60%, #d6ece6);
  box-shadow: 0 0 0 5px var(--bg), 0 12px 24px -8px rgba(60, 140, 160, .55);
  transition: transform .15s var(--ease);
}
.tab-blue:active { transform: scale(.94); }
.orb-tab { width: 58px; height: 58px; }
.orb-tab .orb-float { animation: none; }
.orb-tab .orb-shadow { display: none; }
.home .card { padding-left: 11px; padding-right: 9px; }
.home .card strong.long { font-size: clamp(11.5px, 3.3vw, 15.5px); letter-spacing: -0.035em; }

/* Blue gota, líquida y tranquila (tipo Siri): respira, flota y se deforma despacio;
   detrás, un brillo que late. Todo con curvas suaves y tiempos largos. */
.orb { position: relative; }
.gota-a, .gota-b { position: relative; display: block; width: 100%; height: 100%; transform-origin: 50% 70%; }
.orb-img { display: block; width: 100%; height: 100%; object-fit: contain; overflow: visible; pointer-events: none; user-select: none; transform-origin: 50% 70%; }
/* Poses: la de encima aparece con un fundido y la base se apaga */
.gota-b { position: relative; }
.orb-base { transition: opacity .2s ease; }
.orb-pose { position: absolute; inset: 0; opacity: 0; transition: opacity .2s ease; }
.gota-b[data-pose] .orb-pose { opacity: 1; }
.gota-b[data-pose] .orb-base { opacity: 0; }
.gota-b[data-pose="aplastada"] .orb-pose { inset: 20% 0 -20% 0; }
.gota-a, .gota-b { will-change: transform; }
@keyframes gota-flota { 0%, 100% { transform: translate(0, 0) rotate(-1.5deg); } 33% { transform: translate(1.2%, -2.2%) rotate(1.2deg); } 66% { transform: translate(-1%, -1%) rotate(-.6deg); } }
@keyframes gota-respira { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, .985); } }
/* Brillo detrás */
.gota-halo { display: none !important; position: absolute; inset: 14%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(95, 214, 255, .55), rgba(143, 227, 198, .35) 45%, transparent 70%);
  filter: blur(10px); animation: halo-late 4.6s cubic-bezier(.45, 0, .55, 1) infinite; }
.orb-xs .gota-halo, .orb-tab .gota-halo { display: none; }
.orb-sm .gota-halo { filter: blur(5px); }
@keyframes halo-late { 0%, 100% { transform: scale(.9); opacity: .55; } 50% { transform: scale(1.12); opacity: .9; } }
/* Gestos suaves */
@keyframes g-mira { 0%, 100% { transform: none; } 30%, 45% { transform: rotate(-7deg) translateX(-2%); } 70%, 80% { transform: rotate(5deg) translateX(1.5%); } }
@keyframes g-respira { 0%, 100% { transform: none; } 45% { transform: scale(.95, 1.07) translateY(-2%); } 75% { transform: scale(1.03, .98); } }
@keyframes g-bota { 0%, 100% { transform: none; } 30% { transform: translateY(-8%) scale(.96, 1.05); } 60% { transform: scale(1.06, .95); } 80% { transform: scale(.99, 1.01); } }
@keyframes g-tiembla { 0%, 100% { transform: none; } 20% { transform: scale(1.08, .93); } 40% { transform: scale(.95, 1.05); } 60% { transform: scale(1.03, .97); } 80% { transform: scale(.99, 1.01); } }
/* Estados: escuchando = se inclina y el brillo late rápido; pensando = el brillo gira de color */
[data-orb="escuchando"] .orb-img { animation: g-escucha 1.4s cubic-bezier(.45, 0, .55, 1) infinite; }
[data-orb="escuchando"] .gota-halo { animation: halo-late 1.1s cubic-bezier(.45, 0, .55, 1) infinite; inset: 4%; }
[data-orb="pensando"] .orb-img { animation: g-piensa 3s cubic-bezier(.45, 0, .55, 1) infinite; }
[data-orb="pensando"] .gota-halo { background: conic-gradient(from 0deg, rgba(95,214,255,.7), rgba(143,227,198,.7), rgba(170,150,255,.6), rgba(95,214,255,.7));
  animation: halo-gira 2.4s linear infinite; }
@keyframes g-escucha { 0%, 100% { transform: rotate(-5deg) scale(1.02, .98); } 50% { transform: rotate(-5deg) translateY(2.5%) scale(.99, 1.02); } }
@keyframes g-piensa { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-1.5%); } }
@keyframes halo-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gota-a, .gota-b, .orb-img, .gota-halo { animation: none !important; } }
.hero-orb .sparks { display: none; }

/* Logo de arriba: la gota */
.logo-gota { width: 38px; height: 38px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(40,90,170,.25)); }

/* Barra de abajo en todas las pantallas: dejar sitio para que no tape nada */
.tabbar[hidden] { display: none; }
.list, .sub { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* Menú del perfil: por encima de todo, fondo sólido y más cuidado */
.home-head { z-index: 30; }
.menu {
  z-index: 40; top: calc(100% + 6px); right: 0; min-width: 240px; max-width: calc(100vw - 24px);
  padding: 8px; gap: 2px; border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 100%, #000 0%);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .55), 0 0 0 1px var(--line);
  animation: menu-in .18s var(--ease) both; transform-origin: top right;
}
.menu[hidden] { display: none; }
.menu button, .menu a { display: block; text-decoration: none; padding: 13px 14px; border-radius: 13px; font-size: 15px; font-weight: 500; color: var(--ink); }
.menu button:active, .menu a:active { background: var(--surface-2); }
.menu .danger { margin-top: 0; }
.menu #logout { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 13px 13px; padding-top: 15px; }
@keyframes menu-in { from { opacity: 0; transform: scale(.94) translateY(-6px); } to { opacity: 1; transform: none; } }

/* «Escribe o habla con Blue» fija, justo encima de la barra de abajo */
.home { padding-bottom: calc(172px + env(safe-area-inset-bottom)); }
.home .ask-hero {
  position: fixed; z-index: 21; left: 0; right: 0; margin: 0 auto;
  bottom: calc(92px + env(safe-area-inset-bottom));
  width: min(740px, calc(100% - 20px));
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .55);
}
.home[hidden] .ask-hero { display: none; }
.home:not([hidden])::after {
  content: ""; position: fixed; z-index: 18; left: 0; right: 0; bottom: 0; height: calc(170px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 62%, transparent); pointer-events: none;
}

/* Calendario del mes (agenda) */
.cal { padding: 14px 12px 12px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cal-title { flex: 1; margin: 0 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.cal-hoy { padding: 6px 13px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--mint) 22%, transparent); color: var(--mint-2); font-weight: 700; font-size: 13px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week span { text-align: center; padding: 4px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.cal-grid { row-gap: 2px; }
.cal-cell { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; height: 50px; padding: 5px 0 0; border: 0; border-radius: 14px; background: none; color: var(--ink); }
.cal-cell .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 16px; font-weight: 500; }
.cal-cell.today .n { background: var(--brand-2); color: #fff; font-weight: 700; }
.cal-cell.sel { background: color-mix(in srgb, var(--mint) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--mint-2); }
.cal-cell .dots { display: flex; gap: 3px; height: 6px; }
.cal-cell .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint-2); }
.cal-cell .dots i.tk { background: #7ea0ff; }
.cal-cell .dots i.late { background: var(--danger); }
.cal-day { margin-top: 10px; }
.cal-day .day-name { margin: 8px 4px 8px; }
.cal-day .panel { box-shadow: none; }
.cal-sync { width: 100%; margin-top: 18px; }
.cal-box { display: grid; gap: 10px; padding: 16px; margin-top: 10px; }
.cal-box p { margin: 0; font-size: 14px; line-height: 1.4; }
.cal-box a.btn-small { justify-self: start; text-decoration: none; }
.cal-url { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink-2); font-size: 13px; }
.cal-box-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cal-renew { border: 0; background: none; color: var(--ink-3); text-decoration: underline; font-size: 13px; }
.cal-title .y { font-weight: 500; color: var(--ink-3); }
.cal-title { white-space: nowrap; }
.cal-cell.today .n { background: var(--mint-2); color: #0d2a2f; }
.cal-cell { height: 48px; }

.payslip { grid-column: 1 / -1; display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.payslip select, .payslip input { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line, #d8dee6); background: var(--surface, #fff); color: var(--ink); }
.payslip .btn-small { justify-self: start; }
.ps-line { display: flex; justify-content: space-between; gap: 12px; }
.ps-net { font-size: 1.1em; border-top: 1px solid var(--line, #d8dee6); padding-top: 8px; }
.payslip .muted-note { color: var(--ink); opacity: .8; }
.p-rates { display: grid; gap: 10px; }
.p-rates label { display: grid; gap: 4px; font-size: .9em; }
.p-rates input { font: inherit; padding: 10px; border-radius: 10px; border: 1px solid var(--line, #d8dee6); background: var(--surface, #fff); color: var(--ink); }
.p-rates .btn-small { justify-self: start; }
.p-rates { padding: 14px; }
.p-rates .muted-note { color: var(--ink); opacity: .8; margin: 0; }

.ps-list { display: grid; gap: 8px; }
.ps-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border-radius: 10px; background: var(--surface, #fff); }
.ps-row > :first-child { grid-column: 1 / -1; }
.ps-row input, .ps-row select { min-width: 0; }
.ps-fix { display: flex; align-items: center; gap: 4px; font-size: .85em; }
.ps-row .ghost { justify-self: end; }
.ps-title { margin-top: 6px; }
.ps-adders { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-head { display: grid; gap: 6px; }
.ps-head label { font-size: .85em; margin-top: 4px; }

/* cámara dentro de la app */
.f-actions { display: grid; gap: 10px; margin-bottom: 14px; }
.f-actions .btn-primary { font-size: 18px; padding: 18px; }
.btn-ghost-big { display: block; text-align: center; padding: 14px; border: 1px solid var(--line);
                 border-radius: 16px; background: var(--surface-2); color: var(--ink); font-weight: 600; }
.cam { position: fixed; inset: 0; z-index: 200; background: #000; display: flex; flex-direction: column; }
.cam[hidden] { display: none; }
.cam video { flex: 1; min-height: 0; width: 100%; object-fit: cover; }
.cam-strip { position: absolute; left: 0; right: 0; bottom: 120px; display: flex; gap: 6px;
             padding: 0 12px; overflow-x: auto; }
.cam-strip img { width: 52px; height: 52px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; flex: none; }
.cam-bar { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); background: #000; }
.cam-side { border: 0; background: none; color: #fff; font: inherit; font-size: 17px; font-weight: 600; min-width: 84px; padding: 12px 0; }
.cam-side:disabled { opacity: .35; }
.cam-shot { width: 74px; height: 74px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 4px #000; }
.cam-shot:active { transform: scale(.92); }

/* =====================================================================================
   El resto de pantallas con el estilo del Inicio: títulos grandes, tarjetas redondas,
   botones azul marino y menta de acento. Vale para claro y oscuro (usa las variables).
   ===================================================================================== */
.topbar { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-bottom: 0; padding-bottom: 6px; }
.topbar-title { font-size: 24px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 800; letter-spacing: -0.035em; color: var(--ink); }
.topbar .icon-btn.back { width: 40px; height: 40px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.topbar .btn-small { padding: 10px 18px; border-radius: 999px; }
.btn-small { background: var(--mine); color: #fff; box-shadow: 0 8px 18px -10px rgba(21, 33, 59, .65); }
.btn-small.ghost { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.search, .list-tools select, .when select { border-radius: 16px; border-color: transparent; box-shadow: var(--shadow); background: var(--surface); }
.search:focus { border-color: var(--mint-2); }
.seg { border-radius: 999px; box-shadow: var(--shadow); border-color: transparent; }
.seg[aria-selected="true"] { background: var(--navy); color: #fff; }
.list-total { margin: 14px 18px 8px; font-size: 14px; color: var(--ink-2); }
.list-total strong { font-size: 17px; font-weight: 800; color: var(--ink); }
.rows { border-color: transparent; border-radius: 22px; box-shadow: var(--shadow); }
.old-link { border-radius: 16px; background: color-mix(in srgb, var(--mint) 18%, var(--surface)); color: var(--ink); }
.pill.ok { background: color-mix(in srgb, var(--mint) 28%, var(--surface)); color: #1c6f55; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill.ok { background: color-mix(in srgb, var(--mint) 18%, var(--surface)); color: var(--mint); }
  :root:not([data-theme="light"]) .btn-small.ghost { background: var(--surface-2); }
}
.btn-small:not(.ghost), .btn-primary, .act.primary { background: var(--mine); }
.btn-small:not(.ghost) { box-shadow: 0 8px 18px -10px rgba(21, 33, 59, .65); }
.btn-primary, .act.primary { box-shadow: 0 10px 24px -12px rgba(21, 33, 59, .6); }
#gastos .bar .fill { background: linear-gradient(90deg, var(--mint), var(--mint-2)); }
.chip.on { border-color: var(--mint-2); background: color-mix(in srgb, var(--mint) 22%, transparent); color: var(--ink); }
#personal .stat-value, #papeleo .stat-value { color: var(--ink); }
#resumen i.in { background: var(--mint-2); }
#resumen i.out { background: var(--ink-2); }
#r-customers .fill, #r-cats .fill { background: linear-gradient(90deg, var(--mint), var(--mint-2)); }
.stat-value { white-space: nowrap; font-size: clamp(26px, 8.5vw, 36px); }
.btn-ghost-big { background: var(--surface); border-color: transparent; box-shadow: var(--shadow); border-radius: 18px; }

.mail-on { display: grid; gap: 10px; padding: 16px; margin-bottom: 16px; }
.mail-on strong { font-size: 17px; }
.mail-steps { margin: 4px 0 14px; padding-left: 22px; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.mail-steps a { color: var(--brand); font-weight: 600; word-break: break-all; }

a.btn-primary { display: block; text-align: center; text-decoration: none; }

.n-warn { grid-column: 1 / -1; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
#nominas a.btn-small { text-decoration: none; }

/* Cómo funciona Blue */
.ay-intro { margin: 8px 0 4px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.ay-card { display: grid; gap: 6px; padding: 14px 16px; margin-bottom: 10px; }
.ay-card h2 { margin: 0; font-size: 16px; }
.ay-card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.ay-say { margin: 4px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; color: var(--brand); }
.ay-rules { color: var(--ink-2); }

.signup-box { display: grid; gap: 8px; margin-bottom: 18px; text-align: center; }
.signup-box .btn-primary { font-size: 1.1rem; padding: 16px; }
.signup-box .signup-or { margin-top: 10px; }

/* --- Presentación de Blue (antes del cuestionario) ----------------------------------- */
.intro { display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; min-height: 100dvh; overflow: hidden;
         padding: calc(14px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); }
.intro[hidden] { display: none; }
.intro-top { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.intro-dots { display: flex; gap: 6px; }
.intro-dots span { width: 22px; height: 4px; border-radius: 4px; background: var(--surface-2); transition: background .3s; }
.intro-dots span.on { background: var(--mint-2); }
.intro-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
               text-align: center; padding: 8px 0; }
.intro-slide[hidden] { display: none; }
.intro-slide h1 { margin: 20px 0 8px; font-size: 32px; line-height: 1.1; letter-spacing: -0.025em; }
.intro-slide h1 em { font-style: normal; color: var(--brand); }
.intro-slide p { margin: 0; max-width: 320px; color: var(--ink-2); font-size: 17px; line-height: 1.45; }
.intro-actions { display: grid; }
.pop { opacity: 0; }
.intro-slide.in .pop { animation: i-pop .6s cubic-bezier(.2, .9, .3, 1.2) .25s both; }
.intro-slide.in p.pop { animation-delay: .5s; }
@keyframes i-pop { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes i-spin { to { transform: rotate(360deg); } }

/* 1 · Blue con sus cosas girando alrededor */
.i-hero { position: relative; width: 250px; height: 250px; display: flex; align-items: center; justify-content: center; }
.i-hero .orb-xl { width: 150px; height: 150px; position: relative; z-index: 2; }
.intro-slide.in .i-hero { animation: i-herop .8s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes i-herop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.ring { position: absolute; left: 50%; top: 50%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
        border: 2px solid var(--mint); opacity: 0; animation: i-ring 3.2s ease-out infinite; }
.ring.r2 { animation-delay: 1.05s; } .ring.r3 { animation-delay: 2.1s; }
@keyframes i-ring { 0% { transform: scale(.8); opacity: .65; } 100% { transform: scale(1.9); opacity: 0; } }
.orbiter { position: absolute; inset: 0; animation: i-spin 18s linear infinite; }
.orbiter span { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px;
                transform: rotate(var(--a)) translateY(-108px) rotate(calc(-1 * var(--a))); }
.orbiter b { width: 50px; height: 50px; display: grid; place-items: center; font-size: 25px; border-radius: 16px;
             background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift);
             animation: i-spin 18s linear infinite reverse; }

/* «móvil» donde se ve la demo */
.phone { width: 100%; max-width: 340px; padding: 12px; border-radius: 28px; background: var(--surface);
         border: 1px solid var(--line); box-shadow: var(--shadow-lift); text-align: left; }
.ph-steps { display: flex; gap: 6px; margin-bottom: 10px; }
.ph-steps span { flex: 1; padding: 6px 4px; border-radius: 999px; background: var(--surface-2); color: var(--ink-3);
                 font-size: 11.5px; font-weight: 700; text-align: center; white-space: nowrap; transition: all .3s; }
.ph-steps span.on { background: var(--mint); color: #15213b; transform: scale(1.04); }
.ph-screen { position: relative; height: 290px; border-radius: 18px; background: var(--bg); padding: 14px; overflow: hidden;
             transition: opacity .4s; }
.ph-screen.out { opacity: 0; }

/* 2 · la demo hablada */
.d-voice { display: flex; align-items: center; gap: 12px; opacity: .35; transition: opacity .3s; }
.ph-screen.listen .d-voice { opacity: 1; }
.d-mic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 19px;
         background: var(--mine); box-shadow: 0 0 0 0 rgba(130, 220, 192, .7); }
.ph-screen.listen .d-mic { animation: i-mic 1.1s infinite; }
@keyframes i-mic { 70% { box-shadow: 0 0 0 14px rgba(130, 220, 192, 0); } 100% { box-shadow: 0 0 0 0 rgba(130, 220, 192, 0); } }
.d-wave { display: flex; align-items: center; gap: 4px; height: 34px; }
.d-wave i { width: 4px; height: 6px; border-radius: 4px; background: var(--mint-2); }
.ph-screen.listen .d-wave i { animation: i-wave .7s ease-in-out infinite; }
.d-wave i:nth-child(2n) { animation-delay: .12s !important; } .d-wave i:nth-child(3n) { animation-delay: .27s !important; }
.d-wave i:nth-child(5n) { animation-delay: .4s !important; }
@keyframes i-wave { 50% { height: 30px; } }
.d-bubble { margin-top: 12px; padding: 11px 14px; border-radius: 16px 16px 4px 16px; background: var(--mine); color: #fff;
            font-size: 15px; line-height: 1.35; min-height: 22px; }
.d-bubble u { display: inline-block; width: 2px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--mint);
              animation: i-blink .8s steps(2) infinite; text-decoration: none; }
@keyframes i-blink { 50% { opacity: 0; } }
.d-think { display: flex; align-items: center; gap: 10px; margin-top: 16px; opacity: 0; transform: translateY(8px);
           transition: all .35s; position: absolute; left: 14px; right: 14px; top: 130px; }
.d-think em { font-style: normal; color: var(--ink-2); font-size: 14px; }
.ph-screen.think .d-think { opacity: 1; transform: none; }
.d-doc { position: absolute; left: 14px; right: 14px; top: 112px; padding: 13px 14px; border-radius: 16px;
         background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift);
         opacity: 0; transform: translateY(30px) scale(.94); transition: all .55s cubic-bezier(.2, .9, .3, 1.2); }
.ph-screen.doc .d-doc { opacity: 1; transform: none; }
.ph-screen.doc .d-bubble { opacity: .5; transform: scale(.96); transform-origin: right; transition: all .4s; }
.d-doc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.d-tag { padding: 3px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 700; }
.d-line { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
          opacity: 0; transform: translateX(-12px); transition: all .4s; }
.ph-screen.doc .d-line { opacity: 1; transform: none; }
.ph-screen.doc .d-line.l2 { transition-delay: .35s; color: var(--ink-3); font-size: 13px; }
.d-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.d-total b { font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.d-sent { margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--brand-soft); color: var(--brand);
          font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px;
          opacity: 0; transform: scale(.8); transition: all .45s cubic-bezier(.2, 1.4, .4, 1); }
.d-sent span { width: 22px; height: 22px; border-radius: 50%; background: var(--mint); color: #15213b; display: grid; place-items: center; font-size: 13px; }
.ph-screen.sent .d-sent { opacity: 1; transform: none; }

/* 3 · ejemplos que cambian solos */
.scenes { padding: 14px; }
.sc-body { min-height: 238px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.sc-in { align-self: flex-end; display: flex; align-items: center; gap: 10px; max-width: 92%; padding: 11px 14px;
         border-radius: 16px 16px 4px 16px; background: var(--mine); color: #fff; font-size: 15px; line-height: 1.3; }
.sc-ico { font-size: 22px; }
.sc-arrow { align-self: center; color: var(--mint-2); font-size: 22px; font-weight: 800; }
.sc-out { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--bg);
          border: 1px solid var(--line); }
.sc-out b { font-size: 18px; }
.sc-out span { color: var(--ink-2); font-size: 14px; }
.sc-out em { align-self: flex-start; margin-top: 6px; padding: 7px 12px; border-radius: 999px; background: var(--brand-soft);
             color: var(--brand); font-style: normal; font-weight: 700; font-size: 13px; }
.sc-body.go .sc-in { animation: sc-in .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.sc-body.go .sc-arrow { animation: sc-fade .4s .5s both; }
.sc-body.go .sc-out { animation: sc-in .6s .8s cubic-bezier(.2, .9, .3, 1.2) both; }
.sc-body.go .sc-out em { animation: sc-in .5s 1.5s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes sc-in { from { opacity: 0; transform: translateY(22px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes sc-fade { from { opacity: 0; } to { opacity: 1; } }
.sc-tabs { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.sc-tabs button { width: 26px; height: 6px; padding: 0; border: 0; border-radius: 6px; background: var(--surface-2); transition: all .3s; }
.sc-tabs button.on { width: 40px; background: var(--mint-2); }

/* 4 · vamos a conocernos */
.intro-slide .orb-xl.jump { width: 130px; height: 130px; animation: i-jump 1.6s ease-in-out infinite; }
@keyframes i-jump { 0%, 100% { transform: translateY(0) scale(1, 1); } 40% { transform: translateY(-18px) scale(.96, 1.05); }
                    70% { transform: translateY(0) scale(1.06, .94); } }
.checks { list-style: none; margin: 14px 0 16px; padding: 0; display: grid; gap: 9px; width: 100%; max-width: 300px; text-align: left; }
.checks li { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; background: var(--surface);
             border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 600; opacity: 0; }
.checks li::before { content: "✓"; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none;
                     background: var(--mint); color: #15213b; font-size: 13px; font-weight: 800; transform: scale(0); }
.intro-slide.in .checks li { animation: i-pop .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.intro-slide.in .checks li::before { animation: i-tick .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.intro-slide.in .checks li:nth-child(1) { animation-delay: .35s; } .intro-slide.in .checks li:nth-child(1)::before { animation-delay: .75s; }
.intro-slide.in .checks li:nth-child(2) { animation-delay: .7s; }  .intro-slide.in .checks li:nth-child(2)::before { animation-delay: 1.1s; }
.intro-slide.in .checks li:nth-child(3) { animation-delay: 1.05s; } .intro-slide.in .checks li:nth-child(3)::before { animation-delay: 1.45s; }
.intro-slide.in .checks li:nth-child(4) { animation-delay: 1.4s; } .intro-slide.in .checks li:nth-child(4)::before { animation-delay: 1.8s; }
@keyframes i-tick { from { transform: scale(0); } to { transform: scale(1); } }
.intro-slide.in p.pop { animation-delay: .5s; }
.intro-slide[data-slide="5"].in p.pop { animation-delay: 1.5s; }

/* pastillas con datos sueltos */
.i-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 16px; max-width: 340px; }
.i-pills span { padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
                font-size: 12.5px; font-weight: 700; }
.intro-slide.in .i-pills.pop { animation-delay: .8s; }
.intro-slide.in .i-pills.late { animation-delay: 1.2s; }
.sc-tabs button { width: 18px; }
.sc-tabs button.on { width: 30px; }

/* 4 · te escribe primero */
.morning { padding: 14px; }
.mo-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 15px; }
.mo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mo-list li { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px;
              background: var(--bg); border: 1px solid var(--line); opacity: 0; }
.mo-list li > span { font-size: 20px; }
.mo-list li p { flex: 1; margin: 0; font-size: 13.5px; line-height: 1.25; color: var(--ink); max-width: none; text-align: left; }
.mo-list li em { padding: 6px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand);
                 font-style: normal; font-weight: 700; font-size: 12px; white-space: nowrap; }
.mo-tip { margin-top: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); font-size: 13px;
          line-height: 1.35; color: var(--ink-2); text-align: left; opacity: 0; }
.morning.again .mo-list li { animation: sc-in .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.morning.again .mo-list li:nth-child(2) { animation-delay: .4s; } .morning.again .mo-list li:nth-child(3) { animation-delay: .8s; }
.morning.again .mo-list li:nth-child(4) { animation-delay: 1.2s; }
.morning.again .mo-tip { animation: sc-in .5s 1.8s cubic-bezier(.2, .9, .3, 1.2) both; }
.morning.again .mo-list li:first-child em { animation: mo-press .5s 3s both; }
.morning.again .mo-list li:first-child { animation: sc-in .5s both, mo-done .5s 3.1s forwards; }
.mo-list li:first-child::after { content: "✓ Enviada"; position: absolute; right: 12px; padding: 6px 10px; border-radius: 999px;
                                 background: var(--mint); color: #15213b; font-weight: 800; font-size: 12px; opacity: 0; }
.morning.again .mo-list li:first-child::after { animation: sc-in .45s 3.3s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes mo-press { 50% { transform: scale(.88); } 100% { opacity: 0; transform: scale(.88); } }
@keyframes mo-done { to { background: var(--brand-soft); } }

/* 5 · números */
.nums { padding: 16px; }
.nu-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.nu-head span { color: var(--ink-3); font-size: 12px; }
.nu-row { display: grid; grid-template-columns: 74px 1fr 66px; align-items: center; gap: 10px; margin-bottom: 11px; font-size: 13px; }
.nu-row label { color: var(--ink-2); }
.nu-row i { display: block; height: 14px; border-radius: 8px; background: var(--surface-2); position: relative; overflow: hidden; }
.nu-row i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: 8px; background: var(--mine);
                   transform-origin: left; transform: scaleX(0); }
.nu-row.red i::after { background: #e58a8a; } .nu-row.mint i::after { background: var(--mint-2); }
.nu-row b { text-align: right; font-variant-numeric: tabular-nums; opacity: 0; }
.nums.again .nu-row i::after { animation: nu-grow .9s var(--d) cubic-bezier(.2, .9, .3, 1) forwards; }
.nums.again .nu-row b { animation: sc-fade .4s calc(var(--d) + .5s) forwards; }
@keyframes nu-grow { to { transform: scaleX(1); } }
.nu-zip { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 14px;
          background: var(--brand-soft); text-align: left; opacity: 0; }
.nu-zip > span { font-size: 26px; }
.nu-zip p { margin: 0; font-weight: 700; font-size: 14px; color: var(--ink); max-width: none; line-height: 1.25; }
.nu-zip small { display: block; margin-top: 2px; font-weight: 500; font-size: 12px; color: var(--ink-2); }
.nums.again .nu-zip { animation: sc-in .55s 2s cubic-bezier(.2, .9, .3, 1.2) both; }

@media (prefers-reduced-motion: reduce) {
  .intro *, .intro *::before { animation-duration: .01s !important; animation-iteration-count: 1 !important; }
  .pop, .checks li { opacity: 1; }
}

.terms-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2, var(--ink-3)); text-align: left; margin: 0 0 8px; }
.terms-check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

.p-report { display: flex; gap: 10px; align-items: center; padding: 12px; }
.p-report select { flex: 1; min-width: 0; }
.p-report .btn-small { flex: none; text-decoration: none; }

.menu .menu-legal { font-size: 12px; font-weight: 400; color: var(--ink-2); padding-top: 6px; padding-bottom: 6px; text-align: center; }

/* Factura nueva desde el panel */
.d-customer { font-weight: 700; font-size: 18px; margin: 4px 0 12px; }
.d-add { margin-top: 18px; display: grid; gap: 10px; }
.d-qty { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.d-qty input, #d-form input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: inherit; }
.d-qty input { width: 80px; }
.d-free summary { cursor: pointer; font-size: 14px; color: var(--ink-2); padding: 6px 0; }
#d-form { display: grid; gap: 8px; margin-top: 8px; }
.d-totals { margin: 18px 0 8px; display: grid; gap: 4px; }
.d-totals div { display: flex; justify-content: space-between; }
.d-totals .big { font-size: 22px; font-weight: 800; }
.d-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.d-actions .btn-primary { flex: 1; min-width: 140px; }
.d-confirm { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; background: var(--surface-2); }
.dr-line { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.dr-line:first-child { border-top: 0; }
.dr-line .d-t { flex: 1; min-width: 0; }
.dr-line small { display: block; color: var(--ink-2); }
#d-form label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.d-tap { background: none; border: 0; color: inherit; font: inherit; text-align: left; padding: 0; cursor: pointer; }
.d-hint { font-size: 12px; opacity: .7; }
.d-del { font-size: 18px; padding: 8px 12px; }
.d-edit { display: grid; gap: 8px; width: 100%; }
.d-edit label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.d-edit input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--surface); color: inherit; }
.d-edit-btns { display: none; }
.d-missing { border: 1px solid var(--line); border-left: 4px solid #e0a030; border-radius: 12px; padding: 12px 14px; display: grid; gap: 10px; margin: 12px 0; background: var(--surface-2); }
