:root {
  --bg-primary: #070B14;
  --bg-secondary: #0D1526;
  --bg-card: #121D33;
  --border-card: #1E2D4A;
  --border-focus: #00CAFF;
  --text-main: #F3F4F6;
  --text-muted: #94A3B8;
  --cyan: #00CAFF;
  --green: #10B981;
  --amber: #F59E0B;
  --red: #EF4444;
  --ring-blue: #1998D5;
  --amazon-orange: #FF9900;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Top KPI Bar */
.top-nav {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-card);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-logo {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-mcp {
  background: rgba(0, 202, 255, 0.15);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.kpi-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.kpi-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
}

.kpi-pill.highlight {
  border-color: rgba(245, 158, 11, 0.4);
}

.kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.kpi-val {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.kpi-val.green { color: var(--green); }
.kpi-val.cyan { color: var(--cyan); }
.kpi-val.amber { color: var(--amber); }

.btn-reset {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f1f5f9;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reset:hover {
  background: #334155;
  border-color: var(--cyan);
  color: var(--cyan);
}

/* Guided 3-Step Layman Workflow Banner */
.workflow-stepper {
  background: #091022;
  border-bottom: 1px solid var(--border-card);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow-x: auto;
  max-width: 100vw;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 29, 51, 0.85);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 8px 14px;
  flex: 1;
  min-width: 250px;
  transition: all 0.25s ease;
}

.stepper-step.active {
  background: rgba(0, 202, 255, 0.12);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(0, 202, 255, 0.18);
}

.stepper-step.completed {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
}

.step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #1e293b;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.stepper-step.active .step-badge {
  background: var(--cyan);
  color: #04101e;
  box-shadow: 0 0 8px var(--cyan);
}

.stepper-step.completed .step-badge {
  background: var(--green);
  color: #022c16;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.step-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.stepper-step.active .step-title {
  color: var(--cyan);
}

.stepper-step.completed .step-title {
  color: #a7f3d0;
}

.step-sub {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
}

.stepper-arrow {
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
  padding: 0 4px;
}

/* Command Center Split Screen (100% Zoom Responsive Layout & Zero Overflow Guarantee) */
.command-center {
  display: grid;
  grid-template-columns: minmax(0, 50%) minmax(0, 50%); /* fractional grid base: minmax(0, 1.05fr) minmax(0, 0.95fr) */
  gap: 14px;
  padding: 8px 14px 104px 14px; /* 104px bottom caption safe-zone */
  flex: 1;
  max-width: 100%;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  align-items: start;
}

#aws-lambda-url {
  word-break: break-all;
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 1150px) {
  .command-center {
    grid-template-columns: minmax(0, 100%);
  }
}

.panel-left, .panel-right, .left-panel, .right-panel, .tab-content, .panel-card, .controls-card, .control-panel-unified {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  overflow-x: hidden;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.btn-audio {
  background: rgba(0, 202, 255, 0.1);
  border: 1px solid rgba(0, 202, 255, 0.3);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
}

/* Consolidated Control Panel Above Echo Show 15 */
.control-panel-unified {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.control-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cyan);
  color: #04101e;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
}

.control-panel-sub {
  font-size: 10px;
  color: var(--text-muted);
}

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

@media (max-width: 720px) {
  .scenario-buttons-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.btn-scenario {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  transition: all 0.2s;
  color: #cbd5e1;
}

.btn-scenario:hover {
  border-color: var(--cyan);
  background: #172544;
}

.btn-scenario.active {
  background: rgba(0, 202, 255, 0.12);
  border-color: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 202, 255, 0.2);
}

.scenario-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.scenario-num {
  background: rgba(255,255,255,0.1);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.btn-scenario.active .scenario-num {
  background: var(--cyan);
  color: #04101e;
}

.scenario-heading {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-scenario.active .scenario-heading {
  color: var(--cyan);
}

.scenario-badge {
  font-size: 10px;
  color: #94a3b8;
  line-height: 1.3;
}

.btn-scenario.active .scenario-badge {
  color: #cbd5e1;
}

/* Custom Input & Vision Card */
.custom-input-card {
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-input-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-input-row .input-text {
  flex: 1 1 200px;
  min-width: 160px;
}

.custom-input-row .select-preset {
  flex: 0 1 180px;
}

.btn-upload {
  background: #1e293b;
  border: 1px solid #334155;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: #334155;
  border-color: var(--cyan);
  color: var(--cyan);
}

.custom-options-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
}

.upload-filename {
  color: #64748b;
  font-size: 10px;
}

.toggle-bedrock-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #f59e0b;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
}

.bedrock-telemetry-badge {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fcd34d;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
}

/* Echo Show 15 Device Bezel */
/* Echo Show 15 Device Bezel & Zero-Clipping Screen Container */
.echo-show-bezel {
  background: #020617;
  border: 14px solid #0f172a;
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px #1e293b;
  overflow: visible;
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  height: auto;
  max-height: none !important;
}

.bezel-camera {
  width: 8px;
  height: 8px;
  background: #334155;
  border-radius: 50%;
  margin: 6px auto;
  border: 1px solid #475569;
}

.echo-screen {
  background: #070B14;
  height: auto;
  min-height: 400px;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}

.echo-voice-bar {
  background: #0d1526;
  border-bottom: 1px solid #1e293b;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
}

.waveform .bar {
  width: 3px;
  height: 6px;
  background: var(--cyan);
  border-radius: 2px;
  transition: height 0.2s ease;
}

.waveform.active .bar {
  animation: wave 1.2s infinite ease-in-out alternate;
}

.waveform.active .bar:nth-child(2) { animation-delay: 0.1s; }
.waveform.active .bar:nth-child(3) { animation-delay: 0.2s; }
.waveform.active .bar:nth-child(4) { animation-delay: 0.3s; }
.waveform.active .bar:nth-child(5) { animation-delay: 0.4s; }
.waveform.active .bar:nth-child(6) { animation-delay: 0.5s; }
.waveform.active .bar:nth-child(7) { animation-delay: 0.6s; }
.waveform.active .bar:nth-child(8) { animation-delay: 0.7s; }
.waveform.active .bar:nth-child(9) { animation-delay: 0.8s; }

@keyframes wave {
  0% { height: 4px; }
  100% { height: 18px; }
}

.transcript {
  font-size: 13px;
  color: #e2e8f0;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.iframe-container {
  flex: 1;
  position: relative;
  background: #080C14;
  width: 100%;
  height: auto;
  min-height: 380px;
  overflow: visible;
  box-sizing: border-box;
}

.iframe-container iframe,
#mcp-app-iframe {
  width: 100%;
  min-width: 100%;
  border: none;
  background: #080C14;
  display: block;
  height: 480px;
  max-height: none !important;
  overflow-y: auto;
  box-sizing: border-box;
}

.device-bottom-bar {
  background: #0d1526;
  border-top: 1px solid #1e293b;
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.active-app-badge {
  color: var(--cyan);
  font-family: monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--cyan);
}

.device-hint {
  color: var(--text-muted);
}

/* Trigger Box */
.trigger-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 10px;
}

