:root {
  --ink: #18211f;
  --muted: #64716d;
  --line: #dce4df;
  --panel: #ffffff;
  --canvas: #f2f6f8;
  --forest: #12332d;
  --green: #2fb66d;
  --green-soft: #e6f7ed;
  --sky: #1f9ed8;
  --sky-soft: #e4f6ff;
  --blue: #356fd5;
  --blue-soft: #e9f0ff;
  --violet: #8158d8;
  --violet-soft: #f0ebff;
  --amber: #c17817;
  --amber-soft: #fff1d7;
  --pink: #d94d83;
  --pink-soft: #ffe8f2;
  --red: #c84747;
  --red-soft: #fde7e7;
  --shadow: 0 18px 46px rgba(18, 51, 45, .12);
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(228,246,255,.78), rgba(242,246,248,.72) 36%, rgba(230,247,237,.82)),
    var(--canvas);
  font: 13px/1.45 Inter, system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: Manrope, Inter, sans-serif; letter-spacing: 0; }
h1 { max-width: 780px; font-size: clamp(28px, 4vw, 44px); line-height: 1.02; }
h2 { font-size: 18px; line-height: 1.15; }
h3 { font-size: 15px; }

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 28px;
  padding: 22px 16px;
  color: #e7fff1;
  background:
    radial-gradient(circle at 22px 38px, rgba(82,210,115,.24), transparent 90px),
    radial-gradient(circle at 196px 160px, rgba(31,158,216,.26), transparent 110px),
    linear-gradient(180deg, #0f2b31, var(--forest) 52%, #10251f);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-icon { width: 40px; height: 40px; flex: 0 0 auto; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); }
.brand strong { font: 800 18px Manrope, sans-serif; }
nav { display: grid; gap: 7px; }
.tenant-label {
  display: grid;
  gap: 3px;
  margin-bottom: 3px;
  padding: 0 12px 7px;
  border-bottom: 1px solid rgba(234, 255, 241, .12);
}

.tenant-label span {
  color: #7edbb4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tenant-label strong {
  overflow: hidden;
  color: #f2fff6;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #bad2cb;
  font-weight: 700;
  text-decoration: none;
}
nav svg { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }
nav a.active, nav a:hover { color: #fff; background: rgba(255,255,255,.12); }

.nav-separator {
  height: 1px;
  margin: 8px 0 4px;
  background: rgba(234, 255, 241, .14);
}

.connector-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: auto;
}
.connector-card > span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 8px;
  color: #dff9eb;
  background: rgba(255,255,255,.08);
  font-weight: 800;
}
.connector-card .aws { border-color: rgba(245,182,66,.45); color: #ffe0a1; }
.connector-card .gcp { border-color: rgba(66,211,146,.45); color: #b6ffd8; }
.connector-card .azure { border-color: rgba(71,171,255,.45); color: #bde7ff; }
.connector-card .kubernetes { border-color: rgba(156,129,255,.45); color: #ded4ff; }

main { min-width: 0; padding: 28px; }
.topbar {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 18%, rgba(245,182,66,.28), transparent 160px),
    radial-gradient(circle at 73% 82%, rgba(31,158,216,.2), transparent 190px),
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(235,250,244,.92));
  box-shadow: var(--shadow);
}

.hero-mark {
  position: absolute;
  right: 190px;
  bottom: -18px;
  opacity: .14;
  transform: rotate(-8deg) scale(2.8);
  pointer-events: none;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.top-actions { display: flex; align-items: center; gap: 10px; }
.feedback-button {
  color: var(--forest);
  background: var(--sky-soft);
}
button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  color: #fff;
  background: var(--forest);
  font-weight: 800;
}
button:hover { background: #1e4d43; }
.feedback-button:hover { background: #d3effd; }

.sidebar-action {
  display: inline-flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  background: transparent;
  color: #bad2cb;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.sidebar-action:hover {
  background: rgba(255,255,255,.12);
  color: #eafff1;
}

.toggle {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}
.toggle input { position: absolute; opacity: 0; }
.toggle span {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cbd6d1;
}
.toggle span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .16s ease;
}
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(14px); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.filters.compact { margin: 7px 0 0; }
.segmented-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}
.segmented-button.active { border-color: #9ed7b3; color: #0f402f; background: var(--green-soft); }
.vendor-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  font-weight: 800;
  white-space: nowrap;
}
.vendor-badge svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: 0 0 auto;
}
.vendor-badge.all svg { color: var(--green); }
.vendor-badge.aws svg { color: #f5a623; }
.vendor-badge.data svg { color: var(--pink); }
.vendor-badge span { color: inherit; }
.connector-card .vendor-badge {
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
}
.connector-card .vendor-badge svg {
  width: 23px;
  height: 23px;
}

.demo-data-notice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  margin: -6px 0 16px;
  padding: 14px 16px;
  border: 1px solid #acd2e7;
  border-radius: 8px;
  background: linear-gradient(120deg, #fff, #eef9ff);
  box-shadow: 0 8px 22px rgba(21, 38, 33, .05);
}
.demo-data-notice > div:first-child { min-width: 0; }
.demo-data-notice > div:first-child > strong { margin-left: 9px; font-size: 14px; }
.demo-data-notice p { margin-top: 5px; color: var(--muted); }
.demo-data-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #17546e;
  background: var(--sky-soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.demo-data-badge span { color: var(--sky); }
.demo-data-notice dl {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
}
.demo-data-notice dl div { min-width: 74px; }
.demo-data-notice dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.demo-data-notice dd { margin: 2px 0 0; color: var(--ink); font-weight: 900; }
.demo-data-notice .demo-data-boundary {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #c9e3ef;
  color: #3f6879;
  font-size: 12px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.kpi, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(21, 38, 33, .07);
}
.kpi {
  position: relative;
  min-height: 136px;
  overflow: hidden;
  padding: 18px;
}
.kpi::after {
  position: absolute;
  inset: auto -26px -42px auto;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  content: "";
}
.kpi.spend { background: linear-gradient(145deg, #ffffff, var(--sky-soft)); }
.kpi.waste { background: linear-gradient(145deg, #ffffff, var(--amber-soft)); }
.kpi.savings { background: linear-gradient(145deg, #ffffff, var(--green-soft)); }
.kpi.score { background: linear-gradient(145deg, #ffffff, var(--violet-soft)); }
.kpi-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 11px;
  border-radius: 8px;
  color: #fff;
}
.kpi-icon svg { width: 19px; height: 19px; fill: currentColor; }
.spend .kpi-icon { background: var(--sky); }
.waste .kpi-icon { background: var(--amber); }
.savings .kpi-icon { background: var(--green); }
.score .kpi-icon { background: var(--violet); }
.kpi span, .kpi em, td span, .rec-meta span, .queue small, .anomaly span {
  color: var(--muted);
  font-style: normal;
}
.kpi strong {
  display: block;
  margin: 8px 0 5px;
  font: 800 27px Manrope, sans-serif;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.panel { overflow: hidden; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head button {
  color: var(--forest);
  background: var(--green-soft);
}

.recommendation-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(240px, 1.5fr) auto;
  align-items: start;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfb;
}
.recommendation-controls span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.recommendation-total {
  align-self: center;
  color: var(--forest);
  font: 900 18px Manrope, sans-serif;
  text-align: right;
  white-space: nowrap;
}
.recommendation-total small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.recommendation-list { display: grid; gap: 0; }
.recommendation-group {
  display: grid;
  border-bottom: 1px solid var(--line);
}
.recommendation-group:last-child { border-bottom: 0; }
.recommendation-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #f3faf6, #fff);
}
.recommendation-group-head h3 {
  margin: 2px 0 0;
  font-size: 18px;
}
.recommendation-group-head p {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 800;
}
.recommendation-group-head strong {
  color: var(--forest);
  font: 900 18px Manrope, sans-serif;
  white-space: nowrap;
}
.recommendation-group .recommendation:last-child { border-bottom: 0; }
.recommendation {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 180px;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.recommendation:hover { background: #fbfefd; }
.recommendation.active-action { background: linear-gradient(135deg, #ffffff, #f6fbf8); }
.recommendation:last-child { border-bottom: 0; }
.rec-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--green);
}
.rec-icon svg { width: 22px; height: 22px; fill: currentColor; }
.rec-icon.aws { background: #f5a623; }
.rec-icon.gcp { background: #42a86f; }
.rec-icon.azure { background: #258fda; }
.rec-icon.kubernetes { background: #6956dc; }
.rec-icon.data { background: #d94d83; }
.rec-main p { margin-top: 7px; color: var(--muted); }
.rec-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.rec-stats div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fbf9;
}
.rec-stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.rec-stats dd {
  margin-top: 3px;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}
.cloud-pill {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #135936;
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}
.rec-meta {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: end;
  align-content: center;
  gap: 5px;
}
.rec-meta strong { font: 800 22px Manrope, sans-serif; }
.rec-meta button, .queue button {
  min-height: 30px;
  color: #13402f;
  background: var(--green-soft);
}
.demo-action-panel {
  grid-column: 2 / 4;
  display: grid;
  gap: 14px;
  margin-top: 2px;
  padding: 16px;
  border: 1px solid #cbe8d5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(19, 64, 47, .08);
}
.demo-action-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.demo-action-head h4 {
  margin-top: 3px;
  font-size: 18px;
}
.demo-action-head button {
  min-height: 30px;
  color: var(--muted);
  background: #f4f7f5;
}
.demo-action-panel > p {
  color: var(--muted);
  line-height: 1.55;
}
.demo-action-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 10px;
}
.demo-action-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}
.demo-action-grid strong,
.demo-action-grid span {
  display: block;
}
.demo-action-grid strong {
  margin-bottom: 7px;
  color: var(--forest);
}
.demo-action-grid span,
.demo-action-grid li {
  color: var(--muted);
  line-height: 1.45;
}
.demo-action-grid ol {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
}
.demo-action-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.demo-action-footer span,
.demo-action-footer strong {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--forest);
  font-size: 12px;
  font-weight: 800;
}
.demo-action-footer button {
  margin-left: auto;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 24, 20, .42);
}
.feedback-dialog {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid rgba(220,228,223,.9);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(5, 24, 20, .32);
}
.dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-head button {
  color: var(--muted);
  background: #f4f7f5;
}
.feedback-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.feedback-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.feedback-form select,
.feedback-form textarea,
.feedback-form input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}
.feedback-form textarea {
  min-height: 180px;
  resize: vertical;
}
.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: #8fd9aa;
  box-shadow: 0 0 0 3px rgba(47,182,109,.16);
  outline: 0;
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.admin-growth-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.export-actions a {
  text-decoration: none;
}
.growth-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.growth-insight {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}
.growth-insight > span {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--forest);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.growth-insight.high > span {
  color: var(--red);
  background: var(--red-soft);
}
.growth-insight.medium > span {
  color: #7a4d00;
  background: var(--amber-soft);
}
.growth-insight h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.growth-insight p {
  margin: 0 0 8px;
  color: var(--muted);
}
.growth-insight strong {
  display: block;
  color: var(--forest);
}
.growth-experiment-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.growth-experiment-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.growth-experiment-form .wide {
  grid-column: 1 / -1;
}
.growth-experiment-form input,
.growth-experiment-form select,
.growth-experiment-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  text-transform: none;
}
.growth-experiment-form button {
  justify-self: start;
  align-self: end;
  min-height: 44px;
}
.growth-experiment-list {
  display: grid;
  gap: 10px;
}
.growth-experiment {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}
.growth-experiment > span {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--forest);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}
.growth-experiment h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.growth-experiment p {
  margin: 0 0 8px;
  color: var(--muted);
}
.growth-experiment strong {
  color: var(--forest);
}
.experiment-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.experiment-metrics div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--paper);
}
.experiment-metrics span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.experiment-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}
.experiment-metrics em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}
.experiment-outcome {
  margin-top: 10px;
  color: var(--forest);
  font-weight: 800;
}
.growth-experiment-update {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}
.growth-experiment-update select,
.growth-experiment-update input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  font: inherit;
}
.growth-experiment-update button {
  min-height: 42px;
  white-space: nowrap;
}
.admin-users-table-row td {
  height: auto;
  padding: 0 14px 14px;
  background: #fbfdfc;
}
.admin-user-list {
  display: grid;
  gap: 10px;
}
.admin-user-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 420px) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.admin-user-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-reset-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) auto;
  gap: 8px;
}
.admin-reset-form input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}
.feedback-list {
  display: grid;
}
.feedback-report {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.feedback-report:last-child { border-bottom: 0; }
.feedback-report span {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--forest);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
}
.feedback-report p {
  margin-top: 8px;
  color: var(--muted);
  white-space: pre-wrap;
}
.feedback-report aside {
  display: grid;
  align-content: start;
  gap: 4px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.feedback-report aside strong {
  color: var(--ink);
}
.feedback-report aside em {
  margin-top: 6px;
  color: var(--forest);
  font-style: normal;
  font-weight: 800;
}

.audit-log-table td {
  height: auto;
  overflow-wrap: anywhere;
  vertical-align: top;
}

.audit-log-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
th, td {
  height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  height: 38px;
  color: var(--muted);
  background: #fafcfb;
  font-size: 11px;
  text-transform: uppercase;
}
td strong { display: block; }
td > span { display: block; }
td .vendor-badge { display: inline-flex; color: var(--muted); }
.bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2ef;
}
.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}
.danger { color: var(--red); font-weight: 800; }
.good { color: var(--green); font-weight: 800; }

