:root {
  color-scheme: light;
  --blue: #46679a;
  --blue-dark: #173256;
  --blue-pale: #aebfdb;
  --line: #8ed0f6;
  --panel: #ffffff;
  --text: #22252b;
  --muted: #666b74;
  --green: #45ad12;
  --amber: #f5b800;
  --red: #d70000;
  --yellow: #ffd000;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--blue);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

select {
  font: inherit;
}

button {
  cursor: pointer;
}

.topbar {
  height: 60px;
  background: #fff;
  display: grid;
  grid-template-columns: 220px 1fr 240px;
  align-items: end;
  padding: 0 22px;
}

.brand-wrap {
  align-self: center;
  color: var(--blue);
}

.brand {
  font-size: 22px;
  letter-spacing: 0;
  font-weight: 700;
}

.brand-wrap span {
  display: block;
  font-size: 9px;
  color: #6c7890;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 2px;
  align-items: end;
}

.tab {
  min-width: 164px;
  text-align: center;
  text-decoration: none;
  color: #1e2633;
  background: var(--blue-pale);
  border-radius: 18px 18px 0 0;
  padding: 13px 18px 14px;
  font-size: 15px;
}

.tab.active {
  background: var(--blue);
  color: #fff;
}

.user-block {
  align-self: center;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #0b4381;
  color: #fff;
  font-size: 18px;
}

.icon-button.dark {
  background: #22314b;
}

.dashboard-shell {
  padding: 0 18px 24px;
}

.map-stage {
  position: relative;
  min-height: 61vh;
  border: 0;
  border-radius: 0;
  background: var(--blue-dark);
  overflow: hidden;
}

.map-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.74;
  display: flex;
  align-items: center;
  justify-content: center;
}

.world-map-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  max-height: 100%;
  max-width: 100%;
  overflow: hidden;
}

.world-map-canvas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  filter: saturate(0.85) contrast(1.08);
}

.world-map-canvas::before,
.world-map-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world-map-canvas::before {
  background: rgba(23, 50, 86, 0.42);
}

.world-map-canvas::after {
  background: linear-gradient(90deg, rgba(23, 50, 86, 0.9), transparent 28%, transparent 72%, rgba(23, 50, 86, 0.9));
}

.plane-layer,
.airport-poi-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.plane-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font-size: 27px;
  text-shadow: 0 1px 2px #442f00;
  line-height: 1;
  pointer-events: auto;
}

.airport-poi-marker {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background: rgba(40, 124, 71, 0.95);
  color: #fff;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.airport-poi-marker::before {
  content: "";
  width: 11px;
  height: 3px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(-28deg);
}