.trigger-row {
  display: flex;
  gap: 8px;
}

.input-text {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}

.input-text:focus { border-color: var(--cyan); }

.select-preset {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #fff;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  outline: none;
}

.btn-run {
  background: var(--cyan);
  color: #04101E;
  font-weight: 800;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
}

.btn-run:hover { background: #38d6ff; }

/* Right Panel Tabs */
.tabs-header {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-card);
  padding-bottom: 8px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.tab-btn:hover { color: #fff; }

.tab-btn.active {
  background: var(--bg-card);
  color: var(--cyan);
}

.tab-content {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.tab-content.active {
  display: flex;
}

.tab-intro {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: #cbd5e1;
}

/* Fleet Cards & Grid (Zero Overflow Guarantee) */
.fleet-cards, .fleet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1360px) {
  .fleet-cards, .fleet-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.van-box, .van-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 12px;
  position: relative;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.van-box.stocked, .van-card.stocked {
  border-color: rgba(16, 185, 129, 0.4);
}

.van-box.unstocked, .van-card.unstocked {
  border-color: rgba(239, 68, 68, 0.3);
  opacity: 0.85;
}

.van-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.van-header-row1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.van-header-row2 {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.van-title, .van-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.van-sub, .van-tech {
  font-size: 11px;
  color: var(--text-muted);
}

.van-status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: normal;
  word-break: break-word;
  display: inline-block;
  max-width: 100%;
  line-height: 1.3;
  box-sizing: border-box;
}

.van-status-badge.green {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid #10b981;
}

.van-status-badge.red {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

/* Fleet Inventory SKU Table & Column Spacing */
.sku-table {
  width: 100%;
  max-width: 100%;
  font-size: 11px;
  border-collapse: collapse;
  table-layout: fixed;
  margin-top: 8px;
  box-sizing: border-box;
}

.sku-table th {
  text-align: left;
  padding: 6px 8px;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid #1e293b;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.sku-table th:nth-child(1) { width: 32%; }
.sku-table th:nth-child(2) { width: 48%; }
.sku-table th:nth-child(3) { width: 20%; text-align: right; }

.sku-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: middle;
}

.sku-table .sku-code {
  font-family: monospace;
  color: #38bdf8;
  font-weight: 600;
  font-size: 11px;
  word-break: break-all;
}

.sku-table .sku-desc {
  color: #cbd5e1;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-table .sku-qty-cell {
  text-align: right;
  white-space: nowrap;
}

.sku-qty-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 10px;
  white-space: nowrap;
}

.sku-qty-pill.stocked {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.sku-qty-pill.out {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.sku-table tr.highlight-needed-part {
  background: rgba(0, 202, 255, 0.12) !important;
  border-left: 3px solid #00caff;
}

.sku-table tr.highlight-needed-part td.sku-code {
  color: #00caff;
  font-weight: 800;
}

.needed-badge {
  display: inline-block;
  background: #00caff;
  color: #04101e;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

/* ROI Summary Card */
.roi-summary-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(0, 202, 255, 0.08));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  padding: 14px;
}

.roi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
}

.badge-verified {
  background: rgba(16, 185, 129, 0.2);
  color: var(--green);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.roi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  .roi-grid { grid-template-columns: repeat(2, 1fr); }
}

.roi-metric {
  text-align: center;
}

.roi-metric .val {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.roi-metric .lbl {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Ring Tab */
.ring-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 16px;
}

.ring-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.ring-title {
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ring-blue);
}

.badge-armed {
  background: rgba(25, 152, 213, 0.2);
  border: 1px solid var(--ring-blue);
  color: var(--ring-blue);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.ring-details {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.8;
  margin-bottom: 14px;
}

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

.btn-ring-action {
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.btn-ring-action.grant {
  background: var(--green);
  color: #032514;
}

.btn-ring-action.grant:hover { background: #34d399; }

.btn-ring-action.deny {
  background: #374151;
  color: #f87171;
  border: 1px solid #4b5563;
}

.btn-ring-action.deny:hover { background: #4b5563; }

.audit-log-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 14px;
}

.audit-log-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.table-container {
  overflow-x: auto;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.audit-table th, .audit-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.audit-table th {
  color: var(--text-muted);
  font-weight: 600;
}

/* Protocol Inspector Tab */
.reasoning-trace-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trace-empty {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

.trace-step {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
}

.trace-step-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.trace-step-name {
  font-weight: 700;
  color: var(--cyan);
}

.trace-step-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.protocol-inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 14px;
}

.inspector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.btn-test-idemp {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  color: var(--cyan);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.btn-test-idemp:hover { border-color: var(--cyan); }

.inspector-result {
  background: #060911;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 10px;
  font-family: monospace;
  font-size: 11px;
  color: #94a3b8;
  max-height: 120px;
  overflow-y: auto;
}

.discovery-links-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 12px;
}

.discovery-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.links-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.link-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: #38bdf8;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  text-decoration: none;
  transition: all 0.2s;
}

.link-pill:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

/* ==========================================================================
   SPRINT 7 FLAGSHIP UI/UX STYLING ENHANCEMENTS
   ========================================================================== */

/* Toast Notification System */
.toast-container {
  position: fixed;
  top: 72px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 300px;
  max-width: 440px;
  background: rgba(13, 21, 38, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 202, 255, 0.2);
  color: #fff;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
}

.toast.toast-fadeout {
  opacity: 0;
  transform: translateX(30px);
}

.toast-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.toast-msg { font-size: 12px; color: #cbd5e1; line-height: 1.4; }

.toast.success { border-left: 4px solid var(--green); }
.toast.success .toast-title { color: var(--green); }
.toast.error { border-left: 4px solid var(--red); }
.toast.error .toast-title { color: var(--red); }
.toast.warning { border-left: 4px solid var(--amber); }
.toast.warning .toast-title { color: var(--amber); }
.toast.info { border-left: 4px solid var(--cyan); }
.toast.info .toast-title { color: var(--cyan); }

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Badge Enhancements */
.badge-oauth {
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid #818cf8;
  color: #c7d2fe;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
  margin-left: 6px;
}

/* Echo Show 15 Physical Hardware Bezel */
.echo-show-bezel {
  background: #11141c;
  border: 10px solid #232a38;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

.bezel-top-bar {
  background: #19202e;
  padding: 6px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2a3547;
}

.bezel-camera-housing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bezel-camera {
  width: 12px;
  height: 12px;
  background: #000;
  border: 2px solid #334155;
  border-radius: 50%;
  box-shadow: inset 0 0 4px rgba(0, 202, 255, 0.5);
}

.camera-led {
  width: 7px;
  height: 7px;
  background: #475569;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.camera-led.active {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.ambient-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: #94a3b8;
}

.ambient-time { font-weight: 700; color: #fff; }
.ambient-device { color: #64748b; }
.ambient-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
}

.ambient-aws-status {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #6ee7b7;
}

.status-dot-green {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 6px #10b981;
}

/* Rating Plate Vision Uploader Card */
.vision-uploader-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
}

.uploader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.uploader-title {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
}

.badge-bedrock {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.uploader-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-upload {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover { border-color: var(--cyan); background: rgba(0, 202, 255, 0.1); }
.upload-filename { font-size: 11px; color: #94a3b8; font-family: monospace; flex: 1; }

.toggle-bedrock-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #f59e0b;
  cursor: pointer;
  font-weight: 600;
}

.bedrock-telemetry-badge {
  margin-top: 8px;
  font-size: 11px;
  color: #38bdf8;
  background: rgba(0, 202, 255, 0.08);
  border: 1px dashed rgba(0, 202, 255, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  gap: 8px;
}

/* FSM Webhook Feed Card */
.fsm-webhook-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.fsm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.fsm-title { font-size: 14px; font-weight: 700; color: #fff; display: block; }
.fsm-sub { font-size: 11px; color: #94a3b8; }

.btn-test-fsm {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-test-fsm:hover { background: var(--green); color: #04101e; }

.table-container {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-sizing: border-box;
}

.fsm-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
  box-sizing: border-box;
}

.fsm-table th, .fsm-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #162035;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.fsm-table th {
  background: #0d1526;
  color: #94a3b8;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-card);
}

.fsm-table th:nth-child(1), .fsm-table td:nth-child(1) { width: 14%; }
.fsm-table th:nth-child(2), .fsm-table td:nth-child(2) { width: 14%; }
.fsm-table th:nth-child(3), .fsm-table td:nth-child(3) { width: 20%; }
.fsm-table th:nth-child(4), .fsm-table td:nth-child(4) { width: 14%; }
.fsm-table th:nth-child(5), .fsm-table td:nth-child(5) { width: 16%; }
.fsm-table th:nth-child(6), .fsm-table td:nth-child(6) { width: 10%; text-align: right; }
.fsm-table th:nth-child(7), .fsm-table td:nth-child(7) { width: 12%; text-align: center; }

.dynamo-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
  box-sizing: border-box;
}

.dynamo-table th, .dynamo-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #162035;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  box-sizing: border-box;
}

.dynamo-table th {
  background: #0d1526;
  color: #94a3b8;
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-card);
}

/* Simulated Ring Battery Doorbell Pro HD Card */
.ring-camera-feed-card {
  background: #030712;
  border: 1px solid #1f2937;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
}

.camera-feed-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  border-bottom: 1px solid #1e293b;
}

.feed-live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #ef4444;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-rec 1.2s infinite;
}

@keyframes pulse-rec {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

.feed-device-tag { color: #94a3b8; font-family: monospace; }

.camera-viewport {
  height: 180px;
  background: linear-gradient(135deg, #090e1a 0%, #172554 50%, #0b1329 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.camera-tech-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.tech-card-sim {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 202, 255, 0.4);
  padding: 10px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 20px rgba(0, 202, 255, 0.2);
}

.tech-sim-avatar { font-size: 32px; }
.tech-sim-name { font-weight: 800; font-size: 14px; color: #fff; }
.tech-sim-co { font-size: 11px; color: #94a3b8; }
.tech-sim-badge { font-size: 11px; color: var(--green); font-weight: 600; margin-top: 2px; }

.camera-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  box-shadow: 0 0 8px var(--cyan);
  animation: scan-pass 3s infinite linear;
}

@keyframes scan-pass {
  0% { top: 0; }
  100% { top: 100%; }
}

/* OAuth 2.1 Security Lab Button */
.btn-test-oauth {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid #818cf8;
  color: #c7d2fe;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-test-oauth:hover { background: #6366f1; color: #fff; }

/* AWS Architecture Status Cards */
.aws-arch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.aws-arch-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
}

.badge-live-aws {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.aws-arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.aws-component-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 12px;
}

.comp-icon { font-size: 20px; color: var(--cyan); margin-bottom: 4px; }
.comp-title { font-weight: 700; font-size: 13px; color: #fff; margin-bottom: 4px; }
.comp-detail { font-size: 11px; color: #94a3b8; font-family: monospace; word-break: break-all; margin-bottom: 6px; }
.comp-status { font-size: 11px; font-weight: 600; }
.comp-status.green { color: var(--green); }

/* DynamoDB Live Inspector */
.dynamo-inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  padding: 16px;
}

.dynamo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.dynamo-title { font-size: 14px; font-weight: 700; color: #fff; display: block; }
.dynamo-sub { font-size: 11px; color: #94a3b8; }

.btn-query-dynamo {
  background: rgba(0, 202, 255, 0.15);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-query-dynamo:hover { background: var(--cyan); color: #04101e; }

/* Van inventory quantity decrement flash */
.flash-decrement {
  animation: flash-highlight 1.5s ease-out;
}

@keyframes flash-highlight {
  0% { background: rgba(245, 158, 11, 0.4); }
  100% { background: transparent; }
}