.right-rail { display: grid; gap: 16px; }
.compact .panel-head { padding-bottom: 13px; }
.anomaly-list { display: grid; }
.anomaly {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.anomaly:last-child { border-bottom: 0; }
.anomaly-copy {
  display: flex;
  align-items: center;
  gap: 10px;
}
.anomaly-copy svg {
  width: 28px;
  height: 28px;
  padding: 6px;
  border-radius: 8px;
  fill: var(--amber);
  background: var(--amber-soft);
  flex: 0 0 auto;
}
.anomaly.high .anomaly-copy svg {
  fill: var(--red);
  background: var(--red-soft);
}
.anomaly strong, .anomaly span { display: block; }
.anomaly em {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
  font-style: normal;
  font-weight: 800;
}
.anomaly.high em { background: var(--red-soft); color: var(--red); }

.automation-module { min-width: 0; }
.automation-principles {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #effaf4, #eef8fb);
}
.automation-principles p {
  margin: 0;
  color: var(--muted);
}
.automation-principles strong { color: var(--ink); }
.automation-plan-list { display: grid; gap: 14px; }
.automation-plan {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.automation-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.automation-plan-head h3 {
  margin: 8px 0 6px;
  font-size: 22px;
}
.automation-plan-head p { margin: 0; color: var(--muted); }
.automation-plan-head > strong {
  display: grid;
  justify-items: end;
  color: var(--green);
  font-size: 24px;
  white-space: nowrap;
}
.automation-plan-head small {
  color: var(--muted);
  font-size: 12px;
}
.automation-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.automation-plan-grid > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbf9;
}
.automation-plan-grid strong,
.automation-plan-grid span { display: block; }
.automation-plan-grid strong { margin-bottom: 8px; }
.automation-plan-grid ol,
.automation-plan-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}
.automation-plan-grid span { color: var(--muted); }

