:root {
  --ceramic: #f4f1ea;
  --porcelain: #fffdfa;
  --graphite: #101313;
  --graphite-soft: #2a2e2c;
  --metal: #c9c3b8;
  --card: #e9e4da;
  --line: #d8d1c5;
  --signal: #2f6f5e;
  --signal-dark: #1f4f43;
  --signal-soft: #dce9e2;
  --amber: #d88a3d;
  --amber-soft: #f4d4b3;
  --danger: #b44335;
  --danger-soft: #f3ded9;
  --muted: #6e746f;
  --console: #151918;
  --console-line: #303634;
  --shadow: 0 18px 50px rgba(16, 19, 19, 0.09);
  --font-sans: Geist, Inter, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.timo-body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--graphite);
  color: var(--porcelain);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid rgba(47, 111, 94, 0.38);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  background: var(--graphite);
  color: var(--porcelain);
  padding: 10px 14px;
  border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }

/* Application shell */
.app-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: var(--porcelain);
  color: var(--graphite);
}

.app-header__inner {
  width: min(100%, 1480px);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  white-space: nowrap;
}

.app-brand__mark {
  width: 21px;
  height: 21px;
  border: 1px solid var(--graphite);
  display: grid;
  place-items: center;
}

.app-brand__mark span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.app-brand__name {
  font-weight: 760;
  letter-spacing: -0.03em;
}

.app-brand__product {
  padding-left: 9px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 4px;
}

.app-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  color: #5f6561;
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
  transition: color 160ms ease;
}

.app-nav__link::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  background: transparent;
}

.app-nav__link:hover,
.app-nav__link.is-active { color: var(--graphite); }
.app-nav__link.is-active::after { background: var(--signal); }

.app-account {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
}

.app-account__identity {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-account__logout {
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: var(--graphite-soft);
  cursor: pointer;
  font-weight: 600;
}
.app-account__logout:hover { color: var(--signal-dark); }

.htmx-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
}

.htmx-request .htmx-progress::after,
body.htmx-request .htmx-progress::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  background: var(--signal);
  animation: progress-scan 1.1s ease-in-out infinite;
}

@keyframes progress-scan {
  from { transform: translateX(-110%); }
  to { transform: translateX(365%); }
}

.app-main { min-height: calc(100vh - 105px); }

.app-footer {
  min-height: 41px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #2c302f;
  color: #858b87;
  font-size: 11px;
  letter-spacing: 0.03em;
}

/* Shared light operational page */
.page-surface {
  min-height: calc(100vh - 105px);
  background: var(--ceramic);
  color: var(--graphite);
}

.operations-shell {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: 42px 28px 72px;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--signal-dark);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  max-width: 850px;
  font-size: clamp(31px, 4vw, 52px);
  font-weight: 650;
  letter-spacing: -0.052em;
  line-height: 0.98;
}

.page-lede {
  max-width: 680px;
  margin: 17px 0 0;
  color: #5f6561;
  font-size: 15px;
  line-height: 1.55;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 680;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.6; transform: none; }
