/* Hypercare tab, shared saved views, and Ad Manager revenue across the CRM. Uses the CRM's colour tokens (light + dark). */

/* Revenue strip on Pipeline deal cards, and the deal window's revenue panel */
.card-revenue-strip:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; padding: 5px 8px; border-radius: 6px; font-size: 11px; color: var(--text-muted); background: rgba(5, 150, 105, 0.08); border: 1px solid rgba(5, 150, 105, 0.25); }
.card-revenue-strip b:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-main); font-weight: 700; }
.rev-trend:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 700; margin-left: 2px; }
.rev-trend.up:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #059669; }
.rev-trend.down:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: #dc2626; }
.deal-rev-block:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-card); box-sizing: border-box; font-size: 12px; }
.deal-rev-table:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-rev-table:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-collapse: collapse; font-size: 12px; width: 100%; max-width: 420px; }
.deal-rev-table th:where(:not([data-ui="v2"], [data-ui="v2"] *)), .deal-rev-table td:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-rev-table th:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-rev-table td:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--border-color); }
.deal-rev-table th:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)), .deal-rev-table td:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-rev-table th:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-rev-table td:first-child:where(:not([data-ui="v2"], [data-ui="v2"] *)) { text-align: left; color: var(--text-muted); }
.deal-rev-meta:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-muted); font-size: 11px; }
.card-hc-badge:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-block; margin-top: 6px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: rgba(139, 92, 246, 0.12); color: #7c3aed; text-decoration: none; }
.card-hc-badge:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)) { text-decoration: underline; }

/* Hypercare tab */
#hypercareView:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: relative; }
.hc-root:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 18px 24px; color: var(--text-main); }
.hc-head:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.hc-title:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 4px; font-size: 20px; }
.hc-muted:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-muted); font-size: 12px; font-weight: 400; }
.hc-kpis:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 8px; flex-wrap: wrap; }
.hc-kpis span:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--bg-card); border: 1px solid var(--card-border); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.hc-toolbar:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 14px 0; }
.hc-input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
#hcSearch:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-width: 240px; }
.hc-spacer:where(:not([data-ui="v2"], [data-ui="v2"] *)) { flex: 1; }
.hc-check-inline:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--text-muted); cursor: pointer; }
.hc-small:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 5px 10px !important; font-size: 12px !important; }
.hc-board:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.hc-col:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: color-mix(in srgb, var(--text-muted) 6%, transparent); border-radius: 10px; min-height: 240px; display: flex; flex-direction: column; border: 2px solid transparent; }
.hc-col.over:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--primary-blue); }
.hc-col-head:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-weight: 700; font-size: 13px; cursor: help; }
.hc-count:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--bg-card); border-radius: 999px; padding: 0 8px; font-size: 12px; color: var(--text-muted); }
.hc-col-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 10px; }
.hc-col-empty:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-muted); text-align: center; padding: 16px 0; font-size: 12px; }
.hc-card:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--bg-card); border: 1px solid var(--card-border); border-left: 4px solid #94a3b8; border-radius: 8px; padding: 9px 10px; box-shadow: var(--card-shadow); cursor: pointer; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.hc-card:hover:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-card:focus-visible:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-color: var(--primary-blue); outline: none; }
.hc-card.st-green:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-left-color: #059669; }
.hc-card.st-amber:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-left-color: #f59e0b; }
.hc-card.st-red:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border-left-color: #dc2626; }
.hc-card.closed:where(:not([data-ui="v2"], [data-ui="v2"] *)) { opacity: 0.6; }
.hc-card.dragging:where(:not([data-ui="v2"], [data-ui="v2"] *)) { opacity: 0.4; }
.hc-card-top:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 6px; align-items: center; }
.hc-card-name:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-card-deal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-card-day:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-weight: 600; }
.hc-flag:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 8px; background: var(--dropdown-selected-bg); color: var(--primary-blue); margin-left: 4px; }
.hc-flag.warn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.hc-flag.bad:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.hc-rev:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-wrap: wrap; gap: 2px 8px; padding: 4px 6px; border-radius: 6px; background: rgba(5, 150, 105, 0.08); color: var(--text-muted); font-size: 11px; }
.hc-rev b:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-main); }
.hc-rev.none:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: transparent; padding: 0; }
.hc-card-people:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--text-muted); font-size: 11px; }
.hc-card-day0:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 11px; color: #b45309; font-weight: 600; }
.hc-empty:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 40px; text-align: center; color: var(--text-muted); }
.hc-note:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-top: 10px; }

