/* ═══════════════════════════════════════════════
   InmoCalc – pro-plus/proPlus.css
   Estilos exclusivos PRO+
   Hereda variables CSS de styles.css
═══════════════════════════════════════════════ */

/* ════════════════════════════════
   CARDS HOME PRO+
════════════════════════════════ */
.home-card[data-goto^="proplus"] {
  border-left: 3px solid var(--color-plus, #a855f7);
}

/* ════════════════════════════════
   RESULT ACTIONS
════════════════════════════════ */
.result-actions {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--color-surface, #f8fafc);
  border-radius: 12px;
  border: 1px solid var(--color-border, #e2e8f0);
}

.result-actions.visible,
#roi-actions.visible,
#cashflow-actions.visible,
#comparator-actions.visible,
#projection-actions.visible {
  display: block !important;
}

/* ════════════════════════════════
   RESULT CARD PRO+
════════════════════════════════ */
.result-row--main {
  border-top: 1px solid var(--color-border, #e2e8f0);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* ════════════════════════════════
   BOTÓN COMPRAR PRO+
════════════════════════════════ */
.btn-comprar-pro-plus {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  width: 100%;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-comprar-pro-plus:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ════════════════════════════════
   COMPARADOR
════════════════════════════════ */
.comparator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.comp-col {
  background: var(--color-surface, #f8fafc);
  border-radius: 10px;
  padding: 0.75rem;
  border: 1px solid var(--color-border, #e2e8f0);
}

.comp-col-header {
  margin-bottom: 0.5rem;
}

.comp-label-input {
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

.comparator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.comparator-table th {
  background: var(--color-surface, #f1f5f9);
  padding: 0.5rem 0.4rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.78rem;
  border-bottom: 2px solid var(--color-border, #e2e8f0);
}

.comparator-table td {
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--color-border, #f1f5f9);
  font-size: 0.82rem;
}

.comp-metric { font-weight: 500; color: var(--color-text-muted, #64748b); }
.comp-val    { text-align: right; font-weight: 600; }
.comp-diff   { text-align: right; font-size: 0.78rem; color: var(--color-text-muted, #64748b); }

.cell-winner {
  background: rgba(34, 197, 94, 0.08);
  color: var(--color-success, #16a34a);
}

.comparator-verdict {
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.verdict-a   { background: rgba(59,130,246,0.1);  color: #2563eb; }
.verdict-b   { background: rgba(168,85,247,0.1);  color: #7c3aed; }
.verdict-tie { background: rgba(100,116,139,0.1); color: #475569; }

/* ════════════════════════════════
   PROYECCIÓN — SNAPSHOTS
════════════════════════════════ */
.projection-snapshots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.proj-snap {
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  padding: 0.6rem;
  text-align: center;
}

.proj-snap-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-muted, #64748b);
  margin-bottom: 0.3rem;
}

.proj-snap-val {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-accent, #0ea5e9);
  margin-bottom: 0.15rem;
}

.proj-snap-cf  { font-size: 0.75rem; color: var(--color-success, #16a34a); }
.proj-snap-roi { font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted, #64748b); }

/* ════════════════════════════════
   CRM
════════════════════════════════ */
.crm-toolbar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  align-items: center;
}

.crm-search-input { flex: 1; }
.crm-add-btn      { white-space: nowrap; padding: 0.6rem 1rem; font-size: 0.9rem; }

.crm-capacity-bar {
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
  min-height: 1.2rem;
}

.crm-client-list { display: flex; flex-direction: column; gap: 0.5rem; }

.crm-client-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.crm-client-row:active { background: var(--color-border, #e2e8f0); }

.crm-client-avatar {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.crm-client-info   { flex: 1; min-width: 0; }
.crm-client-name   { display: block; font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-client-sub    { display: block; font-size: 0.78rem; color: var(--color-text-muted, #64748b); }

.crm-del-btn {
  background: none;
  border: none;
  color: var(--color-text-muted, #94a3b8);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem;
  flex-shrink: 0;
}

.crm-del-btn:hover { color: var(--color-danger, #ef4444); }

.crm-empty {
  text-align: center;
  color: var(--color-text-muted, #94a3b8);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

/* Detalle de cliente */
/* crm-list-view visible por defecto, detail oculto */
#crm-detail-view        { display: none; }
#crm-detail-view.active { display: block; }
#crm-list-view          { display: block; }  /* visible por defecto */
#crm-list-view.hidden   { display: none; }   /* oculto solo si se marca */

.back-btn-inline {
  background: none;
  border: none;
  color: var(--color-accent, #0ea5e9);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.25rem 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.crm-detail-card {
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  margin-bottom: 1rem;
}

.crm-detail-avatar {
  width: 3rem; height: 3rem; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff; font-weight: 700; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.5rem;
}

.crm-detail-name   { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.25rem; }
.crm-detail-meta   { font-size: 0.82rem; color: var(--color-text-muted, #64748b); margin-bottom: 0.5rem; }
.crm-detail-notes  { font-size: 0.85rem; font-style: italic; color: var(--color-text-muted, #94a3b8); }

.crm-section-title { font-weight: 700; font-size: 0.9rem; margin: 0.75rem 0 0.5rem; }

.crm-project-list  { display: flex; flex-direction: column; gap: 0.4rem; }

.crm-project-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--color-surface, #f8fafc);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.85rem;
}

.crm-project-type  { font-size: 0.8rem; min-width: 5rem; }
.crm-project-title { flex: 1; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crm-project-date  { font-size: 0.75rem; color: var(--color-text-muted, #94a3b8); white-space: nowrap; }

/* ════════════════════════════════
   CLOUD — PRÓXIMAMENTE
════════════════════════════════ */
.proplus-cloud-slot { margin-top: 1.5rem; }

.proplus-cloud-coming {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--color-surface, #f8fafc);
  border: 1px dashed var(--color-border, #cbd5e1);
  border-radius: 10px;
  opacity: 0.65;
}

.proplus-cloud-icon  { font-size: 1.4rem; }
.proplus-cloud-info  { flex: 1; }
.proplus-cloud-label { display: block; font-weight: 600; font-size: 0.9rem; }
.proplus-cloud-sub   { display: block; font-size: 0.78rem; color: var(--color-text-muted, #94a3b8); }
.proplus-cloud-badge { font-size: 1rem; }

/* ════════════════════════════════
   PLAN CARD PRO+ ACTIVO
════════════════════════════════ */
.plan-card.plus.plan-active {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168,85,247,0.2);
}

.tag-upgrade {
  background: rgba(168,85,247,0.12);
  color: #7c3aed;
}

/* ════════════════════════════════
   TARJETA HOME PRO+ (accesos rápidos)
════════════════════════════════ */
.proplus-home-section {
  margin-top: 1.25rem;
}

.proplus-home-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #94a3b8);
  margin-bottom: 0.5rem;
  padding-left: 0.25rem;
}

.proplus-home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.proplus-home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.75rem 0.5rem;
  background: linear-gradient(135deg, rgba(124,58,237,0.07), rgba(168,85,247,0.07));
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.proplus-home-card:active { background: rgba(168,85,247,0.15); }
.proplus-home-card-icon   { font-size: 1.4rem; }
.proplus-home-card-label  { font-size: 0.72rem; font-weight: 600; text-align: center; color: #7c3aed; }

/* ════════════════════════════════
   RESPONSIVE — pantallas pequeñas
════════════════════════════════ */
@media (max-width: 360px) {
  .comparator-grid          { grid-template-columns: 1fr; }
  .projection-snapshots     { grid-template-columns: 1fr 1fr; }
  .proplus-home-grid        { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════
   SECCIÓN AVANZADA COLAPSABLE
════════════════════════════════ */
.proplus-advanced {
  margin-bottom: 0.75rem;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 10px;
  overflow: hidden;
}

.proplus-advanced-toggle {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface, #f8fafc);
  user-select: none;
}

.proplus-advanced-toggle::-webkit-details-marker { display: none; }

.proplus-advanced[open] .proplus-advanced-toggle {
  border-bottom: 1px solid var(--color-border, #e2e8f0);
  color: var(--color-text, #1e293b);
}

.proplus-advanced-toggle::after {
  content: '›';
  margin-left: auto;
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.proplus-advanced[open] .proplus-advanced-toggle::after {
  transform: rotate(90deg);
}

.proplus-advanced-body {
  padding: 0.75rem 1rem 0.25rem;
  background: #fff;
}

/* ════════════════════════════════
   LABELS Y NOTAS ACLARATORIAS
════════════════════════════════ */
.form-label-hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--color-text-muted, #94a3b8);
  display: block;
}

.proplus-save-note {
  font-size: 0.78rem;
  color: var(--color-text-muted, #94a3b8);
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-surface, #f1f5f9);
  border-radius: 8px;
  border-left: 3px solid var(--color-accent, #0ea5e9);
}

/* ════════════════════════════════
   HERO BANNER — PLAN ACTIVO
════════════════════════════════ */
.plans-hero {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1rem;
  color: #fff;
  text-align: center;
}

.plans-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 0.25rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.plans-hero-badge--pro {
  background: rgba(255,255,255,0.2);
}

.plans-hero-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.plans-hero-sub {
  font-size: 0.82rem;
  opacity: 0.85;
}

/* ════════════════════════════════
   PLAN CARD — ESTADOS
════════════════════════════════ */
.plan-active--premium {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 2px rgba(168,85,247,0.25), 0 4px 16px rgba(168,85,247,0.15) !important;
}

.tag-included {
  background: rgba(100,116,139,0.1);
  color: #64748b;
  font-size: 0.72rem;
}

/* ════════════════════════════════
   FEATURE PRÓXIMAMENTE
════════════════════════════════ */
.feat-row--soon {
  opacity: 0.6;
}

.feat-text--soon em {
  font-style: normal;
  font-size: 0.75rem;
  background: rgba(168,85,247,0.12);
  color: #7c3aed;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* ════════════════════════════════
   PRECIO EN TARJETA PRO+
════════════════════════════════ */
.plan-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #7c3aed;
  margin: 0.2rem 0 0.4rem;
}

.plan-price-period {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted, #94a3b8);
}

/* ════════════════════════════════
   BOTÓN INFO (!)
════════════════════════════════ */
.info-btn {
  background: none;
  border: none;
  color: var(--color-accent, #0ea5e9);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0 0.2rem;
  vertical-align: middle;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.info-btn:hover { opacity: 1; }

/* ════════════════════════════════
   MODAL TOOLTIP DE AYUDA
════════════════════════════════ */
.proplus-tooltip-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.proplus-tooltip-overlay.visible { opacity: 1; }

.proplus-tooltip-box {
  background: #fff;
  border-radius: 18px 18px 14px 14px;
  padding: 1.5rem 1.25rem 2rem;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.2s;
}
.proplus-tooltip-overlay.visible .proplus-tooltip-box { transform: translateY(0); }

.proplus-tooltip-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--color-surface, #f1f5f9);
  border: none;
  border-radius: 50%;
  width: 2rem; height: 2rem;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.proplus-tooltip-icon  { font-size: 2rem; margin-bottom: 0.5rem; }
.proplus-tooltip-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  padding-right: 2rem;
}

.proplus-tooltip-body p  { font-size: 0.88rem; margin-bottom: 0.6rem; line-height: 1.5; }
.proplus-tooltip-body ul { padding-left: 1.1rem; margin-bottom: 0.6rem; }
.proplus-tooltip-body li { font-size: 0.85rem; margin-bottom: 0.35rem; line-height: 1.5; }
.proplus-tooltip-body strong { color: var(--color-text, #1e293b); }

.tooltip-tip {
  background: rgba(14,165,233,0.08);
  border-left: 3px solid var(--color-accent, #0ea5e9);
  padding: 0.5rem 0.75rem !important;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem !important;
  color: var(--color-text-muted, #475569) !important;
}

/* ════════════════════════════════
   BOTÓN EDITAR CLIENTE
════════════════════════════════ */
.crm-edit-btn {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.55rem;
  background: none;
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--color-text-muted, #64748b);
  cursor: pointer;
  transition: background 0.15s;
}
.crm-edit-btn:hover { background: var(--color-surface, #f1f5f9); }

/* ════════════════════════════════
   FILA SHARE PRO+ (PDF + WhatsApp)
════════════════════════════════ */
.proplus-share-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.proplus-share-row .save-btn {
  flex: 1;
  font-size: 0.82rem;
  padding: 0.55rem 0.5rem;
  justify-content: center;
}

/* ════════════════════════════════
   FILA GUARDAR EN CRM (calculadoras FREE/PRO)
════════════════════════════════ */
.crm-save-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  align-items: center;
}
.crm-save-row select {
  flex: 1;
  font-size: 0.82rem;
  padding: 0.5rem;
}
.crm-save-row .save-btn {
  display: flex !important;
  white-space: nowrap;
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
}

/* ════════════════════════════════
   BOTONES DENTRO DE RESULT-ACTIONS PRO+
   Sobreescribir display:none del .save-btn global
   Los botones dentro de result-actions siempre visibles
════════════════════════════════ */
.result-actions .save-btn,
.result-actions .save-btn--pdf,
.result-actions .save-btn--whatsapp,
.proplus-share-row .save-btn,
.proplus-share-row .save-btn--pdf,
.proplus-share-row .save-btn--whatsapp {
  display: flex !important;
}

/* ════════════════════════════════
   MODAL DETALLE DE PROYECTO
════════════════════════════════ */
.crm-project-detail-box {
  text-align: left;
  max-height: 85vh;
  overflow-y: auto;
}

.crm-proj-detail-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.proj-meta-type {
  background: rgba(124,58,237,0.1);
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.proj-meta-date {
  font-size: 0.78rem;
  color: var(--color-text-muted, #94a3b8);
}

.crm-proj-detail-filas {
  background: var(--color-surface, #f8fafc);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.proj-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border, #f1f5f9);
  gap: 0.5rem;
}

.proj-detail-row:last-child { border-bottom: none; }

.proj-detail-label {
  font-size: 0.82rem;
  color: var(--color-text-muted, #64748b);
  flex: 1;
}

.proj-detail-valor {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text, #1e293b);
  text-align: right;
}

.crm-proj-detail-notes {
  font-size: 0.82rem;
  color: var(--color-text-muted, #94a3b8);
  font-style: italic;
  padding: 0.5rem 0;
}

/* Filas de proyecto clickeables */
.crm-project-row--clickable {
  cursor: pointer;
}
.crm-project-row--clickable:active {
  background: var(--color-border, #e2e8f0);
}
.crm-project-row--clickable::after {
  content: '›';
  color: var(--color-text-muted, #94a3b8);
  font-size: 1.1rem;
  margin-left: auto;
  flex-shrink: 0;
}
