    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg:        #F5F2EC;
      --card:      #FFFFFF;
      --header-bg: #111110;
      --ink:       #0F0F0F;
      --ink-2:     #3A3A3A;
      --mute:      #7A7774;
      --border:    #E8E4DC;
      --accent:    #1E3DB8;
      --accent-h:  #0F2A8F;
      --green:     #15803D;
      --green-bg:  #DCFCE7;
      --amber:     #B45309;
      --amber-bg:  #FEF3C7;
      --red:       #B91C1C;
      --red-bg:    #FEE2E2;
      --radius-lg: 22px;
      --radius-md: 14px;
      --radius-sm: 8px;
      --shadow:    0 1px 2px rgba(0,0,0,0.04), 0 6px 20px rgba(0,0,0,0.05);
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
    }

    html { font-size: 15px; }
    body {
      font-family: 'Inter', -apple-system, sans-serif;
      background: var(--bg);
      color: var(--ink);
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }

    /* ── HEADER ────────────────────────────────────── */
    .rp-header {
      background: var(--header-bg);
      padding: 0 40px;
      height: 60px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      position: sticky;
      top: 0;
      z-index: 100;
    }
    .header-brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .header-logo {
      width: 32px; height: 32px;
      background: #FFFFFF0F;
      border: 1px solid #FFFFFF18;
      border-radius: 9px;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 600; color: #FFF;
      letter-spacing: -0.3px;
    }
    .header-title { font-size: 14px; font-weight: 500; color: #FFFFFFCC; letter-spacing: -0.1px; }
    .header-right { display: flex; align-items: center; gap: 20px; }
    .header-date  { font-size: 13px; color: #FFFFFF66; font-variant-numeric: tabular-nums; }
    .header-time  { font-size: 13px; color: #FFFFFF99; font-variant-numeric: tabular-nums; font-weight: 500; }
    .live-badge {
      display: flex; align-items: center; gap: 6px;
      font-size: 11.5px; color: #FFFFFF55;
      cursor: pointer;
      transition: color 0.15s;
    }
    .live-badge:hover { color: #FFFFFF99; }
    .live-dot {
      width: 6px; height: 6px; border-radius: 50%;
      background: #22c55e;
      animation: pulse-dot 2.5s ease infinite;
    }
    .live-dot.stale { background: #f59e0b; animation: none; }
    .live-dot.error { background: #ef4444; animation: none; }
    @keyframes pulse-dot {
      0%, 100% { opacity: 1; }
      50%       { opacity: 0.4; }
    }

    /* ── BIZ SCREEN (pantallas individuales por negocio) ─ */
    .back-link {
      font-size: 13px; color: #FFFFFF99; text-decoration: none;
      display: flex; align-items: center; gap: 6px; transition: color 0.15s;
    }
    .back-link:hover { color: #FFF; }
    .biz-hero {
      display: flex; align-items: flex-start; justify-content: space-between;
      gap: 16px;
    }
    .biz-hero-name { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); display: block; }

    /* ── PIPELINE LIST (GHL, pantallas individuales) ──── */
    .pipeline-list { display: flex; flex-direction: column; }
    .pipeline-row {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
      padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px;
    }
    .pipeline-row:last-child { border-bottom: none; }
    .pipeline-name    { font-weight: 500; color: var(--ink); }
    .pipeline-company { color: var(--mute); font-size: 12px; margin-top: 2px; }
    .pipeline-meta     { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
    .pipeline-stage {
      font-size: 11px; padding: 3px 9px; border-radius: 20px;
      background: var(--bg); border: 1px solid var(--border); color: var(--ink-2);
      white-space: nowrap;
    }
    .pipeline-value { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 56px; text-align: right; }

    /* ── DATA TABLE (pantallas individuales) ──────────── */
    .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
    .data-table th {
      text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
      color: var(--mute); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border);
    }
    .data-table td { padding: 10px; border-bottom: 1px solid var(--border); color: var(--ink-2); }
    .data-table tr:last-child td { border-bottom: none; }
    .data-table td.num, .data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
    .data-table td strong { color: var(--ink); font-weight: 500; }

    /* ── LAYOUT ────────────────────────────────────── */
    .rp-main {
      max-width: 1200px;
      margin: 0 auto;
      padding: 40px 40px 80px;
      display: flex; flex-direction: column; gap: 36px;
    }

    /* ── SECTION HEADER ─────────────────────────────── */
    .section-head {
      display: flex; align-items: baseline; justify-content: space-between;
      margin-bottom: 16px;
    }
    .section-title {
      font-size: 11px; font-weight: 500;
      letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute);
    }
    .section-action {
      font-size: 12px; color: var(--accent); cursor: pointer;
      background: none; border: none; font-family: inherit; padding: 0;
      font-weight: 500;
    }
    .section-action:hover { opacity: 0.75; }

    /* ── KPI STRIP ──────────────────────────────────── */
    .kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .kpi-strip-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
    .kpi-card {
      background: var(--card);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
      padding: 20px 22px;
      display: flex; flex-direction: column; gap: 6px;
    }
    .kpi-label { font-size: 11.5px; color: var(--mute); font-weight: 400; letter-spacing: 0.01em; }
    .kpi-value {
      font-size: 28px; font-weight: 300; color: var(--ink);
      letter-spacing: -0.04em; line-height: 1;
    }
    .kpi-value span { font-size: 14px; font-weight: 400; color: var(--ink-2); margin-left: 2px; }
    .kpi-value.loading { color: var(--border); }
    .kpi-delta { font-size: 11.5px; font-weight: 400; color: var(--mute); }
    .kpi-delta.up   { color: var(--green); }
    .kpi-delta.down { color: var(--red); }
    .kpi-sparkline { display: block; margin-top: 8px; }
    .kpi-sparkline svg { display: block; }

    /* ── BIZ NAV ────────────────────────────────────── */
    .biz-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
    .biz-pill {
      padding: 7px 14px; border-radius: 20px;
      border: 1px solid var(--border); background: var(--card);
      color: var(--ink-2); font-size: 12.5px; font-weight: 500;
      font-family: inherit; cursor: pointer; transition: all 0.15s;
      display: inline-flex; align-items: center; text-decoration: none;
    }
    .biz-pill:hover  { border-color: var(--accent); color: var(--accent); }
    .biz-pill.active { background: var(--ink); border-color: var(--ink); color: #FFF; }

    /* ── FRENTES GRID ───────────────────────────────── */
    .frentes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; transition: grid-template-columns 0.15s; }
    .frentes-grid.expanded { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
    .frentes-grid .frente-card.hidden-biz { display: none; }
    .frentes-grid.compact-mode .frente-card { padding: 20px 22px; gap: 8px; }
    .frentes-grid.compact-mode .frente-hito:not(.hito-primary) { display: none; }
    .frentes-grid.compact-mode .frente-links { display: none; }
    .frente-card {
      background: var(--card);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      padding: 28px 30px;
      display: flex; flex-direction: column; gap: 18px;
      position: relative; overflow: hidden;
    }
    .frente-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.8) 70%, transparent);
    }
    .frente-header { display: flex; align-items: flex-start; justify-content: space-between; }
    .frente-title-block { display: flex; flex-direction: column; gap: 3px; }
    .frente-name  { font-size: 17px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
    .frente-sub   { font-size: 12px; color: var(--mute); font-weight: 400; }
    .status-badge {
      display: flex; align-items: center; gap: 6px;
      padding: 5px 10px; border-radius: 20px;
      font-size: 11.5px; font-weight: 500;
      cursor: pointer; user-select: none;
      transition: opacity 0.15s; flex-shrink: 0;
    }
    .status-badge:hover { opacity: 0.8; }
    .status-badge.green { background: var(--green-bg); color: var(--green); }
    .status-badge.amber { background: var(--amber-bg); color: var(--amber); }
    .status-badge.red   { background: var(--red-bg);   color: var(--red);   }
    .status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
    .status-badge.green .status-dot { background: var(--green); }
    .status-badge.amber .status-dot { background: var(--amber); }
    .status-badge.red   .status-dot { background: var(--red);   }

    .frente-hito {
      background: var(--bg); border-radius: var(--radius-sm);
      padding: 12px 14px; font-size: 13px; color: var(--ink-2);
      line-height: 1.5; border: 1px solid var(--border);
    }
    .hito-label {
      font-size: 10.5px; text-transform: uppercase;
      letter-spacing: 0.07em; color: var(--mute); font-weight: 500;
      display: block; margin-bottom: 4px;
    }
    .live-kpi-inline {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 13px; font-weight: 500; color: var(--ink);
    }
    .live-kpi-inline .delta { font-size: 11px; color: var(--green); font-weight: 400; }
    .live-kpi-inline .delta.neg { color: var(--red); }

    .frente-links { display: flex; flex-wrap: wrap; gap: 8px; }
    .link-pill {
      display: inline-flex; align-items: center; gap: 5px;
      padding: 6px 12px;
      background: var(--bg); border: 1px solid var(--border);
      border-radius: 20px; font-size: 12px; font-weight: 500;
      color: var(--ink-2); text-decoration: none; transition: all 0.15s;
    }
    .link-pill:hover { background: var(--accent); border-color: var(--accent); color: #FFF; }
    .link-pill svg { width: 12px; height: 12px; opacity: 0.6; flex-shrink: 0; }
    .link-pill:hover svg { opacity: 1; }

    /* ── TOOLS SECTION ──────────────────────────────── */
    .tools-grid { display: flex; flex-wrap: wrap; gap: 10px; }
    .tool-card {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 16px;
      background: var(--card); border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm); text-decoration: none;
      color: var(--ink); font-size: 13px; font-weight: 500;
      transition: all 0.15s; border: 1px solid transparent;
    }
    .tool-card:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 2px 12px rgba(30,61,184,0.12); }
    .tool-icon {
      width: 30px; height: 30px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 14px; flex-shrink: 0;
    }

    /* ── ANÁLISIS ───────────────────────────────────── */
    .analysis-card {
      background: var(--card);
      border-radius: var(--radius-lg); box-shadow: var(--shadow);
      padding: 28px 30px;
      display: flex; flex-direction: column; gap: 16px;
    }
    .analysis-btn {
      align-self: flex-start;
      padding: 10px 20px;
      background: var(--ink); color: #FFF;
      border: none; border-radius: var(--radius-sm);
      font-size: 13px; font-weight: 500; font-family: inherit;
      cursor: pointer; transition: opacity 0.15s;
    }
    .analysis-btn:hover { opacity: 0.8; }
    .analysis-btn:disabled { opacity: 0.5; cursor: default; }
    .analysis-output {
      font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
      white-space: pre-wrap;
      display: none;
    }
    .analysis-output.visible { display: block; }
    .analysis-meta {
      font-size: 11px; color: var(--mute); margin-top: 8px;
    }

    /* ── NORTE ESTRATÉGICO ──────────────────────────── */
    .north-card {
      background: var(--card);
      border-radius: var(--radius-lg); box-shadow: var(--shadow);
      padding: 28px 30px;
      display: flex; flex-direction: column; gap: 20px;
      position: relative; overflow: hidden;
    }
    .north-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8) 30%, rgba(255,255,255,0.8) 70%, transparent);
    }
    .goals-list { display: flex; flex-direction: column; gap: 20px; }
    .goal-item { display: flex; flex-direction: column; gap: 7px; }
    .goal-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
    .goal-name { font-size: 13.5px; font-weight: 500; color: var(--ink); }
    .goal-horizon { font-size: 11.5px; color: var(--mute); white-space: nowrap; }
    .goal-bar-track { height: 5px; background: var(--border); border-radius: 99px; overflow: hidden; }
    .goal-bar-fill { height: 100%; border-radius: 99px; background: var(--accent); transition: width 0.5s ease; }
    .goal-bar-fill.amber { background: #D97706; }
    .goal-bar-fill.green { background: #15803D; }
    .goal-note { font-size: 11.5px; color: var(--mute); }

    /* edit mode */
    .goal-slider {
      display: none;
      width: 100%; height: 5px; cursor: pointer;
      accent-color: var(--accent); border-radius: 99px;
    }
    .goal-note-input {
      display: none;
      width: 100%; font-size: 11.5px; color: var(--ink-2);
      border: 1px solid var(--border); border-radius: var(--radius-sm);
      padding: 4px 8px; font-family: inherit; background: var(--bg);
      outline: none;
    }
    .goal-note-input:focus { border-color: var(--accent); }
    .north-card.editing .goal-slider      { display: block; }
    .north-card.editing .goal-note-input  { display: block; }
    .north-card.editing .goal-bar-track   { display: none; }
    .north-card.editing .goal-note        { display: none; }

    /* ── LIFE GRID (Experiencias, estilo blog) ───────── */
    .life-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .life-card {
      background: var(--card);
      border-radius: var(--radius-md);
      box-shadow: var(--shadow-sm);
      overflow: hidden;
      display: flex; flex-direction: column;
    }
    .life-card-photo {
      position: relative;
      aspect-ratio: 4 / 3;
      background: var(--bg);
      display: flex; align-items: center; justify-content: center;
      overflow: hidden; cursor: pointer;
    }
    .life-card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .life-card-icon { font-size: 22px; color: var(--mute); }
    .life-card-badge {
      position: absolute; top: 8px; right: 8px;
      width: 22px; height: 22px; border-radius: 50%;
      background: var(--green); color: #FFF;
      display: flex; align-items: center; justify-content: center;
      font-size: 12px; box-shadow: var(--shadow-sm);
    }
    .life-card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
    .life-card-name { font-size: 13.5px; font-weight: 500; color: var(--ink); line-height: 1.35; }
    .life-card.done .life-card-name { color: var(--mute); text-decoration: line-through; }
    .life-card-meta { font-size: 11.5px; color: var(--mute); }

    /* ── DIVIDER ─────────────────────────────────────── */
    .divider { height: 1px; background: var(--border); }

    /* ── RESPONSIVE ─────────────────────────────────── */
    @media (max-width: 900px) {
      .rp-header { padding: 0 20px; }
      .rp-main   { padding: 24px 20px 60px; }
      .kpi-strip { grid-template-columns: repeat(2, 1fr); }
      .kpi-strip-3 { grid-template-columns: repeat(2, 1fr); }
      .frentes-grid { grid-template-columns: 1fr; }
      .life-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 540px) {
      .kpi-strip   { grid-template-columns: repeat(2, 1fr); }
      .kpi-strip-3 { grid-template-columns: 1fr; }
      .life-grid   { grid-template-columns: 1fr; }
    }
