/**
 * ==========================================================================
 * UnitedQKeyEngine - admin.css
 *
 * @fileOverview
 *   Admin skin layer for the Cases-style vendorless QKeyDB standalone admin
 *   shell. Holds admin-only visual treatments on top of the shared framework
 *   component stack.
 *
 * @author
 *   Farrel Wilson – Contact@QueryKey.com
 *
 * @maintainer
 *   QKeyDB Admin Surfaces
 *
 * @usage
 *   Load last in the governed admin CSS stack.
 *
 * @dependencies
 *   ../variables.css
 *   ../shell/layout.css
 *   ../components/navigation.css
 *   ../components/buttons.css
 *   ../components/forms.css
 *   ../components/tables.css
 *   ../components/cards.css
 *   ../components/auth-card.css
 *   ../components/status-notices.css
 *
 * @notes
 *   - LastUpdatedUTC: 2026-03-14T00:00:00Z
 *
 * @license
 *   QueryKey is a trademark of Farrel Wilson. All rights reserved.
 * ==========================================================================
 */

.loading {
  opacity: .7;
  pointer-events: none;
}

.loading .login-btn {
  background: #666;
  box-shadow: none;
}

.main-content {
  display: none;
}

.main-content.active {
  display: block;
}

.table-section h2,
.section-title {
  color: var(--qk-admin-accent);
}

.clickable-card {
  cursor: pointer;
}

.qk-card-meta {
  margin: .4rem 0 0;
  font-size: .65rem;
  color: var(--qk-admin-text-muted);
}

.qk-meta-row {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.qk-meta-time {
  color: var(--qk-admin-text-muted);
}

.qk-status-pill-stack {
  margin-top: .35rem;
}

.qk-status-pill-inline {
  margin-right: .4rem;
}

.analytics-progress {
  width: 100%;
  height: 10px;
  appearance: none;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255 255 255 / .08);
}

.analytics-progress::-webkit-progress-bar {
  background: rgba(255 255 255 / .08);
  border-radius: 999px;
}

.analytics-progress::-webkit-progress-value {
  background: linear-gradient(145deg,#ff7e28,#f45a00);
  border-radius: 999px;
}

.analytics-progress::-moz-progress-bar {
  background: linear-gradient(145deg,#ff7e28,#f45a00);
  border-radius: 999px;
}

.qk-toast {
  transition: opacity .3s ease;
}

.qk-toast.is-exiting {
  opacity: 0;
}

.table-section h2 {
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: none;
}

.section-title {
  margin-bottom: 2rem;
}

.db-list-shell {
  margin-top: 1.5rem;
  padding: 1.2rem 1.4rem;
  background: rgba(255 255 255 / .05);
  border: 1px solid rgba(255 255 255 / .08);
  border-radius: 20px;
  box-shadow: var(--qk-admin-panel-shadow);
}

.db-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .8rem;
}

.db-subtitle {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--qk-admin-accent);
  text-shadow: 0 0 6px #ff7e28aa;
}

.badge-count {
  background: #262c44;
  color: var(--qk-admin-accent-soft);
  padding: .25rem .55rem;
  border-radius: 10px;
  font-size: .65rem;
  margin-left: .4rem;
}

.db-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.db-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .85rem;
  background: rgba(255 255 255 / .07);
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--qk-admin-text);
  box-shadow: inset 2px 2px 6px rgba(255 255 255 / .15), inset -2px -2px 6px rgba(0 0 0 / .85);
}

.db-list li.empty-row {
  background: rgba(255 255 255 / .03);
  font-style: italic;
}

.db-list li.active {
  outline: 2px solid var(--qk-admin-accent);
}

.db-list .db-name {
  font-weight: 700;
}

