  :root {
    --ink: #1a1a18;
    --paper: #faf8f3;
    --cream: #f2ede3;
    --gold: #9BA339;
    --gold-light: #d4dc8a;
    --rust: #c44b2a;
    --navy: #1C3B61;
  --forest: #2d5a3d;
    --muted: #7a7468;
    --border: #ddd8cc;
    --white: #ffffff;
    --radius: 4px;
    --radius-lg: 12px;
  }

  * { margin:0; padding:0; box-sizing:border-box; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
  }

  /* ─── LEAD BANNER ─── */
  .lead-banner {
    background: var(--ink);
    color: var(--gold-light);
    text-align: center;
    padding: 10px 20px;
    font-size: 13px;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  .lead-banner strong { color: #fff; }
  .btn-lead {
    background: var(--gold);
    color: #fff;
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
  }
  .btn-lead:hover { background: var(--rust); }

  /* ─── NAV DESKTOP ─── */
  .navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    position: sticky;
    top: 40px;
    z-index: 999;
  }
  .nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-logo svg { height: 28px; width: auto; }
  .brand-logo-img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
  }
  .brand-logo-img--nav { height: 28px; }
  .brand-logo-img--sidebar {
    max-height: 40px;
    width: auto;
  }
  .nav-logo span {
    display: inline-block;
    width: 32px; height: 32px;
    background: var(--ink);
    color: var(--gold-light);
    border-radius: 50%;
    font-size: 16px;
    text-align: center;
    line-height: 32px;
    font-style: italic;
  }
  .nav-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--ink);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-burger:hover { background: var(--cream); }
  .nav-burger i { font-size: 22px; line-height: 1; }

  .nav-links { display: flex; gap: 8px; align-items: center; margin-left: auto; }
  .nav-links a {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
    cursor: pointer;
  }
  .nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--cream); }
  .btn-primary {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }
  .btn-primary:hover { background: var(--gold); }
  .btn-outline {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-outline:hover { border-color: var(--ink); }

  /* ─── VIEWS ─── */
  .view { display: none; }
  .view.active { display: block; }

  /* ─── HERO ─── */
  .hero {
    min-height: calc(100vh - 104px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 60px 80px;
    gap: 60px;
  }
  .hero-left h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(40px, 5vw, 68px);
    line-height: 1.1;
    margin-bottom: 24px;
  }
  .hero-left h1 em { color: var(--gold); font-style: italic; }
  .hero-left p { color: var(--muted); font-size: 17px; max-width: 460px; margin-bottom: 32px; }
  .hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
  .btn-big {
    background: var(--navy);
    color: #fff;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }
  .btn-big:hover { background: var(--gold); }
  .btn-big-outline {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--ink);
    padding: 14px 32px;
    border-radius: 30px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .btn-big-outline:hover { background: var(--ink); color: #fff; }

  .hero-right {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
  }
  .hero-right::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    background: var(--gold-light);
    border-radius: 50%;
    opacity: 0.4;
  }
  .services-preview { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
  .service-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--paper);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: border-color 0.2s;
  }
  .service-item:hover { border-color: var(--gold); }
  .service-icon {
    width: 36px; height: 36px;
    background: var(--ink);
    color: var(--gold-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
  }
  .service-item h4 { font-size: 14px; font-weight: 500; }
  .service-item p { font-size: 12px; color: var(--muted); }

  /* ─── SECTION GENERAL ─── */
  .section {
    padding: 80px 80px;
    border-top: 1px solid var(--border);
  }
  .section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    font-weight: 500;
    margin-bottom: 12px;
  }
  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 16px;
  }
  .section-subtitle { color: var(--muted); font-size: 16px; max-width: 560px; margin-bottom: 48px; }

  /* ─── PROCESS JOURNEY ─── */
  .journey-track {
    position: relative;
    padding: 20px 0;
  }
  .journey-line {
    position: absolute;
    top: 56px; left: 60px; right: 60px;
    height: 3px;
    background: var(--border);
    z-index: 0;
  }
  .journey-line-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--forest));
    width: 45%;
    border-radius: 2px;
  }
  .journey-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 90px;
  }
  .step-circle {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    border: 3px solid var(--border);
    background: var(--white);
    transition: all 0.3s;
    cursor: default;
    position: relative;
  }
  .step-circle.done {
    background: var(--forest);
    border-color: var(--forest);
    color: #fff;
  }
  .step-circle.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    box-shadow: 0 0 0 6px var(--gold-light);
  }
  .step-circle.pending { opacity: 0.45; }
  .step-label { font-size: 11px; color: var(--muted); text-align: center; font-weight: 500; }
  .step-label.active-label { color: var(--gold); font-weight: 600; }

  /* ─── PIPELINE / ESTADO INTERNO (seguimiento, tapa, maquetación, impresión, admin) ─── */
  .pipeline-stages {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .pipeline-stage {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
  }
  .pipeline-stage:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .pipeline-stage:first-child {
    padding-top: 0;
  }
  .ps-connector {
    flex-shrink: 0;
    width: 4px;
    min-height: 36px;
    margin-top: 6px;
    border-radius: 3px;
    background: var(--border);
    align-self: stretch;
  }
  .ps-connector.done { background: var(--forest); }
  .ps-connector.active { background: var(--gold); }
  .ps-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 1;
    box-sizing: border-box;
  }
  .ps-icon i { font-size: 16px; line-height: 1; }
  .ps-icon.done {
    background: var(--forest);
    color: #fff;
    border: none;
  }
  .ps-icon.done i { color: #fff; }
  .ps-icon.active {
    background: var(--gold);
    color: #fff;
    border: none;
    box-shadow: 0 0 0 3px var(--gold-light);
  }
  .ps-icon.active i { color: #fff; }
  .ps-icon.pending {
    background: var(--cream);
    border: 1px solid var(--border);
    color: var(--muted);
  }
  .ps-icon.pending i { color: var(--muted); opacity: 0.85; }
  .ps-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
  }
  .ps-name {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.35;
  }
  .ps-detail {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
  }
  .ps-substages {
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .ps-sub {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    line-height: 1.4;
    color: var(--ink);
  }
  .ps-sub.done { color: var(--forest); }
  .ps-sub.done .ps-sub-dot { background: var(--forest); }
  .ps-sub.active {
    color: var(--ink);
    font-weight: 500;
  }
  .ps-sub.active .ps-sub-dot {
    background: var(--gold);
    box-shadow: 0 0 0 2px var(--gold-light);
  }
  .ps-sub.pending { color: var(--muted); }
  .ps-sub.pending .ps-sub-dot { background: var(--border); }
  .ps-sub-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--border);
  }

  /* ─── AUTH FORMS ─── */
  .auth-wrap {
    min-height: calc(100vh - 104px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--cream);
  }
  .auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 460px;
  }
  .auth-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 8px;
  }
  .auth-card p.sub { color: var(--muted); font-size: 14px; margin-bottom: 32px; }
  .form-group { margin-bottom: 20px; }
  .form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
  .form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    background: var(--paper);
    color: var(--ink);
    outline: none;
    transition: border-color 0.2s;
  }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--gold);
  }
  .form-group textarea { resize: vertical; min-height: 80px; }
  .form-submit {
    width: 100%;
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
  }
  .form-submit:hover { background: var(--gold); }
  .form-link { font-size: 13px; color: var(--muted); text-align: center; margin-top: 16px; }
  .form-link a { color: var(--gold); text-decoration: none; cursor: pointer; }

  /* ─── SERVICES CHECKBOXES ─── */
  .services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
  .service-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
  }
  .service-check:hover { border-color: var(--gold); background: var(--paper); }
  .service-check.selected { border-color: var(--gold); background: #fdf6e3; }
  .service-check input { position: absolute; opacity: 0; pointer-events: none; }
  .check-icon { font-size: 22px; flex-shrink: 0; }
  .check-label h4 { font-size: 13px; font-weight: 500; }
  .check-label p { font-size: 11px; color: var(--muted); }

  /* ─── DASHBOARD ─── */
  .dashboard-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: calc(100vh - 104px);
    align-items: start;
  }
  .sidebar {
    background: var(--ink);
    color: var(--white);
    padding: 28px 0 32px;
    position: sticky;
    top: 104px;
    height: calc(100vh - 104px);
    overflow-y: auto;
  }
  .sidebar-logo {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
  }
  .sidebar > .sidebar-nav:first-child {
    padding-top: 4px;
  }
  .sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .sidebar-nav a:hover, .sidebar-nav a.active {
    color: var(--white);
    background: rgba(255,255,255,0.08);
  }
  .sidebar-nav a.active { border-right: 2px solid var(--gold); }
  .sidebar-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.3);
    padding: 16px 24px 6px;
  }

  .main-content {
    padding: 40px 48px;
    background: var(--paper);
    min-width: 0;
  }
  .page-header { margin-bottom: 32px; }
  .page-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 4px;
  }
  .page-header p {
    color: var(--muted);
    font-size: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  /* ─── MANUSCRIPT CARDS ─── */
  .manuscript-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-bottom: 32px; }
  .manuscript-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
  }
  .manuscript-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
  .ms-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
  .ms-title { font-family: 'Playfair Display', serif; font-size: 18px; }
  .ms-genre { font-size: 11px; color: var(--muted); }
  .status-badge {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
  }
  .badge-active { background: #e8f5e9; color: #2e7d32; }
  .badge-pending { background: #fff8e1; color: #f57f17; }
  .badge-done { background: #e3f2fd; color: #1565c0; }
  .progress-bar { height: 4px; background: var(--border); border-radius: 2px; margin: 16px 0 12px; }
  .progress-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--gold), var(--forest)); }
  .ms-stage { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }

  /* ─── STATS ROW ─── */
  .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
  .stat-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
  }
  .stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
  .stat-value { font-family: 'Playfair Display', serif; font-size: 28px; }
  .stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }

  /* ─── CHAT ─── */
  .chat-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 240px 1fr;
    height: 520px;
  }
  .chat-list {
    border-right: 1px solid var(--border);
    overflow-y: auto;
  }
  .chat-list-header { padding: 16px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--border); }
  .chat-contact {
    display: flex; gap: 12px; align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
  }
  .chat-contact:hover, .chat-contact.active { background: var(--cream); }
  .chat-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
  }
  .chat-contact-info h4 { font-size: 13px; font-weight: 500; }
  .chat-contact-info p { font-size: 11px; color: var(--muted); }
  .chat-main { display: flex; flex-direction: column; }
  .chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .chat-header h3 { font-size: 14px; font-weight: 500; }
  .chat-header p { font-size: 12px; color: var(--muted); }
  .chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
  .msg { max-width: 75%; }
  .msg-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
  }
  .msg.sent { align-self: flex-end; }
  .msg.sent .msg-bubble { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
  .msg.received .msg-bubble { background: var(--cream); color: var(--ink); border-bottom-left-radius: 4px; }
  .msg-time { font-size: 10px; color: var(--muted); margin-top: 4px; text-align: right; }
  .msg.received .msg-time { text-align: left; }
  .chat-input-row {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
  }
  .chat-input-row input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    background: var(--paper);
    outline: none;
  }
  .chat-input-row input:focus { border-color: var(--gold); }
  .btn-send {
    background: var(--ink);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    cursor: pointer;
  }
  .sales-trace-panel .page-header {
    background: linear-gradient(180deg, #fff 0%, #faf9f5 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
  }
  .sales-kpi-grid .ta-stat { padding: 16px 12px; text-align: center; }
  .sales-kpi-grid .ta-stat-val { font-family: 'Playfair Display', serif; font-size: 28px; color: var(--ink); }
  .sales-kpi-grid .ta-stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
  .sales-pies-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
  }
  .sales-pie-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    background: var(--paper);
  }
  .sales-pie-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 10px;
  }
  .sales-pie-wrap { display: flex; align-items: center; gap: 10px; }
  .sales-pie {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.08);
  }
  .sales-pie-center {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
  }
  .sales-pie-legend {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.35;
  }
  .sales-pie-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: baseline;
  }
  .sales-table-extended td, .sales-table-extended th {
    white-space: nowrap;
  }
  .table-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    color: var(--muted);
  }
  .table-pager .btn-outline {
    font-size: 12px;
    padding: 5px 10px;
  }
  .table-pager .btn-outline[disabled] {
    opacity: .45;
    cursor: not-allowed;
  }
  .sales-demography-pies {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
  }
  .sales-demography-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 12px;
  }
  .sales-demography-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    background: var(--paper);
  }
  .sales-demography-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 10px;
  }
  .sales-demography-chart-wrap { display: flex; align-items: center; gap: 12px; }
  .sales-demography-pie {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
  }
  .sales-demography-pie-center {
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
  }
  .sales-demography-legend {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.4;
  }
  .sales-demography-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: baseline;
  }
  .sales-demography-pies-placeholder {
    background: var(--white);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
  }
  .sales-demography-card.is-placeholder { background: var(--cream); }
  .sales-demography-empty {
    font-size: 12px;
    color: var(--muted);
    border: 1px dashed var(--border);
    border-radius: 8px;
    padding: 14px 10px;
    text-align: center;
  }

  /* ─── BUDGET TABLE ─── */
  .budget-table { width: 100%; border-collapse: collapse; }
  .budget-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    font-weight: 500;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
  }
  .budget-table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
  }
  .budget-table tr:last-child td { border-bottom: none; }
  .budget-total { font-weight: 600; font-size: 15px; }

  /* ─── REVIEWS ─── */
  .stars { color: var(--gold); font-size: 20px; letter-spacing: 2px; }
  .review-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
  }

  /* ─── ADMIN LEADS ─── */
  .leads-table { width: 100%; border-collapse: collapse; }
  .leads-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
  }
  .leads-table td { padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
  .leads-table tr:hover td { background: var(--cream); }
  .action-btn {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
  }
  .action-btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
  .action-btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }

  /* ─── MODAL ─── */
  .modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .modal-overlay.open { display: flex; }
  .modal-box {
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
  }
  .modal-close {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 22px;
    cursor: pointer;
    color: var(--muted);
    background: none;
    border: none;
  }
  .modal-box h3 { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 8px; }
  .modal-box p.sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

  /* ─── MOBILE NAV ─── */
  .mobile-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 8px 0 12px;
    z-index: 998;
    grid-template-columns: repeat(4, 1fr);
  }
  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    padding: 6px 4px;
    font-size: 10px;
    color: var(--muted);
    transition: color 0.2s;
  }
  .mobile-nav-item.active { color: var(--gold); }
  .mobile-nav-icon { font-size: 20px; }

  /* ─── NAVEGACIÓN INFERIOR — SITIO PÚBLICO (solo móvil) ─── */
  .pub-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  }
  .pub-mobile-nav__primary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .pub-mobile-nav__item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 6px 4px;
    font-size: 9px;
    line-height: 1.15;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    color: var(--muted);
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .pub-mobile-nav__item.active {
    color: var(--gold);
    background: var(--cream);
    font-weight: 600;
  }
  .pub-mobile-nav__icon {
    font-size: 20px;
    line-height: 1;
  }
  .pub-mobile-nav__item.active .pub-mobile-nav__icon {
    color: var(--gold);
  }
  .pub-mobile-nav__label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  @media (max-width: 768px) {
    .pub-mobile-nav { display: block; }
    body.has-pub-mobile-nav {
      padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }
    .nav-burger { display: inline-flex; }
  }

  /* ─── Cajón menú (hamburguesa) — público y paneles ─── */
  .nav-drawer-wrap {
    position: fixed;
    inset: 0;
    z-index: 10040;
    pointer-events: none;
    visibility: hidden;
  }
  .nav-drawer-wrap.is-open {
    pointer-events: auto;
    visibility: visible;
  }
  .nav-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
  }
  .nav-drawer-wrap.is-open .nav-drawer-overlay { opacity: 1; }
  .nav-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(100%, 320px);
    max-width: 92vw;
    background: var(--white);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .nav-drawer-wrap.is-open .nav-drawer-panel { transform: translateX(0); }
  .nav-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
  }
  .nav-drawer-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
  }
  .nav-drawer-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--cream);
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  .nav-drawer-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .nav-drawer-body--dense { gap: 2px; padding-top: 8px; }
  .nav-drawer-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 12px 8px 6px;
    margin-top: 4px;
  }
  .nav-drawer-section:first-child { margin-top: 0; padding-top: 4px; }
  .nav-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s;
  }
  .nav-drawer__link i { font-size: 18px; color: var(--muted); }
  .nav-drawer__link:hover { background: var(--cream); }
  .nav-drawer__link--btn {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    text-align: left;
  }
  .nav-drawer__link--muted { color: var(--muted); font-size: 13px; }
  body.nav-drawer-open { overflow: hidden; }

  /* ─── Barra inferior paneles admin / proveedor ─── */
  .panel-mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 6px 0 calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.06);
  }
  .panel-mobile-nav__inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    max-width: 100%;
  }
  .panel-mobile-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    font-size: 9px;
    line-height: 1.15;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
  }
  .panel-mobile-nav__item.active {
    color: var(--gold);
    font-weight: 600;
  }
  .panel-mobile-nav__icon { font-size: 20px; line-height: 1; }
  .panel-mobile-nav__item.active .panel-mobile-nav__icon { color: var(--gold); }

  /* ─── TOAST ─── */
  .toast {
    position: fixed;
    bottom: 80px; right: 24px;
    background: var(--ink);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 3000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
  }
  .toast.show { opacity: 1; transform: translateY(0); }

  /* ─── TABS ─── */
  .tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    gap: 0;
  }
  .tab-btn {
    padding: 10px 20px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
  }
  .tab-btn.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 500; }
  .tab-panel { display: none; }
  .tab-panel.active { display: block; }

  /* ─── NOTIFICATIONS ─── */
  .notif-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
  }
  .notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    margin-top: 6px;
  }
  .notif-dot.read { background: var(--border); }
  .notif-text h4 { font-size: 13px; font-weight: 500; }
  .notif-text p { font-size: 12px; color: var(--muted); }
  .notif-time { font-size: 11px; color: var(--muted); margin-left: auto; white-space: nowrap; }

  /* ─── PROVIDERS ─── */
  .provider-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
  }
  .provider-card:hover { border-color: var(--gold); }
  .provider-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .provider-info { flex: 1; }
  .provider-info h4 { font-size: 14px; font-weight: 500; }
  .provider-info p { font-size: 12px; color: var(--muted); }
  .provider-actions { display: flex; gap: 8px; }

  /* ─── RESPONSIVE ─── */
  /* ─── ONBOARDING WIZARD ─── */
  .onboarding-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,10,8,0.72);
    z-index: 3500;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
  }
  .onboarding-overlay.open { display: flex; }

  .wizard-box {
    background: var(--white);
    border-radius: 20px;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  }

  /* Progress header */
  .wizard-header {
    background: var(--ink);
    padding: 28px 36px 24px;
    color: var(--white);
    flex-shrink: 0;
  }
  .wizard-steps-track {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 20px;
  }
  .wstep {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    position: relative;
  }
  .wstep:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.15);
  }
  .wstep.done:not(:last-child)::after { background: var(--gold); }
  .wstep-circle {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    border: 1.5px solid rgba(255,255,255,0.15);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
  }
  .wstep.done .wstep-circle {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    font-size: 13px;
  }
  .wstep.active .wstep-circle {
    background: var(--white);
    border-color: var(--white);
    color: var(--ink);
    box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
  }
  .wstep-label {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-align: center;
    white-space: nowrap;
  }
  .wstep.active .wstep-label { color: rgba(255,255,255,0.9); }
  .wstep.done .wstep-label { color: var(--gold-light); }

  .wizard-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    color: var(--white);
    margin-bottom: 4px;
  }
  .wizard-header-sub { font-size: 13px; color: rgba(255,255,255,0.55); }

  /* Panels */
  .wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px 36px;
  }
  .wizard-panel { display: none; }
  .wizard-panel.active { display: block; }

  /* Step indicator pill */
  .step-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 20px;
  }
  .step-pill span { color: var(--gold); }

  /* Contract viewer */
  .contract-viewer {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
  }
  .contract-toolbar {
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 12px;
  }
  .contract-toolbar span {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 12rem;
    line-height: 1.35;
  }
  .contract-toolbar button,
  .contract-toolbar .btn-outline {
    flex-shrink: 0;
  }
  .contract-scroll {
    height: 260px;
    overflow-y: auto;
    padding: 20px 24px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--ink);
  }
  .contract-scroll h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 16px 0 6px;
    font-family: 'Playfair Display', serif;
  }
  .contract-scroll p { margin-bottom: 10px; color: var(--muted); }
  .contract-scroll .clause {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
  }
  .contract-scroll .clause-num {
    font-weight: 600;
    color: var(--gold);
    flex-shrink: 0;
    font-size: 12px;
    min-width: 24px;
  }
  .read-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: #fffbf0;
    border-top: 1px solid var(--gold-light);
    cursor: pointer;
  }
  .read-confirm input { margin-top: 3px; accent-color: var(--gold); cursor: pointer; }
  .read-confirm label { font-size: 13px; color: var(--ink); cursor: pointer; }

  /* Signature pad */
  .signature-pad-wrap {
    border: 1.5px dashed var(--border);
    border-radius: 8px;
    background: var(--paper);
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
    overflow: hidden;
    margin: 16px 0;
  }
  .signature-pad-wrap:hover { border-color: var(--gold); background: #fffbf0; }
  .signature-pad-wrap.signed {
    border-color: var(--forest);
    background: #f0f8f2;
    border-style: solid;
  }
  .sig-placeholder { text-align: center; color: var(--muted); }
  .sig-placeholder .sig-icon { font-size: 28px; margin-bottom: 4px; opacity: 0.4; }
  .sig-placeholder p { font-size: 12px; }
  .sig-done { text-align: center; color: var(--forest); }
  .sig-done .sig-name { font-family: 'Playfair Display', serif; font-style: italic; font-size: 26px; color: var(--ink); margin-bottom: 4px; }
  .sig-done p { font-size: 11px; color: var(--forest); }

  /* Upload zone */
  .upload-zone {
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--paper);
  }
  .upload-zone:hover { border-color: var(--gold); background: #fffbf0; }
  .upload-zone.uploaded { border-color: var(--forest); background: #f0f8f2; border-style: solid; }
  .upload-icon { font-size: 32px; margin-bottom: 8px; }
  .upload-zone h4 { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
  .upload-zone p { font-size: 12px; color: var(--muted); }

  /* Summary card */
  .summary-card {
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin: 16px 0;
  }
  .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
  }
  .summary-row:last-child { border-bottom: none; }
  .summary-row .label { color: var(--muted); }
  .summary-row .value { font-weight: 500; }

  /* Success screen */
  .success-screen {
    text-align: center;
    padding: 20px 0 10px;
  }
  .success-icon-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #f0f8f2;
    border: 3px solid var(--forest);
    display: flex; align-items: center; justify-content: center;
    font-size: 36px;
    margin: 0 auto 20px;
    animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
  }
  @keyframes popIn {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  .success-screen h3 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    margin-bottom: 8px;
  }
  .success-screen p { color: var(--muted); font-size: 14px; max-width: 400px; margin: 0 auto 24px; }

  /* Wizard footer */
  .wizard-footer {
    padding: 20px 36px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--white);
    gap: 12px;
  }
  .wizard-footer-info { font-size: 12px; color: var(--muted); }

  /* Info callout */
  .callout {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin: 16px 0;
  }
  .callout.info { background: #eef5fb; border: 1px solid #b5d4f4; color: #185fa5; }
  .callout.warn { background: #fffbf0; border: 1px solid var(--gold-light); color: #7a5c10; }
  .callout.success { background: #f0f8f2; border: 1px solid #9FE1CB; color: #0f6e56; }
  .callout-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

  /* ─── Checklist ─── */
  .checklist { display: flex; flex-direction: column; gap: 10px; }
  .check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
  }
  .check-item.checked { background: #f0f8f2; border-color: #9FE1CB; }
  .check-box {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    transition: all 0.15s;
  }
  .check-item.checked .check-box { background: var(--forest); border-color: var(--forest); color: #fff; }


  /* ═══════════════════════════════
     PLANES
  ═══════════════════════════════ */
  .plans-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 24px 0;
  }
  @media (max-width: 1024px) {
    .plans-grid { grid-template-columns: repeat(2, 1fr); }
  }
  .plan-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    display: flex;
    flex-direction: column;
  }
  .plan-card:hover {
    border-color: var(--gold);
    box-shadow: 0 8px 32px rgba(0,0,0,.09);
    transform: translateY(-2px);
  }
  .plan-card.selected { border-color: var(--gold); background: #fffbf0; }
  .plan-card.featured { border-color: var(--gold); box-shadow: 0 4px 20px rgba(155,163,57,.2); box-shadow: 0 4px 20px rgba(184,146,42,.15); }
  .plan-badge {
    position: absolute;
    top: -13px; left: 50%;
    transform: translateX(-50%);
    background: var(--gold);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .03em;
  }
  .plan-name {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    margin-bottom: 4px;
  }
  .plan-price {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    color: var(--gold);
    font-weight: 700;
    line-height: 1;
    margin: 12px 0 4px;
  }
  .plan-desc {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
  }
  .plan-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
    margin-bottom: 20px;
  }
  .plan-features li {
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
  }
  .plan-features li::before {
    content: '✓';
    color: var(--forest);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
  }
  .plan-features li.extra { color: var(--ink); }
  .plan-features li.extra::before { content: '★'; color: var(--gold); }
  .plan-features li.muted { color: var(--muted); }
  .plan-features li.muted::before { content: '—'; color: var(--border); }
  .btn-plan {
    width: 100%;
    padding: 13px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    border: 2px solid var(--ink);
    background: var(--ink);
    color: #fff;
    margin-top: auto;
  }
  .btn-plan:hover { background: var(--gold); border-color: var(--gold); }
  .plan-card.selected .btn-plan,
  .plan-card.featured .btn-plan { background: var(--gold); border-color: var(--gold); }
  /* Plan page — full width */
  .plans-grid-full { max-width: 1400px; margin: 0 auto; }


  /* ── Hero book stack ── */
  .hero-book-stack {
    position: relative;
    height: 280px;
    width: 100%;
  }

  /* ─── PERIODIC TABLE CELLS ─── */
  .periodic-cell {
    border: 2px solid var(--border);
    border-radius: 4px;
    padding: 8px 6px 12px;
    text-align: center;
    flex: 1;
    min-width: 80px;
    transition: border-color .2s, background .2s;
    cursor: default;
  }
  .periodic-cell .cell-num {
    font-size: 9px;
    color: var(--muted);
    margin-bottom: 2px;
  }
  .periodic-cell .cell-sym {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    line-height: 1;
    color: var(--muted);
  }
  .periodic-cell .cell-label {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    margin-top: 5px;
  }
  .periodic-cell.active {
    border-color: var(--gold);
    background: #f5f7e8;
  }
  .periodic-cell.active .cell-num,
  .periodic-cell.active .cell-sym,
  .periodic-cell.active .cell-label { color: var(--gold); }
  .periodic-cell.done {
    border-color: var(--gold);
    background: #fafbf0;
  }
  .periodic-cell.done .cell-sym { font-weight: 500; color: var(--gold); }
  .periodic-cell.done .cell-num,
  .periodic-cell.done .cell-label { color: var(--gold); }


  /* ─── REVIEW CAROUSEL ─── */
  .review-carousel { position:relative; overflow:hidden; }
  .review-track { display:flex; gap:20px; transition:transform .4s ease; }
  .review-card-c {
    min-width:320px; background:var(--white); border:1px solid var(--border);
    border-radius:14px; padding:24px; flex-shrink:0;
  }
  .carousel-nav { display:flex; gap:10px; justify-content:center; margin-top:20px; }
  .carousel-dot { width:8px; height:8px; border-radius:50%; background:var(--border); cursor:pointer; transition:background .2s; border:none; }
  .carousel-dot.active { background:var(--gold); }
  .carousel-arrows { display:flex; gap:10px; justify-content:flex-end; margin-bottom:12px; }
  .carousel-arrow { width:36px; height:36px; border-radius:50%; border:1px solid var(--border); background:var(--white); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:14px; transition:all .2s; }
  .carousel-arrow:hover { background:var(--gold); color:#fff; border-color:var(--gold); }

  @media (max-width: 768px) {
    .hero-book-stack { height: 200px; }
  }

  @media (max-width: 768px) {
    /* ── Nav ── */
    .navbar { padding: 0 16px; top: 36px; height: 54px; }
    .nav-links { display: none; }
    .nav-right { gap: 8px; }
    .lead-banner { font-size: 11px; padding: 8px 12px; }

    /* ── Hero ── */
    .hero { grid-template-columns: 1fr; padding: 32px 20px; gap: 32px; min-height: auto; }
    .hero-right { display: none; }
    .hero-left h1 { font-size: 28px; }
    .hero-ctas { flex-direction: column; }
    .btn-big, .btn-big-outline { width: 100%; text-align: center; padding: 13px 20px; }

    /* ── Sections ── */
    .section { padding: 40px 20px; }
    .section-title { font-size: 24px; }

    /* ── Service grid ── */
    [style*="grid-template-columns:repeat(auto-fit,minmax(280px,1fr))"] { grid-template-columns: 1fr !important; }

    /* ── Plans ── */
    .plans-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .plan-card { margin-top: 0 !important; padding: 22px 18px; }
    .plan-price { font-size: 28px; }
    .plans-grid-full { padding: 0 !important; }

    /* ── Register ── */
    #view-register .plans-grid { margin: 0 -16px; border-radius: 0; }
    #view-register > div > div:first-child { border-radius: 0 !important; }
    [style*="max-width:1000px"] { padding: 0 16px !important; }
    [style*="max-width:600px"] { padding: 16px 16px 40px !important; }
    [style*="grid-template-columns:1fr 1fr;gap:14px"] { grid-template-columns: 1fr !important; }

    /* ── Dashboard ── */
    .dashboard-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .main-content { padding: 16px; padding-bottom: 80px; }
    .page-header h2 { font-size: 22px; }

    /* ── Mobile nav ── */
    .mobile-nav { display: grid; }

    /* ── Stats ── */
    .stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-value { font-size: 22px; }

    /* ── Manuscript cards ── */
    .manuscript-grid { grid-template-columns: 1fr; }

    /* ── Journey ── */
    .journey-steps { gap: 0; }
    .step-node { min-width: 56px; }
    .step-circle { width: 34px; height: 34px; font-size: 13px; }
    .step-label { font-size: 9px; }
    .step-label.active-label { font-size: 9px; }

    /* ── Seguimiento strips ── */
    [style*="min-width:440px"] { min-width: 400px; }
    [style*="min-width:480px"] { min-width: 440px; }
    [style*="min-width:520px"] { min-width: 480px; }

    /* ── Chat ── */
    .chat-wrap { grid-template-columns: 1fr; height: auto; }
    .chat-list { display: block; border-right: 0; border-bottom: 1px solid var(--border); max-height: 180px; }
    .chat-messages { height: 220px; }

    /* ── Tables ── */
    .leads-table { font-size: 11px; }
    .leads-table th, .leads-table td { padding: 7px 8px; }
    [style*="overflow-x:auto"] { -webkit-overflow-scrolling: touch; }

    /* ── Auth ── */
    .auth-wrap { padding: 20px 16px; }
    .auth-card { padding: 24px 16px; max-width: 100% !important; }

    /* ── Modals ── */
    .modal-overlay { padding: 12px; align-items: flex-end; }
    .modal-box { padding: 24px 18px; border-radius: 16px 16px 0 0; max-height: 90vh; overflow-y: auto; }
    .modal-box h3 { font-size: 20px; }
    [style*="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px"] { display: flex !important; flex-direction: column !important; gap: 10px; }

    /* ── Onboarding wizard ── */
    .onboarding-overlay { padding: 0; align-items: flex-end; }
    .wizard-box { border-radius: 20px 20px 0 0; max-height: 94vh; }
    .wizard-header { padding: 18px 16px 14px; }
    .wizard-body { padding: 14px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .wizard-footer { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
    .wstep-label { display: none; }

    /* ── Provider portal ── */
    [style*="grid-template-columns:220px 1fr"] { display: block !important; }

    /* ── Admin pipeline inline journeys ── */
    [style*="min-width:520px"].journey-steps { overflow-x: auto; }

    /* ── Trazabilidad ── */
    [style*="grid-template-columns:repeat(4,1fr)"] { grid-template-columns: repeat(2,1fr) !important; }
    [style*="grid-template-columns: repeat(4,1fr)"] { grid-template-columns: repeat(2,1fr) !important; }
    .sales-pies-row { grid-template-columns: 1fr; }
    .sales-pie-wrap { align-items: flex-start; }
    .sales-demography-grid { grid-template-columns: 1fr; }
    .sales-demography-chart-wrap { align-items: flex-start; }
    .sales-demography-pies { padding: 14px 12px; }

    /* ── Generic 2-col → 1-col ── */
    [style*="grid-template-columns:1fr 1fr;gap:48px"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns:1fr 1fr;gap:16px;margin-bottom:14px"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px"] { grid-template-columns: 1fr !important; }
    [style*="grid-template-columns:1fr 1fr;gap:16px"] { grid-template-columns: 1fr !important; }

    /* ── Mi plan upgrade grid ── */
    [style*="grid-template-columns: repeat(auto-fill,minmax(200px,1fr))"] { grid-template-columns: 1fr 1fr !important; }

    /* ── Servicios comparativa table ── */
    [style*="overflow-x:auto"] table { font-size: 11px; }

    /* ── Site footer ── */
    .site-footer { padding: 40px 0 28px !important; }
    .site-footer__inner { padding: 0 20px !important; }
    .site-footer__grid {
      grid-template-columns: 1fr !important;
      gap: 28px !important;
      margin-bottom: 28px !important;
    }
    .site-footer__bottom {
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 14px !important;
    }
    .site-footer__copyright { font-size: 11px !important; }
    .site-footer__legal { justify-content: flex-start !important; }
  }

  /* ─── SITE FOOTER (main layout) ─── */
  .site-footer {
    padding: 56px 0 32px;
    box-sizing: border-box;
  }
  .site-footer__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
  }
  .site-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
    margin-bottom: 40px;
  }
  .site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
  }
  .site-footer__copyright {
    font-size: 12px;
    line-height: 1.55;
    flex: 1 1 240px;
    min-width: 0;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }
  .site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    align-items: center;
  }

  @media (max-width: 1024px) {
    .site-footer__grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 28px;
    }
  }