.queue {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.queue li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.queue li:last-child { border-bottom: 0; }
.queue li > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #135936;
  background: var(--green-soft);
  font-weight: 800;
}
.queue strong, .queue small { display: block; }
.empty, .muted-row { padding: 18px; color: var(--muted); }

.empty-workspace {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.empty-state-panel {
  display: grid;
  justify-items: start;
  gap: 14px;
  min-height: 360px;
  padding: 34px;
  background:
    radial-gradient(circle at 86% 14%, rgba(66,211,146,.18), transparent 170px),
    linear-gradient(135deg, #ffffff, #f5fbf8);
}

.empty-state-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--forest);
}

.empty-state-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.empty-state-panel h2 {
  max-width: 620px;
  font-size: 30px;
}

.empty-state-panel p {
  max-width: 680px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.empty-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--forest);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.empty-side-panel .empty {
  min-height: 88px;
}

.connection-summary {
  display: grid;
  width: 100%;
  max-width: 760px;
  align-items: center;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.connection-summary > span,
.trust-policy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.connection-summary code,
.trust-policy code {
  overflow: hidden;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scan-panel {
  display: grid;
  width: 100%;
  max-width: 760px;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.scan-panel h3 {
  font-size: 18px;
}

.scan-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.region-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.region-field-label {
  line-height: 1.45;
}

.region-picker {
  position: relative;
  width: 100%;
}

.region-picker > button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

.region-picker > button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.region-picker > button strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-family: "SFMono-Regular", Consolas, monospace;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.region-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(88vw, 420px);
  max-height: 320px;
  overflow: auto;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(25, 45, 38, .16);
}

.region-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
}

.region-choice:hover {
  background: #f1f7f4;
}

.region-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--green);
}