.db-list .action-delete .trash-ico {
  filter: drop-shadow(0 0 4px #ff7e28);
}

.db-list .action-locked {
  margin-left: auto;
  opacity: .7;
}

.db-meta {
  font-size: .62rem;
  color: var(--qk-admin-text-muted);
  font-weight: 600;
}

.create-db-btn,
.run-query-btn {
  padding: .55rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .05em;
}

body[data-theme='light'] .db-list-shell,
body[data-theme='light'] .db-list li,
body[data-theme='light'] .db-list li.empty-row {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: none;
}

body[data-theme='light'] .db-list-shell,
body[data-theme='light'] .db-list li {
  border-color: var(--border-soft);
}

body[data-theme='light'] .db-subtitle,
body[data-theme='light'] .db-meta,
body[data-theme='light'] .badge-count,
body[data-theme='light'] .qk-card-meta {
  color: var(--text-soft);
}

body[data-theme='light'] .badge-count {
  background: var(--bg-card);
}

body[data-theme='light'] .analytics-progress,
body[data-theme='light'] .analytics-progress::-webkit-progress-bar {
  background: var(--bg-card);
}

.db-modal-overlay,
.qk-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 3.5rem 1.5rem 2rem;
  animation: fadeIn .3s ease;
}

.db-modal-overlay {
  background: rgba(10 12 20 / .78);
  z-index: 5000;
}

.qk-modal-overlay {
  background: rgba(10, 12, 20, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.db-modal {
  width: 380px;
  background: rgba(34 37 56 / .95);
  border: 1px solid rgba(255 255 255 / .12);
  border-radius: 20px;
  padding: 1.4rem 1.3rem 1.2rem;
  box-shadow: 0 18px 38px -8px rgba(0 0 0 /.7), inset 4px 4px 10px rgba(255 255 255 / .18), inset -4px -4px 10px rgba(0 0 0 / .9);
}

.db-modal.enhanced,
.qk-modal {
  background: var(--bg-soft);
}

.db-modal.enhanced {
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

.db-modal h3,
.qk-panel-header span,
.db-detail-header h2 {
  color: var(--qk-admin-accent);
}

.db-modal h3 {
  margin: .2rem 0 1rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-shadow: 0 0 6px #ff7e28cc;
}

.db-modal.enhanced h3 {
  letter-spacing: .5px;
  text-shadow: 0 0 10px #ff7e28aa;
}

.db-modal-field-label {
  display: block;
  margin-top: .6rem;
}

.qk-modal {
  width: min(760px, 96vw);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 48px rgba(2, 6, 23, 0.45);
  padding: 1.6rem;
  margin: 0 auto;
}

.qk-modal-hdr {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--qk-admin-accent);
}

.qk-modal-msg {
  margin: 0.35rem 0 0;
  color: var(--text-faint);
  font-size: 0.78rem;
  line-height: 1.5;
}

.qk-modal-status,
.form-feedback,
.inline-status,
.query-error,
.export-result {
  margin-top: .6rem;
  font-size: .65rem;
  font-weight: 600;
  min-height: 1em;
}

.query-duration {
  font-size: .65rem;
  font-weight: 600;
  color: #8891c9;
}

.run-query-btn.running {
  opacity: .55;
  pointer-events: none;
  position: relative;
}

.run-query-btn.running::after {
  content: '…';
  position: absolute;
  right: 8px;
  animation: ellipsis 1s infinite;
}

@keyframes ellipsis {
  0% { content: '…'; }
  33% { content: '..'; }
  66% { content: '.'; }
  100% { content: '…'; }
}

.qk-panel {
  position: relative;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(2, 6, 23, .74));
  padding: 1rem 1.2rem;
  box-shadow: var(--qk-admin-panel-shadow);
  overflow: hidden;
}

.qk-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}

.qk-card-title,
.evidence-card h4,
.metric .m-key,
.db-detail-header h2 {
  font-weight: 700;
}

.kv {
  display: flex;
  justify-content: space-between;
  padding: .2rem 0;
  color: #ccc;
  font-weight: 600;
}

.gate-disabled {
  opacity: .5;
  pointer-events: none;
  filter: grayscale(.3);
  position: relative;
}

.gate-disabled::after {
  content: 'Capability enforcement active';
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: .7rem;
  color: var(--qk-admin-accent-soft);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gate-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,12,20,.7);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  z-index: 5;
}

.gate-overlay-message {
  font-size: .75rem;
  font-weight: 600;
  color: #ffddb8;
  line-height: 1.4;
}

.evidence-meta,
.qk-muted-text,
.trend-chip,
.analytics-controls label,
.select-desc {
  color: var(--qk-admin-text-muted);
}

