/* Owned by package WEB-C (docs/ENTERPRISE.md): host dashboard cards, secure hosting, payouts earnings history,
 * operator tools (grouped tabs, drawers, queues). Builds on the tokens and components in /styles.css. */

/* ------------------------------------------------------------------ shared kit (admin-kit.js) */
.kit-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 16px; margin: 12px 0; }
.kit-facts div { min-width: 0; }
.kit-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; }
.kit-facts dd { font-size: 12.5px; margin-top: 2px; overflow-wrap: anywhere; }
.kit-facts.compact { margin: 8px 0; }

/* Operator tools → Cloud GPUs (admin-cloud.js) */
.kit-section { margin-top: 20px; }
.kit-section + .kit-section { border-top: 1px solid var(--border); padding-top: 18px; }
.kit-section .table-btns { margin-top: 8px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.check-grid legend { font-size: 11.5px; color: #45536a; font-weight: 800; margin-bottom: 4px; }
.sub-head { align-items: center; margin-top: 8px; }
.sub-head .sub-title { margin: 10px 0 8px; }
.drawer-actions { margin-top: 16px; }
.danger-zone { border: 1px solid #f2c9c6; background: #fffafa; border-radius: 10px; padding: 12px 14px; }
.danger-zone .note { margin-bottom: 10px; }
.evidence-view { background: #0f1724; color: #dbe6f3; border-radius: 10px; padding: 12px 14px; max-height: 360px; overflow: auto; font: 11.5px/1.55 var(--mono); white-space: pre; margin: 6px 0 4px; }
.evidence-view code { background: none; color: inherit; padding: 0; border: 0; border-radius: 0; font: inherit; white-space: inherit; }
.evidence-view:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 360px; }

/* ------------------------------------------------------------------------- host dashboard */
.hl-list { display: grid; gap: 14px; }
.hl-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: #fff; }
.hl-card:hover { border-color: #d6dee8; }
.hl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 16px; flex-wrap: wrap; }
.hl-title { min-width: 0; flex: 1 1 260px; }
.hl-title h3 { font-size: 15px; letter-spacing: -0.02em; margin-bottom: 2px; overflow-wrap: anywhere; }
.hl-title h3 a:hover { text-decoration: underline; }
.hl-title .muted { display: block; }
.hl-badges { margin-top: 0; align-items: center; }
.hl-card > .dash-note { margin: 12px 0 0; }
.hl-card > .badge { margin-top: 10px; }
.hl-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 16px; margin: 14px 0 12px; padding: 12px 14px; background: #f8fafc; border-radius: 10px; }
.hl-facts div { min-width: 0; }
.hl-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 800; margin-bottom: 3px; }
.hl-facts dd { font-size: 12.5px; overflow-wrap: anywhere; }
.hl-facts dd strong { display: block; font-size: 12.5px; }
.hl-facts .badge { margin-top: 4px; }
.hl-actions { justify-content: flex-start; }
.hl-secure-status { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lf-connect { display: grid; gap: 12px; border-top: 1px solid #edf0f3; padding-top: 4px; }
.lf-connect legend { font-size: 13px; font-weight: 800; color: var(--ink); padding-top: 14px; margin-bottom: 2px; float: left; width: 100%; }
.lf-connect legend + * { clear: both; }
.lf-connect .dash-note { margin-bottom: 0; }

/* ------------------------------------------------------------------------- secure hosting */
.ht-body > .panel:first-child { border-top-left-radius: 0; border-top-right-radius: 0; }
.ht-back { display: flex; margin: 0 0 14px; padding: 12px 16px; background: #fff; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 12px 12px; }
.trust-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trust-tier { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fbfcfd; }
.trust-tier.is-secure { background: #f4f8fe; border-color: #d9e5f6; }
.trust-tier h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.trust-tier p { font-size: 12.5px; color: #4b586c; line-height: 1.6; }
.trust-tier p + p { margin-top: 8px; }
.trust-p { color: #4b586c; margin: 6px 0 12px; }
.trust-list { padding-left: 18px; display: grid; gap: 6px; color: #4b586c; font-size: 12.5px; line-height: 1.6; }
.trust-list.rules { margin-bottom: 16px; padding: 12px 14px 12px 30px; background: #f8fafc; border-radius: 10px; }
.req-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-bottom: 16px; }
.req-list li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; padding: 9px 11px; border-radius: 9px; background: #f8fafc; }
.req-list li .icon { margin-top: 2px; flex: none; }
.req-list li.ok .icon { color: #3a6f33; }
.req-list li.missing { background: var(--warn-bg); }
.req-list li.missing .icon { color: #a5521a; }
.tier-choice { max-width: 520px; }
.tier-choice .mode-tab { padding: 10px 8px; }
.tier-choice:disabled .mode-tab { cursor: not-allowed; opacity: 0.7; }
.tier-choice .mode-tab:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.ht-listing-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ht-listing-head h2 { font-size: 18px; letter-spacing: -0.03em; }
.ht-listing-head .badge-row { margin-top: 0; align-items: center; }
.mw-form { margin: 0 0 14px; }
.mw-form .form-row { flex: 1 1 180px; }
.mw-form .btn { flex: none; }
.mw-list li { align-items: flex-start; flex-wrap: wrap; }
.mw-main { flex: 1 1 220px; min-width: 0; }
.mw-list .btn { margin-left: auto; }
.cluster-list .request-card:last-child { margin-bottom: 0; }
.uptime-meter { display: block; width: 100%; max-width: 160px; height: 8px; margin-top: 5px; }

/* ----------------------------------------------------------------------------- payouts */
.earn-legend { padding-top: 12px; padding-bottom: 0; }
.earn-legend .note { line-height: 1.9; }
.row-penalty td { background: #fff8f7; }
.earn-memo { margin-top: 4px; overflow-wrap: anywhere; }
.center-row { display: flex; justify-content: center; }

/* -------------------------------------------------------------------------- operator tools */
.admin-groups { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-group { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; color: #4e5c70; padding: 7px 12px; border-radius: 999px; font-weight: 800; font-size: 12px; }
.admin-group:hover { color: var(--ink); border-color: #cfd8e3; }
.admin-group.active { background: var(--brand-bg); border-color: #b9d6a5; color: #3f6330; }
.filter-check { align-self: flex-end; padding-bottom: 8px; }
.filter-action { margin-left: auto; align-self: flex-end; }
.filter-actions { align-items: center; }
.filter-actions .note { flex: 1 1 240px; }
.admin-panel .sub-title:first-child { margin-top: 0; }
.contract-card { padding: 14px 16px; }
.total-row td { background: #fafbfc; }
.ticket-controls { margin: 4px 0 6px; }
.ticket-controls .form-row { flex: 1 1 140px; }
.ticket-thread { max-height: 420px; }
.chat-bubble.internal { background: var(--warn-bg); border: 1px dashed var(--warn-border); align-self: stretch; max-width: 100%; }
.row-overdue td { background: #fffaf5; }
.incident-card h4 { overflow-wrap: anywhere; }
.incident-updates { list-style: none; margin: 10px 0 12px; display: grid; gap: 8px; border-left: 2px solid #e6eaf0; padding: 0 0 0 12px; }
.incident-updates p { margin-top: 3px; white-space: pre-line; font-size: 12.5px; color: #4b586c; }

/* ------------------------------------------------------------------------------ responsive */
@media (max-width: 1180px) {
  .hl-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .trust-tiers { grid-template-columns: 1fr; }
}
@media (max-width: 630px) {
  .hl-card { padding: 14px; }
  .hl-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 10px; }
  .hl-actions .btn { flex: 1 1 auto; justify-content: center; }
  .req-list { grid-template-columns: 1fr; }
  .tier-choice { max-width: none; }
  .mw-form .btn { width: 100%; }
  .mw-list .btn { margin-left: 0; }
  .admin-groups { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .admin-group { flex: none; }
  .filter-action { margin-left: 0; width: 100%; }
  .filter-action .btn, .filter-actions .btn { width: 100%; justify-content: center; }
  .filter-check { padding-bottom: 0; }
  .clamp-2 { max-width: none; }
}