.region-choice span {
  display: grid;
  gap: 2px;
}

.region-choice strong {
  color: var(--ink);
  font-size: 13px;
}

.region-choice small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scan-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.scan-progress-row > strong {
  color: var(--ink);
  font: 800 13px Manrope, sans-serif;
  min-width: 40px;
  text-align: right;
}

.scan-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6eee9;
}

.scan-progress span {
  display: block;
  height: 100%;
  width: var(--scan-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green, #2fb66d), var(--sky, #1f9ed8));
  transition: width .35s ease;
}

.scan-progress.active span {
  min-width: 28px;
}

.scan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.scan-actions strong {
  color: var(--ink);
  font-size: 20px;
}

.scan-actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scan-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.scan-counts li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.scan-counts span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scan-counts strong {
  color: var(--ink);
}

.scan-warning {
  color: #8a5d00;
}

.connect-form {
  display: grid;
  width: 100%;
  max-width: 760px;
  gap: 12px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.connect-form h3 {
  font-size: 18px;
}

.connect-form > div > p,
.setup-step p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.setup-steps {
  display: grid;
  gap: 12px;
}

.setup-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
}

.setup-step > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--forest);
  font-size: 13px;
  font-weight: 900;
}

.setup-step strong {
  color: var(--ink);
  font-size: 14px;
}