.airport-poi-marker::after {
  content: attr(data-code);
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.kpi-strip {
  position: absolute;
  z-index: 3;
  top: 36px;
  left: 34px;
  display: flex;
  gap: 16px;
}

.ring {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  background: conic-gradient(var(--ring-color) 0 var(--value), #9ca3af var(--value) 100%);
}

.ring::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: rgba(23, 50, 86, 0.92);
}

.ring {
  isolation: isolate;
}

.ring::after {
  content: attr(data-value);
  position: relative;
  z-index: 1;
}

.ring span {
  position: absolute;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.ring.green { --ring-color: var(--green); }
.ring.amber { --ring-color: var(--amber); }
.ring.red { --ring-color: var(--red); }

.clock-strip {
  position: absolute;
  z-index: 3;
  top: 36px;
  right: 34px;
  display: flex;
  gap: 34px;
  color: #fff;
}

.clock-strip div {
  display: grid;
  place-items: center;
  gap: 8px;
}

.clock-strip strong {
  font-size: 20px;
  font-weight: 500;
}

.clock-strip span {
  font-size: 18px;
}

.map-credit {
  position: absolute;
  z-index: 3;
  left: 18px;
  bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.panel,
.entry-panel,
.login-card {
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid #cdd9e9;
  box-shadow: none;
}

.panel {
  min-height: 210px;
  min-width: 0;
  overflow: hidden;
  padding: 14px 17px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--line);
  padding-bottom: 7px;
  margin-bottom: 8px;
}

.panel h2,
.entry-panel h1 {
  margin: 0;
  color: #666;
  font-size: 24px;
  font-weight: 400;
}

.pager {
  display: flex;
  gap: 6px;
}

.pager button {
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: 14px;
  background: var(--blue);
  color: #fff;
  font-size: 18px;
}

.pager button:disabled {
  opacity: 0.35;
}

.panel-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.airport-shell {
  padding: 20px 22px 24px;
}

.airport-map-card {
  min-height: 68vh;
  background: #fff;
  border: 1px solid #cdd9e9;
  border-radius: 8px;
  padding: 18px 22px 10px;
}

.airport-map-toolbar {
  display: grid;
  grid-template-columns: 210px 1fr 48px;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.airport-map-toolbar h1 {
  margin: 0;
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  color: #111;
}

.airport-view-picker select {
  width: 100%;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: #d9d9d9;
  color: #5f6369;
  padding: 0 40px 0 18px;
  font-size: 18px;
}

.north-arrow {
  position: relative;
  color: #1758d8;
  font-size: 13px;
  text-align: center;
  padding-bottom: 26px;
}

.north-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 32px solid #1758d8;
}

.airport-map-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  align-items: center;
}

.airport-legend {
  align-self: center;
  border: 1px solid #8a8a8a;
  background: #fff;
  font-size: 13px;
}

.airport-legend h2 {
  margin: 0;
  padding: 8px;
  background: #2a2a2a;
  color: #fff;
  text-align: center;
  font-size: 20px;
}

.airport-legend div {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: center;
  min-height: 28px;
  border-top: 1px solid #aaa;
  font-weight: 600;
}

.legend-swatch {
  width: 20px;
  height: 14px;
  justify-self: center;
  border: 2px solid #333;
}

.legend-swatch.terminal {
  background: #a7c7df;
  border-color: #ff2bbf;
}

.legend-swatch.gate {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff2bbf;
  border-color: #ff2bbf;
}

.legend-swatch.poi {
  background: #235aa7;
  border-color: #235aa7;
}

.legend-swatch.road {
  height: 5px;
  background: #ffa500;
  border: 0;
}

.legend-swatch.rail {
  height: 5px;
  background: #1f6eea;
  border: 0;
}

.legend-swatch.apron {
  background: #e8e9f0;
  border-color: #d5d7e5;
}

.legend-swatch.parking {
  background: #9e9e9e;
  border-color: #8f8f8f;
}

.legend-swatch.overlay {
  height: 5px;
  background: #8ba6c5;
  border: 0;
}

.legend-swatch.anchor {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #235aa7;
  border-color: #235aa7;
}

.airport-map-frame {
  position: relative;
  min-height: 60vh;
  border: 2px solid #333;
  overflow: hidden;
  background: #fff;
}

#airport-map-svg {
  display: block;
  width: 100%;
  height: 60vh;
  min-height: 520px;
}

.airport-feature {
  vector-effect: non-scaling-stroke;
}

.airport-feature.apron {
  fill: #eef0f7;
  stroke: #d7d9e5;
  stroke-width: 1.2;
}

.airport-feature.terminal {
  fill: rgba(151, 191, 220, 0.88);
  stroke: #ff2bbf;
  stroke-width: 2.4;
}

.airport-feature.building {
  fill: #9f9f9f;
  stroke: #7c7c7c;
  stroke-width: 0.7;
  opacity: 0.8;
}

.airport-feature.parking {
  fill: #b0b0b0;
  stroke: #8d8d8d;
  stroke-width: 0.8;
}

.airport-feature.runway {
  fill: none;
  stroke: #b5b5b5;
  stroke-width: 8;
  stroke-linecap: round;
}

