/* PropTechUSA Control Plane — premium operator presentation layer */
:root {
  --wc-bg: #050b0a;
  --wc-panel: rgba(11, 24, 20, 0.84);
  --wc-panel-strong: rgba(14, 31, 26, 0.96);
  --wc-line: rgba(154, 220, 193, 0.14);
  --wc-line-strong: rgba(119, 242, 189, 0.24);
  --wc-emerald: #78f2be;
  --wc-emerald-dim: rgba(120, 242, 190, 0.1);
  --wc-cyan: #78d9ff;
  --wc-gold: #f4c56b;
  --wc-red: #ff8279;
  --wc-shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
}

body[data-worldclass="true"] {
  background:
    radial-gradient(circle at 90% -15%, rgba(66, 220, 158, 0.11), transparent 34rem),
    radial-gradient(circle at 20% 115%, rgba(61, 139, 132, 0.08), transparent 36rem),
    linear-gradient(180deg, #06100e 0%, #050b0a 100%);
}

body[data-worldclass="true"] .sidebar {
  background:
    linear-gradient(180deg, rgba(9, 21, 18, 0.99), rgba(4, 12, 10, 0.99));
  box-shadow: 18px 0 60px rgba(0, 0, 0, 0.12);
}

body[data-worldclass="true"] .sidebar-brand {
  min-height: 84px;
}

body[data-worldclass="true"] .topbar {
  background: rgba(5, 13, 11, 0.82);
  border-bottom-color: rgba(154, 220, 193, 0.1);
  min-height: 84px;
}

body[data-worldclass="true"] .topbar h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.045em;
}

body[data-worldclass="true"] .view {
  padding-top: 28px;
}

body[data-worldclass="true"] .metric,
body[data-worldclass="true"] .panel,
body[data-worldclass="true"] .service-card {
  background:
    linear-gradient(145deg, rgba(18, 38, 32, 0.9), rgba(8, 20, 17, 0.93));
  border-color: var(--wc-line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.018) inset, 0 18px 55px rgba(0, 0, 0, 0.13);
}

body[data-worldclass="true"] .metric {
  min-height: 148px;
  padding: 22px;
}

body[data-worldclass="true"] .metric strong {
  letter-spacing: -0.055em;
}

body[data-worldclass="true"] .metric-accent {
  background:
    radial-gradient(circle at 88% -10%, rgba(120, 242, 190, 0.22), transparent 46%),
    linear-gradient(145deg, rgba(18, 49, 39, 0.98), rgba(8, 27, 21, 0.98));
  border-color: rgba(120, 242, 190, 0.22);
}

body[data-worldclass="true"] .panel {
  overflow: hidden;
  position: relative;
}

body[data-worldclass="true"] .panel::before,
.wc-surface::before {
  background: linear-gradient(90deg, transparent, rgba(120, 242, 190, 0.28), transparent);
  content: "";
  height: 1px;
  left: 0;
  opacity: 0.35;
  position: absolute;
  right: 0;
  top: 0;
}

body[data-worldclass="true"] table {
  border-collapse: separate;
  border-spacing: 0;
}

body[data-worldclass="true"] thead th {
  backdrop-filter: blur(14px);
  background: rgba(8, 19, 16, 0.94);
  color: #7f988e;
  font-size: 9px;
  letter-spacing: 0.09em;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  z-index: 3;
}

body[data-worldclass="true"] tbody tr {
  transition: background 120ms ease, transform 120ms ease;
}

body[data-worldclass="true"] tbody tr:hover {
  background: rgba(120, 242, 190, 0.035);
}

body[data-worldclass="true"] .key-display,
body[data-worldclass="true"] .mono {
  font-variant-numeric: tabular-nums;
}

body[data-worldclass="true"] .key-display {
  color: #dff9ee;
}

body[data-worldclass="true"] input,
body[data-worldclass="true"] select,
body[data-worldclass="true"] textarea {
  background: rgba(4, 12, 10, 0.78);
  border-color: rgba(154, 220, 193, 0.15);
}

body[data-worldclass="true"] .button-primary {
  box-shadow: 0 10px 32px rgba(48, 217, 144, 0.2);
}

/* Operator summary strip */
.wc-operator-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 16px;
}