.evidence-meta {
  font-size: .7rem;
  margin-bottom: .4rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.analytics-bars {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-top: .6rem;
}

.analytics-bars .bar {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(145deg,#ff7e28,#f45a00);
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
}

.analytics-controls label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.trend-chip {
  font-size: .7rem;
  margin-left: .4rem;
  font-weight: 700;
}

.trend-chip.positive {
  color: #4caf50;
}

.settings-toggle,
.toggle-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .85rem;
  font-weight: 600;
  color: #ffddb8;
}

.settings-toggle input,
.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.toggle-label {
  font-size: .7rem;
  color: #cbd3ff;
}

.toggle-text {
  font-weight: 600;
}

.soc-evidence-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.soc-evidence-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255 255 255 / .05);
  padding: .45rem .6rem;
  border-radius: 10px;
  font-weight: 600;
}

.db-detail-shell {
  margin-top: 1.4rem;
  padding: 1.2rem 1.4rem;
  background: rgba(255 255 255 / .04);
  border: 1px solid rgba(255 255 255 / .08);
  border-radius: 24px;
  box-shadow: inset 4px 4px 10px rgba(255 255 255 / .15), inset -4px -4px 10px rgba(0 0 0 / .85);
}

.db-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .9rem;
}

.db-detail-header h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  text-shadow: 0 0 6px #ff7e28aa;
}

.db-tabs {
  margin-bottom: 1rem;
}

.db-tabs .tab.active {
  background: var(--qk-admin-accent);
  border-color: var(--qk-admin-accent);
  color: #fff;
  box-shadow: 0 0 6px #ff7e28;
}

.db-tab-panels .panel {
  display: none;
}

.db-tab-panels .panel.active {
  display: block;
}

.tables-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .5rem;
}

.tables-list {
  margin-bottom: 1rem;
}

.tables-ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.tables-ul li {
  padding: .45rem .7rem;
  background: rgba(255 255 255 / .06);
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 600;
  cursor: pointer;
}

.tables-ul li.active,
.tables-ul li:hover {
  background: rgba(255 126 40 / .2);
  color: #fff;
}

.perf-pre {
  background: rgba(0 0 0 / .35);
  padding: .8rem;
  border-radius: 14px;
  font-size: .6rem;
}

.records-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.2rem;
}

.records-table-list {
  background: var(--qk-surface);
  border: 1px solid var(--qk-border);
  border-radius: var(--qk-card-radius);
  padding: 1rem;
  max-height: 520px;
}

.records-table-list button {
  width: 100%;
  text-align: left;
  padding: .45rem .6rem;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #e4e7ff;
  font-weight: 600;
  cursor: pointer;
}

.records-table-list button.active,
.records-table-list button:hover {
  border-color: var(--qk-admin-accent);
  background: rgba(255 126 40 / .1);
  color: #fff;
}

.records-view {
  background: var(--qk-surface);
  border: 1px solid var(--qk-border);
  border-radius: var(--qk-card-radius);
  padding: 1rem 1.2rem;
  min-height: 420px;
}

.records-tabs {
  display: flex;
  gap: .4rem;
  margin-bottom: .9rem;
}

.records-tabs button {
  border-radius: 999px;
}

@media (max-width: 960px) {
  .records-shell {
    grid-template-columns: 1fr;
  }
}

/**
 * ====================================================================
 * CONTROL PLANE DASHBOARD DENSITY
 * ====================================================================
 * Add denser summary, install, and runtime-visibility patterns so the local
 * control plane reads like an operator workspace instead of a sparse mock.
 */
.cc-dashboard-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(255 255 255 / .08);
  background:
    radial-gradient(circle at top right, rgba(255 126 40 / .12), transparent 38%),
    linear-gradient(165deg, rgba(41 46 73 / .88), rgba(26 29 46 / .86));
}

.cc-dashboard-hero__copy {
  max-width: 44rem;
}

.cc-dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .55rem;
}

.cc-summary-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: .9rem;
  margin: 1rem 0 1.25rem;
}

.cc-summary-matrix--tight {
  margin: 0;
  min-width: min(100%, 34rem);
}