.airport-feature.taxiway {
  fill: none;
  stroke: #c7c7d3;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.airport-feature.road {
  fill: none;
  stroke: #ffa500;
  stroke-width: 2.1;
  stroke-linecap: round;
}

.airport-feature.rail {
  fill: none;
  stroke: #1f6eea;
  stroke-width: 2.3;
  stroke-dasharray: 7 4;
  stroke-linecap: round;
}

.airport-feature.walkway {
  fill: none;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.airport-feature.jet_bridge {
  fill: none;
  stroke: #ff2bbf;
  stroke-width: 2;
}

.airport-feature.parking_position {
  fill: none;
  stroke: rgba(255, 43, 191, 0.55);
  stroke-width: 1.2;
}

.airport-point {
  vector-effect: non-scaling-stroke;
  stroke-width: 1.2;
}

.airport-point.gate {
  fill: #ff2bbf;
  stroke: #9e006f;
}

.airport-point.poi,
.airport-point.transport_point {
  fill: #235aa7;
  stroke: #fff;
}

.airport-label {
  font-size: 15px;
  fill: #1f1f1f;
  stroke: #fff;
  stroke-width: 3px;
  paint-order: stroke;
  pointer-events: none;
}

.airport-label.gate {
  font-size: 12px;
  font-weight: 700;
}

.airport-label.terminal {
  font-size: 22px;
  font-weight: 700;
}

.airport-label.poi {
  font-size: 11px;
}

.gate-terminal {
  fill: #a9c7df;
  stroke: #ff2bbf;
  stroke-width: 3;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.gate-terminal.main-core {
  fill: #b6d1e4;
}

.gate-terminal.satellite {
  fill: none;
  stroke: #ff2bbf;
  stroke-width: 18;
  stroke-linecap: round;
}

.gate-terminal-label {
  fill: #1d1d1d;
  font-size: 22px;
  font-weight: 700;
  stroke: #fff;
  stroke-width: 4;
  paint-order: stroke;
}

.satellite-label {
  font-size: 20px;
}

.gate-tick {
  stroke: #ff2bbf;
  stroke-width: 5;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}

.gate-label {
  fill: #1f1f1f;
  font-size: 13px;
  font-weight: 700;
  stroke: #fff;
  stroke-width: 3;
  paint-order: stroke;
  pointer-events: none;
}

.gate-anchor {
  fill: #235aa7;
  stroke: #fff;
  stroke-width: 1.4;
}

.satellite-frame {
  fill: #fff;
  stroke: #222;
  stroke-width: 2;
}

.gate-overlay-lane {
  fill: none;
  stroke: rgba(70, 103, 154, 0.35);
  stroke-width: 3;
  stroke-dasharray: 8 6;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.gate-overlay-layer {
  pointer-events: none;
}

.airport-map-status {
  position: absolute;
  right: 10px;
  bottom: 8px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #c7ceda;
  font-size: 11px;
  color: #475263;
}

.airport-map-credit {
  margin: 8px 0 0;
  color: #596273;
  font-size: 11px;
  text-align: right;
}

.airport-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.airport-stat-panel {
  min-height: 150px;
}

.panel-item,
.panel-row,
.iocc-row {
  min-height: 31px;
  font-size: 13px;
  text-transform: uppercase;
}

.panel-item {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  text-transform: none;
}

.panel-item strong {
  display: block;
  font-weight: 500;
  line-height: 1.15;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.panel-item.news-link,
.panel-item.news-link:visited,
.panel-item.news-link:hover,
.panel-item.news-link:focus-visible {
  color: var(--text);
  display: block;
  outline-offset: 2px;
  text-decoration: none;
}

.news-link:hover strong,
.news-link:focus-visible strong {
  color: var(--text);
  text-decoration: none;
}

.panel-item small {
  display: block;
  color: var(--muted);
  text-transform: none;
  margin-top: 3px;
}

.panel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.pill {
  min-width: 74px;
  border: 0;
  border-radius: 16px;
  padding: 7px 12px;
  color: #fff;
  font-size: 12px;
  text-align: center;
  text-transform: none;
}

.pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pill.ok { background: var(--green); }
.pill.warn { background: var(--amber); }
.pill.danger { background: var(--red); }

.iocc-row {
  display: grid;
  grid-template-columns: 38px 1fr 92px;
  gap: 9px;
  align-items: start;
}

.chat-launch {
  border: 0;
  border-radius: 15px;
  background: #06427f;
  color: #fff;
  height: 29px;
}

.iocc-row strong {
  background: #06427f;
  border-radius: 15px;
  color: #fff;
  text-align: center;
  padding: 7px 8px;
  font-size: 11px;
}

.pairing-dialog,
.chat-dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(620px, 92vw);
}

.pairing-dialog::backdrop,
.chat-dialog::backdrop {
  background: rgba(10, 20, 35, 0.55);
}

.pairing-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.pairing-content {
  display: grid;
  gap: 14px;
}

.qr-box {
  max-width: 320px;
}

.qr-box svg {
  width: 100%;
  height: auto;
}

.pairing-code {
  display: grid;
  gap: 4px;
}

.pairing-code span {
  color: var(--muted);
  font-size: 12px;
}

.pairing-code strong {
  font-size: 32px;
  letter-spacing: 0;
}

.chat-shell {
  padding: 0;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: var(--blue);
  color: #fff;
  padding: 16px 18px;
}

.chat-header h2 {
  margin: 0;
}

.chat-header span {
  color: #dbeafe;
}

.chat-log {
  height: 360px;
  overflow-y: auto;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: #f8fafc;
}

.chat-bubble {
  max-width: 78%;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 8px;
}

.chat-bubble.inbound {
  background: #fff;
  justify-self: start;
  border: 1px solid #d7e1ef;
}

.chat-bubble.outbound {
  background: #dbeafe;
  justify-self: end;
}

.chat-bubble small {
  color: var(--muted);
  font-size: 11px;
}

.chat-bubble.broadcast-alert {
  border: 2px solid var(--red);
}

.chat-bubble.broadcast-alert strong {
  color: var(--red);
  font-size: 12px;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 10px;
  padding: 14px;
}

.chat-compose input,
.chat-compose button,
.dense-form input,
.dense-form select,
.stack-form input,
.stack-form select,
.stack-form textarea,
.login-card input,
.login-card button {
  border: 1px solid #b7c6da;
  border-radius: 8px;
  padding: 10px 12px;
}

.chat-compose button,
.dense-form button,
.stack-form button,
.login-card button {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}

.entry-shell {
  padding: 22px;
}

.entry-panel {
  padding: 18px;
}

.entry-panel.wide {
  grid-column: 1 / -1;
}

.management-panel {
  display: grid;
  gap: 18px;
}

.entry-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 2px solid var(--line);
}

.entry-tab {
  border: 0;
  border-radius: 8px 8px 0 0;
  background: var(--blue-pale);
  color: #172033;
  padding: 11px 16px;
  min-width: 126px;
}

.entry-tab.active {
  background: var(--blue);
  color: #fff;
}

.entry-section {
  display: none;
}

.entry-section.active {
  display: grid;
  gap: 16px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.secondary-button {
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 9px 13px;
  font-weight: 600;
}

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

.dense-form label,
.stack-form label {
  display: grid;
  gap: 5px;
}

.dense-form label span,
.stack-form label span {
  color: var(--muted);
  font-size: 12px;
}

.dense-form button {
  min-height: 42px;
  align-self: end;
}

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

.stack-form textarea {
  min-height: 96px;
  resize: vertical;
}

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

.crud-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.crud-table th,
.crud-table td {
  border-bottom: 1px solid #d9e5f3;
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
}

.crud-table th {
  color: #526071;
  font-weight: 600;
  background: #f7f9fc;
}

.sim-actions {
  display: flex;
  gap: 8px;
}

.sim-control-strip {
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.sim-control-fields,
.sim-readouts {
  display: grid;
  gap: 12px;
}

.sim-control-fields {
  grid-template-columns: 130px minmax(220px, 1fr);
}

.sim-readouts {
  grid-template-columns: repeat(2, minmax(140px, 1fr));
}

.sim-control-strip label,
.sim-readout {
  display: grid;
  gap: 5px;
}

.sim-control-strip span,
.sim-readout span {
  color: var(--muted);
  font-size: 12px;
}

.sim-control-strip input,
.sim-control-strip select {
  border: 1px solid #b7c6da;
  border-radius: 8px;
  padding: 10px 12px;
}

.sim-readout {
  min-height: 42px;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f7f9fc;
}

.sim-readout strong {
  font-size: 16px;
}

.other-data-controls {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 160px;
  gap: 12px;
  align-items: end;
  max-width: 520px;
}

.other-data-controls label {
  display: grid;
  gap: 5px;
}

.other-data-controls span {
  color: var(--muted);
  font-size: 12px;
}

.other-data-controls select {
  border: 1px solid #b7c6da;
  border-radius: 8px;
  padding: 10px 12px;
}

.other-data-form button {
  width: fit-content;
  min-width: 180px;
  padding-left: 18px;
  padding-right: 18px;
}

.sim-status {
  border: 1px solid #d9e5f3;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7f9fc;
  color: var(--muted);
  font-size: 13px;
}

.sim-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.sim-pane {
  display: grid;
  gap: 12px;
}

.sim-pane:nth-child(3) {
  grid-column: 2;
}

.sim-route-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  max-width: 980px;
}

.sim-message-form {
  max-width: 720px;
}

.sim-route-form button,
.sim-message-form button {
  width: fit-content;
  min-width: 170px;
  padding-left: 18px;
  padding-right: 18px;
}

.recipe-list {
  display: grid;
  gap: 8px;
}

.recipe-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: start;
  border: 1px solid #d9e5f3;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.recipe-row strong {
  display: block;
}

.recipe-row small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.recipe-row button {
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  padding: 6px 9px;
}

.crud-table td:last-child {
  white-space: nowrap;
}

.crud-table button {
  border: 1px solid #b7c6da;
  border-radius: 7px;
  background: #fff;
  color: #173256;
  padding: 6px 9px;
  margin-right: 4px;
}

.login-body {
  background: var(--blue);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 26px;
}

.login-card h1 {
  margin: 12px 0 6px;
  font-size: 26px;
}

.login-card p {
  color: var(--muted);
}

.login-card label {
  display: grid;
  gap: 6px;
}

.error {
  min-height: 20px;
  color: var(--red);
  margin: 0;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 160px 1fr 90px;
  }

  .tab {
    min-width: auto;
    padding-inline: 12px;
  }

  .panel-grid,
  .entry-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dense-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .other-data-controls {
    grid-template-columns: minmax(180px, 1fr) 150px;
  }

  .sim-control-strip,
  .sim-grid {
    grid-template-columns: 1fr;
  }

  .sim-pane:nth-child(3) {
    grid-column: auto;
  }

  .sim-route-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .airport-map-toolbar,
  .airport-map-layout,
  .airport-info-grid {
    grid-template-columns: 1fr;
  }

  .airport-legend {
    align-self: stretch;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
  }

  .tabs {
    overflow-x: auto;
    justify-content: start;
  }

  .user-block {
    display: none;
  }

  .map-stage {
    min-height: 48vh;
  }

  .kpi-strip,
  .clock-strip,
  .map-credit {
    display: none;
  }

  .panel-grid,
  .entry-shell,
  .dense-form {
    grid-template-columns: 1fr;
  }

  .other-data-controls {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .sim-control-fields,
  .sim-readouts,
  .sim-route-form {
    grid-template-columns: 1fr;
  }

  .airport-shell {
    padding: 12px;
  }

  .airport-map-toolbar h1 {
    font-size: 20px;
  }

  #airport-map-svg,
  .airport-map-frame {
    min-height: 420px;
  }
}
