/* Final UI polish layer for Aegis Command. Keep this file small and override-only. */
button,
.room-node,
.agent-card,
.nav-pill,
.primary-ghost {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
.room-node:focus,
.agent-card:focus,
.nav-pill:focus,
.primary-ghost:focus {
  outline: none;
}

button:focus-visible,
.room-node:focus-visible,
.agent-card:focus-visible,
.nav-pill:focus-visible,
.primary-ghost:focus-visible {
  box-shadow: 0 0 0 2px rgba(125, 211, 252, 0.34);
}

.room-strip {
  grid-template-columns: minmax(190px, 238px) minmax(0, 1fr) 136px;
  gap: 12px;
  min-height: 68px;
  padding: 12px 18px;
  overflow: hidden;
}

.room-strip h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-strip p,
.connection-pill {
  white-space: nowrap;
}

.connection-pills {
  max-height: 42px;
  overflow: hidden;
}

.primary-ghost {
  min-height: 38px;
}

.feed-list {
  min-height: 404px;
  align-content: start;
}

.feed-item {
  min-height: 74px;
}

.response-strip {
  min-height: 62px;
  max-height: 62px;
  overflow: hidden;
}

.response-strip span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.room-node {
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.room-node:active {
  transform: translateY(1px);
}

.agent-card,
.dock-card,
.agent-detail {
  overflow: hidden;
}

.agent-detail {
  min-height: 150px;
  max-height: 150px;
}

.dock-card {
  min-height: 150px;
}

.command-input {
  grid-template-columns: 1fr 92px;
}

.command-input .mic-button,
#micButton {
  display: none !important;
}

.wake-button {
  width: 100%;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.18);
  color: #dff7ff;
  font-weight: 800;
  padding: 10px 12px;
  cursor: pointer;
}

.wake-button.is-on {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.42);
  color: #e7ffe7;
}

.aegis-panel-dialog,
.aegis-settings-dialog {
  width: min(760px, calc(100vw - 36px));
}

.panel-dialog-body {
  max-height: 62vh;
  overflow: auto;
}

.panel-clean-list,
.panel-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.panel-clean-list li,
.panel-log-list li {
  border: 1px solid #1f3955;
  border-radius: 16px;
  background: rgba(7, 19, 34, 0.78);
  padding: 14px 16px;
  color: var(--text);
}

.panel-log-list li {
  display: grid;
  grid-template-columns: 86px 110px 1fr;
  gap: 12px;
  align-items: start;
}

.panel-log-list strong {
  color: var(--cyan);
  font-size: 12px;
}

.panel-log-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel-log-list p {
  margin: 0;
  line-height: 1.45;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.setting-row {
  display: grid;
  gap: 8px;
  border: 1px solid #1f3955;
  border-radius: 16px;
  background: rgba(7, 19, 34, 0.78);
  padding: 14px 16px;
}

.setting-row.wide,
.settings-note.wide,
.settings-test.wide {
  grid-column: 1 / -1;
}

.setting-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.setting-row select,
.setting-row input[type="range"] {
  width: 100%;
}

.setting-row select {
  border: 1px solid var(--border2);
  border-radius: 14px;
  background: #0b192a;
  color: var(--text);
  padding: 12px;
}

.setting-row input[type="checkbox"] {
  width: 46px;
  height: 24px;
  accent-color: var(--cyan);
}

.settings-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.settings-test {
  border: 1px solid var(--cyan);
  border-radius: 16px;
  background: #123653;
  padding: 13px 16px;
  font-weight: 800;
}

.review-principle {
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 18px;
  background: rgba(14, 116, 144, 0.14);
  padding: 16px;
  margin: 16px 0;
}

.review-principle strong {
  display: block;
  margin-bottom: 8px;
  color: var(--cyan2);
}

.review-principle p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.review-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.review-mode-card {
  display: grid;
  gap: 8px;
  text-align: left;
  border: 1px solid #1f3955;
  border-radius: 16px;
  background: rgba(7, 19, 34, 0.78);
  padding: 14px 16px;
}

.review-mode-card strong {
  color: var(--text);
}

.review-mode-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 980px) {
  .room-strip {
    grid-template-columns: 1fr;
  }

  .settings-grid,
  .panel-log-list li,
  .review-mode-grid {
    grid-template-columns: 1fr;
  }
}
