
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  html, body { overscroll-behavior-y: contain; }

  :root {
    /* Tema CLARO inspirado en la app de reparto */
    --bg: #f6f8fc;              /* Fondo general muy claro */
    --bg-elev: #ffffff;
    --bg-card: #ffffff;
    --bg-card-2: #f0f3f8;
    --border: #e1e6ee;
    --border-soft: #edf0f5;
    --text: #1a2332;            /* Texto oscuro principal */
    --text-dim: #5a6678;
    --text-muted: #8c97a8;

    /* Colores institucionales Summo */
    --accent: #e85820;          /* Naranja Summo */
    --accent-2: #ff7338;
    --accent-dark: #c2491a;
    --accent-bg: rgba(232, 88, 32, 0.10);

    --blue: #2e62b8;            /* Azul Summo más profundo (como botón Nueva Hoja) */
    --blue-2: #4a90c2;
    --blue-bg: rgba(46, 98, 184, 0.08);
    --blue-dark: #1e4d96;

    /* Semáforo */
    --green: #1ea547;
    --green-bg: rgba(30, 165, 71, 0.10);
    --yellow: #d49327;
    --yellow-bg: rgba(212, 147, 39, 0.12);
    --red: #d63838;
    --red-bg: rgba(214, 56, 56, 0.10);

    --purple: #6f4dc2;
    --purple-bg: rgba(111, 77, 194, 0.08);
  }

  body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .display { font-family: 'Bricolage Grotesque', sans-serif; letter-spacing: -0.02em; }

  /* === LOGIN === */
  .login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    animation: fadeIn 0.4s ease-out;
    background: var(--bg);
  }
  .login-logo {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-weight: 800;
    font-size: 56px;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--accent) 0%, #ff8c42 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
  }
  .login-logo-img {
    width: 240px;
    max-width: 75%;
    height: auto;
    margin-bottom: 20px;
  }
  .login-sub {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 40px;
    letter-spacing: 0.18em;
    font-weight: 700;
  }
  .login-label {
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    font-weight: 700;
  }
  .vendor-input {
    width: 100%;
    max-width: 320px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.15em;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(26, 35, 50, 0.04);
  }
  input[type="password"].vendor-input {
    letter-spacing: 0.3em;
  }
  .vendor-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(232, 88, 32, 0.12);
  }
  .login-btn {
    margin-top: 24px;
    width: 100%;
    max-width: 320px;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    border: none;
    border-radius: 16px;
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.02em;
    box-shadow: 0 6px 16px rgba(232, 88, 32, 0.25);
  }
  .login-btn:hover { background: linear-gradient(135deg, var(--accent-2) 0%, var(--accent) 100%); }
  .login-btn:active { transform: translateY(1px); }
  .login-btn:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

  /* === APP STRUCTURE === */
  .app { display: none; padding-bottom: 80px; max-width: 720px; margin: 0 auto; }
  .app.active { display: block; animation: fadeIn 0.3s ease-out; }

  /* === HEADER === */
  .header {
    padding: 8px 16px 7px;   /* compacto (José, 2026-09-15) */
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
  }
  .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .header-logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
  }
  .header-greeting {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 0;
  }
  .header-vendor {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
  }
  #lastUpdate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 9.5px !important; }
  .header-actions { display: flex; gap: 8px; }
  .icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }
  .icon-btn:hover { background: var(--bg-card-2); color: var(--accent); border-color: var(--accent); }

  /* === BOTTOM NAV === */
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 720px;
    display: flex;
    justify-content: space-around;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-soft);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 200;
    box-shadow: 0 -4px 16px rgba(26, 35, 50, 0.04);
  }
  .nav-item {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    padding: 8px 4px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    transition: color 0.2s;
  }
  .nav-item.active { color: var(--accent); }
  .nav-icon { font-size: 20px; }

  /* === SECTIONS === */
  .view { display: none; animation: fadeIn 0.25s ease-out; }
  .view.active { display: block; }

  /* === HOME: HERO === */
  .hero {
    margin: 18px 20px 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 16px 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
  }
  .hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(232, 88, 32, 0.10) 0%, transparent 70%);
    pointer-events: none;
  }
  .hero-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .hero-period {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 14px;
    text-transform: capitalize;
  }
  /* Resumen general compacto (2026-09-15): cabecera en dos columnas, KPIs con su objetivo
     adentro, una sola barra y un pie de una línea. */
  .hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
  .hero-top .hero-period { margin-bottom: 0; }
  .hero-upd { font-size: 10px; color: var(--text-muted); font-weight: 600; text-align: right; line-height: 1.35; white-space: nowrap; }
  .hero-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
  }
  .kpi {
    background: var(--bg-card-2);
    border-radius: 12px;
    padding: 8px 6px 7px;
    text-align: center;
    border: 1px solid var(--border-soft);
    min-width: 0;
  }
  .kpi-top { display: flex; align-items: center; justify-content: center; gap: 5px; }
  .kpi-line { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
  .kpi-obj { font-size: 10px; color: var(--text-dim); font-weight: 600; white-space: nowrap; }
  .hero-bar { margin-top: 12px; }
  .hero-foot { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
  .hero-foot b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--text); }
  .hero-devol { color: var(--red); background: var(--red-bg); padding: 1px 8px; border-radius: 6px; font-weight: 700; }
  .kpi-icon { font-size: 15px; }
  .kpi-value {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 16.5px;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
    margin-bottom: 2px;
  }
  .kpi-pct {
    font-size: 11px;
    font-weight: 700;
    margin-top: 0;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
  }
  .kpi-pct.green { color: var(--green); background: var(--green-bg); }
  .kpi-pct.yellow { color: var(--yellow); background: var(--yellow-bg); }
  .kpi-pct.red { color: var(--red); background: var(--red-bg); }
  .kpi-label {
    font-size: 9.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 3px;
    font-weight: 600;
  }
  .kpi-sub {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
  }

  /* === BIG NUMBER (Plata Total) === */
  .big-progress {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
  }
  .big-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
  }
  .big-progress-label .lbl {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
  }
  .big-progress-label .pct {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 28px;
    font-weight: 800;
  }
  .big-progress-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 10px;
  }
  .big-progress-values strong { color: var(--text); font-weight: 700; }
  .progress {
    height: 8px;
    background: var(--bg-card-2);
    border-radius: 6px;
    overflow: hidden;
  }
  .progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .progress-fill.green { background: linear-gradient(90deg, var(--green), #22c55e); }
  .progress-fill.yellow { background: linear-gradient(90deg, var(--yellow), #f59e0b); }
  .progress-fill.red { background: linear-gradient(90deg, var(--red), #ef4444); }

  /* === VENTA POR PLATAFORMA (módulo discreto del Inicio) === */
  .platform-card {
    margin: 12px 20px 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.03);
  }
  .platform-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 11px;
  }
  .platform-title {
    font-size: 12px; font-weight: 800; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.05em;
  }
  .platform-sub {
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.03em;
  }
  .plat-row { margin-bottom: 9px; }
  .plat-row:last-of-type { margin-bottom: 0; }
  .plat-row-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 4px;
  }
  .plat-name {
    font-size: 12.5px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 6px;
  }
  .plat-ico { font-size: 13px; }
  .plat-vals { display: flex; align-items: baseline; gap: 10px; }
  .plat-monto { font-size: 12.5px; font-weight: 700; color: var(--text-dim); }
  .plat-pct {
    font-size: 13px; font-weight: 800; color: var(--text);
    min-width: 52px; text-align: right;
    font-family: 'Bricolage Grotesque', sans-serif;
  }
  .plat-bar { height: 6px; background: var(--bg-card-2); border-radius: 4px; overflow: hidden; }
  .plat-bar-fill {
    height: 100%; border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .plat-bar-fill.plat-ca { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
  .plat-bar-fill.plat-vd { background: linear-gradient(90deg, var(--blue), var(--blue-2)); }
  .plat-bar-fill.plat-ax { background: linear-gradient(90deg, var(--purple), #8b6fd6); }
  .plat-pend {
    margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--border);
    font-size: 11px; color: var(--text-muted); font-weight: 600; line-height: 1.35;
  }
  .plat-pend strong { color: var(--text-dim); font-weight: 800; }

  /* === AI INSIGHTS === */
  .ai-card {
    margin: 18px 20px 0;
    background: var(--bg-card-2);   /* un poco más gris que las tarjetas blancas (José, 2026-09-15) */
    border: 1px solid var(--border);
    border-left: 4px solid var(--blue);
    border-radius: 16px;
    padding: 18px;
    position: relative;
    box-shadow: 0 2px 8px rgba(26, 35, 50, 0.04);
  }
  .ai-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }
  .ai-badge {
    background: var(--blue-bg);
    color: var(--blue);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
  }
  .ai-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    font-weight: 700;
    flex: 1;
  }
  .ai-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
  }
  .ai-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
  }
  .ai-content ol, .ai-content ul {
    padding-left: 18px;
    margin: 8px 0;
  }
  .ai-content li { margin-bottom: 6px; }
  .ai-content strong { color: var(--accent); font-weight: 700; }

  /* Planificador IA: secciones con semáforo (rojo/amarillo/verde) + emojis */
  .plan { display: flex; flex-direction: column; }
  /* Aire + divisor entre secciones para que no quede todo pegado */
  .plan-sec + .plan-sec { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); }
  .plan-sec-head {
    font-size: 12px; font-weight: 800; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: .03em;
    margin-bottom: 7px; display: flex; align-items: center; gap: 6px;
  }
  /* "Objetivos = N" al lado del título de cada sección del plan (José, 2026-09-25). */
  .plan-obj {
    margin-left: auto; font-size: 10px; font-weight: 800; color: var(--text-dim);
    background: var(--bg-card-2); border-radius: 999px; padding: 2px 8px;
    white-space: nowrap; text-transform: none; letter-spacing: 0;
  }
  .plan-total { margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-align: center; }
  .plan-total b { color: var(--text-dim); }
  .plan-item {
    display: flex; gap: 9px; padding: 8px 11px; border-radius: 10px;
    margin-bottom: 6px; background: var(--bg-card-2); border-left: 3px solid var(--border);
  }
  .plan-item:last-child { margin-bottom: 0; }
  .plan-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; background: var(--text-muted); }
  .plan-item.estado-rojo { background: var(--red-bg); border-left-color: var(--red); }
  .plan-item.estado-rojo .plan-dot { background: var(--red); }
  .plan-item.estado-amarillo { background: var(--yellow-bg); border-left-color: var(--yellow); }
  .plan-item.estado-amarillo .plan-dot { background: var(--yellow); }
  .plan-item.estado-verde { background: var(--green-bg); border-left-color: var(--green); }
  .plan-item.estado-verde .plan-dot { background: var(--green); }
  .plan-item-body { flex: 1; min-width: 0; }
  .plan-item-text { font-size: 13px; color: var(--text); font-weight: 600; line-height: 1.35; }
  .plan-sub { margin: 6px 0 0; padding: 0; list-style: none; }
  .plan-sub li { font-size: 12px; color: var(--text-dim); line-height: 1.45; position: relative; padding-left: 12px; margin-bottom: 3px; }
  .plan-sub li::before { content: "–"; position: absolute; left: 0; color: var(--text-muted); }
  .ai-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 13px;
    padding: 8px 0;
  }
  .ai-dots {
    display: inline-flex;
    gap: 4px;
  }
  .ai-dots span {
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
    animation: pulse 1.4s infinite ease-in-out both;
  }
  .ai-dots span:nth-child(1) { animation-delay: -0.32s; }
  .ai-dots span:nth-child(2) { animation-delay: -0.16s; }
  @keyframes pulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1); }
  }

  /* === SECTION TITLE === */
  .section-title {
    padding: 0 20px;
    margin: 26px 0 12px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-soft);
  }
  .section-title .count {
    color: var(--text-muted);
    font-weight: 600;
  }

  /* === PERIOD TABS === */
  .tabs {
    display: flex;
    gap: 8px;
    padding: 16px 20px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-dim);
    padding: 8px 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    text-transform: capitalize;
    transition: all 0.2s;
  }
  .tab.active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
  }

  /* === CAMPAIGN CARDS === */
  .cards { padding: 0 20px; display: flex; flex-direction: column; gap: 12px; }
  .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(26, 35, 50, 0.04);
  }
  .card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
  }
  .card-brand {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 3px;
  }
  .card-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    flex: 1;
  }
  .card-period {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-card-2);
    padding: 4px 9px;
    border-radius: 7px;
    white-space: nowrap;
    font-weight: 700;
    letter-spacing: 0.03em;
  }
  .metric { margin-bottom: 12px; }
  .metric:last-child { margin-bottom: 0; }
  .metric-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
  }
  .metric-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
  }
  .metric-pct {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    font-weight: 700;
  }
  .metric-pct.green { color: var(--green); }
  .metric-pct.yellow { color: var(--yellow); }
  .metric-pct.red { color: var(--red); }
  .metric-values {
    font-size: 12px;
    color: var(--text);
    margin-bottom: 5px;
    font-weight: 500;
  }
  .metric-values .obj { color: var(--text-muted); }
  .progress-sm {
    height: 5px;
    background: var(--bg-card-2);
    border-radius: 4px;
    overflow: hidden;
  }
  .progress-sm > .progress-fill { height: 100%; border-radius: 4px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }

  /* === CAMPAÑAS con más carácter (2026-09-15) === */
  .card.camp { border-left: 4px solid var(--border); padding: 14px 14px 12px; }
  .card.camp.green { border-left-color: var(--green); }
  .card.camp.yellow { border-left-color: var(--yellow); }
  .card.camp.red { border-left-color: var(--red); }
  .card.camp .card-head { margin-bottom: 10px; }
  .card.camp .card-brand { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--bg-card-2); color: var(--text-dim); margin-bottom: 5px; }
  .card.camp .card-brand.unl { background: #e0edff; color: #1d4ed8; }
  .card.camp .card-brand.summo { background: #ffe8dc; color: #c2410c; }
  .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
  .metrics-grid .metric { margin: 0; background: var(--bg-card-2); border-radius: 12px; padding: 9px 10px 9px; border: 1px solid var(--border-soft); }
  .metrics-grid .metric.green { background: linear-gradient(180deg, var(--green-bg) 0%, var(--bg-card-2) 70%); }
  .metrics-grid .metric.yellow { background: linear-gradient(180deg, var(--yellow-bg) 0%, var(--bg-card-2) 70%); }
  .metrics-grid .metric.red { background: linear-gradient(180deg, var(--red-bg) 0%, var(--bg-card-2) 70%); }
  .metrics-grid .metric-label { font-size: 10px; margin-bottom: 2px; }
  .metrics-grid .metric-big { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
  .metrics-grid .metric-pct { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
  .metric-proy { font-size: 10px; color: var(--text-muted); font-weight: 600; }
  .metric-proy b { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; }
  .metric-proy b.green { color: var(--green); } .metric-proy b.yellow { color: var(--yellow); } .metric-proy b.red { color: var(--red); }
  .metrics-grid .metric-values { font-size: 11.5px; margin: 2px 0 6px; }
  .devol-badge {
    margin-top: 10px;
    padding: 6px 10px;
    background: var(--red-bg);
    color: var(--red);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
  }

  /* === CLIENTES VIEW === */
  .filters {
    padding: 14px 20px 4px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter-pill {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    color: var(--text-dim);
    padding: 8px 14px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
  }
  .filter-pill.active {
    background: var(--blue-bg);
    color: var(--blue);
    border-color: var(--blue);
  }
  .filter-pill.day { text-transform: capitalize; }

  .client-search {
    width: calc(100% - 40px);
    margin: 12px 20px 0;
    padding: 11px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
  }
  .client-search::placeholder { color: var(--text-muted); }
  .client-search:focus { border-color: var(--accent); }

  .client-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(26, 35, 50, 0.04);
  }
  .client-card:hover { border-color: var(--accent); }
  /* Quincenales que tocan la OTRA semana: separados abajo, más apagados (José, 2026-10-05). */
  .cli-otra-semana {
    margin: 22px 2px 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .client-card.otra-semana { opacity: 0.6; }
  .client-card.otra-semana.expanded { opacity: 1; }
  .client-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .client-name {
    font-weight: 700;
    font-size: 14px;
    flex: 1;
  }
  .client-day {
    font-size: 10px;
    background: var(--blue-bg);
    color: var(--blue);
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
  }
  .client-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-soft);
  }
  .client-stat {
    font-size: 11px;
  }
  .client-stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 2px;
  }
  .client-stat-value {
    color: var(--text);
    font-weight: 700;
    font-size: 12px;
  }
  .client-campaigns {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-soft);
    display: none;
  }
  .client-card.expanded .client-campaigns { display: block; }
  .client-camp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border-soft);
  }
  .client-camp-row:last-child { border-bottom: 0; }
  .client-camp-name { color: var(--text-dim); font-weight: 600; }
  .client-camp-val { color: var(--text); font-weight: 700; }
  .client-camp-val.empty { color: var(--text-muted); font-weight: 400; }
  .client-camp-section {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
    font-size: 10px;
    margin: 12px 0 2px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-soft);
  }
  .client-camp-section:first-child { margin-top: 0; }

  /* === CHAT === */
  #chatView {
    padding-bottom: 90px;
  }
  .chat-messages {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: calc(100vh - 220px);
  }
  .msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    animation: fadeIn 0.2s;
    word-wrap: break-word;
  }
  .msg.user {
    background: var(--accent);
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
    font-weight: 600;
  }
  .msg.assistant {
    background: var(--bg-card);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 4px rgba(26, 35, 50, 0.04);
  }
  .msg.assistant strong { color: var(--accent); }
  .msg.assistant ul, .msg.assistant ol { padding-left: 18px; margin: 6px 0; }
  .msg.assistant li { margin-bottom: 4px; }
  .chat-input-bar {
    position: fixed;
    bottom: calc(60px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 720px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-soft);
    display: flex;
    gap: 8px;
    z-index: 150;
  }
  .chat-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    resize: none;
    max-height: 80px;
    line-height: 1.4;
  }
  .chat-input:focus { border-color: var(--accent); }
  .send-btn {
    background: var(--accent);
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(232, 88, 32, 0.3);
  }
  .send-btn:disabled { opacity: 0.4; }
  .chat-suggestions {
    display: flex;
    gap: 8px;
    padding: 8px 20px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chat-suggestions::-webkit-scrollbar { display: none; }
  .suggestion {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 8px 14px;
    border-radius: 18px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
  }
  .suggestion:hover { color: var(--accent); border-color: var(--accent); }

  /* === EMPTY === */
  .empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
  }
  .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
  .empty-text { font-size: 14px; }

  /* === LOADING === */
  .loading {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: var(--bg);
  }
  .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  .loading-text { color: var(--text-dim); font-size: 14px; }
  .loading-sub { color: var(--text-muted); font-size: 12px; margin-top: -10px; }

  @keyframes spin { to { transform: rotate(360deg); } }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }


/* === FEATURE: SEGUIMIENTO DE PEDIDOS x CLIENTE === */
.pedidos-feature {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.client-card.expanded .pedidos-feature { display: block; }

.pedidos-toggle {
  width: 100%;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 700;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.pedidos-toggle:hover { background: var(--accent-bg); border-color: var(--accent); }
.pedidos-toggle.open { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-dark); }

.pedidos-panel-wrap { margin-top: 8px; }
.pedidos-loading, .pedidos-empty, .pedidos-error {
  font-size: 12px; color: var(--text-muted); padding: 10px 4px; text-align: center;
}
.pedidos-error { color: var(--red); }

.pedidos-summary {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 800; color: var(--text);
  padding: 6px 8px; margin-bottom: 8px;
  background: var(--bg-card-2); border-radius: 6px;
}

.pedidos-dia { margin-bottom: 6px; }
.pedidos-dia-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 800; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .04em;
  padding: 7px 0; border-bottom: 1px solid var(--border-soft);
  cursor: pointer; user-select: none;
}
.pedidos-dia-head:hover { color: var(--text); }
.pedidos-dia-flag {
  display: inline-block; margin-left: 6px; vertical-align: middle;
  font-size: 9px; font-weight: 800; letter-spacing: .03em;
  padding: 1px 5px; border-radius: 3px; color: #fff;
}
.pedidos-dia-flag.flag-devol { background: var(--red); }
.pedidos-dia-flag.flag-anulado { background: var(--text-muted); }
.pedidos-dia-right { display: flex; align-items: center; gap: 8px; }
.pedidos-dia-totcol { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.pedidos-dia-anul {
  font-size: 9.5px; font-weight: 700; color: var(--text-muted);
  text-transform: none; letter-spacing: 0; margin-top: 1px;
}
.pedidos-dia-anul .amt { text-decoration: line-through; }
.pedidos-dia-caret {
  font-size: 10px; color: var(--text-muted);
  transition: transform .15s ease;
}
.pedidos-dia.open .pedidos-dia-caret { transform: rotate(180deg); }
.pedidos-rows { padding-top: 2px; display: none; }
.pedidos-dia.open .pedidos-rows { display: block; }
.pedidos-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 8px;
  align-items: center; padding: 5px 0; font-size: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.pedidos-row:last-child { border-bottom: 0; }
.pedidos-art { color: var(--text); font-weight: 600; line-height: 1.25; }
.pedidos-u { color: var(--text-dim); font-weight: 600; white-space: nowrap; min-width: 42px; text-align: right; }
.pedidos-m { color: var(--text); font-weight: 700; white-space: nowrap; min-width: 70px; text-align: right; }

.pedidos-row.pedidos-devol { background: var(--red-bg); border-radius: 4px; padding-left: 4px; padding-right: 4px; }
.pedidos-row.pedidos-devol .pedidos-art,
.pedidos-row.pedidos-devol .pedidos-u,
.pedidos-row.pedidos-devol .pedidos-m { color: var(--red); }

.pedidos-devol-tag {
  display: inline-block; background: var(--red); color: #fff;
  font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 3px;
  vertical-align: middle; letter-spacing: .03em;
}

/* Anulado: pedido hecho y luego revertido. Gris y tachado (no es una devolución real). */
.pedidos-row.pedidos-anulado .pedidos-art,
.pedidos-row.pedidos-anulado .pedidos-u,
.pedidos-row.pedidos-anulado .pedidos-m {
  color: var(--text-muted); text-decoration: line-through;
}
.pedidos-anulado-tag {
  display: inline-block; background: var(--text-muted); color: #fff;
  font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 3px;
  vertical-align: middle; letter-spacing: .03em; text-decoration: none;
}
.pedidos-neg { color: var(--red) !important; }

/* Apertura del día por VIA DE PEDIDO: la via como encabezado del grupo (una sola vez),
   con el subtotal neto del canal a la derecha. Valor crudo de Sigma. */
.pedidos-via-group { margin-bottom: 5px; }
.pedidos-via-group:last-child { margin-bottom: 0; }
.pedidos-via-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 7px; margin: 5px 0 2px;
  background: var(--bg-card-2); border-radius: 4px;
}
.pedidos-via-name { color: var(--text-dim); }
.pedidos-via-sub { color: var(--text-dim); font-weight: 800; }

