// ROCA GOLF — extended styles for tables / charts / forms (depth theme only)

const _rgExtraCSS = `
.rg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}
.rg-table thead th {
  background: var(--rg-cream);
  text-align: left;
  font-weight: 500;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rg-muted);
  border-bottom: 1px solid var(--rg-line);
  position: sticky; top: 0; z-index: 1;
}
.rg-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--rg-line);
  vertical-align: middle;
}
.rg-table tbody tr:hover td { background: var(--rg-cream); }
.rg-table tbody tr:last-child td { border-bottom: none; }
.rg-table .num { font-family: var(--rg-font-mono); text-align: right; }
.rg-table .center { text-align: center; }
.rg-table .folio { font-family: var(--rg-font-mono); font-weight: 600; color: var(--rg-green-700); }
.rg-table .actions {
  display: flex; gap: 4px; justify-content: flex-end;
}
.rg-icon-btn {
  width: 26px; height: 26px;
  border: 1px solid var(--rg-line-2);
  background: white;
  border-radius: 5px;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--rg-ink-2);
  transition: all 0.12s;
}
.rg-icon-btn:hover { background: var(--rg-green-50); color: var(--rg-green-700); border-color: var(--rg-green-500); }
.rg-icon-btn.danger:hover { background: rgba(178,34,34,0.08); color: var(--rg-flag-over); border-color: var(--rg-flag-over); }

/* Filter form row */
.rg-filter-bar {
  display: grid;
  grid-template-columns: 110px 1fr 1fr 130px 130px 110px 110px auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px;
  background: var(--rg-paper);
  border: 1px solid var(--rg-line);
  border-radius: var(--rg-radius);
}
.rg-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rg-field label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rg-muted);
  font-weight: 500;
}
.rg-input, .rg-select {
  padding: 7px 10px;
  font-size: 12.5px;
  border: 1px solid var(--rg-line-2);
  border-radius: 6px;
  background: white;
  font-family: inherit;
  outline: none;
  color: var(--rg-ink);
  width: 100%;
  min-width: 0;
}
.rg-input:focus, .rg-select:focus { border-color: var(--rg-green-500); }

/* Chart card */
.rg-chart-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
}
.rg-bar-track {
  height: 6px;
  background: var(--rg-line);
  border-radius: 3px;
  overflow: hidden;
}
.rg-bar-track .fill {
  height: 100%;
  background: var(--rg-green-700);
  border-radius: 3px;
}

/* family chip */
.rg-fam-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--rg-font-mono);
  background: var(--rg-cream);
  color: var(--rg-ink-2);
  font-weight: 500;
}
.rg-fam-chip .swatch { width: 6px; height: 6px; border-radius: 50%; }

/* Vendor card grid */
.rg-vendor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 20px;
}
.rg-vendor-card {
  border: 1px solid var(--rg-line);
  border-radius: var(--rg-radius);
  padding: 14px 16px;
  background: var(--rg-paper);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all 0.12s;
}
.rg-vendor-card:hover { border-color: var(--rg-green-500); box-shadow: var(--rg-shadow-md); }
.rg-vendor-init {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--rg-green-700);
  color: var(--rg-cream);
  display: grid; place-items: center;
  font-family: var(--rg-font-display);
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
.rg-vendor-body { flex: 1; min-width: 0; }
.rg-vendor-body .nm { font-weight: 600; font-size: 13.5px; margin-bottom: 1px; }
.rg-vendor-body .meta { font-size: 11px; color: var(--rg-muted); font-family: var(--rg-font-mono); }
.rg-vendor-body .stats {
  display: flex; gap: 14px;
  margin-top: 8px;
  font-size: 11.5px;
  font-family: var(--rg-font-mono);
}
.rg-vendor-body .stats .v { font-weight: 600; color: var(--rg-ink); }
.rg-vendor-body .stats .l { color: var(--rg-muted); }

/* History row */
.rg-hist-row {
  display: grid;
  grid-template-columns: 32px minmax(140px, 0.5fr) minmax(120px, 0.5fr) minmax(0, 1.4fr) 130px;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rg-line);
  font-size: 12.5px;
}
.rg-hist-row:last-child { border-bottom: none; }
.rg-hist-row:hover { background: var(--rg-cream); }
.rg-hist-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
}
.rg-hist-row .ts { font-family: var(--rg-font-mono); font-size: 11.5px; color: var(--rg-muted); }
.rg-hist-row .usr { font-weight: 500; }
.rg-hist-row .desc { color: var(--rg-ink-2); }
.rg-hist-row .table-tag {
  font-family: var(--rg-font-mono);
  font-size: 10.5px;
  color: var(--rg-muted);
  background: var(--rg-cream);
  padding: 2px 7px;
  border-radius: 4px;
}

/* Pagination */
.rg-paginate {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--rg-line);
  font-size: 12px;
  color: var(--rg-muted);
}
.rg-paginate .pg { display: flex; gap: 4px; }
.rg-paginate button {
  width: 28px; height: 28px;
  border: 1px solid var(--rg-line-2);
  background: white;
  border-radius: 5px;
  cursor: pointer;
  font-family: var(--rg-font-mono);
  font-size: 12px;
  color: var(--rg-ink-2);
}
.rg-paginate button.active { background: var(--rg-green-700); border-color: var(--rg-green-700); color: white; }

/* Insumo row */
.rg-ins-row {
  display: grid;
  grid-template-columns: 100px 1fr 200px 80px 50px 110px;
  gap: 14px;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--rg-line);
  font-size: 12.5px;
}
.rg-ins-row:last-child { border-bottom: none; }
.rg-ins-row:hover { background: var(--rg-cream); }
.rg-ins-row .clave { font-family: var(--rg-font-mono); font-weight: 600; color: var(--rg-green-700); }
`;
if (typeof document !== "undefined" && !document.getElementById("rg-extra-css")) {
  const s = document.createElement("style");
  s.id = "rg-extra-css";
  s.textContent = _rgExtraCSS;
  document.head.appendChild(s);
}