.cc-summary-card {
  min-height: 130px;
  border: 1px solid rgba(255 255 255 / .06);
  background: linear-gradient(180deg, rgba(255 255 255 / .065), rgba(255 255 255 / .04));
}

.cc-summary-card span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--qk-admin-text-muted);
}

.cc-summary-card strong {
  display: block;
  margin-top: .45rem;
  font-size: 1.15rem;
  color: #fff1de;
}

.cc-summary-card p {
  margin: .5rem 0 0;
  color: #cbd3ff;
  font-size: .76rem;
  line-height: 1.45;
}

.cc-compact-stack {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.cc-compact-row {
  padding: .7rem .8rem;
  border: 1px solid rgba(255 255 255 / .08);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255 255 255 / .055), rgba(255 255 255 / .03));
}

.cc-compact-row span {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--qk-admin-text-muted);
}

.cc-compact-row strong {
  display: block;
  margin-top: .28rem;
  color: #ffddb8;
}

.cc-install-form {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.cc-install-form label {
  display: flex;
  flex-direction: column;
  gap: .28rem;
  font-size: .72rem;
  color: var(--qk-admin-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Keep overlay form labels readable and separated from their input fields. */
.qk-modal-overlay .cc-install-form label {
  gap: 0.56rem;
  color: var(--blue);
}

.qk-modal-overlay .cc-install-form label:nth-of-type(even) {
  color: var(--amber);
}

.qk-modal-overlay .cc-install-form .cc-choice-card,
.qk-modal-overlay .cc-install-form .cc-choice-card span {
  color: #e2e8f0;
}

.qk-modal-overlay .db-field {
  gap: 1.15rem;
}

.qk-modal-overlay .db-field-label {
  color: var(--blue);
}

.qk-modal-overlay .db-field:nth-of-type(even) .db-field-label {
  color: var(--amber);
}

.cc-install-form input,
.cc-install-form select,
.cc-install-form textarea {
  border: 1px solid rgba(255 255 255 / .12);
  border-radius: 12px;
  background: rgba(8 10 18 / .65);
  color: #f6f7ff;
  padding: .72rem .82rem;
  font-size: .86rem;
  box-shadow: inset 2px 2px 6px rgba(255 255 255 / .06), inset -2px -2px 6px rgba(0 0 0 / .35);
}

.cc-install-form input:focus,
.cc-install-form select:focus,
.cc-install-form textarea:focus {
  outline: none;
  border-color: rgba(255 126 40 / .5);
  box-shadow: 0 0 0 3px rgba(255 126 40 / .12), inset 2px 2px 6px rgba(255 255 255 / .06), inset -2px -2px 6px rgba(0 0 0 / .35);
}

.cc-install-form textarea {
  min-height: 10rem;
  resize: vertical;
  line-height: 1.5;
}

.cc-install-form input::placeholder,
.cc-install-form textarea::placeholder {
  color: rgba(203 213 225 / .55);
}

.cc-choice-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.5rem;
  border: 1px solid rgba(255 255 255 / .08);
  border-radius: 16px;
  background: rgba(15 23 42 / .62);
  padding: .9rem 1rem;
  color: #e2e8f0;
  text-transform: none;
  letter-spacing: normal;
  font-size: .9rem;
}

.cc-choice-card input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #0ea5e9;
  flex-shrink: 0;
}

.cc-choice-card span {
  color: #e2e8f0;
  font-size: .92rem;
  font-weight: 600;
}

.cc-install-form .run-query-btn {
  align-self: flex-start;
}

.cc-runbook-grid--tight {
  margin-top: .85rem;
}

.cc-runbook-grid--tight .cc-runbook-card {
  min-height: 0;
}

/**
 * ====================================================================
 * STAGING AND RELEASE SURFACES
 * ====================================================================
 * Give deployment lanes and release movement a denser, more authored layout
 * so staging/runtime simulation reads like a real operator console.
 */
.cc-section-kicker {
  display: inline-block;
  margin-bottom: .35rem;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--qk-admin-accent-soft);
}

.cc-lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 1rem;
}

.cc-lane-card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  min-height: 100%;
}

.cc-lane-card__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.cc-lane-card__header h3 {
  margin: 0;
}

