/* ── proveedor-panel.css — Panel B2B del proveedor HeladoPro ── */
/* Extraído de proveedor-panel.html — sesión 14ª (2026-04-05)    */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root, [data-theme="dark"] {
  --bg:      #080E1C;   /* deep navy-dark — único para panel B2B */
  --surf:    var(--color-gray-900,#111827);   /* gray-900 surface panel B2B */
  --surf2:   #1A2235;   /* surface hover — unique navy-dark tone */
  --border:  var(--color-border, rgba(255,255,255,.08));
  --border2: var(--color-border-md, rgba(255,255,255,.14));
  --teal:    var(--color-accent, #0D9488);
  --teal-lt: var(--color-accent-light, #5EEAD4);
  --gold:    var(--color-gold, #F59E0B);
  --green:   var(--color-emerald, #10B981);
  --red:     #EF4444;   /* red-500 — distinto de --color-error (#DC2626) intencionalmente */
  --navy:    var(--color-primary, #0B1F38);
  --white:   var(--color-white, #FFFFFF);
  --mid:     var(--color-text-on-dark-mid, rgba(255,255,255,.55));
  --low:     var(--color-text-on-dark-low, rgba(255,255,255,.28));
  --font:    var(--font-body, 'DM Sans', system-ui, sans-serif);
  --display: var(--font-display, 'Playfair Display', serif);
  --max-w:   680px;
}
[data-theme="light"] {
  --bg:      var(--color-neutral-pale, #F8FAFB);
  --surf:    var(--color-white, #FFFFFF);
  --surf2:   var(--color-neutral-bg, #F1F5F9);
  --border:  rgba(0,0,0,.08);
  --border2: rgba(0,0,0,.13);
  --teal:    var(--color-accent, #0D9488);
  --teal-lt: var(--color-accent-dark, #0D7C72);
  --gold:    var(--color-bronze, #D97706);
  --green:   var(--color-emerald-600,#059669);   /* emerald-600 — tono más oscuro que --color-emerald para text sobre blanco */
  --red:     var(--color-error, #DC2626);
  --navy:    #1E3A5F;   /* navy intermedio — entre --color-primary y --color-primary-mid */
  --white:   #0F172A;   /* texto dark sobre fondo claro — alias invertido */
  --mid:     rgba(0,0,0,.50);
  --low:     rgba(0,0,0,.28);
}
[data-theme="light"] #hdr {
  background: rgba(248,250,251,.96);
}
[data-theme="light"] .prov-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .notice,
[data-theme="light"] .conv-strip,
[data-theme="light"] .lead-item,
[data-theme="light"] .action-card {
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--white);
       -webkit-font-smoothing: antialiased; min-height: 100dvh;
       transition: background .2s, color .2s; }

/* ── SKIP LINK ── */
.skip-to-main {
  position: absolute; top: -52px; left: 16px;
  background: var(--teal); color: var(--color-text-on-dark,#fff); padding: 10px 18px;
  z-index: 9999; font-weight: 700; font-size: 14px;
  border-radius: 0 0 8px 8px; text-decoration: none; transition: top .15s;
}
.skip-to-main:focus { top: 0; }

/* ── THEME TOGGLE ── */
.theme-toggle-btn {
  background: none; border: 1px solid var(--border2); color: var(--mid);
  border-radius: 8px; padding: 5px 9px; font-size: 15px; cursor: pointer;
  transition: all .15s; margin-left: 8px; flex-shrink: 0;
}
.theme-toggle-btn:hover { border-color: var(--teal-lt); color: var(--white); }

/* ── HEADER ── */
#hdr {
  position: sticky; top: 0; z-index: 100;
  height: 58px; display: flex; align-items: center; padding: 0 20px; gap: 10px;
  background: rgba(8,14,28,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.hdr-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.hdr-logo-name { font-family: var(--display); font-size: 16px; font-weight: 700; color: var(--white); }
.hdr-logo-name span { color: var(--teal-lt); }
.hdr-badge {
  margin-left: 4px; font-size: 10px; font-weight: 700; letter-spacing: .1em;
  padding: 2px 7px; border-radius: 6px; background: var(--teal);
  color: var(--white); text-transform: uppercase;
}
.hdr-map { margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
           padding: 6px 14px; border-radius: 16px; border: 1px solid var(--border2);
           color: var(--mid); font-size: 13px; font-weight: 500; text-decoration: none;
           transition: all .15s; }
.hdr-map:hover { color: var(--white); border-color: rgba(94,234,212,.4); }

/* ── MAIN ── */
main { max-width: var(--max-w); margin: 0 auto; padding: 32px 16px 80px; }

/* ── ESTADOS ── */
.state-screen { display: none; flex-direction: column; align-items: center;
                justify-content: center; min-height: 60vh; gap: 14px; text-align: center; }
.state-screen.active { display: flex; }
.state-icon { font-size: 40px; }
.state-title { font-family: var(--display); font-size: 22px; font-weight: 700; }
.state-sub   { font-size: 14px; color: var(--mid); max-width: 360px; line-height: 1.55; }
.cta-btn {
  margin-top: 8px; padding: 12px 28px; border-radius: 999px;
  background: var(--teal); color: var(--white);
  font-weight: 700; font-size: 14px; text-decoration: none; border: none; cursor: pointer;
  transition: background .18s;
}
.cta-btn:hover { background: var(--color-accent-hover,#0a7a70); }
.cta-btn.outline {
  background: transparent; border: 1px solid var(--border2); color: var(--mid);
}
.cta-btn.outline:hover { border-color: var(--teal-lt); color: var(--white); }

/* ── LOADING ── */
.spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.1);
           border-top-color: var(--teal); border-radius: 50%;
           animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DASHBOARD ── */
#dashboard { display: none; }

/* Identity card */
.prov-card {
  background: var(--surf); border: 1px solid var(--border2); border-radius: 16px;
  padding: 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.prov-logo {
  width: 56px; height: 56px; border-radius: 12px; flex-shrink: 0;
  background: var(--surf2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.prov-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.prov-meta { flex: 1; min-width: 0; }
.prov-label { font-size: 10px; font-weight: 700; letter-spacing: .15em;
              text-transform: uppercase; color: var(--teal-lt); margin-bottom: 3px; }
.prov-name  { font-family: var(--display); font-size: 18px; font-weight: 700; overflow: hidden;
              text-overflow: ellipsis; white-space: nowrap; }
.prov-loc   { font-size: 12px; color: var(--mid); margin-top: 3px; }
.prov-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.pbadge {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 6px; letter-spacing: .05em;
}
.pbadge-plan-free    { background: rgba(255,255,255,.06); color: var(--mid); }
.pbadge-plan-basic   { background: rgba(13,148,136,.12); color: var(--teal-lt); border: 1px solid rgba(13,148,136,.25); }
.pbadge-plan-premium { background: rgba(245,158,11,.12); color: var(--color-gold-highlight,#FCD34D); border: 1px solid rgba(245,158,11,.25); }
.pbadge-verified     { background: rgba(16,185,129,.12); color: var(--color-emerald-400,#34D399); border: 1px solid rgba(16,185,129,.25); }
.pbadge-pending      { background: rgba(245,158,11,.1); color: var(--gold); border: 1px solid rgba(245,158,11,.2); }

/* Notice */
.notice {
  padding: 12px 16px; border-radius: 12px; font-size: 13px; line-height: 1.5;
  display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px;
}
.notice.warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); color: var(--color-gold-highlight,#FCD34D); }
.notice.info    { background: rgba(13,148,136,.08); border: 1px solid rgba(13,148,136,.2); color: var(--teal-lt); }
.notice-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

/* Stats grid */
.section-title {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mid); margin-bottom: 10px;
}
.stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px;
}
@media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(5, 1fr); } }
.stat-card {
  background: var(--surf); border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 12px; display: flex; flex-direction: column; gap: 4px;
}
.stat-card.teal  { border-color: rgba(13,148,136,.3); }
.stat-card.navy  { border-color: rgba(94,234,212,.15); }
.stat-card.gold  { border-color: rgba(245,158,11,.3); }
.stat-card.green { border-color: rgba(16,185,129,.3); }
.stat-card.rose  { border-color: rgba(244,114,182,.3); }
.stat-label { font-size: 10px; color: var(--mid); font-weight: 600; letter-spacing: .04em; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-card.teal  .stat-value { color: var(--teal-lt); }
.stat-card.navy  .stat-value { color: var(--color-info-light,#93C5FD); }
.stat-card.gold  .stat-value { color: var(--color-gold-highlight,#FCD34D); }
.stat-card.green .stat-value { color: var(--color-emerald-400,#34D399); }
.stat-card.rose  .stat-value { color: var(--color-rose-light, #F9A8D4); }
[data-theme="light"] .stat-card.rose .stat-value { color: var(--color-rose-dark, #be185d); }
.stat-sub { font-size: 10px; color: var(--low); }

/* ── BRANDS & TRAINING SECTIONS ── */
.brands-section, .training-section { margin-bottom: 24px; }
.brands-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; min-height: 30px; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surf2); border: 1px solid var(--border2);
  border-radius: 20px; padding: 5px 12px; font-size: 13px; font-weight: 500;
}
.brand-chip.oficial { border-color: rgba(13,148,136,.4); background: rgba(13,148,136,.08); }
.brand-official-badge { font-size: 10px; color: var(--teal-lt); font-weight: 700; }
.brand-delete-btn, .training-delete-btn {
  background: none; border: none; color: var(--low); cursor: pointer;
  font-size: 14px; padding: 0 2px; line-height: 1; transition: color .15s;
}
.brand-delete-btn:hover, .training-delete-btn:hover { color: var(--red); }
.brands-empty, .training-empty {
  font-size: 13px; color: var(--mid); padding: 12px 0; line-height: 1.6;
}
.brands-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.panel-input {
  flex: 1; min-width: 160px; background: var(--surf2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 12px; color: var(--white); font-size: 13px;
  font-family: var(--font); outline: none; transition: border-color .15s;
}
.panel-input:focus { border-color: var(--teal); }
.panel-input::placeholder { color: var(--low); }
.panel-select {
  background: var(--surf2); border: 1px solid var(--border2);
  border-radius: 8px; padding: 8px 12px; color: var(--white); font-size: 13px;
  font-family: var(--font); outline: none; cursor: pointer;
}
.panel-check-label {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mid);
  cursor: pointer; white-space: nowrap;
}
.panel-btn {
  padding: 8px 16px; background: var(--teal); color: var(--color-white,#fff); border: none;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .15s; font-family: var(--font);
}
.panel-btn:hover { background: var(--color-accent-hover,#0a7a70); }
.training-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.training-card {
  background: var(--surf); border: 1px solid var(--border2); border-radius: 12px;
  padding: 14px 16px; display: flex; align-items: flex-start; gap: 12px;
}
.training-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.training-meta { flex: 1; min-width: 0; }
.training-name { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.training-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.training-tag {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  letter-spacing: .04em; text-transform: uppercase;
}
.training-tag.presencial { background: rgba(16,185,129,.12); color: var(--color-emerald-400,#34D399); }
.training-tag.online     { background: rgba(99,102,241,.12); color: var(--color-premium-text,#A5B4FC); }
.training-tag.hibrido    { background: rgba(245,158,11,.12); color: var(--color-gold-highlight,#FCD34D); }
.training-tag.cert       { background: rgba(13,148,136,.12); color: var(--teal-lt); }
.training-price, .training-date { font-size: 12px; color: var(--mid); }
.training-add-form {
  background: var(--surf2); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px; margin-top: 4px;
}
[data-theme="light"] .panel-input,
[data-theme="light"] .panel-select { color: var(--white); }
[data-theme="light"] .training-card { box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* Tasa de conversión */
.conv-strip {
  display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
  background: var(--surf); border: 1px solid rgba(245,158,11,.25); border-radius: 12px;
  padding: 11px 16px; font-size: 13px; flex-wrap: wrap;
}
.conv-label { color: var(--mid); font-weight: 600; flex-shrink: 0; }
.conv-value { font-weight: 800; font-size: 16px; color: var(--color-gold-highlight,#FCD34D); }
.conv-detail { font-size: 11px; color: var(--low); margin-left: auto; }
.conv-bar-wrap { flex: 1; min-width: 80px; height: 4px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.conv-bar-fill { height: 100%; background: linear-gradient(90deg, var(--teal-lt), var(--gold)); border-radius: 2px; transition: width .4s; }

/* Leads list */
.leads-section { margin-bottom: 20px; }
.lead-item {
  background: var(--surf); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; margin-bottom: 8px;
  display: flex; align-items: flex-start; gap: 12px;
}
.lead-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: rgba(13,148,136,.12); border: 1px solid rgba(13,148,136,.2);
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.lead-meta { flex: 1; min-width: 0; }
.lead-negocio  { font-weight: 700; font-size: 14px; }
.lead-mensaje  { font-size: 13px; color: var(--mid); margin-top: 3px;
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-footer   { display: flex; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.lead-contact  { font-size: 12px; color: var(--teal-lt); font-weight: 500; }
.lead-date     { font-size: 11px; color: var(--low); }
.leads-empty   { font-size: 13px; color: var(--mid); text-align: center;
                 padding: 24px 0; line-height: 1.6; }

/* Actions */
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.action-card {
  flex: 1; min-width: 140px; background: var(--surf); border: 1px solid var(--border2);
  border-radius: 14px; padding: 16px; text-decoration: none; color: var(--white);
  display: flex; flex-direction: column; gap: 6px; transition: border-color .15s;
}
.action-card:hover { border-color: var(--teal-lt); }
.action-card-icon  { font-size: 20px; }
.action-card-title { font-weight: 700; font-size: 13px; }

/* ══════════════════════════════════════════════════════
   SESIÓN 26 — Extracción inline styles
   Dpto 04, 2026-04-10
   ══════════════════════════════════════════════════════ */

/* Logo emoji */
.hdr-logo-emoji { font-size: 22px; }

/* Loading message */
.panel-loading-text { color: var(--mid); font-size: 13px; }

/* Training add form rows */
.brands-add-row--wrap { flex-wrap: wrap; }

/* Training inputs fixed width */
#coursePriceInput { max-width: 160px; }
#courseDateInput { max-width: 180px; }

/* Lead type badge (base — color set inline as dynamic) */
.lead-type-badge {
  font-size: 10px; padding: 2px 8px; border-radius: 20px;
  font-weight: 600; letter-spacing: .04em; margin-left: 6px;
}

/* RFQ lead highlight */
.lead-item--rfq {
  border-left: 2px solid rgba(245,158,11,.4);
  padding-left: 10px;
}

/* Premium contact link */
.panel-premium-link { color: inherit; font-weight: 600; }
.action-card-sub   { font-size: 11px; color: var(--mid); }

/* ── Focus-visible para botones e interactivos (Sesión 27ª — accesibilidad WCAG 2.1) ── */
button:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 2px solid var(--teal, #0D9488);
  outline-offset: 2px;
  border-radius: 4px;
}
.panel-input:focus-visible {
  outline: none; /* ya tiene border-color:focus */
}
.theme-toggle-btn:focus-visible {
  outline: 2px solid var(--teal, #0D9488);
  outline-offset: 3px;
  border-radius: 50%;
}
.brand-delete-btn:focus-visible,
.training-delete-btn:focus-visible {
  outline: 2px solid var(--color-error, #EF4444);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Light mode */
[data-theme="light"] button:focus-visible,
[data-theme="light"] a:focus-visible,
[data-theme="light"] select:focus-visible {
  outline-color: var(--color-accent-dark, #0D7C72);
}