/* ===========================================================================
   Etiqueta de acceso directo a WhatsApp en el Card x Cliente
   (feature public/js/features/whatsapp-cliente.js)
   =========================================================================== */

/* Va como fila propia debajo del encabezado y NO se esconde con el card colapsado: la
   gracia es tenerla a un toque mientras se recorre la lista del dia. */
.wa-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: -2px 0 8px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: var(--green-bg);
  border: 1px solid transparent;
  color: var(--green);
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  text-decoration: none;
  line-height: 1;
  /* Mismo modo de alineacion que el icono de exportar uno, que va pegado al lado:
     si uno alinea por baseline y el otro por centro, quedan desfasados. */
  vertical-align: middle;
  /* El card entero es clickeable; este target tiene que sentirse aparte. */
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.wa-chip:hover { background: rgba(30, 165, 71, 0.18); border-color: var(--green); }
.wa-chip-icon { width: 13px; height: 13px; flex-shrink: 0; }
.wa-chip-num { white-space: nowrap; }

/* Numeros del bloque 11-4xxx: casi seguro linea fija, asi que probablemente no haya nadie
   del otro lado en WhatsApp. Se muestra igual (es el contacto agendado) pero en gris, para
   no prometer un chat que puede no existir. El title explica el porque. */
.wa-chip-dudoso {
  background: var(--bg-card-2);
  color: var(--text-muted);
}
.wa-chip-dudoso:hover { background: var(--bg-card-2); border-color: var(--border); }