.cc-lane-card__status {
  flex-shrink: 0;
}

.cc-lane-card__summary {
  margin: 0;
  color: #d8deff;
  line-height: 1.5;
}

.cc-lane-card__lists {
  display: grid;
  gap: .8rem;
}

.cc-metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(130px,1fr));
  gap: .7rem;
}

.cc-metric-strip--compact {
  grid-template-columns: repeat(2,minmax(0,1fr));
}

.cc-metric-tile {
  min-height: 88px;
  padding: .75rem .8rem;
  border-radius: 14px;
  border: 1px solid rgba(255 255 255 / .08);
  background: linear-gradient(180deg, rgba(255 255 255 / .055), rgba(255 255 255 / .025));
}

.cc-metric-tile span {
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--qk-admin-text-muted);
}

.cc-metric-tile strong {
  display: block;
  margin-top: .4rem;
  color: #fff1de;
  font-size: .9rem;
  line-height: 1.4;
  word-break: break-word;
}

.metrics-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .34rem .62rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .35);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #cbd5e1;
  background: rgba(15, 23, 42, .55);
}

.metrics-live-indicator::before {
  content: '';
  width: .5rem;
  height: .5rem;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, .35);
}

.metrics-live-indicator.is-live::before {
  background: #22c55e;
  animation: metricsPulse 1.6s ease-out infinite;
}

.metrics-trend-shell {
  display: grid;
  gap: .55rem;
}

.metrics-trend-meta {
  display: flex;
  justify-content: flex-start;
}

.metrics-compact-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.metrics-legend-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: rgba(15, 23, 42, .5);
  font-size: .72rem;
  color: #dbeafe;
}

.metrics-legend-chip i {
  display: inline-flex;
  width: .56rem;
  height: .56rem;
  border-radius: 999px;
}

.metrics-chart-frame {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: radial-gradient(130% 110% at 92% 0%, rgba(56, 189, 248, .14), rgba(15, 23, 42, .75));
  overflow: hidden;
}

.metrics-chart-svg {
  display: block;
}

.metrics-chart-grid-line {
  stroke: rgba(148, 163, 184, .2);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.metrics-chart-area {
  opacity: .85;
}

.metrics-chart-line {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: metricsDrawLine .9s ease-out forwards;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, .2));
}

.metrics-chart-cursor {
  stroke: rgba(255, 255, 255, .38);
  stroke-width: 1;
  stroke-dasharray: 3 5;
  opacity: 0;
  transition: opacity .2s ease;
}

.metrics-chart-point {
  opacity: 0;
  transition: opacity .2s ease;
}

.metrics-trend-shell:hover .metrics-chart-cursor,
.metrics-trend-shell:hover .metrics-chart-point {
  opacity: 1;
}

.metrics-chart-axis-label {
  fill: rgba(226, 232, 240, .9);
  font-size: 11px;
}

.metrics-chart-tooltip {
  position: absolute;
  top: 0;
  left: 0;
  padding: .45rem .58rem;
  border-radius: .6rem;
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(2, 6, 23, .9);
  color: #f8fafc;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .35);
  font-size: .73rem;
  display: grid;
  gap: .16rem;
  min-width: 152px;
}

.metrics-chart-tooltip strong {
  font-size: .78rem;
  color: #fef3c7;
}

@keyframes metricsDrawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes metricsPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
  }
}

.cc-runbook-grid--signals {
  align-items: stretch;
}

.cc-runbook-card--signal {
  min-height: 100%;
}

.cc-signal-stack {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.cc-release-track {
  display: grid;
  gap: .9rem;
}

.cc-release-track__step {
  position: relative;
  overflow: hidden;
}

.cc-release-track__step::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255 126 40 / .95), rgba(255 126 40 / .2));
}

/**
 * ====================================================================
 * CONTROL PLANE INFORMATION LAYOUT
 * ====================================================================
 * Improve hierarchy and readability for the control center surfaces so dense
 * operations data remains easy to scan on desktop and mobile.
 */
.cc-hero-copy {
  margin-bottom: 1rem;
}

.cc-hero-copy .section-title {
  margin: 0;
  font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2.1rem);
  letter-spacing: .01em;
}