.wc-signal {
  background: linear-gradient(145deg, rgba(12, 27, 23, 0.86), rgba(7, 18, 15, 0.9));
  border: 1px solid var(--wc-line);
  border-radius: 12px;
  min-height: 96px;
  padding: 16px 17px;
  position: relative;
}

.wc-signal-label {
  color: #6f887e;
  font: 700 8px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wc-signal strong {
  color: #effaf5;
  display: block;
  font-size: 22px;
  letter-spacing: -0.04em;
  margin-top: 8px;
}

.wc-signal small {
  color: #728a80;
  display: block;
  font-size: 10px;
  line-height: 1.45;
  margin-top: 4px;
}

.wc-signal.is-good { border-color: rgba(120, 242, 190, 0.2); }
.wc-signal.is-good strong { color: var(--wc-emerald); }
.wc-signal.is-warn { border-color: rgba(244, 197, 107, 0.2); }
.wc-signal.is-warn strong { color: var(--wc-gold); }
.wc-signal.is-info strong { color: var(--wc-cyan); }

/* Key Intelligence */
.wc-key-intelligence {
  margin: 0 0 18px;
}

.wc-intel-hero {
  align-items: flex-end;
  background:
    radial-gradient(circle at 90% 5%, rgba(120, 242, 190, 0.12), transparent 34%),
    linear-gradient(145deg, rgba(15, 34, 28, 0.96), rgba(7, 18, 15, 0.96));
  border: 1px solid var(--wc-line-strong);
  border-radius: 16px;
  box-shadow: var(--wc-shadow);
  display: flex;
  justify-content: space-between;
  overflow: hidden;
  padding: 24px;
  position: relative;
}

.wc-intel-hero::after {
  background: linear-gradient(90deg, var(--wc-emerald), var(--wc-cyan), transparent);
  bottom: 0;
  content: "";
  height: 2px;
  left: 24px;
  opacity: 0.55;
  position: absolute;
  right: 24px;
}

.wc-intel-kicker {
  color: var(--wc-emerald);
  font: 700 9px/1.2 var(--mono);
  letter-spacing: 0.14em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.wc-intel-title {
  font-size: clamp(25px, 3vw, 36px);
  letter-spacing: -0.055em;
  line-height: 1;
  margin: 0;
}

.wc-intel-copy {
  color: #849c92;
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0 0;
  max-width: 690px;
}

.wc-trust-seal {
  align-items: center;
  background: rgba(120, 242, 190, 0.08);
  border: 1px solid rgba(120, 242, 190, 0.2);
  border-radius: 999px;
  color: var(--wc-emerald);
  display: inline-flex;
  flex: 0 0 auto;
  font: 700 9px/1 var(--mono);
  gap: 7px;
  padding: 9px 12px;
  text-transform: uppercase;
}

.wc-trust-seal::before {
  background: var(--wc-emerald);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(120, 242, 190, 0.08);
  content: "";
  height: 6px;
  width: 6px;
}

.wc-intel-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}

.wc-intel-metric {
  background: var(--wc-panel);
  border: 1px solid var(--wc-line);
  border-radius: 12px;
  padding: 16px;
}

.wc-intel-metric span {
  color: #718a7f;
  display: block;
  font: 700 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.wc-intel-metric strong {
  color: #f2faf6;
  display: block;
  font-size: 24px;
  letter-spacing: -0.045em;
  margin-top: 8px;
}

.wc-intel-metric small {
  color: #687f75;
  display: block;
  font-size: 10px;
  line-height: 1.4;
  margin-top: 3px;
}

.wc-intel-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1.15fr 1fr 0.85fr;
  margin-top: 12px;
}

.wc-surface {
  background: linear-gradient(145deg, rgba(12, 28, 23, 0.9), rgba(7, 18, 15, 0.92));
  border: 1px solid var(--wc-line);
  border-radius: 14px;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.wc-surface-head {
  align-items: center;
  border-bottom: 1px solid var(--wc-line);
  display: flex;
  justify-content: space-between;
  padding: 16px 18px 13px;
}

.wc-surface-head h4 {
  font-size: 13px;
  letter-spacing: -0.02em;
  margin: 0;
}

.wc-surface-head span {
  color: #61796f;
  font: 700 8px/1 var(--mono);
  text-transform: uppercase;
}

.wc-list {
  display: grid;
}

.wc-list-row {
  align-items: center;
  border-bottom: 1px solid rgba(154, 220, 193, 0.08);
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 11px 18px;
}

.wc-list-row:last-child { border-bottom: 0; }
.wc-list-row:hover { background: rgba(120, 242, 190, 0.025); }

.wc-list-main { min-width: 0; }
.wc-list-main strong {
  color: #dceee6;
  display: block;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-list-main small {
  color: #61786e;
  display: block;
  font: 9px/1.45 var(--mono);
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wc-list-value {
  color: #eaf8f1;
  font: 700 11px/1 var(--mono);
  text-align: right;
}
.wc-list-value small {
  color: #60776d;
  display: block;
  font: 8px/1.4 var(--mono);
  margin-top: 4px;
}

.wc-truth-chip {
  align-items: center;
  border: 1px solid rgba(154, 220, 193, 0.15);
  border-radius: 999px;
  color: #8da59a;
  display: inline-flex;
  font: 700 8px/1 var(--mono);
  gap: 5px;
  padding: 5px 7px;
  text-transform: uppercase;
}
.wc-truth-chip.is-active { background: rgba(120, 242, 190, 0.07); border-color: rgba(120, 242, 190, 0.18); color: var(--wc-emerald); }
.wc-truth-chip.is-observed { background: rgba(120, 217, 255, 0.07); border-color: rgba(120, 217, 255, 0.2); color: var(--wc-cyan); }
.wc-truth-chip.is-warning { background: rgba(244, 197, 107, 0.07); border-color: rgba(244, 197, 107, 0.2); color: var(--wc-gold); }

.wc-telemetry-note {
  align-items: flex-start;
  background: linear-gradient(90deg, rgba(244, 197, 107, 0.08), rgba(244, 197, 107, 0.025));
  border: 1px solid rgba(244, 197, 107, 0.18);
  border-radius: 12px;
  color: #cdb783;
  display: flex;
  font-size: 10px;
  gap: 10px;
  line-height: 1.55;
  margin-top: 12px;
  padding: 12px 14px;
}
.wc-telemetry-note strong { color: var(--wc-gold); }
.wc-telemetry-note .wc-note-mark {
  color: var(--wc-gold);
  font: 800 13px/1 var(--mono);
  margin-top: 1px;
}

.wc-empty {
  color: #61796f;
  font-size: 10px;
  line-height: 1.5;
  padding: 22px 18px;
}

/* Read-only observed credentials should feel distinct from lifecycle records. */
body[data-worldclass="true"] .keys-table tr.wc-observed-row {
  background: linear-gradient(90deg, rgba(120, 217, 255, 0.035), transparent 38%);
}
body[data-worldclass="true"] .keys-table tr.wc-observed-row td:first-child {
  box-shadow: 2px 0 0 rgba(120, 217, 255, 0.4) inset;
}
body[data-worldclass="true"] .keys-table tr.wc-observed-row .action-button {
  opacity: 0.42;
}

.wc-toast {
  background: rgba(11, 26, 22, 0.98);
  border: 1px solid var(--wc-line-strong);
  border-radius: 11px;
  box-shadow: var(--wc-shadow);
  color: #d8ebe2;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 8px;
  max-width: 370px;
  padding: 12px 14px;
}

@media (max-width: 1180px) {
  .wc-intel-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wc-intel-grid { grid-template-columns: 1fr 1fr; }
  .wc-intel-grid .wc-surface:last-child { grid-column: 1 / -1; }
}

@media (max-width: 920px) {
  .wc-operator-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wc-intel-hero { align-items: flex-start; flex-direction: column; gap: 18px; }
  .wc-intel-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wc-intel-grid { grid-template-columns: 1fr; }
  .wc-intel-grid .wc-surface:last-child { grid-column: auto; }
}

@media (max-width: 620px) {
  .wc-operator-strip,
  .wc-intel-metrics { grid-template-columns: 1fr; }
  .wc-intel-hero { padding: 20px; }
  .wc-intel-title { font-size: 28px; }
}