/* ===========================================================================
   Exportar contactos a la agenda del telefono
   (feature public/js/features/exportar-contactos.js)
   =========================================================================== */
/* Discreto (2026-09-15): un link chico a la derecha del buscador, sin nota hasta que se usa. */
.exportar-caja { margin: 4px 20px 0; text-align: right; }
.exportar-btn {
  display: inline-flex; align-items: center; gap: 4px;
  width: auto;
  padding: 3px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.exportar-btn:hover { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.exportar-btn:active { transform: translateY(1px); }
.exportar-nota {
  margin-top: 3px;
  font-size: 10.5px; line-height: 1.45;
  color: var(--text-muted);
  text-align: right;
}
.exportar-nota strong { color: var(--green); }
.exportar-sin { color: var(--text-muted); }

/* Atajo para bajar UN solo contacto, al lado del telefono. Va discreto a proposito:
   es un atajo, no la accion principal (esa es el boton de exportar todos). */
.exportar-uno {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  /* El icono se ve de 13px, pero el boton es mas grande: es un target para el dedo,
     en la calle y con una mano. El fondo es transparente, asi que se sigue viendo sutil. */
  width: 30px; height: 30px;
  margin: -2px 0 8px 5px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.exportar-uno svg { width: 13px; height: 13px; display: block; }
.exportar-uno:hover { color: var(--green); background: var(--green-bg); border-color: var(--green); }
/* Confirmacion breve al tocarlo: sin esto no hay forma de saber si hizo algo. */
.exportar-uno-ok { color: var(--green); background: var(--green-bg); border-color: var(--green); }

/* ===== Ranking de vendedores (features/ranking.js) ===== */
/* Reusa .platform-card / .platform-head para quedar igual que Venta por plataforma. */
.rk-card { cursor: default; }
.rk-hero { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.rk-hero-pos {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 30px; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1; color: var(--accent);
  display: flex; align-items: baseline; gap: 6px;
}
.rk-hero-de { font-size: 14px; font-weight: 700; color: var(--text-dim); letter-spacing: 0; }
.rk-hero-pts { font-size: 12.5px; font-weight: 700; color: var(--text-dim); text-align: right; }
.rk-hero-pts strong { font-family: 'Bricolage Grotesque', sans-serif; font-size: 18px; color: var(--text); }
.rk-msg { font-size: 12px; color: var(--text-muted); font-weight: 600; line-height: 1.4; padding: 4px 0 8px; }
.rk-row { margin-bottom: 10px; }
.rk-row:last-of-type { margin-bottom: 0; }
.rk-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rk-name { font-size: 12.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; }
.rk-ico { font-size: 13px; }
.rk-per { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.rk-vals { display: flex; align-items: baseline; gap: 8px; flex-shrink: 0; }
.rk-extra { font-size: 10.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.rk-val {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; font-weight: 800; color: var(--text);
  min-width: 44px; text-align: right;
}
.rk-val.green { color: var(--green); } .rk-val.yellow { color: var(--yellow); } .rk-val.red { color: var(--red); }
.rk-pos { font-size: 12px; font-weight: 800; color: var(--text-dim); min-width: 40px; text-align: right; display: inline-flex; align-items: baseline; justify-content: flex-end; gap: 3px; }
.rk-delta { font-size: 10px; font-weight: 800; }
.rk-up { color: var(--green); } .rk-down { color: var(--red); }
.rk-bar { height: 6px; background: var(--bg-card-2); border-radius: 4px; overflow: hidden; }
.rk-bar-fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.rk-bar-fill.green { background: linear-gradient(90deg, var(--green), #22c55e); }
.rk-bar-fill.yellow { background: linear-gradient(90deg, var(--yellow), #f59e0b); }
.rk-bar-fill.red { background: linear-gradient(90deg, var(--red), #ef4444); }
.rk-mejor { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-top: 2px; text-align: right; }
.rk-na { opacity: 0.55; }
/* Detalle (se abre al tocar) */
.rk-detalle { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.rk-serie-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 11px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.rk-serie-ult { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 11px; }
.rk-serie-ult.rk-up { color: var(--green); } .rk-serie-ult.rk-down { color: var(--red); }
/* Evolución del puesto mes a mes: línea de trayectoria. Eje invertido (1º arriba). */
.rk-ev { margin-bottom: 14px; }
.rk-ln { width: 100%; height: auto; display: block; overflow: visible; }
.rk-ln-path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rk-ln-ref { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
.rk-ln-eje { font-size: 8px; font-weight: 700; fill: var(--text-muted); font-family: 'Manrope', sans-serif; }
.rk-ln-pt { fill: var(--accent); stroke: var(--bg-card); stroke-width: 2; }
.rk-ln-pt.rk-ln-mejor { fill: var(--green); }
.rk-ln-pt.rk-ln-ult { stroke-width: 2.5; }
.rk-ln-val { font-size: 9px; font-weight: 800; fill: var(--text-dim); font-family: 'Bricolage Grotesque', sans-serif; }
.rk-ln-val.rk-ln-val-ult { fill: var(--accent); font-size: 10.5px; }
.rk-ln-mes { font-size: 8px; font-weight: 700; fill: var(--text-muted); font-family: 'Manrope', sans-serif; text-transform: capitalize; }
.rk-ev-pie { font-size: 10px; color: var(--text-muted); font-weight: 600; margin-top: 6px; line-height: 1.35; }
/* Tabla de KPIs mes a mes */
.rk-tabla-wrap { overflow-x: auto; margin-bottom: 12px; }
table.rk-tabla { border-collapse: collapse; width: 100%; font-size: 11px; font-variant-numeric: tabular-nums; }
table.rk-tabla th { text-align: right; font-weight: 700; color: var(--text-muted); padding: 4px 6px; white-space: nowrap; font-size: 10px; }
table.rk-tabla thead th { text-transform: capitalize; border-bottom: 1px solid var(--border); }
table.rk-tabla tbody th { text-align: left; color: var(--text-dim); font-weight: 700; }
table.rk-tabla td { text-align: right; padding: 4px 6px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
table.rk-tabla td.green { color: var(--green); } table.rk-tabla td.yellow { color: var(--yellow); } table.rk-tabla td.red { color: var(--red); }
table.rk-tabla tfoot th, table.rk-tabla tfoot td { border-top: 1px solid var(--border); padding-top: 6px; }
table.rk-tabla tfoot th { text-align: left; color: var(--text-dim); }
.rk-tabla-pos { font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--accent) !important; font-size: 12px; }
.rk-det-title { font-size: 11px; font-weight: 800; color: var(--text-dim); margin: 10px 0 6px; line-height: 1.3; }
.rk-det-row { display: grid; grid-template-columns: 26px 1fr; gap: 2px 6px; align-items: start; font-size: 11.5px; padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.rk-det-chk { font-weight: 800; font-size: 11px; }
.rk-det-chk.green { color: var(--green); } .rk-det-chk.yellow { color: var(--yellow); } .rk-det-chk.red { color: var(--red); }
.rk-ok .rk-det-chk { color: var(--green); } .rk-no .rk-det-chk { color: var(--red); }
.rk-det-chk { grid-row: 1; grid-column: 1; }
.rk-det-name { grid-column: 2; font-weight: 700; color: var(--text); min-width: 0; line-height: 1.3; }
.rk-det-row > .rk-per { grid-column: 2; text-transform: none; letter-spacing: 0; }
.rk-det-row > .rk-per .rk-tipo { text-transform: uppercase; letter-spacing: 0.03em; }
.rk-det-val { grid-column: 2; font-size: 10.5px; color: var(--text-muted); font-weight: 600; text-align: left; }
.rk-foot { margin-top: 10px; font-size: 10.5px; color: var(--text-muted); font-weight: 600; line-height: 1.4; }
.rk-sub { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-top: 3px; }
.rk-sub .rk-mejor { margin-top: 0; margin-left: auto; }
.rk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rk-tabla-vacio { color: var(--border) !important; }
.rk-ln-pt.rk-ln-hoy { stroke: var(--accent); stroke-width: 2.5; fill: var(--bg-card); }
.rk-ln-pt.rk-ln-hoy.rk-ln-mejor { stroke: var(--green); }
.rk-ln-mes.rk-ln-mes-hoy { fill: var(--accent); font-weight: 800; }
.rk-ev-pie em { font-style: normal; font-weight: 700; color: var(--text-dim); }

/* ============ Cobertura por rubro y línea (features/cobertura-rubros.js) ============ */
.rb-card { cursor: default; }
.rb-resumen { font-size: 11.5px; color: var(--text-dim); font-weight: 600; line-height: 1.4; margin: 2px 0 10px; }
.rb-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-soft); font-size: 10.5px; color: var(--text-muted); font-weight: 600; line-height: 1.4; }
.rb-bar { display: block; height: 6px; background: var(--bg-card-2); border-radius: 4px; overflow: hidden; }
.rb-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.rb-bar i.green { background: linear-gradient(90deg, var(--green), #22c55e); }
.rb-bar i.yellow { background: linear-gradient(90deg, var(--yellow), #f59e0b); }
.rb-bar i.red { background: linear-gradient(90deg, var(--red), #ef4444); }
.rb-caret { font-size: 10px; color: var(--text-muted); width: 10px; flex-shrink: 0; }

/* Rubro: fila cliqueable con nombre, barra, % y subtítulo */
.rb-rubro-wrap { border-bottom: 1px solid var(--border-soft); padding: 8px 0; }
.rb-rubro-wrap:last-of-type { border-bottom: 0; }
.rb-rubro, .rb-linea {
  display: grid; grid-template-columns: 10px 1fr 64px 46px; gap: 4px 8px;
  align-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.rb-rubro-nom { font-size: 12.5px; font-weight: 800; color: var(--text); }
.rb-linea-nom { font-size: 12px; font-weight: 700; color: var(--text); }
.rb-rubro-val, .rb-linea-val {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; font-weight: 800;
  color: var(--text); text-align: right;
}
.rb-rubro-val.green, .rb-linea-val.green, .rb-marca-val.green { color: var(--green); }
.rb-rubro-val.yellow, .rb-linea-val.yellow, .rb-marca-val.yellow { color: var(--yellow); }
.rb-rubro-val.red, .rb-linea-val.red, .rb-marca-val.red { color: var(--red); }
.rb-rubro-sub, .rb-linea-sub {
  grid-column: 2 / -1; font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-top: 1px;
}
.rb-lineas { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--border-soft); }
.rb-linea-wrap { padding: 6px 0; }
.rb-marcas { margin: 6px 0 2px 20px; }
.rb-marca { display: grid; grid-template-columns: 1fr 56px 40px; gap: 3px 8px; align-items: center; padding: 3px 0; }
.rb-marca-nom { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.rb-marca-val { font-size: 11.5px; font-weight: 800; text-align: right; }
.rb-marca-cli { grid-column: 1 / -1; font-size: 10px; color: var(--text-muted); font-weight: 600; }
.rb-vacio { font-size: 10.5px; color: var(--text-muted); font-weight: 600; padding: 4px 0; }

/* Bloque dentro del card del cliente */
.rb-cli { margin: 8px 0; padding: 8px 10px; background: var(--bg-card-2); border-radius: 10px; }
.rb-cli-head { font-size: 10.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.rb-cli-nada { font-size: 11px; font-weight: 700; color: var(--red); margin-bottom: 6px; }
.rb-cli-ok { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.rb-cli-lineas { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.rb-cli-linea {
  font-size: 10.5px; font-weight: 700; color: var(--green);
  background: rgba(30, 165, 71, 0.1); border-radius: 6px; padding: 2px 6px;
}
.rb-cli-linea b { font-weight: 800; color: var(--text-dim); }
.rb-cli-faltantes { display: flex; flex-direction: column; gap: 4px; }
.rb-falta { display: grid; grid-template-columns: auto 1fr; gap: 1px 6px; align-items: baseline; }
.rb-falta-tipo {
  grid-row: 1; font-size: 8.5px; font-weight: 800; letter-spacing: 0.04em;
  padding: 1px 5px; border-radius: 5px; white-space: nowrap;
}
.rb-falta-recompra .rb-falta-tipo { color: var(--red); background: rgba(214, 56, 56, 0.1); }
.rb-falta-oportunidad .rb-falta-tipo { color: var(--yellow); background: rgba(212, 147, 39, 0.12); }
.rb-falta-marca { font-size: 11.5px; font-weight: 700; color: var(--text); }
.rb-falta-sub { grid-column: 2; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.rb-cli-mas { font-size: 10px; font-weight: 700; color: var(--text-muted); margin-top: 5px; }

/* ============ OSA por negocio y categoría (features/osa-desagregado.js) ============ */
.os-card { cursor: default; }
.os-hero { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.os-hero-val {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 30px; font-weight: 800;
  line-height: 1; color: var(--text); flex-shrink: 0;
}
.os-hero-val.green { color: var(--green); } .os-hero-val.red { color: var(--red); }
.os-hero-txt { font-size: 11.5px; color: var(--text-dim); font-weight: 600; line-height: 1.45; }
.os-foot { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border-soft); font-size: 10.5px; color: var(--text-muted); font-weight: 600; line-height: 1.4; }
.os-vacio { font-size: 10.5px; color: var(--text-muted); font-weight: 600; padding: 4px 0; }
.os-caret { font-size: 10px; color: var(--text-muted); width: 10px; flex-shrink: 0; }

/* Barra con marca de objetivo */
.os-bar { position: relative; display: block; height: 6px; background: var(--bg-card-2); border-radius: 4px; }
.os-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.os-bar i.green { background: linear-gradient(90deg, var(--green), #22c55e); }
.os-bar i.red { background: linear-gradient(90deg, var(--red), #ef4444); }
.os-bar b { position: absolute; top: -2px; width: 2px; height: 10px; background: var(--text-dim); border-radius: 1px; }

.os-neg-wrap { border-bottom: 1px solid var(--border-soft); padding: 8px 0; }
.os-neg-wrap:last-of-type { border-bottom: 0; }
.os-neg, .os-cat { display: grid; grid-template-columns: 10px 1fr 64px 46px; gap: 4px 8px; align-items: center; }
.os-neg { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.os-cat { grid-template-columns: 10px 1fr 64px 46px; padding: 5px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.os-neg-nom { font-size: 12.5px; font-weight: 800; color: var(--text); }
.os-cat-nom { font-size: 11.5px; font-weight: 700; color: var(--text-dim); }
.os-neg-val, .os-cat-val {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; color: var(--text); text-align: right;
}
.os-neg-val { font-size: 14px; } .os-cat-val { font-size: 12.5px; }
.os-neg-val.green, .os-cat-val.green { color: var(--green); }
.os-neg-val.red, .os-cat-val.red { color: var(--red); }
.os-neg-sub { grid-column: 2 / -1; font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-top: 1px; }
.os-cat-sub { grid-column: 2 / -1; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.os-cats { margin: 8px 0 0 14px; padding-left: 10px; border-left: 2px solid var(--border-soft); }

.os-ejec { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.os-ejec-head { width: 100%; font-size: 10.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.os-pill { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--bg-card-2); color: var(--text-dim); }
.os-pill.green { color: var(--green); background: rgba(30, 165, 71, 0.1); }
.os-pill.yellow { color: var(--yellow); background: rgba(212, 147, 39, 0.12); }
.os-pill.red { color: var(--red); background: rgba(214, 56, 56, 0.1); }

/* Bloque dentro del card del cliente */
.os-cli { margin: 8px 0; padding: 8px 10px; background: var(--bg-card-2); border-radius: 10px; }
.os-cli-head { font-size: 10.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.os-cli-hero { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.os-cli-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 20px; font-weight: 800; color: var(--text); }
.os-cli-val.green { color: var(--green); } .os-cli-val.red { color: var(--red); }
.os-cli-sub { font-size: 10.5px; font-weight: 600; color: var(--text-muted); }
.os-cli-sub2 { font-size: 10px; font-weight: 700; color: var(--text-dim); margin-bottom: 3px; }
.os-cli-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.os-cli-cat { font-size: 10.5px; font-weight: 700; color: var(--text-dim); background: var(--bg-card); border-radius: 6px; padding: 2px 6px; }
.os-cli-cat.green { color: var(--green); background: rgba(30, 165, 71, 0.1); }
.os-cli-cat.red { color: var(--red); background: rgba(214, 56, 56, 0.1); }
.os-cli-faltantes { display: flex; flex-direction: column; gap: 3px; }
.os-cli-falta { display: flex; flex-direction: column; }
.os-cli-item { font-size: 11.5px; font-weight: 700; color: var(--red); }
.os-cli-cat-sub { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.os-cli-ok { font-size: 11px; font-weight: 600; color: var(--green); }
.os-cli-mas { font-size: 10px; font-weight: 700; color: var(--text-muted); margin-top: 4px; }
.os-cli-ejec { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }

/* Relevamiento del MES (el OSA mira 8 semanas; esto es lo que falta relevar en el mes en curso) */
.os-hero-ojo { color: var(--text-muted); font-weight: 600; }
.os-mes { margin: 10px 0 2px; padding: 9px 10px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--bg-card-2); }
.os-mes-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.os-mes-tit { font-size: 11.5px; font-weight: 800; color: var(--text-dim); }
.os-mes-val { font-family: "Bricolage Grotesque", sans-serif; font-size: 15px; font-weight: 800; }
.os-mes-val.green { color: var(--green); } .os-mes-val.yellow { color: var(--yellow); } .os-mes-val.red { color: var(--red); }
.os-mes-sub { font-size: 11px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }
.os-mes-det { margin-top: 6px; }
.os-mes-det > summary { font-size: 11px; font-weight: 800; color: var(--accent-2); cursor: pointer; list-style: none; }
.os-mes-det > summary::-webkit-details-marker { display: none; }
.os-mes-det > summary::after { content: " ▾"; }
.os-mes-det[open] > summary::after { content: " ▴"; }
.os-mes-lista { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.os-mes-dia { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.os-mes-dia-nom { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); min-width: 68px; }
.os-mes-cli { font-size: 11px; font-weight: 600; color: var(--text-dim); background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 8px; padding: 2px 7px; }
.os-mes-cli b { color: var(--text); }
.os-mes-cli i { font-style: normal; font-weight: 700; color: var(--text-muted); font-size: 10px; }
.os-cli-mes { font-size: 11px; font-weight: 700; color: var(--yellow); background: var(--yellow-bg); border-radius: 8px; padding: 4px 7px; margin-bottom: 6px; }

/* ============ Tira de chips + panel del Inicio (features/home-chips.js) ============ */
/* Full-bleed con padding lateral de 20px: el primer chip queda alineado con el borde de las
   tarjetas (.platform-card usa margin 12px 20px) y la tira igual puede scrollear de punta a
   punta cuando no entran los tres. */
/* Los tres chips reparten el ancho en partes iguales y entran SIEMPRE en una pantalla de
   teléfono: nada de scroll horizontal. Por eso van en dos líneas (valor arriba, etiqueta
   abajo) y con `min-width: 0`, que es lo que deja que el texto se achique en vez de empujar. */
.hchips { display: flex; align-items: stretch; gap: 8px; padding: 0 20px; margin: 14px 0 0; }
.hchip {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 8px 10px; cursor: pointer; font-family: inherit; text-align: left;
  -webkit-tap-highlight-color: transparent; transition: transform 0.12s ease;
}
.hchip:active { transform: scale(0.96); }
.hchip-top { display: flex; align-items: baseline; gap: 4px; min-width: 0; }
.hchip-ico { font-size: 12px; flex-shrink: 0; }
.hchip-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.1; }
.hchip-val.green { color: var(--green); } .hchip-val.yellow { color: var(--yellow); } .hchip-val.red { color: var(--red); }
.hchip-lbl {
  font-size: 9.5px; font-weight: 600; color: var(--text-muted); line-height: 1.2;
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.hpanel { position: fixed; inset: 0; z-index: 900; }
.hpanel-back { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.45); }
.hpanel-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; top: 32px;
  background: var(--bg); border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18); overflow: hidden;
}
.hpanel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border-soft); flex-shrink: 0;
}
.hpanel-title { font-size: 14px; font-weight: 800; color: var(--text); }
.hpanel-close {
  background: var(--bg-card-2); border: 0; border-radius: 999px; width: 30px; height: 30px;
  font-size: 14px; color: var(--text-dim); cursor: pointer; flex-shrink: 0; font-family: inherit;
}
.hpanel-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 28px; }
body.hpanel-open { overflow: hidden; }

/* ============ Chips y detalle en el card del cliente ============ */
.cchips { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0 2px; }
.cchip {
  font-size: 10.5px; font-weight: 700; color: var(--text-dim);
  background: var(--bg-card-2); border-radius: 999px; padding: 3px 9px;
}
.cchip.green { color: var(--green); background: rgba(30, 165, 71, 0.1); }
.cchip.yellow { color: var(--yellow); background: rgba(212, 147, 39, 0.12); }
.cchip.red { color: var(--red); background: rgba(214, 56, 56, 0.1); }
.cchips-hint { font-size: 9.5px; color: var(--text-muted); font-weight: 600; }
.client-card.expanded .cchips-hint { display: none; }
/* El detalle vive adentro de lo que ya se despliega al tocar el card. */
.cextra { display: none; }
.client-card.expanded .cextra { display: block; }

/* Artículos dentro de una categoría de OSA */
.os-cat-wrap { padding: 2px 0; }
.os-items { margin: 4px 0 6px 20px; padding-left: 8px; border-left: 2px solid var(--border-soft); }
.os-item { display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 4px 0; }
.os-item-nom { font-size: 11px; font-weight: 700; color: var(--text-dim); }
.os-item-falta { font-size: 10.5px; font-weight: 800; text-align: right; white-space: nowrap; }
.os-item-falta.red { color: var(--red); } .os-item-falta.green { color: var(--green); }
.os-item-sub { grid-column: 1 / -1; font-size: 9.5px; font-weight: 600; color: var(--text-muted); }

/* Venta por plataforma colapsable: arranca cerrada, el total va en el encabezado. */
.plat-colapsable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.plat-colapsable .plat-cuerpo { display: none; }
.plat-colapsable.plat-abierta .plat-cuerpo { display: block; }
.plat-total { font-weight: 800; color: var(--text); }
.plat-caret { color: var(--text-muted); margin-left: 4px; }

/* Ejecución de góndola en el card del cliente (bloque propio, separado del OSA) */
.os-ej-fila { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; }
.os-ej-cat { font-size: 11.5px; font-weight: 700; color: var(--text-dim); }

/* Líneas que el cliente NO compra, al lado de las que sí: el hueco también es información. */
.rb-cli-sub { font-size: 9.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 2px 0 3px; }
.rb-cli-nota { font-weight: 600; text-transform: none; letter-spacing: 0; }
.rb-cli-linea-no { color: var(--red); background: rgba(214, 56, 56, 0.08); }
.rb-cli-linea-no b { color: var(--text-muted); }

/* Separador entre la venta por línea y lo que hay para ofrecerle: son dos lecturas distintas. */
.rb-cli-corte {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 6px;
  font-size: 9.5px; font-weight: 800; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.rb-cli-corte::before, .rb-cli-corte::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Activación de góndola desglosada por categoría (panel del Inicio) */
.os-ej-cat { padding: 6px 0; border-bottom: 1px solid var(--border-soft); }
.os-ej-cat:last-child { border-bottom: 0; }
.os-ej-cat-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.os-ej-cat-nom { font-size: 11.5px; font-weight: 700; color: var(--text); }
.os-ej-cat-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 12.5px; font-weight: 800; color: var(--text); white-space: nowrap; }
.os-ej-cat-val.green { color: var(--green); } .os-ej-cat-val.yellow { color: var(--yellow); } .os-ej-cat-val.red { color: var(--red); }
.os-ej-cat-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* Activación de góndola separada por período: lo que corre ahora arriba, lo cerrado abajo. */
.os-ej-grupo {
  font-size: 9.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.04em; margin: 8px 0 2px; padding-top: 6px; border-top: 1px dashed var(--border);
}
.os-ej-grupo:first-child { margin-top: 2px; padding-top: 0; border-top: 0; }
.os-ej-grupo-pasado { color: var(--text-muted); }
.os-ej-cat-per { display: block; font-size: 9.5px; font-weight: 600; color: var(--text-muted); margin-top: 1px; }

/* Vigentes vs cerradas: dos cajas separadas, no dos rótulos sueltos en la misma lista. */
.os-ej-bloque { border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.os-ej-vig { background: rgba(30, 165, 71, 0.06); border: 1px solid rgba(30, 165, 71, 0.22); }
.os-ej-cerr { background: var(--bg-card-2); border: 1px solid var(--border-soft); }
.os-ej-bloque .os-ej-grupo {
  font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
  margin: 0 0 4px; padding: 0; border: 0;
}
.os-ej-vig .os-ej-grupo { color: var(--green); }
.os-ej-cerr .os-ej-grupo { color: var(--text-muted); }
.os-ej-grupo-n {
  display: inline-block; min-width: 15px; padding: 0 4px; margin-left: 2px;
  border-radius: 99px; background: rgba(0, 0, 0, 0.06); text-align: center;
}
.os-ej-cerr .os-ej-cat-nom { color: var(--text-dim); }

/* ============ Bloques del card del cliente (venta total / incentivos) ============ */
.cli-bloque { margin: 8px 0; padding: 10px; background: var(--bg-card-2); border-radius: 10px; }
.cli-bloque-head {
  font-size: 10.5px; font-weight: 800; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.cli-hero { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cli-hero-val { font-family: 'Bricolage Grotesque', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.1; }
.cli-hero-val.green { color: var(--green); } .cli-hero-val.yellow { color: var(--yellow); } .cli-hero-val.red { color: var(--red); }
.cli-hero-pct { font-family: 'Bricolage Grotesque', sans-serif; font-size: 14px; font-weight: 800; }
.cli-hero-pct.green { color: var(--green); } .cli-hero-pct.yellow { color: var(--yellow); } .cli-hero-pct.red { color: var(--red); }
.cli-hero-sub { font-size: 10.5px; font-weight: 600; color: var(--text-muted); margin-top: 3px; }
.cli-hero-sub strong { color: var(--text); font-weight: 800; }
.cli-hero-sub strong.green { color: var(--green); } .cli-hero-sub strong.yellow { color: var(--yellow); } .cli-hero-sub strong.red { color: var(--red); }
.cli-sub { font-size: 9.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin: 8px 0 3px; }
.cli-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.cli-sub + .cli-chips { margin-top: 0; }
.cli-chips .cchip b { font-weight: 800; }
/* El bloque de incentivos se despliega con el card, igual que el resto del detalle. */
.cli-extra { display: none; }
.client-card.expanded .cli-extra { display: block; }
/* `.client-campaigns` quedó como ancla vacía para las features: no debe dibujar nada. */
.client-campaigns:empty { display: none !important; padding: 0; border: 0; margin: 0; }
/* Marca sugerida que sirve para abrir una línea que el cliente no compra. */
.rb-abre {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 5px;
  font-size: 8.5px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase;
  color: var(--accent); background: rgba(99, 102, 241, 0.12); vertical-align: middle;
}
/* Venta sin bonificación dentro de cada vía de pedido. */
.plat-sinbonif { font-size: 10px; font-weight: 600; color: var(--text-muted); margin-top: 4px; }
.plat-sinbonif strong { color: var(--text-dim); font-weight: 800; }

/* Plan del día · Recompras: los clientes donde falta cada marca (hasta 3 y el resto plegado) */
.plan-clis { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.plan-cli { font-size: 11px; font-weight: 700; color: var(--text-dim); background: var(--bg-card-2); border: 1px solid var(--border-soft); border-radius: 999px; padding: 2px 8px; }
.plan-mas summary { font-size: 11px; font-weight: 700; color: var(--accent); cursor: pointer; list-style: none; margin: 2px 0; }
.plan-mas summary::-webkit-details-marker { display: none; }

/* ============ Card de campaña → clientes por día (features/campana-clientes.js) ============ */
.card.camp.cc-tocable { cursor: pointer; }
.card.camp.cc-tocable:active { transform: scale(0.995); }
.cc-pie {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border-soft);
  font-size: 11.5px; font-weight: 700; color: var(--blue);
}
.cc-head { padding: 2px 2px 10px; }
.cc-titulo { font-size: 16px; font-weight: 800; color: var(--text); margin: 6px 0 4px; }
.cc-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.cc-sub b { color: var(--text); }
.cc-toggle {
  display: flex; gap: 6px; background: var(--bg-card-2, #eef1f6); border-radius: 12px; padding: 4px;
  margin: 4px 0 12px; position: sticky; top: -12px; z-index: 1;
}
.cc-toggle button {
  flex: 1; border: 0; border-radius: 9px; padding: 9px 6px; font-family: inherit;
  font-size: 12.5px; font-weight: 800; color: var(--text-dim); background: transparent; cursor: pointer;
}
.cc-toggle button.on { background: var(--bg-card); color: var(--text); box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12); }
.cc-dia { margin-bottom: 14px; }
.cc-dia-tit {
  font-size: 11.5px; font-weight: 800; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: 0.03em; margin: 0 2px 6px;
}
.cc-dia-tit span { color: var(--text-muted); font-weight: 700; }
.cc-dia-tit.hoy { color: var(--accent); }
.cc-cli {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  text-align: left; font-family: inherit; cursor: pointer;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 6px;
}
.cc-cli:active { background: var(--blue-bg); }
.cc-dir { font-size: 13.5px; font-weight: 800; color: var(--text); }
.cc-cod { font-size: 11.5px; color: var(--text-muted); }
.cc-det { font-size: 12px; color: var(--green); font-weight: 700; }
.cc-anul { font-size: 11.5px; color: var(--yellow); font-weight: 700; }
.cc-vacio { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px 8px; }
.cc-copiar {
  width: 100%; margin-top: 4px; border: 1px solid var(--border); background: var(--bg-card);
  border-radius: 12px; padding: 11px; font-family: inherit; font-size: 13px; font-weight: 800;
  color: var(--text); cursor: pointer;
}
.cc-det.mal { color: var(--red); }