.launch-stack-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 10px 0 12px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fff;
  background: #ff9900;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.launch-stack-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.connect-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.connect-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.connect-form input[readonly] {
  color: var(--muted);
  background: #f7faf8;
}

.trust-policy {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  background: #f7faf8;
}

.connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.field-help {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.field-help code {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.derived-role {
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connect-actions button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.secondary-connect {
  color: var(--forest);
  background: var(--green-soft);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
  padding: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(66,211,146,.28), transparent 250px),
    radial-gradient(circle at 76% 12%, rgba(31,158,216,.28), transparent 270px),
    linear-gradient(135deg, #0f2b31, #12332d 54%, #16373f);
}

.auth-visual {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 36px clamp(24px, 5vw, 72px);
  color: #effff5;
  overflow: hidden;
}

.auth-visual::after {
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,182,66,.24), transparent 62%);
  content: "";
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.auth-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.auth-brand > span {
  display: grid;
  gap: 1px;
}

.auth-brand strong { font: 800 20px Manrope, sans-serif; }

.auth-brand small {
  color: #b9d6ce;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-hero {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.auth-hero .eyebrow { color: #7df0a4; }
.auth-hero h1 { max-width: 720px; font-size: clamp(42px, 7vw, 82px); }
.auth-hero p {
  max-width: 620px;
  margin-top: 20px;
  color: #c9e3dc;
  font-size: 17px;
}

.auth-campaign-banner {
  display: inline-flex;
  width: fit-content;
  margin-top: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(245, 182, 66, .48);
  border-radius: 8px;
  background: rgba(245, 182, 66, .16);
  color: #fff7df;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
}

.auth-operating-promise {
  display: grid;
  max-width: 680px;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: rgba(9, 24, 21, .42);
  box-shadow: 0 16px 38px rgba(0, 0, 0, .14);
}

.auth-operating-promise p {
  max-width: none;
  margin: 0;
  color: #def5ec;
  font-size: 15px;
  line-height: 1.45;
}

.auth-operating-promise strong { color: #fff; }

.auth-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 680px;
  margin-top: 16px;
}

.auth-capabilities span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #def5ec;
  background: rgba(255, 255, 255, .08);
  font-size: 12px;
  font-weight: 800;
}

.intent-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(18, 51, 45, .12);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(18, 51, 45, .1);
}

.auth-hero .intent-card {
  max-width: 680px;
  background: rgba(245, 255, 249, .95);
}

.intent-card h3 {
  margin: 4px 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.intent-card p {
  margin: 0;
  color: var(--muted);
}

.intent-card dl {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.intent-card div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
}

.intent-card dt {
  color: #45615a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.intent-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 750;
}

.auth-signal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
}

.auth-signal-grid article {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(14px);
}

.auth-signal-grid span,
.auth-signal-grid em {
  display: block;
  color: #b9d6ce;
  font-style: normal;
}

.auth-signal-grid strong {
  display: block;
  margin: 8px 0 4px;
  font: 800 31px Manrope, sans-serif;
}

.auth-panel {
  align-self: center;
  width: min(460px, calc(100% - 36px));
  margin: 28px auto;
  padding: 24px;
  border: 1px solid rgba(220,228,223,.9);
  border-radius: 8px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 22px 58px rgba(5, 24, 20, .28);
}

.auth-panel-head h2 { font-size: 30px; }

.auth-panel-copy {
  margin: 16px 0 0;
  color: var(--muted);
}

.static-auth-actions {
  display: grid;
  gap: 12px;
  margin-top: 22px;
  text-align: center;
}

.static-auth-actions a {
  color: var(--forest);
  font-weight: 800;
}

.static-auth-actions .static-auth-primary {
  display: flex;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: var(--forest);
  text-decoration: none;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 22px 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.auth-tabs button {
  color: var(--muted);
  background: transparent;
}

.auth-tabs button.active {
  color: #fff;
  background: var(--forest);
}

.google-button {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.google-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.google-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
  flex: 1;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
}

.auth-form input:focus {
  border-color: #8fd9aa;
  box-shadow: 0 0 0 3px rgba(47,182,109,.16);
  outline: 0;
}

.auth-form button {
  min-height: 45px;
  margin-top: 4px;
}

.auth-hint {
  margin: -2px 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.auth-hint.hidden {
  display: none;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin-top: 14px;
}

.auth-links a {
  color: var(--forest);
  font-weight: 800;
  text-align: center;
}

.auth-message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red);
  text-align: center;
}

@media (max-width: 1050px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
  }
  nav { display: flex; }
  .connector-card { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { min-height: auto; }
  .auth-panel { align-self: start; }
}

@media (max-width: 720px) {
  main { padding: 14px; }
  .topbar { display: grid; padding: 20px; }
  .top-actions { flex-wrap: wrap; }
  .demo-data-notice { grid-template-columns: 1fr; }
  .demo-data-notice > div:first-child > strong { display: block; margin: 7px 0 0; }
  .demo-data-notice dl { align-items: flex-start; flex-wrap: wrap; }
  .demo-data-notice .demo-data-boundary { grid-column: 1; }
  .kpi-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .recommendation { grid-template-columns: 42px minmax(0, 1fr); }
  .recommendation-controls { grid-template-columns: 1fr; }
  .recommendation-total { text-align: left; }
  .rec-meta { grid-column: 2; }
  .rec-meta { justify-items: start; }
  .demo-action-panel { grid-column: 1 / -1; }
  .demo-action-grid { grid-template-columns: 1fr; }
  .demo-action-footer button {
    width: 100%;
    margin-left: 0;
  }
  .feedback-report { grid-template-columns: 1fr; }
  .growth-insights { grid-template-columns: 1fr; }
  .growth-experiment-form,
  .growth-experiment { grid-template-columns: 1fr; }
  .experiment-metrics { grid-template-columns: 1fr; }
  .growth-experiment-update { grid-template-columns: 1fr; }
  .admin-user-row,
  .admin-reset-form {
    grid-template-columns: 1fr;
  }
  .dialog-actions button { width: 100%; }
  table { min-width: 680px; }
  .table-panel { overflow-x: auto; }
  .auth-visual { padding: 24px 18px; }
  .auth-hero h1 { font-size: 40px; }
  .auth-signal-grid { grid-template-columns: 1fr; }
  .auth-panel {
    width: calc(100% - 28px);
    padding: 18px;
  }
}
