/* ══ GR Proveedores — Admin CSS ══ */
.grpv-wrap { max-width: 1400px; }
.grpv-loading { padding: 30px; text-align: center; color: #9ca3af; }
.grpv-empty   { padding: 48px; text-align: center; color: #9ca3af; background: #f9fafb; border-radius: 10px; }

/* ── Header ── */
.grpv-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}
.grpv-header h2 { margin: 0; }
.grpv-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grpv-back { color: #6b7280; text-decoration: none; font-size: .85rem; }
.grpv-back:hover { color: #111827; }

/* ── Event selector grid ── */
.grpv-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; margin-top: 20px;
}
.grpv-event-card {
  background: #fff; border: 2px solid #e5e7eb;
  border-radius: 12px; padding: 18px;
  transition: .2s;
}
.grpv-event-card.grpv-event-on { border-color: #6366f1; background: #f5f3ff; }
.grpv-event-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.grpv-event-card p { color: #6b7280; font-size: .84rem; margin: 0 0 12px; }
.grpv-event-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.grpv-event-badge {
  font-size: .7rem; font-weight: 600; padding: 3px 10px; border-radius: 20px;
}
.badge-on  { background: #d1fae5; color: #065f46; }
.badge-off { background: #f3f4f6; color: #9ca3af; }

/* ── Financial summary ── */
.grpv-summary {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
  padding: 16px 20px; margin-bottom: 20px;
}
.grpv-sum-card { text-align: center; padding: 0 16px; border-right: 1px solid #e5e7eb; }
.grpv-sum-card:last-of-type { border: none; }
.grpv-sum-num { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.grpv-sum-lbl { font-size: .68rem; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; }
.grpv-sum-alert { background: #fef2f2; border-radius: 8px; padding: 6px 12px; }
.grpv-sum-progress-wrap { flex: 1; min-width: 180px; padding: 0 12px; }
.grpv-progress-bar { height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.grpv-progress-fill { height: 100%; background: linear-gradient(90deg, #10b981, #6366f1); border-radius: 4px; transition: width .5s; }

/* ── Tabs ── */
.grpv-tabs {
  display: flex; gap: 4px; border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px; flex-wrap: wrap;
}
.grpv-tab {
  background: none; border: none; border-bottom: 3px solid transparent;
  padding: 10px 18px; cursor: pointer; font-size: .85rem; font-weight: 600;
  color: #6b7280; margin-bottom: -2px; border-radius: 6px 6px 0 0;
  transition: .18s;
}
.grpv-tab:hover { color: #111827; background: #f9fafb; }
.grpv-tab.active { color: #6366f1; border-bottom-color: #6366f1; background: #f5f3ff; }
.grpv-tab-content { display: none; }
.grpv-tab-content.active { display: block; }

/* ── Category blocks ── */
.grpv-cat-block {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 12px; margin-bottom: 12px; overflow: hidden;
  transition: border-color .2s;
}
.grpv-cat-block:hover { border-color: #a5b4fc; }
.grpv-cat-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; padding: 14px 18px;
  background: #fafafa; border-bottom: 1px solid #e5e7eb;
}
.grpv-cat-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grpv-cat-title h3 { margin: 0; font-size: 1rem; }
.grpv-cat-budget    { font-size: .78rem; color: #6b7280; }
.grpv-cat-contracted{ font-size: .82rem; font-weight: 700; color: #f59e0b; }
.grpv-cat-saving    { font-size: .75rem; background: #d1fae5; color: #065f46; padding: 2px 8px; border-radius: 20px; }
.grpv-cat-actions   { display: flex; gap: 6px; }

.grpv-items-list { padding: 12px 18px; display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; }
.grpv-item-tag {
  background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 20px;
  padding: 4px 10px; font-size: .8rem; display: inline-flex; align-items: center; gap: 5px;
}
.grpv-item-tag em { color: #6b7280; font-style: normal; }
.grpv-del-item-btn {
  background: none; border: none; color: #ef4444; cursor: pointer;
  font-size: .9rem; line-height: 1; padding: 0 2px;
}

/* ── Comparison matrix ── */
.grpv-matrix-table {
  width: 100%; border-collapse: collapse; font-size: .84rem;
}
.grpv-matrix-table th, .grpv-matrix-table td {
  border: 1px solid #e5e7eb; padding: 10px 12px; text-align: left;
}
.grpv-matrix-table th { background: #f9fafb; font-weight: 600; }
.grpv-matrix-table td:first-child { font-weight: 500; min-width: 160px; }
.grpv-cell-best     { background: #ecfdf5; }
.grpv-cell-selected { background: #eef2ff; }
.grpv-price         { font-weight: 700; font-size: .92rem; display: block; }
.grpv-badge-best    { font-size: .65rem; background: #10b981; color: #fff; padding: 2px 7px; border-radius: 10px; margin-left: 4px; }
.grpv-badge-sel     { font-size: .65rem; background: #6366f1; color: #fff; padding: 2px 7px; border-radius: 10px; margin-left: 4px; }
.grpv-totals-row td { background: #f9fafb; font-weight: 700; }

.grpv-add-supplier-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px;
  padding: 12px 16px;
}

/* ── Semaphore ── */
.grpv-sem {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 50%; flex-shrink: 0;
}
.grpv-status-badge {
  font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  text-transform: capitalize;
}
.grpv-status-pagado   { background: #d1fae5; color: #065f46; }
.grpv-status-anticipo { background: #fef9c3; color: #854d0e; }
.grpv-status-pendiente{ background: #ffedd5; color: #c2410c; }
.grpv-status-cotizado { background: #f3f4f6; color: #6b7280; }

/* ── Calendar / Timeline ── */
.grpv-timeline { position: relative; padding-left: 28px; }
.grpv-timeline::before { content:''; position:absolute; left:10px; top:0; bottom:0; width:2px; background:#e5e7eb; }
.grpv-tl-item { position: relative; display: flex; gap: 16px; margin-bottom: 16px; }
.grpv-tl-dot  { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; position: absolute; left: -22px; }
.grpv-tl-body { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:12px 16px; flex:1; }
.grpv-tl-date    { font-size: .75rem; color: #6b7280; margin-bottom: 3px; }
.grpv-tl-title   { font-weight: 600; font-size: .9rem; }
.grpv-tl-concept { font-size: .82rem; color: #6b7280; }
.grpv-tl-amount  { font-weight: 700; color: #111827; margin-top: 4px; }
.grpv-tl-diff    { font-size: .75rem; font-weight: 600; }

/* ── Agenda Maestra — Supplier cards ── */
.grpv-suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-top: 16px;
}
.grpv-sup-card {
  background: #fff; border: 1px solid #e5e7eb;
  border-radius: 14px; padding: 20px;
  position: relative; transition: .2s;
}
.grpv-sup-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.grpv-sup-featured-badge {
  position: absolute; top: -10px; left: 16px;
  background: #f59e0b; color: #fff; font-size: .65rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; letter-spacing: .05em;
}
.grpv-sup-header { display: flex; gap: 14px; margin-bottom: 14px; align-items: flex-start; }
.grpv-sup-logo   { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; border: 1px solid #e5e7eb; }
.grpv-sup-avatar {
  width: 52px; height: 52px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; font-size: 1.5rem; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.grpv-sup-name  { font-weight: 700; font-size: 1rem; }
.grpv-sup-cat   { font-size: .75rem; color: #6b7280; margin-bottom: 3px; }
.grpv-sup-stars { color: #f59e0b; font-size: .9rem; letter-spacing: 1px; }
.grpv-sup-contact { font-size: .82rem; line-height: 1.8; }
.grpv-sup-contact a { color: #6366f1; text-decoration: none; }
.grpv-sup-contact a:hover { text-decoration: underline; }
.grpv-sup-social { display: flex; gap: 6px; margin-top: 10px; }
.grpv-social-btn {
  font-size: .68rem; font-weight: 700; padding: 4px 10px; border-radius: 20px;
  text-decoration: none; color: #fff;
}
.grpv-ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.grpv-fb { background: #1877f2; }
.grpv-tt { background: #010101; }
.grpv-sup-notes {
  font-size: .78rem; color: #6b7280; background: #f9fafb;
  border-radius: 6px; padding: 8px 10px; margin-top: 10px;
}
.grpv-sup-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #f3f4f6; }

/* ── Modal ── */
.grpv-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 99999; padding: 20px;
}
.grpv-modal-box {
  background: #fff; border-radius: 14px; padding: 28px;
  width: 100%; max-width: 560px; max-height: 90vh;
  overflow-y: auto; position: relative;
}
.grpv-modal-wide { max-width: 800px; }
.grpv-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: #f3f4f6; border: none; border-radius: 50%;
  width: 30px; height: 30px; cursor: pointer; font-size: .9rem;
}
.grpv-modal-box h3 { margin-top: 0; }
.grpv-modal-box p  { margin: 0 0 12px; }
.grpv-modal-box label { font-size: .8rem; font-weight: 600; color: #374151; }

/* ── Toolbar ── */
.grpv-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ── Stars ── */
#grpv-stars-row button:hover { opacity: 1 !important; }

/* ── Responsive ── */
@media (max-width: 782px) {
  .grpv-header { flex-direction: column; align-items: flex-start; }
  .grpv-summary { flex-direction: column; }
  .grpv-sum-card { border: none; border-bottom: 1px solid #e5e7eb; padding: 8px 0; }
  .grpv-matrix-table { font-size: .75rem; }
  .grpv-modal-box { padding: 18px; }
}