.button--primary { background: var(--signal); color: #fff; }
.button--primary:hover { background: var(--signal-dark); }
.button--secondary { border-color: var(--metal); background: var(--porcelain); color: var(--graphite); }
.button--secondary:hover { border-color: #8f958f; }
.button--quiet { min-height: 36px; padding: 0 13px; border-color: var(--line); background: transparent; color: var(--graphite-soft); }
.button--danger { border-color: #d9aaa2; background: var(--danger-soft); color: #7e2b21; }

/* Fleet overview */
.fleet-overview {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
  border: 1px solid var(--line);
  background: var(--porcelain);
  box-shadow: 0 10px 34px rgba(16, 19, 19, 0.045);
}

.fleet-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-filter {
  min-width: 0;
  min-height: 148px;
  padding: 24px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--graphite);
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease;
}
.metric-filter:hover,
.metric-filter.is-active { background: #f6f3ed; }
.metric-filter.is-active { box-shadow: inset 0 -3px var(--signal); }

.metric-filter__label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-filter__value {
  display: block;
  margin-top: 15px;
  font-size: clamp(31px, 3vw, 43px);
  font-weight: 620;
  letter-spacing: -0.055em;
  line-height: 1;
}

.metric-filter__hint {
  display: block;
  margin-top: 11px;
  color: #767c77;
  font-size: 12px;
}

.signals-panel {
  min-width: 0;
  padding: 22px 24px;
  background: var(--graphite);
  color: var(--porcelain);
}

.signals-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.signals-panel__title {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.signals-panel__window { color: #929995; font-size: 11px; }

.signals-list { margin: 0; padding: 0; list-style: none; }

.signal-item {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid #303634;
}
.signal-item:first-child { border-top: 0; }
.signal-item__dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--amber); }
.signal-item.is-error .signal-item__dot { background: #d36150; }
.signal-item__robot { color: #f7f5ef; font-size: 12px; font-weight: 650; text-decoration: none; }
.signal-item__message { margin-top: 2px; overflow: hidden; color: #aeb4b0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.signal-item__time { color: #838a86; font-size: 10px; white-space: nowrap; }
.signals-empty { padding: 20px 0; color: #9ca39f; font-size: 12px; line-height: 1.55; }

/* Fleet controls */
.fleet-toolbar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}

.search-field { position: relative; }
.search-field::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  width: 12px;
  height: 12px;
  border: 1.5px solid #777d78;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}
.search-field::after {
  content: "";
  position: absolute;
  top: calc(50% + 5px);
  left: 27px;
  width: 6px;
  height: 1.5px;
  background: #777d78;
  transform: rotate(45deg);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 42px 0 42px;
  background: var(--porcelain);
  color: var(--graphite);
}
.search-field input::placeholder { color: #8c918d; }
.search-field input:focus { border-color: var(--signal); outline: 3px solid rgba(47, 111, 94, 0.14); }
.search-clear {
  position: absolute;
  top: 50%;
  right: 9px;
  min-width: 28px;
  min-height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.filter-pills { display: flex; gap: 5px; }
.filter-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: transparent;
  color: #626863;
  font-size: 12px;
  font-weight: 620;
  cursor: pointer;
}
.filter-pill:hover { border-color: var(--metal); color: var(--graphite); }
.filter-pill.is-active { border-color: var(--graphite); background: var(--graphite); color: var(--porcelain); }

.fleet-result-count { color: var(--muted); font-size: 12px; text-align: right; white-space: nowrap; }

/* Robot operational rows */
.fleet-list {
  border-top: 1px solid var(--graphite);
  background: var(--porcelain);
}

.robot-record { border-bottom: 1px solid var(--line); }

.robot-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.05fr) minmax(300px, 1.45fr) minmax(170px, 0.75fr) minmax(170px, 0.65fr);
  gap: 24px;
  align-items: center;
  min-height: 174px;
  padding: 23px 24px;
  background: var(--porcelain);
  transition: background-color 170ms ease;
}

.robot-record:hover .robot-row { background: #faf8f3; }
.robot-record[hidden] { display: none; }

.robot-identity { min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: space-between; }

.robot-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.robot-status__dot { width: 8px; height: 8px; border-radius: 50%; background: #858b87; }
.robot-status[data-state="ready"] { color: var(--signal-dark); }
.robot-status[data-state="ready"] .robot-status__dot { background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }
.robot-status[data-state="attention"] { color: #9a5a1f; }
.robot-status[data-state="attention"] .robot-status__dot { background: var(--amber); box-shadow: 0 0 0 4px #f8eadb; }
.robot-status[data-state="offline"] { color: #5f6561; }
.robot-status[data-state="offline"] .robot-status__dot { background: #777d78; }

.robot-name {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  color: var(--graphite);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.robot-name:hover { color: var(--signal-dark); }

.robot-location { margin: 7px 0 0; color: #5d635f; font-size: 13px; line-height: 1.4; }
.robot-id { margin-top: 15px; color: #8a8f8b; font-family: var(--font-mono); font-size: 10px; }

.robot-health { min-width: 0; }
.section-label { margin: 0 0 10px; color: #7a807b; font-size: 10px; font-weight: 720; letter-spacing: 0.095em; text-transform: uppercase; }
.health-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.health-chip {
  max-width: 170px;
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f6f3ed;
  color: #555b57;
  font-size: 10px;
  white-space: nowrap;
}
.health-chip__dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #929793; }
.health-chip__label { overflow: hidden; text-overflow: ellipsis; }
.health-chip__value { color: #858a86; }
.health-chip[data-color="green"] { border-color: #c7dbd2; background: #eef5f1; color: var(--signal-dark); }
.health-chip[data-color="green"] .health-chip__dot { background: var(--signal); }
.health-chip[data-color="yellow"] { border-color: #e9cba8; background: #fcf3e9; color: #8c511c; }
.health-chip[data-color="yellow"] .health-chip__dot { background: var(--amber); }
.health-chip[data-color="red"] { border-color: #e2b8b1; background: #faece9; color: #8a3025; }
.health-chip[data-color="red"] .health-chip__dot { background: var(--danger); }
.health-more { padding: 6px 0; color: var(--muted); font-size: 10px; }

.latest-warning {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: baseline;
  color: #7a4a1f;
  font-size: 10px;
}
.latest-warning__count { font-weight: 720; }
.latest-warning__message { overflow: hidden; color: #77716a; text-overflow: ellipsis; white-space: nowrap; }

.robot-telemetry { min-width: 0; display: grid; gap: 18px; }
.telemetry-line__header { margin-bottom: 7px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.telemetry-line__label { color: #6c726d; font-size: 10px; font-weight: 660; letter-spacing: 0.055em; text-transform: uppercase; }
.telemetry-line__value { color: var(--graphite); font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; }
.telemetry-line__source { margin-top: 5px; color: #8b908c; font-size: 9px; }
.meter { height: 5px; overflow: hidden; background: var(--card); }
.meter__fill { width: var(--meter-value, 0%); height: 100%; background: var(--signal); transition: width 380ms cubic-bezier(.22,1,.36,1); }
.meter__fill.is-low { background: var(--danger); }
.meter__fill.is-mid { background: var(--amber); }
.telemetry-unknown { color: #858b87; font-size: 12px; }
.charging-label { color: var(--signal-dark); font-size: 9px; font-weight: 700; text-transform: uppercase; }

.robot-operations { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 18px; }
.robot-seen { color: #747a75; font-size: 11px; text-align: right; line-height: 1.5; }
.robot-seen strong { display: block; color: var(--graphite-soft); font-size: 12px; font-weight: 630; }
.robot-version { color: #8a8f8b; font-family: var(--font-mono); font-size: 9px; }
.muted-badge { margin-top: 5px; display: inline-block; color: #8d561f; font-size: 10px; }

.robot-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.robot-actions-menu { position: relative; }
.robot-actions-menu > summary { list-style: none; }
.robot-actions-menu > summary::-webkit-details-marker { display: none; }
.robot-actions-menu[open] > summary { border-color: var(--graphite); }
.robot-actions-menu__panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: 230px;
  padding: 7px;
  border: 1px solid var(--line);
  background: var(--porcelain);
  box-shadow: var(--shadow);
}
.menu-action {
  width: 100%;
  min-height: 39px;
  border: 0;
  padding: 0 10px;
  background: transparent;
  color: var(--graphite-soft);
  text-align: left;
  font-size: 12px;
  cursor: pointer;
}
.menu-action:hover { background: var(--ceramic); }
.menu-action.is-caution { color: #8d561f; }
.menu-divider { height: 1px; margin: 6px 4px; background: var(--line); }
.menu-caption { padding: 6px 10px 3px; color: #8a8f8b; font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }

.robot-edit-panel {
  padding: 22px 24px 25px;
  border-top: 1px solid var(--line);
  background: #f0ece4;
}
.robot-edit-panel[hidden] { display: none; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr 150px 100px minmax(220px, 1.5fr) auto; gap: 12px; align-items: end; }
.field { display: grid; gap: 6px; color: #656b66; font-size: 10px; font-weight: 680; letter-spacing: 0.04em; text-transform: uppercase; }
.field input, .field select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--metal);
  border-radius: 5px;
  padding: 0 10px;
  background: var(--porcelain);
  color: var(--graphite);
  font-size: 13px;
  font-weight: 450;
  letter-spacing: 0;
  text-transform: none;
}
.field--check { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.field--check input { width: 17px; height: 17px; accent-color: var(--signal); }
.edit-actions { display: flex; gap: 7px; }

.fleet-no-results {
  padding: 54px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--porcelain);
  color: var(--muted);
  text-align: center;
}

.empty-state {
  padding: 70px 28px;
  border: 1px solid var(--line);
  background: var(--porcelain);
  text-align: center;
}
.empty-state__title { margin: 0; color: var(--graphite); font-size: 21px; font-weight: 650; letter-spacing: -0.025em; }
.empty-state__copy { max-width: 520px; margin: 10px auto 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }

/* Release upload */
.release-popover { position: relative; }
.release-popover > summary { list-style: none; }
.release-popover > summary::-webkit-details-marker { display: none; }
.release-panel {
  position: absolute;
  z-index: 35;
  top: calc(100% + 9px);
  right: 0;
  width: min(620px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--porcelain);
  box-shadow: var(--shadow);
}
.release-panel__title { margin: 0; font-size: 14px; font-weight: 680; }
.release-panel__copy { margin: 5px 0 15px; color: var(--muted); font-size: 11px; }
.release-form { display: grid; grid-template-columns: 120px 1fr 1.3fr auto; gap: 10px; align-items: end; }
.file-field input { max-width: 100%; font-size: 11px; }

/* Dialog + toasts */
.app-dialog {
  width: min(460px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--porcelain);
  color: var(--graphite);
  box-shadow: var(--shadow);
}
.app-dialog::backdrop { background: rgba(16, 19, 19, 0.66); }
.dialog-content { padding: 28px; text-align: center; }
.dialog-eyebrow { margin: 0; color: var(--muted); font-size: 11px; }
.claim-code { margin: 17px 0 11px; color: var(--signal-dark); font-family: var(--font-mono); font-size: clamp(38px, 8vw, 56px); font-weight: 720; letter-spacing: 0.13em; }
.dialog-meta { min-height: 18px; color: var(--muted); font-size: 11px; }
.dialog-actions { margin-top: 19px; display: flex; justify-content: center; }

.toast-region { position: fixed; z-index: 90; right: 18px; bottom: 18px; width: min(380px, calc(100vw - 36px)); display: grid; gap: 9px; }
.toast {
  padding: 13px 15px;
  border: 1px solid #4e5551;
  border-radius: 6px;
  background: var(--graphite);
  color: var(--porcelain);
  box-shadow: var(--shadow);
  font-size: 12px;
  line-height: 1.45;
  animation: toast-in 220ms cubic-bezier(.22,1,.36,1);
}
.toast.is-error { border-color: #9f493d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Robot detail shell */
.detail-header { margin-bottom: 28px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 22px; color: #666c67; font-size: 12px; font-weight: 620; text-decoration: none; }
.back-link::before { content: "←"; font-size: 15px; }
.back-link:hover { color: var(--signal-dark); }
.detail-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.detail-title { margin: 0; color: var(--graphite); font-size: clamp(30px, 4vw, 48px); font-weight: 650; letter-spacing: -0.05em; line-height: 1; }
.detail-meta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 9px 22px; color: #6d736e; font-size: 12px; }
.detail-meta code { color: #555b57; font-family: var(--font-mono); font-size: 10px; }
.tier-badge { display: inline-flex; min-height: 24px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; color: var(--muted); font-size: 10px; font-weight: 680; text-transform: uppercase; }
.detail-tabs-wrap { overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.detail-tabs { min-width: max-content; display: flex; gap: 2px; }
.detail-tab {
  position: relative;
  min-height: 48px;
  border: 0;
  padding: 0 15px;
  background: transparent;
  color: #707671;
  font-size: 12px;
  font-weight: 640;
  cursor: pointer;
}
.detail-tab::after { content: ""; position: absolute; right: 14px; bottom: -1px; left: 14px; height: 2px; background: transparent; }
.detail-tab:hover { color: var(--graphite); }
.detail-tab.tab-active { color: var(--graphite); }
.detail-tab.tab-active::after { background: var(--signal); }
.detail-workspace { min-height: 360px; margin-top: 22px; padding: 22px; border: 1px solid #303634; background: var(--console); color: #e7e9e6; }
.detail-loading { color: #909793; font-size: 12px; }

/* Logs console */
.logs-console { color: #dce0dd; }
.logs-header { margin-bottom: 17px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.logs-title { margin: 0; color: #f4f3ee; font-size: 16px; font-weight: 650; }
.logs-description { margin: 4px 0 0; color: #909793; font-size: 11px; }
.live-state { display: inline-flex; align-items: center; gap: 7px; color: #aeb5b1; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.live-state__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(47,111,94,.18); }
.live-state[data-state="connecting"] .live-state__dot { background: var(--amber); box-shadow: none; }
.live-state[data-state="paused"] .live-state__dot { background: #7c827e; box-shadow: none; }
.logs-controls { margin-bottom: 12px; display: grid; grid-template-columns: 150px minmax(180px, 1fr) auto auto; gap: 9px; align-items: end; }
.console-field { display: grid; gap: 5px; color: #929995; font-size: 9px; font-weight: 680; letter-spacing: .07em; text-transform: uppercase; }
.console-field input, .console-field select { min-height: 38px; border: 1px solid #3a413e; border-radius: 4px; padding: 0 10px; background: #101413; color: #eef0ed; font-size: 12px; text-transform: none; letter-spacing: 0; }
.console-button { min-height: 38px; border: 1px solid #49514d; border-radius: 999px; padding: 0 14px; background: transparent; color: #e4e7e4; font-size: 11px; font-weight: 650; cursor: pointer; }
.console-button:hover { border-color: #7d8681; }
.console-button--primary { border-color: var(--signal); background: var(--signal); color: #fff; }
.logs-table-shell { overflow: auto; max-height: 620px; border: 1px solid var(--console-line); }
.logs-table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 11px; }
.logs-table thead { position: sticky; z-index: 2; top: 0; background: #1d2220; color: #8f9692; }
.logs-table th { padding: 10px 12px; text-align: left; font-size: 9px; font-weight: 680; letter-spacing: .08em; text-transform: uppercase; }
.log-row { border-top: 1px solid #292f2d; cursor: pointer; }
.log-row:hover { background: #1c211f; }
.log-row td { padding: 9px 12px; vertical-align: top; }
.log-time { width: 170px; color: #858d88; font-family: var(--font-mono); font-size: 9px; white-space: nowrap; }
.log-kind { width: 170px; color: #bbc1bd; font-family: var(--font-mono); font-size: 10px; }
.log-message { max-width: 560px; overflow: hidden; color: #d7dbd8; text-overflow: ellipsis; white-space: nowrap; }
.log-badge { display: inline-flex; min-width: 47px; min-height: 20px; align-items: center; justify-content: center; border: 1px solid #424a46; border-radius: 999px; color: #aeb5b1; font-size: 8px; font-weight: 740; }
.log-badge[data-level="WARN"] { border-color: #8b642f; color: #efbd7c; }
.log-badge[data-level="ERROR"] { border-color: #88463e; color: #e68c80; }
.log-detail { background: #0f1211; }
.log-detail td { padding: 12px 18px 16px; }
.log-detail pre { margin: 0; color: #8f9892; font-family: var(--font-mono); font-size: 9px; white-space: pre-wrap; word-break: break-word; }
.logs-empty { padding: 46px 20px !important; color: #818884; text-align: center; }
.logs-empty strong { display: block; margin-bottom: 4px; color: #b8beba; font-size: 12px; }

/* Tailwind-based legacy partial compatibility */
.tab-active { border-color: var(--signal) !important; color: #ffffff; }

@media (max-width: 1180px) {
  .fleet-overview { grid-template-columns: 1fr; }
  .signals-panel { min-height: 0; }
  .robot-row { grid-template-columns: minmax(210px, 1fr) minmax(280px, 1.4fr) 165px; }
  .robot-operations { grid-column: 1 / -1; flex-direction: row; align-items: center; }
  .robot-seen { text-align: left; }
  .edit-grid { grid-template-columns: repeat(3, 1fr); }
  .edit-actions { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .app-header__inner { padding: 0 18px; grid-template-columns: auto 1fr; gap: 12px; }
  .app-brand__product, .app-account__identity { display: none; }
  .app-nav { grid-row: 2; grid-column: 1 / -1; min-width: 0; min-height: 42px; overflow-x: auto; }
  .app-header__inner { padding-top: 7px; }
  .app-account { justify-self: end; }
  .app-nav__link { min-height: 42px; padding: 0 12px; }
  .operations-shell { padding: 30px 18px 54px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-actions { justify-content: flex-start; }
  .fleet-metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-filter { min-height: 118px; border-bottom: 1px solid var(--line); }
  .metric-filter:nth-child(2) { border-right: 0; }
  .metric-filter:nth-child(n+3) { border-bottom: 0; }
  .fleet-toolbar { grid-template-columns: 1fr; }
  .filter-pills { overflow-x: auto; padding-bottom: 2px; }
  .fleet-result-count { text-align: left; }
  .robot-row { grid-template-columns: 1fr 1fr; gap: 24px 18px; padding: 22px 18px; }
  .robot-identity { min-height: 125px; }
  .robot-health { grid-column: 1 / -1; }
  .robot-operations { grid-column: 1 / -1; }
  .release-panel { position: fixed; top: 76px; right: 16px; left: 16px; width: auto; }
  .release-form { grid-template-columns: 1fr 1fr; }
  .logs-controls { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .page-title { font-size: 34px; }
  .page-actions { width: 100%; }
  .page-actions > * { flex: 1 1 auto; }
  .button { min-height: 44px; }
  .fleet-metrics { grid-template-columns: 1fr 1fr; }
  .metric-filter { min-height: 108px; padding: 17px; }
  .metric-filter__value { margin-top: 10px; font-size: 34px; }
  .metric-filter__hint { display: none; }
  .signals-panel { padding: 19px 17px; }
  .robot-row { grid-template-columns: 1fr; }
  .robot-health, .robot-operations { grid-column: auto; }
  .robot-telemetry { grid-template-columns: 1fr 1fr; }
  .robot-operations { align-items: stretch; flex-direction: column; }
  .robot-actions { justify-content: stretch; }
  .robot-actions > * { flex: 1 1 auto; }
  .robot-actions .button { width: 100%; }
  .robot-actions-menu__panel { right: auto; left: 0; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-actions { grid-column: auto; flex-direction: column; }
  .release-form, .logs-controls { grid-template-columns: 1fr; }
  .detail-title-row { flex-direction: column; }
  .detail-workspace { margin-right: -18px; margin-left: -18px; padding: 16px; border-right: 0; border-left: 0; }
  .app-footer { padding: 0 18px; }
  .app-footer span:first-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
