/* Melier CRM — estética premium negro/dorado, mobile-first */
:root {
  --bg: #0a0a0b;
  --bg2: #111113;
  --card: #161618;
  --card2: #1c1c1f;
  --gold: #c9a227;
  --gold-soft: #e6c65a;
  --gold-dim: rgba(201, 162, 39, 0.16);
  --text: #f2ede0;
  --muted: #a09a86;
  --line: #2a2a2e;
  --danger: #e5484d;
  --green: #3fb950;
  --radius: 14px;
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
.splash { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.splash-m {
  width: 84px; height: 84px; border-radius: 22px; background: #000;
  border: 2px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 44px; font-weight: bold;
}
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 11, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  display: flex; align-items: center; gap: 10px;
}
.topbar .brand {
  width: 34px; height: 34px; border-radius: 9px; background: #000;
  border: 1.5px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-weight: bold; font-size: 19px; flex: none;
}
.topbar h1 { font-size: 17px; margin: 0; letter-spacing: 0.4px; }
.topbar h1 small { display: block; font-size: 11px; color: var(--muted); font-weight: normal; letter-spacing: 1.2px; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.container { max-width: 720px; margin: 0 auto; padding: 14px 14px 24px; }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
}
.card h3 { margin: 0 0 8px; font-size: 15px; color: var(--gold-soft); }
.rowline { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.rowline:last-child { border-bottom: none; }
.rowline .t { font-weight: 600; }
.rowline .s { font-size: 13px; color: var(--muted); }
a { color: var(--gold-soft); }
.listitem {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
  color: var(--text); text-decoration: none;
}
.listitem:active { background: var(--card2); }
.listitem .t { font-weight: 700; font-size: 16px; }
.listitem .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.listitem .r { float: right; font-weight: 700; color: var(--gold-soft); }
/* Seguimientos con mensaje listo: fila con acción de un toque */
.fup-item { display: flex; align-items: center; gap: 10px; }
.fup-main { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.fup-act { flex: none; }
.fup-act .badge { margin-top: 0; }
.pnl-row .fup-btn { flex: none; }
.badge {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.6px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); margin-top: 6px; margin-right: 6px;
}
.badge.scheduled { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.badge.completed, .badge.done { color: var(--green); border-color: var(--green); }
.badge.cancelled { color: var(--danger); border-color: var(--danger); }
.badge.in_progress { color: #6cb8ff; border-color: #6cb8ff; }
.badge.en_route { color: #c99cff; border-color: #c99cff; }
/* Estados de lead (Fase 1) */
.badge.new { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.badge.contacted { color: #6cb8ff; border-color: #6cb8ff; }
.badge.quoted { color: #c99cff; border-color: #c99cff; }
.badge.following { color: #ffa94d; border-color: #ffa94d; }
.badge.won { color: var(--green); border-color: var(--green); }
.badge.lost { color: var(--danger); border-color: var(--danger); }
.badge.open { color: var(--gold-soft); border-color: var(--gold); }
.badge.care { color: #ffa94d; border-color: #ffa94d; text-transform: none; letter-spacing: 0; }
.btn {
  display: inline-block; border: 1px solid var(--gold); background: var(--gold);
  color: #111; font-weight: 700; font-size: 16px; border-radius: 12px;
  padding: 12px 18px; text-decoration: none; text-align: center; cursor: pointer; width: 100%;
}
.btn:active { opacity: 0.85; }
.btn.ghost { background: transparent; color: var(--gold-soft); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; }
.btnrow { display: flex; gap: 10px; margin-top: 12px; }
.btnrow .btn { flex: 1; }
label.f { display: block; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
label.f input, label.f select, label.f textarea {
  display: block; width: 100%; margin-top: 5px;
  background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 12px; font-size: 16px; font-family: inherit;
}
label.f textarea { min-height: 84px; resize: vertical; }
label.f input:focus, label.f select:focus, label.f textarea:focus { outline: none; border-color: var(--gold); }
.checkrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 16px; }
.checkrow input { width: 22px; height: 22px; accent-color: var(--gold); }
.searchbar {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 12px 14px; font-size: 16px; margin-bottom: 12px;
}
.searchbar:focus { outline: none; border-color: var(--gold); }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(14, 14, 16, 0.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none; font-size: 11px; gap: 3px; font-weight: 600;
}
.bottomnav a .ic { font-size: 20px; }
.bottomnav a.active { color: var(--gold-soft); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.kpi .v { font-size: 22px; font-weight: 800; color: var(--gold-soft); }
.kpi .l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }
.secttl { font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); margin: 18px 2px 10px; }
.login-wrap { max-width: 420px; margin: 8vh auto 0; padding: 0 18px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px 22px; text-align: center; }
.login-card .logo {
  width: 76px; height: 76px; border-radius: 20px; background: #000; margin: 0 auto 12px;
  border: 2px solid var(--gold); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: Georgia, serif; font-size: 40px; font-weight: bold;
}
.login-card img.logo-img { object-fit: cover; background: none; border: none; display: block; }
.g-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 14px 0 4px; }
.g-divider::before, .g-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.gbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 12px; margin-top: 10px; border-radius: 10px; border: 1px solid #dadce0;
  background: #fff; color: #1f1f1f; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; box-sizing: border-box;
}
.gbtn .g-ico { width: 20px; height: 20px; flex: none; }
button.gbtn:disabled { opacity: .6; cursor: default; }
.login-card h2 { margin: 0 0 4px; font-size: 20px; }
.login-card p { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button {
  flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--muted); font-size: 14px; font-weight: 700; cursor: pointer;
}
.tabs button.on { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.login-card label.f { text-align: left; }
.error { color: var(--danger); font-size: 14px; margin: 8px 0; min-height: 20px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 12px; }
.pinpad button {
  padding: 16px 0; font-size: 22px; border-radius: 12px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); color: var(--text); font-weight: 700;
}
.pinpad button:active { background: var(--card2); border-color: var(--gold); }
.pindots { font-size: 30px; letter-spacing: 12px; color: var(--gold-soft); min-height: 44px; }
table.rep { width: 100%; border-collapse: collapse; font-size: 15px; }
table.rep td, table.rep th { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; }
table.rep td.n, table.rep th.n { text-align: right; }
table.rep tr.total td { font-weight: 800; color: var(--gold-soft); border-bottom: none; }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 25;
  width: 58px; height: 58px; border-radius: 50%; background: var(--gold); color: #111;
  font-size: 30px; line-height: 1; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.backlink { display: inline-block; margin-bottom: 10px; color: var(--muted); text-decoration: none; font-size: 15px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.mt { margin-top: 14px; }

/* Fotos antes/después del trabajo */
.photorow { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }

/* Tablero Kanban de leads (Fase 1): columnas con scroll horizontal en
   escritorio; en móvil se apilan como lista agrupada por estado. */
.kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { flex: 0 0 248px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.kcol-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gold-soft); margin: 2px 2px 10px; }
.kcol-n { color: var(--muted); }
.kcol .listitem { margin-bottom: 8px; }
.leadcard .t { font-size: 15px; }
/* Origen del lead como chip y línea del servicio solicitado (tal como lo
   pidió el cliente en su canal), truncada con elegancia en la tarjeta. */
.lead-chip { display: inline-block; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card2); color: var(--gold-soft); font-size: 12px; font-weight: 600; line-height: 1.7; }
.lead-req { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; color: var(--gold-soft); }
@media (max-width: 720px) {
  .kanban { flex-direction: column; overflow-x: visible; }
  .kcol { flex: 1 1 auto; width: 100%; }
}
.phototile { position: relative; width: 104px; height: 104px; border-radius: 12px; overflow: hidden; background: var(--card2); border: 1px dashed var(--line); display: flex; align-items: center; justify-content: center; font-size: 30px; color: var(--muted); cursor: pointer; }
.phototile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photoadd input { display: none; }
.photodel { position: absolute; top: 4px; right: 4px; padding: 2px 9px; font-size: 12px; }

/* Panel de métricas: variación en KPI y gráficas SVG (ligeras, sin librerías) */
.kpi .delta { font-size: 12px; font-weight: 700; margin-top: 3px; color: var(--muted); }
.kpi .delta.up { color: var(--green); }
.kpi .delta.down { color: var(--danger); }
svg.chart { width: 100%; height: auto; display: block; }
.donut-flex { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
svg.donut { width: 140px; height: 140px; flex: none; }
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dleg .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 7px; }
.src-rows { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.src-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: inherit; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.src-row:hover { border-color: var(--gold, #c9a227); }
.src-row .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.src-row-l { font-weight: 600; }
.src-row-n { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 380px) {
  .kpis { grid-template-columns: 1fr; }
}

/* ===== Panel rediseñado (tarjetas premium estilo CoaterZ, identidad Melier) =====
   Todas las clases llevan prefijo pnl- y solo se usan en la vista del Panel,
   para no contaminar el CSS del resto de secciones. */
.pnl-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.pnl-kpi {
  background: linear-gradient(160deg, var(--card2), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.pnl-ic {
  display: inline-flex; width: 34px; height: 34px; border-radius: 10px;
  background: var(--gold-dim); color: var(--gold-soft);
  align-items: center; justify-content: center;
}
.pnl-ic svg { width: 20px; height: 20px; }
.pnl-kpi-v { font-size: 24px; font-weight: 800; color: var(--text); margin-top: 9px; line-height: 1.1; }
.pnl-kpi-l { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }
.pnl-chip {
  display: inline-block; margin-top: 7px; font-size: 11.5px; font-weight: 700;
  padding: 2.5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
}
.pnl-chip.up { color: var(--green); border-color: var(--green); background: rgba(63, 185, 80, 0.12); }
.pnl-chip.down { color: var(--danger); border-color: var(--danger); background: rgba(229, 72, 77, 0.12); }
.pnl-minis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.pnl-mini { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 4px; text-align: center; }
.pnl-mini b { display: block; font-size: 16px; color: var(--gold-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-mini span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 1px; }
.pnl-mini em { display: block; font-style: normal; font-size: 10.5px; font-weight: 700; margin-top: 1px; }
.pnl-mini em.down { color: var(--danger); }
.pnl-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pnl-h h3 { margin: 0; font-size: 15px; color: var(--gold-soft); }
.pnl-h a { font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.pnl-sub { font-size: 13px; color: var(--muted); margin: -4px 0 8px; }
.pnl-sub b { color: var(--gold-soft); }
.pnl-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.pnl-day { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; min-height: 74px; }
.pnl-day.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.pnl-day-h { display: flex; flex-direction: column; align-items: center; text-decoration: none; color: var(--muted); margin-bottom: 5px; }
.pnl-day-n { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.6px; }
.pnl-day-d { font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.15; }
.pnl-day.today .pnl-day-d { color: var(--gold-soft); }
.pnl-day-e { text-align: center; color: var(--line); font-size: 11px; }
.pnl-job { display: block; text-decoration: none; border-radius: 7px; padding: 4px 5px; margin-bottom: 4px; border-left: 3px solid var(--muted); background: var(--card2); }
.pnl-job-t { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: 0.3px; color: var(--muted); }
.pnl-job-s { display: block; font-size: 9.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-job.st-scheduled { border-left-color: var(--gold); }
.pnl-job.st-scheduled .pnl-job-t { color: var(--gold-soft); }
.pnl-job.st-en_route { border-left-color: #c99cff; }
.pnl-job.st-en_route .pnl-job-t { color: #c99cff; }
.pnl-job.st-in_progress { border-left-color: #6cb8ff; }
.pnl-job.st-in_progress .pnl-job-t { color: #6cb8ff; }
.pnl-job.st-completed { border-left-color: var(--green); opacity: 0.78; }
.pnl-job.st-completed .pnl-job-t { color: var(--green); }
.pnl-duo { display: grid; grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .pnl-duo { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pnl-duo .card { margin-bottom: 12px; }
}
.pnl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pnl-row:last-child { border-bottom: none; }
.pnl-row:active { background: var(--card2); }
.pnl-row-m { min-width: 0; }
.pnl-row-t { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-row-s { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl-row-r { display: flex; align-items: center; gap: 8px; flex: none; }
.pnl-row-r .badge { margin: 0; }
.pnl-amt { font-weight: 800; color: var(--text); flex: none; }
.pnl-amt.gold { color: var(--gold-soft); }

/* ===== Calendario mensual (prefijo cal-) ===== */
.cal-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-booked { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
.cal-booked b { color: var(--gold-soft); font-size: 17px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid > * { min-width: 0; }
.cal-head div { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); padding: 4px 0; }
.cal-cell { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 5px 4px; min-height: 88px; }
.cal-cell.out { opacity: 0.38; }
.cal-cell.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.cal-d { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.cal-cell.today .cal-d { color: var(--gold-soft); }
.cal-chip { display: block; text-decoration: none; border-radius: 6px; padding: 3px 4px; margin-bottom: 3px; border-left: 3px solid var(--muted); background: var(--card2); }
.cal-t { display: block; font-size: 9px; font-weight: 800; letter-spacing: 0.2px; color: var(--muted); }
.cal-c { display: block; font-size: 9.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-s { display: block; font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.st-scheduled { border-left-color: var(--gold); }
.cal-chip.st-scheduled .cal-t { color: var(--gold-soft); }
.cal-chip.st-en_route { border-left-color: #c99cff; }
.cal-chip.st-en_route .cal-t { color: #c99cff; }
.cal-chip.st-in_progress { border-left-color: #6cb8ff; }
.cal-chip.st-in_progress .cal-t { color: #6cb8ff; }
.cal-chip.st-completed { border-left-color: var(--green); opacity: 0.78; }
.cal-chip.st-completed .cal-t { color: var(--green); }
.cal-chip.st-cancelled { border-left-color: #ff8f8f; opacity: 0.6; }
.cal-chip.st-cancelled .cal-t { color: #ff8f8f; }
.cal-more { font-size: 9.5px; font-weight: 700; color: var(--gold-soft); padding: 1px 2px; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.cal-legend .st-scheduled { color: var(--gold-soft); }
.cal-legend .st-en_route { color: #c99cff; }
.cal-legend .st-in_progress { color: #6cb8ff; }
.cal-legend .st-completed { color: var(--green); }
.cal-legend .st-cancelled { color: #ff8f8f; }
@media (max-width: 560px) {
  .cal-s { display: none; }
  .cal-cell { min-height: 76px; }
}
@media (max-width: 400px) {
  .cal-c { display: none; }
  .cal-cell { min-height: 62px; padding: 4px 3px; }
  .cal-grid { gap: 3px; }
}

/* ===== Rentabilidad por servicio (prefijo rnt-) ===== */
.rnt-scroll { overflow-x: auto; }
.rnt-table { min-width: 540px; }
.rnt-table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); }
/* Tarjeta del mes (mejora visual 2026-11-05, formato captura de referencia) */
.rnt-month-label { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.rnt-month-total { font-size: 32px; font-weight: 800; line-height: 1.15; margin: 2px 0 6px; }
.rnt-month-delta { margin-bottom: 6px; }
.rnt-delta { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.rnt-delta.up { color: var(--green); background: rgba(63, 185, 80, .14); border: 1px solid rgba(63, 185, 80, .45); }
.rnt-delta.down { color: var(--danger); background: rgba(229, 72, 77, .12); border: 1px solid rgba(229, 72, 77, .45); }
.rnt-delta.flat { color: var(--muted); background: var(--card2); border: 1px solid var(--line); }
.rnt-month-sub { font-size: 13.5px; color: var(--muted); }
/* Barras de proporción por servicio/familia */
.rnt-barwrap { height: 6px; background: var(--line); border-radius: 3px; margin-top: 5px; max-width: 280px; overflow: hidden; }
.rnt-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.rnt-bar.off { background: #55565c; opacity: .55; }
/* Fila de suscripciones/sin trabajo: visualmente aparte, sin competir */
.rnt-jobless td { color: var(--muted); }
.rnt-jobless td:first-child { font-style: italic; }

/* ===== Generado por semana (prefijo wk-) ===== */
.wk-table { min-width: 680px; }
tr.wk-now td { background: rgba(201, 162, 39, .08); }
.wk-tag { font-size: 10.5px; font-weight: 800; letter-spacing: 0.4px; text-transform: uppercase; color: #111; background: var(--gold); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; white-space: nowrap; }
.wk-d-up { color: var(--green); font-weight: 700; white-space: nowrap; }
.wk-d-down { color: var(--danger); font-weight: 700; white-space: nowrap; }
.wk-d-flat { color: var(--muted); }

/* ===== Inventario (prefijo inv-) ===== */
.inv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.inv-chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card2); }
.inv-chip.ok { color: #3ddc84; border-color: rgba(61, 220, 132, .45); background: rgba(61, 220, 132, .10); }
.inv-chip.low { color: #ff8a80; border-color: rgba(255, 90, 90, .45); background: rgba(255, 90, 90, .10); }
.inv-chip.ord { color: #6cb8ff; border-color: rgba(108, 184, 255, .45); background: rgba(108, 184, 255, .10); }
.inv-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; vertical-align: 1px; border: 1px solid var(--line); }
.inv-badge.ok { color: #3ddc84; border-color: rgba(61, 220, 132, .5); background: rgba(61, 220, 132, .10); }
.inv-badge.low { color: #ff8a80; border-color: rgba(255, 90, 90, .5); background: rgba(255, 90, 90, .10); }
.inv-badge.out { color: #fff; border-color: #d32f2f; background: #d32f2f; }
.inv-badge.ord { color: #6cb8ff; border-color: rgba(108, 184, 255, .5); background: rgba(108, 184, 255, .12); }
.inv-group { margin-bottom: 6px; }
.inv-row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.inv-row-m { min-width: 0; }
.inv-row-t { font-weight: 700; font-size: 15px; }
.inv-row-s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.inv-acts { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.inv-stepper { display: flex; align-items: center; gap: 6px; }
.inv-adj { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: 19px; line-height: 1; cursor: pointer; }
.inv-adj:active { border-color: var(--gold); color: var(--gold); }
.inv-step { width: 62px; height: 36px; text-align: center; padding: 0 4px; font-size: 14px; }
.inv-btns { display: flex; gap: 8px; align-items: center; flex: none; }
a.pnl-mini { text-decoration: none; color: var(--text); }
a.pnl-mini.alert { border-color: rgba(255, 90, 90, .55); }
a.pnl-mini.alert b { color: #ff8a80; }
/* ===== Detalle de cifras del Panel (prefijo pnl-det-): tarjetas clicables
   y hoja de detalle (bottom-sheet en móvil, modal centrado en escritorio) */
.pnl-det-open { cursor: pointer; position: relative; }
.pnl-det-open::after { content: "›"; position: absolute; top: 3px; right: 7px; font-size: 14px; font-weight: 800; line-height: 1; color: var(--gold); opacity: 0.65; }
.pnl-kpi.pnl-det-open::after { top: 10px; right: 13px; font-size: 19px; }
.pnl-det-open:active { border-color: var(--gold); }
@media (hover: hover) { .pnl-det-open:hover { border-color: var(--gold); } }
.pnl-mini.alert { border-color: rgba(255, 90, 90, .55); }
.pnl-mini.alert b { color: #ff8a80; }
.pnl-mini.gold { border-color: rgba(201, 162, 39, .55); }
.pnl-det-ovl { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .62); display: flex; align-items: flex-end; justify-content: center; }
.pnl-det-sheet { background: var(--card); border: 1px solid var(--line); border-bottom: none; border-radius: 18px 18px 0 0; width: 100%; max-height: 92vh; overflow-y: auto; padding: 0 16px calc(18px + env(safe-area-inset-bottom)); }
.pnl-det-h { position: sticky; top: 0; background: var(--card); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0 10px; z-index: 2; }
.pnl-det-h h3 { margin: 0; font-size: 17px; color: var(--gold-soft); }
.pnl-det-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--card2); color: var(--text); font-size: 15px; cursor: pointer; flex: none; }
.pnl-det-big { font-size: 32px; font-weight: 800; color: var(--gold-soft); line-height: 1.1; }
.pnl-det-explain { color: var(--muted); font-size: 14px; margin: 8px 0 4px; }
.pnl-det-sub { font-size: 13.5px; color: var(--muted); margin: 2px 0 6px; }
.pnl-det-sub b { color: var(--gold-soft); }
.pnl-det-list { margin-top: 6px; }
.pnl-det-empty { text-align: center; color: var(--muted); padding: 22px 0 10px; font-size: 15px; }
.pnl-det-tag { flex: none; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); }
.pnl-det-tag.down { color: #ff8a80; border-color: rgba(255, 90, 90, .55); background: rgba(229, 72, 77, .12); }
.pnl-det-all { display: block; text-align: center; margin-top: 14px; text-decoration: none; }
@media (min-width: 720px) {
  .pnl-det-ovl { align-items: center; padding: 24px; }
  .pnl-det-sheet { max-width: 560px; border-bottom: 1px solid var(--line); border-radius: 18px; max-height: 86vh; }
}
/* ===== Pago rápido en efectivo (prefijo cash-): hoja sobre la carcasa
   pnl-det- con montos grandes para usar con una mano en el teléfono */
.cash-f { display: block; margin-top: 14px; font-size: 13px; color: var(--muted); }
.cash-f input { width: 100%; margin-top: 6px; padding: 12px; font-size: 18px; border-radius: 10px; border: 1px solid var(--line); background: var(--card2); color: var(--text); box-sizing: border-box; }
.cash-f input:focus { outline: none; border-color: var(--gold); }
.cash-total { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; font-size: 15px; }
.cash-total b { font-size: 23px; color: var(--gold-soft); white-space: nowrap; }
.cash-note { font-size: 13px; color: var(--muted); margin-top: 12px; line-height: 1.45; }
.cash-err { color: #ff8a80; font-size: 13.5px; min-height: 18px; margin-top: 10px; }
.cash-toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 95; background: var(--card2); border: 1px solid var(--gold); color: var(--text); padding: 12px 18px; border-radius: 999px; font-size: 14.5px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); max-width: 92vw; text-align: center; }
@media (max-width: 560px) {
  .inv-row { flex-wrap: wrap; }
  .inv-acts { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}
@media (min-width: 1024px) {
  .inv-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
  .inv-group { min-width: 0; margin-bottom: 0; }
}

/* ===== Escritorio (≥1024px): aprovechar el ancho del monitor =====
   Por debajo de este breakpoint el layout queda EXACTAMENTE como el móvil. */
@media (min-width: 1024px) {
  .container { max-width: 1600px; padding: 20px 28px 36px; }
  /* Panel: rejilla real de 12 columnas */
  .pnl { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; align-items: start; }
  .pnl > * { min-width: 0; }
  .pnl > .card { margin-bottom: 0; }
  .pnl-kpis { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); margin-bottom: 0; }
  .pnl-minis { grid-column: 1 / -1; grid-template-columns: repeat(6, 1fr); margin-bottom: 0; }
  .pnl > .card:nth-child(3) { grid-column: 1 / -1; }   /* tira semanal a lo ancho */
  .pnl > .card:nth-child(4) { grid-column: span 5; }  /* tendencia */
  .pnl > .pnl-duo { grid-column: span 7; }            /* donas lado a lado */
  .pnl-duo .card { margin-bottom: 0; }
  .pnl > .card:nth-child(6) { grid-column: 1 / -1; }   /* chips de leads */
  .pnl > .card:nth-child(7) { grid-column: span 6; }  /* trabajos recientes */
  .pnl > .card:nth-child(8) { grid-column: span 6; }  /* últimos cobros */
  .pnl > .secttl { grid-column: 1 / -1; margin-top: 6px; }
  .pnl > a.listitem, .pnl > .empty { grid-column: span 4; }
  /* Listas (trabajos, clientes, pagos, equipo, más): rejilla de tarjetas */
  .container:has(> a.listitem) { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
  .container:has(> a.listitem) > :not(a.listitem) { grid-column: 1 / -1; }
  .container:has(> a.listitem) > a.listitem { margin-bottom: 0; }
  /* Calendario: celdas anchas */
  .cal-cell { min-height: 138px; padding: 8px 7px; }
  .cal-t { font-size: 10.5px; }
  .cal-c { font-size: 12px; }
  .cal-s { font-size: 11px; }
  .cal-d { font-size: 15px; }
  /* Rentabilidad: tabla al ancho completo */
  .rnt-table { min-width: 0; width: 100%; }
}
@media (min-width: 1500px) {
  .container:has(> a.listitem) { grid-template-columns: 1fr 1fr 1fr; }
  .pnl > a.listitem, .pnl > .empty { grid-column: span 4; }
}

/* ===== Cotizador con switches (prefijo qtz-) ===== */
.qtz { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: start; }
.qtz-col { display: grid; gap: 12px; min-width: 0; }
.qtz h3 { margin: 0 0 10px; font-size: 16px; }
.qtz-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; margin-top: 4px; }
.qtz-card { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center;
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px;
  color: var(--ink); cursor: pointer; font: inherit; }
.qtz-card:active { transform: scale(.98); }
.qtz-card.on { border-color: var(--gold); background: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold) inset; }
.qtz-card-t { font-size: 12px; color: var(--muted); line-height: 1.25; }
.qtz-card.on .qtz-card-t { color: var(--gold-soft); }
.qtz-card-p { font-size: 19px; font-weight: 800; color: var(--gold-soft); }
.qtz-card-s { font-size: 12px; color: var(--muted); }
.qtz-addon { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.qtz-addon:last-child { border-bottom: 0; }
.qtz-addon-m { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.qtz-addon-t { font-size: 15px; font-weight: 600; }
.qtz-addon-s { font-size: 12.5px; color: var(--muted); }
.qtz-sw { position: relative; width: 52px; height: 30px; flex: none; display: inline-block; }
.qtz-sw input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.qtz-tr { position: absolute; inset: 0; background: #2c2c30; border: 1px solid var(--line); border-radius: 999px; transition: background .15s ease, border-color .15s ease; pointer-events: none; }
.qtz-tr::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #8a8574; transition: transform .15s ease, background .15s ease; }
.qtz-sw input:checked ~ .qtz-tr { background: var(--gold); border-color: var(--gold); }
.qtz-sw input:checked ~ .qtz-tr::after { transform: translateX(22px); background: #141414; }
.qtz-sw input:focus-visible ~ .qtz-tr { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.qtz-grades { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 12px; border-bottom: 1px solid var(--line); }
.qtz-grade { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: 1; min-width: 88px;
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 9px 6px;
  color: var(--ink); cursor: pointer; font: inherit; font-size: 13.5px; }
.qtz-grade b { color: var(--gold-soft); font-size: 15px; }
.qtz-grade.on { border-color: var(--gold); background: var(--gold-dim); box-shadow: 0 0 0 1px var(--gold) inset; }
.qtz-sum { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 6px); z-index: 15;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .45); }
.qtz-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.qtz-line b { color: var(--ink); white-space: nowrap; }
.qtz-tot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 10px 0 2px; font-size: 16px; font-weight: 700; }
.qtz-tot b { font-size: 26px; color: var(--gold-soft); }
.qtz-time { font-size: 14px; color: var(--muted); padding-top: 4px; }
.qtz-time b { color: var(--ink); }
@media (min-width: 1024px) {
  .qtz { grid-template-columns: minmax(0, 1fr) 340px; }
  .qtz-sum { top: 84px; bottom: auto; box-shadow: none; }
}

/* ===== Tablero de trabajos (prefijo brd-) — Fase 2 =====
   Columnas por estado con scroll horizontal (mismo patrón que el Kanban de
   leads); en móvil se apilan en vertical. Sin drag-and-drop: botones de
   avance, fiables en iPhone. */
.brd-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.brd-bar .btn { flex: none; }
.brd-date { flex: 1; min-width: 140px; text-align: center; font-weight: 700; font-size: 15px; text-transform: capitalize; }
.brd-hoy { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: #111; background: var(--gold); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.brd-attbar { background: rgba(229, 72, 77, 0.12); border: 1px solid rgba(229, 72, 77, 0.5); color: #ff8a80; font-weight: 700; font-size: 14px; border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; }
.brd-cols { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.brd-col { flex: 0 0 252px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.brd-col-h { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 2px 2px 10px; }
.brd-col-n { color: var(--muted); font-weight: 400; }
.brd-col.c-scheduled .brd-col-h { color: var(--gold-soft); }
.brd-col.c-en_route .brd-col-h { color: #c99cff; }
.brd-col.c-in_progress .brd-col-h { color: #6cb8ff; }
.brd-col.c-pending .brd-col-h { color: #ffa94d; }
.brd-col.c-completed .brd-col-h { color: var(--green); }
.brd-col.c-cancelled .brd-col-h { color: #ff8f8f; }
.brd-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; margin-bottom: 8px; }
.brd-card.dim { opacity: 0.55; }
.brd-card-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.brd-time { font-weight: 800; color: var(--gold-soft); font-size: 15px; }
.brd-amt { font-weight: 700; color: var(--text); font-size: 14px; }
.brd-client { display: block; font-weight: 700; font-size: 15.5px; color: var(--text); text-decoration: none; margin-top: 2px; }
.brd-client:active { color: var(--gold-soft); }
.brd-svc { font-size: 13px; color: var(--muted); margin-top: 1px; }
.brd-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brd-att { margin-top: 7px; font-size: 12px; font-weight: 700; color: #ff8a80; background: rgba(229, 72, 77, 0.12); border: 1px solid rgba(229, 72, 77, 0.45); border-radius: 8px; padding: 4px 8px; }
.brd-card .btn { margin-top: 9px; padding: 9px 12px; font-size: 14px; }
.brd-note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.brd-empty { text-align: center; color: var(--line); padding: 12px 0; }
.brd-foot { font-size: 12px; color: var(--muted); margin: 4px 2px 0; }
@media (max-width: 720px) {
  .brd-cols { flex-direction: column; overflow-x: visible; }
  .brd-col { flex: 1 1 auto; width: 100%; }
}
@media (min-width: 1500px) {
  .brd-cols { display: grid; grid-template-columns: repeat(6, 1fr); overflow-x: visible; }
  .brd-col { flex: none; min-width: 0; }
}

/* ===== Reloj de técnicos (prefijo clk-) =====
   Tarjeta de fichaje en la vista principal del técnico, vista «Equipo y
   horas» del dueño y formulario de corrección de turnos. */
.clk-card { border-color: var(--gold); }
.clk-state { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.clk-state-m { min-width: 0; }
.clk-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.18); }
.clk-dot.off { background: var(--muted); box-shadow: none; }
.clk-dot.sm { width: 9px; height: 9px; box-shadow: 0 0 0 3px rgba(63, 185, 80, 0.16); display: inline-block; margin-right: 6px; vertical-align: 1px; }
.clk-big { font-size: 19px; font-weight: 800; }
.clk-sub { font-size: 13.5px; color: var(--muted); margin-top: 1px; }
.clk-today { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.clk-today-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 4px; }
.clk-today-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.clk-today-row b { color: var(--gold-soft); }
.clk-onrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.clk-onrow:last-child { border-bottom: none; }
.clk-onrow-m { min-width: 0; }
.clk-onrow-t { font-weight: 700; font-size: 15.5px; }
.clk-onrow-s { font-size: 13px; color: var(--muted); }
.clk-mrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.clk-mrow:last-child { border-bottom: none; }
.clk-mrow-m { min-width: 0; }
.clk-mrow-t { font-weight: 700; font-size: 15.5px; }
.clk-mrow-s { font-size: 13px; color: var(--muted); margin-top: 1px; }
.clk-mrow-h { font-weight: 800; color: var(--gold-soft); font-size: 16px; flex: none; text-align: right; }
.clk-role { font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: var(--gold-soft); border: 1px solid var(--gold); background: var(--gold-dim); border-radius: 999px; padding: 2px 8px; vertical-align: 2px; }
.clk-erow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.clk-erow:last-child { border-bottom: none; }
.clk-erow-m { min-width: 0; }
.clk-erow-t { font-weight: 600; font-size: 14.5px; }
.clk-erow-s { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.clk-erow .btn { flex: none; }
.clk-live { font-size: 10.5px; font-weight: 800; letter-spacing: 0.6px; color: var(--green); border: 1px solid var(--green); border-radius: 999px; padding: 2px 7px; vertical-align: 2px; }

/* ===== Membresías (prefijo mbr-) =====
   Tarjetas de planes mensuales: estado del pago del mes y servicios
   usados (cubiertos a $0 y cobrados aparte), vista y formulario. */
.mbr-card.off { opacity: 0.62; }
.mbr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mbr-head .btn { flex: none; }
.mbr-head-m { min-width: 0; }
.mbr-name { font-size: 17px; font-weight: 800; }
.mbr-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mbr-sub b { color: var(--gold-soft); }
.mbr-payrow { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.mbr-chip { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); color: var(--muted); }
.mbr-chip.paid { color: var(--green); border-color: var(--green); background: rgba(63, 185, 80, 0.10); }
.mbr-chip.due { color: var(--danger); border-color: var(--danger); background: rgba(229, 72, 77, 0.10); }
.mbr-chip.off { color: var(--muted); }
.mbr-used { font-size: 14px; font-weight: 700; color: var(--gold-soft); }
.mbr-jobs { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.mbr-jobs-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin-bottom: 4px; }
.mbr-job { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 4px 0; }
.mbr-job b { color: var(--gold-soft); flex: none; }
.mbr-job-tag { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--green); }
.mbr-none { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.mbr-alert { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--danger); }

/* ===== Mantenimiento (prefijo mnt-) =====
   Equipos del negocio y sus tareas: sección de vencidas/próximas y
   tarjetas por equipo con última/próxima fecha y acción «Hecho hoy». */
.mnt-card.off { opacity: 0.62; }
.mnt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mnt-head .btn { flex: none; }
.mnt-head-m { min-width: 0; }
.mnt-name { font-size: 17px; font-weight: 800; }
.mnt-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.mnt-none { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.mnt-alert { margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--danger); }
.mnt-duecard { border-color: rgba(229, 72, 77, 0.45); }
.mnt-task { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.mnt-task:first-of-type { border-top: none; }
.mnt-task-m { min-width: 0; }
.mnt-task-t { font-size: 15px; font-weight: 700; }
.mnt-task-eq { color: var(--muted); font-weight: 600; }
.mnt-task-s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.mnt-task-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.mnt-task-btns { display: flex; gap: 6px; }
.mnt-chip { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; border-radius: 999px; padding: 3px 10px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.mnt-chip.over { color: var(--danger); border-color: var(--danger); background: rgba(229, 72, 77, 0.10); }
.mnt-chip.soon { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.mnt-chip.ok { color: var(--green); border-color: var(--green); background: rgba(63, 185, 80, 0.10); }
.mnt-chip.none { color: var(--muted); }

/* ===== Áreas de la app: CRM | Growth (solo dueño/co-dueña) ===== */
.areatabs { max-width: 720px; margin: 0 auto; padding: 12px 14px 0; display: flex; gap: 8px; }
.areatabs a {
  flex: 1; text-align: center; padding: 9px 0; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); text-decoration: none;
  font-weight: 700; font-size: 14.5px; background: var(--bg2);
}
.areatabs a.on { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }

/* ===== Growth Hub — Planificador Social (prefijo gw-) ===== */
.gw-banner p { margin: 6px 0; font-size: 14px; color: var(--text); }
.gw-banner .gw-accs { font-size: 12.5px; color: var(--muted); }
.gw-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.gw-count {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; color: var(--muted);
}
.gw-count b { color: var(--gold-soft); }
.gw-range { font-size: 14px; font-weight: 700; color: var(--gold-soft); margin: 2px 2px 10px; text-transform: capitalize; }
.gw-chip {
  display: block; text-decoration: none; border-radius: 6px; padding: 3px 4px;
  margin-bottom: 3px; border-left: 3px solid var(--muted); background: var(--card2);
  font-size: 9.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gw-chip .gw-t { font-size: 9px; font-weight: 800; color: var(--muted); }
.gw-chip.mk-pending_approval { border-left-color: var(--gold); }
.gw-chip.mk-pending_approval .gw-t { color: var(--gold-soft); }
.gw-chip.mk-approved { border-left-color: var(--green); }
.gw-chip.mk-approved .gw-t { color: var(--green); }
.badge.mk-draft { color: var(--muted); }
.badge.mk-pending_approval { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.badge.mk-approved { color: var(--green); border-color: var(--green); }
.gw-day.today { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.gw-row {
  display: flex; align-items: center; gap: 8px; padding: 9px 2px;
  border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.gw-row:last-child { border-bottom: none; }
.gw-row .gw-t { font-weight: 800; font-size: 13px; color: var(--gold-soft); white-space: nowrap; }
.gw-row-main { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.gw-empty { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.gw-nets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.gw-net {
  display: flex; align-items: center; gap: 9px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  font-size: 15px; color: var(--text); cursor: pointer;
}
.gw-net input { width: 22px; height: 22px; accent-color: var(--gold); flex: none; }
.gw-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.gw-media { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.gw-mitem {
  display: flex; align-items: center; gap: 10px; background: var(--card2);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px;
}
.gw-mitem img, .gw-mitem video {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex: none; background: #000;
}
.gw-mitem.staged { border-style: dashed; }
.gw-minfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gw-minfo b { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-minfo span { font-size: 12px; color: var(--muted); }
.gw-mx {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font-size: 15px; cursor: pointer;
}
.gw-up { margin-top: 10px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.gw-upbar { flex: 1; height: 8px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); overflow: hidden; }
.gw-upbar i { display: block; height: 100%; width: 0%; background: var(--gold); transition: width .15s ease; }
/* ===== Growth Hub — Bandeja Unificada (prefijo gwi-) ===== */
.gw-subnav { display: flex; gap: 8px; margin-bottom: 12px; }
.gw-subnav a {
  flex: 1; text-align: center; padding: 9px 10px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--muted); text-decoration: none;
  font-weight: 700; font-size: 14.5px; background: var(--bg2);
}
.gw-subnav a.on { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.gwi-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.gwi-fchip {
  padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer;
}
.gwi-fchip.on { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.gwi-fchip .gwi-un { color: var(--gold-soft); }
.gwi-search { display: flex; gap: 8px; margin-bottom: 12px; }
.gwi-search input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 15px;
}
.gwi-row {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  margin-bottom: 8px; color: var(--text); text-decoration: none;
}
.gwi-row.unread { border-color: var(--gold); }
.gwi-ava {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 20px; background: var(--card2);
  border: 2px solid var(--muted);
}
.gwi-ava.ch-instagram { border-color: #e1306c; }
.gwi-ava.ch-messenger { border-color: #0084ff; }
.gwi-ava.ch-whatsapp { border-color: #25d366; }
.gwi-ava.ch-tiktok { border-color: #69c9d0; }
.gwi-ava.ch-sms { border-color: var(--green); }
.gwi-ava.ch-web { border-color: var(--gold); }
.gwi-ava.ch-facebook { border-color: #1877f2; }
.gwi-ava.ch-google_review { border-color: #fbbc05; }
.gwi-main { flex: 1; min-width: 0; }
.gwi-top { display: flex; align-items: baseline; gap: 8px; }
.gwi-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gwi-when { margin-left: auto; flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.gwi-prev { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.gwi-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.gwi-chan { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.gwi-chan.ch-instagram { color: #f06ba8; border-color: #e1306c; }
.gwi-chan.ch-messenger { color: #5eb2ff; border-color: #0084ff; }
.gwi-chan.ch-whatsapp { color: #4be07f; border-color: #25d366; }
.gwi-chan.ch-tiktok { color: #8adbe2; border-color: #69c9d0; }
.gwi-chan.ch-sms { color: var(--green); border-color: var(--green); }
.gwi-chan.ch-web { color: var(--gold-soft); border-color: var(--gold); }
.gwi-chan.ch-facebook { color: #6ea8ff; border-color: #1877f2; }
.gwi-chan.ch-google_review { color: #ffd34d; border-color: #fbbc05; }
.badge.gwi-st-open { color: var(--gold-soft); border-color: var(--gold); background: var(--gold-dim); }
.badge.gwi-st-answered { color: var(--green); border-color: var(--green); }
.badge.gwi-st-closed { color: var(--muted); }
.gwi-unb {
  flex: none; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: var(--gold); color: #111; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.gwi-thread { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.gwi-msg { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.4; }
.gwi-msg .gwi-mmeta { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.gwi-msg.in { align-self: flex-start; background: var(--card2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.gwi-msg.out { align-self: flex-end; background: var(--gold-dim); border: 1px solid var(--gold); border-bottom-right-radius: 4px; }
.gwi-msg.out.draft { border-style: dashed; background: var(--card2); }
.gwi-msg.out.failed { border-color: #e5534b; }
.gwi-msg .gwi-tag { font-weight: 800; }
.gwi-tag.draft { color: var(--gold-soft); }
.gwi-tag.failed { color: #ff8a80; }
.gwi-tag.queued { color: var(--gold-soft); }
.gwi-reply textarea {
  width: 100%; min-height: 84px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 15px;
}
.gwi-note { font-size: 12.5px; border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.gwi-note.warn { color: var(--gold-soft); background: var(--gold-dim); border: 1px solid var(--gold); }
.gwi-note.ok { color: var(--green); border: 1px solid var(--green); }
.gwi-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gwi-actions select {
  padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--text); font-size: 14px;
}
div.f { display: block; margin-bottom: 12px; font-size: 14px; color: var(--muted); }
@media (max-width: 400px) {
  .gw-chip { font-size: 8.5px; }
  .gw-nets { grid-template-columns: 1fr; }
}

/* Notificaciones del sitio web (migración 024): campana solo dueño/co-dueña */
.bellbtn {
  position: relative; background: none; border: none; cursor: pointer;
  font-size: 20px; line-height: 1; padding: 4px 6px; flex: none;
}
.bellbadge {
  position: absolute; top: -2px; right: -3px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.bellpanel {
  position: fixed; top: 64px; right: 10px; z-index: 200;
  width: 340px; max-width: calc(100vw - 20px);
  max-height: 70vh; overflow-y: auto;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.bellitem { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bellitem:last-child { border-bottom: none; }
.bellitem.unread { background: var(--gold-dim); }
.bellitem.clickable { cursor: pointer; }
.bellitem.clickable:active { background: var(--line); }
.bellchev { align-self: center; font-size: 20px; opacity: .55; padding-left: 2px; }
.bellic { font-size: 18px; line-height: 1.25; flex: none; }
.belltx { flex: 1; min-width: 0; }
.bellt { font-size: 13.5px; font-weight: 600; }
.bellb { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow-wrap: break-word; }
.bellwhen { font-size: 11px; color: var(--muted); margin-top: 3px; }
.bellempty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.bellpush { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.bellpush .btn { width: 100%; }

/* Filtro por departamento en Servicios (instancias multi-rubro) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chips a { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.chips a.on { color: var(--gold, #c5a359); border-color: var(--gold, #c5a359); font-weight: 600; }
