/* Owned by package WEB-B (docs/ENTERPRISE.md): marketplace filters, the rent form's advanced options, rentals,
 * workloads (templates, secrets, registry logins, volumes), jobs and clusters, organization billing. */

/* ------------------------------------------------------------------------- shared bits */
.pill.red { background: var(--danger-bg); color: #8f302c; }
.ok-text { color: #2f6b2a; font-weight: 800; }
.badge-tier-secure { background: #e3f1ff; color: #1f4f80; }
.badge-tier-cc { background: #efe8fc; color: #4e3684; }
.badge-direct { background: #eef3f7; color: #3d4b60; }
.legend-label { font-size: 11.5px; color: #45536a; font-weight: 800; margin-bottom: 4px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; }
.check-grid code { font-size: 11.5px; }

.kv-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 4px 0 6px; }
.kv-list > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; font-size: 12.5px; align-items: baseline; }
.kv-list dt { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.kv-list dd { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
.kv-list code { font-size: 11.5px; }
.kv-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.drawer-badges { margin-bottom: 10px; }

/* progress bars (GPU use, budgets): <progress>, no inline styles */
.util { display: inline-flex; align-items: center; gap: 6px; }
.util-bar, .budget-bar {
  -webkit-appearance: none; appearance: none; border: 0; height: 7px; width: 70px; border-radius: 99px;
  background: #e5ebf1; overflow: hidden; vertical-align: middle; color: #6a9a4a;
}
.util-bar::-webkit-progress-bar, .budget-bar::-webkit-progress-bar { background: #e5ebf1; border-radius: 99px; }
.util-bar::-webkit-progress-value, .budget-bar::-webkit-progress-value { background: #6a9a4a; border-radius: 99px; }
.util-bar::-moz-progress-bar, .budget-bar::-moz-progress-bar { background: #6a9a4a; border-radius: 99px; }
.budget-bar { width: 100%; height: 10px; }
.budget-bar.high::-webkit-progress-value { background: #d39a24; }
.budget-bar.high::-moz-progress-bar { background: #d39a24; }
.budget-bar.over::-webkit-progress-value { background: var(--danger); }
.budget-bar.over::-moz-progress-bar { background: var(--danger); }

/* ------------------------------------------------------------------------- marketplace */
.filter-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.filter-pair .filter-label { margin-bottom: 6px; }
.filters .note a { text-decoration: underline; }
#filter-country[aria-invalid="true"] { border-color: var(--danger); }
.card-location .card-cuda { margin-left: auto; font-size: 10.5px; font-weight: 800; color: #4c586a; background: #f0f3f6; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.wl-launch { margin-bottom: 14px; }

/* ----------------------------------------------------------------- rent form: advanced */
.detail-side:has(.adv-details[open]) { position: static; }
.adv-details .adv-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.adv-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; padding: 12px 0; border-top: 1px solid #eef1f5; }
.adv-group:first-child { border-top: 0; padding-top: 4px; }
.adv-title { font: 800 11px/1.4 "DM Sans", sans-serif; letter-spacing: 0.09em; text-transform: uppercase; color: var(--brand); margin: 6px 0 0; }
.adv-fieldset { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; }
.adv-fieldset > legend { font-size: 11.5px; color: #45536a; font-weight: 800; margin-bottom: 5px; }
.adv-sizing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adv-sizing .span-all, .span-all { grid-column: 1 / -1; }
.payer-line { background: #eef4fb; color: #2a4466; }

.kv-editor, .ds-editor { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; justify-items: start; }
.kv-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; width: 100%; }
.kv-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 6px; align-items: center; }
.kv-row .field, .ds-row .field { min-width: 0; }
.ds-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; align-items: center; padding: 8px; border: 1px dashed #d7dee7; border-radius: 9px; }
.ds-row .ds-url { grid-column: 1 / -1; }
.ds-row .check-row { padding: 0; }
.ds-row .kv-remove { justify-self: end; }
.kv-remove { padding: 5px 7px; color: #6b7687; }
.kv-remove:hover { color: var(--danger); }

/* --------------------------------------------------------------------------- rentals */
.transfer-line { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #2a4466; background: #eef4fb; border-radius: 8px; padding: 7px 10px; margin: 10px 0 0; }
.transfer-line .spin { width: 12px; height: 12px; margin-left: auto; }
.idle-line, .job-line, .volume-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #45536a; margin-top: 8px; }
.idle-line strong { font-variant-numeric: tabular-nums; }
.retry-line { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.credit-lines { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #3f6230; margin-top: 8px; }
.credit-lines span { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.direct-box { border: 1px solid #e1e8ef; border-radius: 10px; padding: 10px 12px; margin: 12px 0 4px; background: #fbfcfd; }
.direct-box.compact { margin-top: 10px; }
.direct-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 6px; }
.ep-list { list-style: none; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ep-list li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 12px; }
.ep-label { font-weight: 800; color: #45536a; }
.ep-value { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ep-list .code-block { margin: 0; }

/* -------------------------------------------------------------------------- job output */
.log-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.log-state { font-size: 12px; color: var(--muted); }
.log-bar .check-row { padding: 0; }
.log-view {
  margin: 0; background: #0c1422; color: #e3eaf2; border-radius: 10px; padding: 12px 14px; font: 12px/1.55 var(--mono);
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 60vh; min-height: 140px; overflow: auto;
}
.log-view.inline { border-radius: 0; max-height: 420px; }
.log-view:focus-visible { outline-offset: -2px; }

/* --------------------------------------------------------------- workloads, jobs, clusters */
.wl-page { padding-bottom: 60px; }
.wl-panel .panel-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.wl-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.wl-section + .wl-section { margin-top: 10px; padding-top: 18px; border-top: 1px solid #eef1f5; }
.wl-h2 { font-size: 18px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wl-empty { font-size: 12.5px; }
.wl-table td .table-btns { justify-content: flex-end; }
.wl-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.wl-toolbar .note { flex: 1 1 260px; }
.wl-form .adv-title { margin-top: 8px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.tpl-card { border: 1px solid var(--border); border-radius: 12px; padding: 15px; display: flex; flex-direction: column; gap: 8px; background: #fbfcfd; min-width: 0; }
.tpl-name { font-size: 15px; display: flex; align-items: center; gap: 7px; letter-spacing: -0.02em; }
.tpl-name .icon { color: var(--brand); }
.tpl-desc { font-size: 12px; color: #4b586c; line-height: 1.55; flex: 1; }
.tpl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-static { font-size: 10.5px; font-weight: 700; color: #4e5c70; background: #eef2f6; border-radius: 5px; padding: 3px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.job-head { margin-bottom: 4px; }
.job-head .wl-h2 .status { font-family: "DM Sans", sans-serif; letter-spacing: 0.05em; }
.job-stats { margin-top: 4px; }
.current-row td { background: #f6faf2; }
.wl-panel .crumbs { margin-bottom: 0; }
.wl-panel .panel { margin-bottom: 0; }

/* ------------------------------------------------------------------------------ billing */
.billing-tab-panel .panel-content { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.billing-tab-panel .panel { margin-bottom: 0; }
.billing-tab-panel .dash-note { margin-bottom: 0; }
.budget-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.budget-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: grid; gap: 10px; }
.budget-card.high { border-color: var(--warn-border); }
.budget-card.over { border-color: #f2c9c6; background: #fffafa; }
.budget-name { font-size: 15px; letter-spacing: -0.02em; }
.budget-meter { display: grid; gap: 6px; font-size: 12.5px; }
.usage-form { margin-bottom: 0; }
.usage-form .form-row { flex: 1 1 150px; }
.data-table tfoot th, .data-table tfoot td { border-top: 2px solid #e5ebef; padding: 12px 15px; font-size: 12.5px; text-align: left; }

/* -------------------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .kv-list.two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 630px) {
  .kv-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ep-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .wl-table td .table-btns { justify-content: flex-start; }
  .usage-form .btn { flex: 1 1 auto; }
  .tpl-grid { grid-template-columns: minmax(0, 1fr); }
  .data-table tfoot th, .data-table tfoot td { padding: 10px; }
}

/* polish */
.data-table tfoot th { background: transparent; color: var(--ink); }
.rental-card > p.note { margin-top: 8px; }
.usage-form .field { min-height: 44px; }
.panel-content > .sub-title:first-child { margin-top: 0; }

/* replacements for former inline styles (explore hero, host banner, telemetry meter) */
.gpu-floating .floating-row { margin-top: 3px; }
.gpu-floating .floating-row.spread { justify-content: space-between; gap: 19px; }
.host-banner .banner-eyebrow { color: #b7e991; margin-bottom: 11px; }
.telemetry-meter .telemetry-bar {
  -webkit-appearance: none; appearance: none; flex: 1; height: 7px; border: 0; border-radius: 4px; background: #eef1f5; overflow: hidden; color: #5bbd7a;
}
.telemetry-bar::-webkit-progress-bar { background: #eef1f5; border-radius: 4px; }
.telemetry-bar::-webkit-progress-value { background: linear-gradient(90deg, #8fd45e, #5bbd7a); border-radius: 4px; }
.telemetry-bar::-moz-progress-bar { background: linear-gradient(90deg, #8fd45e, #5bbd7a); border-radius: 4px; }