.cc-hero-copy .qk-note {
  margin: .5rem 0 0;
  max-width: 72ch;
  color: #cbd5e1;
  font-size: .95rem;
  line-height: 1.55;
}

.cc-two-column,
.cc-detail-grid,
.cc-panel-grid,
.cc-runbook-grid {
  display: grid;
  gap: .9rem;
  margin-top: .9rem;
}

.cc-two-column {
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.cc-detail-grid,
.cc-runbook-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.cc-panel-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.cc-section-shell {
  border: 1px solid rgba(148, 163, 184, .2);
  background: linear-gradient(180deg, rgba(15, 23, 42, .82), rgba(2, 6, 23, .74));
  box-shadow:
    inset 0 1px 0 rgba(148, 163, 184, .14),
    0 12px 28px rgba(4 6 15 / .28);
}

.cc-section-shell h3,
.cc-section-shell h4 {
  margin: 0;
  letter-spacing: .01em;
}

.cc-section-shell h3 {
  font-size: 1.06rem;
  color: #e2e8f0;
}

.cc-section-shell h4 {
  font-size: .86rem;
  color: #bae6fd;
}

.cc-section-lead {
  margin: .5rem 0 .8rem;
  color: #b9c5ff;
  line-height: 1.48;
  font-size: .84rem;
}

.cc-domain-overview {
  margin-top: .45rem;
  padding-top: 1.05rem;
}

.cc-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: .65rem;
  margin-top: .65rem;
}

.cc-kv-grid--metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.cc-kv {
  display: flex;
  flex-direction: column;
  gap: .26rem;
  padding: .65rem .72rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  background: rgba(15, 23, 42, .56);
}

.cc-kv span {
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #94a3b8;
}

.cc-kv strong {
  font-size: .83rem;
  color: #e2e8f0;
  word-break: break-word;
  line-height: 1.35;
}

.cc-inline-note {
  margin-top: .48rem;
  padding-left: .66rem;
  border-left: 2px solid rgba(34, 211, 238, .45);
  color: #cbd5e1;
  font-size: .78rem;
  line-height: 1.45;
}

.cc-domain-list {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .75rem;
}

.cc-rail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem .74rem;
  border-radius: 12px;
  border: 1px solid rgba(255 255 255 / .08);
  background: rgba(8 11 20 / .36);
}

.cc-rail > div:first-child {
  display: flex;
  flex-direction: column;
  gap: .22rem;
  min-width: 0;
}

.cc-rail span {
  color: #f4f7ff;
  font-weight: 700;
  word-break: break-word;
}

.cc-rail strong {
  color: #aeb8e7;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .02em;
}

.cc-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}

.cc-empty-state {
  margin-top: .7rem;
  border: 1px dashed rgba(34, 211, 238, .42);
  background: linear-gradient(165deg, rgba(34, 211, 238, .14), rgba(16, 185, 129, .1));
  border-radius: 14px;
  padding: .82rem .95rem;
  color: #e0f2fe;
  font-size: .82rem;
  line-height: 1.48;
}

.cc-runbook-card {
  min-height: 100%;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 14px;
  background: rgba(15, 23, 42, .52);
  padding: .78rem .84rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.cc-runbook-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: .8rem;
  line-height: 1.45;
}

.cc-list {
  margin: .65rem 0 0;
  padding-left: 1.1rem;
  color: #d5dcff;
  display: grid;
  gap: .35rem;
}

.cc-code-block {
  display: block;
  margin: .5rem 0;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(2, 6, 23, .65);
  padding: .55rem .68rem;
  color: #e2e8f0;
  font-size: .75rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.status {
  border-radius: 999px;
  font-size: .64rem;
  letter-spacing: .08em;
  padding: .27rem .58rem;
}

@media (max-width: 980px) {
  .cc-two-column {
    grid-template-columns: 1fr;
  }

  .cc-rail {
    flex-direction: column;
    align-items: flex-start;
  }

  .cc-pill-row {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .cc-hero-copy .qk-note {
    font-size: .9rem;
  }

  .cc-section-shell {
    padding: .84rem .92rem;
  }
}

@media (min-width: 980px) {
  .cc-lane-card__lists {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .cc-release-track {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
}