/* Drawer */
.hc-drawer:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: fixed; top: 0; right: 0; height: 100vh; width: min(560px, 100vw); background: var(--bg-card); color: var(--text-main); box-shadow: -10px 0 30px rgba(0,0,0,.18); transform: translateX(105%); transition: transform .2s ease; z-index: 1200; display: flex; flex-direction: column; }
.hc-drawer.open:where(:not([data-ui="v2"], [data-ui="v2"] *)) { transform: translateX(0); }
.hc-drawer-head:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px 10px; border-bottom: 1px solid var(--card-border); }
.hc-drawer-head h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 2px 0 4px; font-size: 17px; }
.hc-drawer-links:where(:not([data-ui="v2"], [data-ui="v2"] *)) { font-size: 12px; }
.hc-drawer-links a:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--primary-blue); text-decoration: none; font-weight: 600; }
.hc-linkbtn:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: none; background: none; color: var(--primary-blue); font-weight: 600; font-size: 12px; cursor: pointer; padding: 0; }
.hc-x:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: none; background: none; font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 0 4px; }
.hc-drawer-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { overflow-y: auto; padding: 4px 18px 24px; }
.hc-banner:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 10px 0; padding: 8px 10px; border-radius: 8px; background: var(--dropdown-selected-bg); font-size: 12.5px; }
.hc-sec:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 12px 0; border-bottom: 1px solid var(--card-border); }
.hc-sec h4:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0 0 8px; font-size: 13px; }
.hc-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.hc-field:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex !important; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; margin: 0; }
.hc-field.full:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-column: 1 / -1; }
.hc-field input:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-field select:where(:not([data-ui="v2"], [data-ui="v2"] *)), .hc-field textarea:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); border-radius: 6px; padding: 6px 8px; font-size: 13px; font-weight: 400; font-family: inherit; }
.hc-checks:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-wrap: wrap; gap: 4px 14px; font-weight: 400; }
.hc-check:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 7px; font-size: 12.5px; font-weight: 400; cursor: pointer; margin: 0; padding: 3px 0; }
.hc-check input:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin-top: 2px; flex-shrink: 0; }
.hc-checklist .hc-check.done > span:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--text-muted); }
.hc-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 12px 0; position: sticky; bottom: 0; background: var(--bg-card); }
.hc-err:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--danger-red); font-size: 12.5px; }
.hc-history:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.hc-req:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--danger-red); }

/* Modals (shared views) */
.hc-modal-backdrop:where(:not([data-ui="v2"], [data-ui="v2"] *)) { position: fixed; inset: 0; z-index: 10050; background: rgba(15, 23, 42, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hc-modal:where(:not([data-ui="v2"], [data-ui="v2"] *)) { background: var(--bg-card); color: var(--text-main); border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,.25); width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; }
.hc-modal.wide:where(:not([data-ui="v2"], [data-ui="v2"] *)) { width: min(720px, 100%); }
.hc-modal-head:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--card-border); }
.hc-modal-head h3:where(:not([data-ui="v2"], [data-ui="v2"] *)) { margin: 0; font-size: 16px; }
.hc-modal-body:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; }
.hc-modal-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: flex-end; gap: 8px; }
.hc-view-list:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-direction: column; gap: 6px; }
.hc-view-row:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--card-border); border-radius: 8px; font-size: 13px; flex-wrap: wrap; }
.hc-row-actions:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; gap: 6px; }
.hc-danger:where(:not([data-ui="v2"], [data-ui="v2"] *)) { color: var(--danger-red) !important; }
.hc-search:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-main); border-radius: 6px; padding: 7px 9px; font-size: 13px; font-weight: 400; }
.hc-studio-results:where(:not([data-ui="v2"], [data-ui="v2"] *)) { max-height: 220px; overflow-y: auto; border: 1px solid var(--card-border); border-radius: 8px; padding: 4px 10px; font-weight: 400; }
.hc-picked:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 400; }
.hc-chip:where(:not([data-ui="v2"], [data-ui="v2"] *)) { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px; border-radius: 999px; background: var(--dropdown-selected-bg); font-size: 12px; }
.hc-chip button:where(:not([data-ui="v2"], [data-ui="v2"] *)) { border: none; background: none; cursor: pointer; color: var(--text-muted); font-size: 14px; line-height: 1; padding: 0 3px; }

@media (max-width: 900px) {
  .hc-root:where(:not([data-ui="v2"], [data-ui="v2"] *)) { padding: 14px 16px; }
  .hc-grid:where(:not([data-ui="v2"], [data-ui="v2"] *)) { grid-template-columns: 1fr 1fr; }
  #hcSearch:where(:not([data-ui="v2"], [data-ui="v2"] *)) { min-width: 0; flex: 1; }
}
