body {
  margin: 0;
  background: #2c2c2c;
  font-family: "Courier New", monospace;
  color: #fff;
  overflow: hidden;
}

#radar {
  position: fixed;
  inset: 0;
  z-index: 1;
  cursor: crosshair;
}

#radar.panning { cursor: grabbing; }
#radar.smr-mode { cursor: grab; }
#radar.smr-panning { cursor: grabbing; }

.ring {
  position: absolute;
  border: 1px solid rgba(92, 93, 94, 0.27);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.not-connected-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.not-connected-text {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
}

* {
  font-family: "League Spartan", Georgia, "Times New Roman", "Courier New", sans-serif !important;
}

.top-bar {
  display: flex;
  align-items: stretch;
  background: #1e4232;
  border-bottom: 1px solid #1e4232;
  position: relative;
  z-index: 10;
  font-family: Georgia, "Times New Roman", serif;
}

.btn {
  background: #1e4232;
  border-right: 1px solid rgba(0, 255, 102, 0.12);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  position: relative;
}

.btn:hover { background: #10301f; color: #ffffff; }
.btn.compact { min-width: 55px; padding: 8px 8px; font-size: 11px; }
.btn.display-only { cursor: default; }
.btn.display-only:hover { background: #0b1f16; color: #ffffff; }
.btn.connected { background: #0d2b1f; color: #ffffff; gap: 2px; }
.btn.connected:hover { background: #0f3524; color: #ffffff; }

.callsign-text { font-size: 12px; line-height: 1; }
.frequency-text { font-size: 9px; color: rgba(255, 255, 255, 0.65); letter-spacing: 0.5px; line-height: 1; }

.mode-box {
  position: relative;
  min-width: 80px;
  padding: 8px 10px;
  border-right: 1px solid rgba(0, 255, 102, 0.12);
}

.mode-display { font-size: 11px; }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #0b1f16;
  border: 1px solid rgba(0, 255, 102, 0.12);
  display: none;
  z-index: 100;
}

.dropdown div {
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown div:hover { background: #111; color: #ffffff; }
.mode-box.open .dropdown { display: block; }

.top-right {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
}

.sign-in-btn {
  background: #0b1f16;
  border: none;
  border-left: 1px solid rgba(0, 255, 102, 0.12);
  color: #ffffff;
  padding: 10px 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 90px;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.sign-in-btn:hover { background: #10301f; color: #ffffff; }

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 11px;
  padding: 0 10px;
  border-left: 1px solid rgba(0, 255, 102, 0.12);
  background: #1e4232;
  box-sizing: border-box;
}

.user-avatar { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,255,102,0.2); flex-shrink: 0; }
.user-name { font-size: 11px; color: #ffffff; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: Georgia, "Times New Roman", serif; }

.logout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
  padding: 3px 6px;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.logout-btn:hover { color: #ff4444; border-color: rgba(255,0,0,0.3); }

/* windows */
.atc-window {
  position: fixed;
  width: 340px;
  height: 420px;
  min-width: 240px;
  min-height: 160px;
  max-width: 90vw;
  max-height: 85vh;
  background: rgba(5, 5, 5, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 20;
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
}

.atc-window-header {
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  cursor: grab;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

.atc-window-header:active { cursor: grabbing; }

.atc-window-minimize {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  width: 18px;
  height: 18px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.atc-window-minimize:hover { color: #ffff66; border-color: rgba(255,255,102,0.3); }

.atc-window-body { padding: 0; flex: 1 1 auto; overflow-y: auto; font-size: 13px; display: flex; flex-direction: column; min-height: 0; }
.atc-window.minimized { height: auto; min-height: 0; resize: none; }
.atc-window.minimized .atc-window-body { display: none; }

.atc-window-body::-webkit-scrollbar { width: 6px; }
.atc-window-body::-webkit-scrollbar-track { background: #050505; }
.atc-window-body::-webkit-scrollbar-thumb { background: #1a1a1a; border: 1px solid rgba(255,255,255,0.1); }

/* metar window */
#metarWindow { right: 300px; top: 80px; display: none; }
#metarWindow.visible { display: block; }

.metar-entry { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 10px; line-height: 1.4; color: rgba(255,255,255,0.8); }
.metar-entry .metar-icao { color: #00ff66; font-weight: bold; margin-right: 4px; }

.metar-settings-btn { background: none; border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); width: 16px; height: 16px; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: "Courier New", monospace; padding: 0; line-height: 1; flex-shrink: 0; letter-spacing: -2px; }
.metar-settings-btn:hover { color: #ffff66; border-color: rgba(255,255,102,0.3); }

.metar-settings-dropdown { position: absolute; top: 27px; right: 0; background: #0a0a0a; border: 1px solid rgba(255,255,255,0.12); z-index: 30; display: none; min-width: 160px; padding: 4px 0; }
.metar-settings-dropdown.open { display: block; }
.metar-settings-item { padding: 6px 10px; font-size: 10px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: rgba(255,255,255,0.7); }
.metar-settings-item:hover { background: #111; color: #fff; }
.metar-settings-item input[type="checkbox"] { width: 12px; height: 12px; accent-color: #00ff66; cursor: pointer; }

/* departure list */
#depListWindow { left: 50%; top: 80px; transform: translateX(-50%); width: 720px; display: none; }
#depListWindow.visible { display: block; }

.dep-list-table { width: 100%; border-collapse: collapse; font-size: 9px; table-layout: fixed; }
.dep-list-table th { background: #0a0a0a; color: rgba(255,255,255,0.6); padding: 4px 3px; text-align: center; font-weight: normal; border-bottom: 1px solid rgba(255,255,255,0.1); border-right: 1px solid rgba(255,255,255,0.06); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.dep-list-table td { padding: 0; border-bottom: 1px solid rgba(255,255,255,0.04); border-right: 1px solid rgba(255,255,255,0.04); text-align: center; }
.dep-list-table td input { width: 100%; background: transparent; border: none; color: #fff; font-family: "Courier New", monospace; font-size: 9px; padding: 3px 2px; text-align: center; outline: none; box-sizing: border-box; }
.dep-list-table td input:focus { background: rgba(255,255,255,0.05); outline: 1px solid rgba(0,255,102,0.3); }
.dep-list-table td input::placeholder { color: rgba(255,255,255,0.15); }
.dep-list-table td select { width: 100%; background: transparent; border: none; color: #fff; font-family: "Courier New", monospace; font-size: 9px; padding: 3px 2px; text-align: center; outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; }
.dep-list-table td select:focus { background: rgba(255,255,255,0.05); outline: 1px solid rgba(0,255,102,0.3); }
.dep-list-table td select option { background: #0a0a0a; color: #fff; }
.dep-checkbox { width: 14px; height: 14px; cursor: pointer; accent-color: #00ff66; margin: 0; vertical-align: middle; }

.col-cs { width: 10%; } .col-stand { width: 5%; } .col-atyp { width: 6%; }
.col-w { width: 5%; } .col-ades { width: 6%; }
.col-rwy { width: 5%; } .col-sid { width: 8%; } .col-climb { width: 6%; }
.col-assr { width: 5%; } .col-c { width: 3%; }
.col-sts { width: 8%; } .col-rmk { width: 18%; }

/* notification toast */
.notification-toast { position: fixed; bottom: 50px; right: 20px; background: rgba(5,5,5,0.95); border: 1px solid rgba(0,255,102,0.3); padding: 10px 14px; font-size: 10px; z-index: 50; opacity: 0; transform: translateX(120%); transition: all 0.4s ease; pointer-events: none; max-width: 260px; border-radius: 6px; }
.notification-toast.show { opacity: 1; transform: translateX(0); }
.notification-toast .notif-callsign { color: #00ff66; font-weight: bold; }
.notification-toast .notif-action { color: rgba(255,255,255,0.7); }

.version-tag { position: fixed; bottom: 12px; right: 16px; font-size: 9px; color: rgba(255,255,255,0.25); letter-spacing: 1px; z-index: 5; pointer-events: none; }
.version-tag a { color: rgba(255,255,255,0.25); text-decoration: none; pointer-events: auto; }

#vectorCanvas { position: fixed; inset: 0; z-index: 2; pointer-events: none; }

/* inline editor used for aircraft label fields (scratchpad, assigned alt/speed) */
.label-field-input {
  position: fixed;
  z-index: 500;
  background: rgba(0,0,0,0.8);
  border: 1px solid rgba(255,255,255,0.3);
  outline: none;
  font-family: "League Spartan", Georgia, "Times New Roman", "Courier New", sans-serif;
  font-size: 12px;
  padding: 0 3px;
  margin: 0;
  height: 15px;
  line-height: 15px;
  min-width: 30px;
  box-sizing: content-box;
  letter-spacing: 0.5px;
}
.label-field-input:focus { border-color: rgba(255,255,102,0.6); }

.assume-menu {
  position: fixed;
  z-index: 600;
  background: rgba(5,10,8,0.97);
  border: 1px solid rgba(0,255,102,0.3);
  min-width: 110px;
  font-size: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.assume-menu-item {
  padding: 6px 10px;
  color: #d7f5e4;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
}

.assume-menu-item:hover { background: rgba(0,255,102,0.12); }
.assume-menu-disabled { color: rgba(255,255,255,0.4); cursor: default; }
.assume-menu-disabled:hover { background: none; }

.assume-menu-transfer .assume-submenu { display: none; }
.assume-menu-transfer:hover .assume-submenu { display: block; }

.assume-submenu {
  position: absolute;
  top: 0;
  right: 100%;
  background: rgba(5,10,8,0.97);
  border: 1px solid rgba(0,255,102,0.3);
  min-width: 120px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.assume-submenu-item {
  padding: 6px 10px;
  color: #d7f5e4;
  cursor: pointer;
  white-space: nowrap;
}

.assume-submenu-item:hover { background: rgba(0,255,102,0.12); }
.assume-submenu-empty { color: rgba(255,255,255,0.35); cursor: default; }
.assume-submenu-empty:hover { background: none; }

#smrBackground { position: fixed; inset: 0; z-index: 0; background: #005C73; display: none; }

/* popups */
.popup-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; display: none; justify-content: center; align-items: center; }
.popup-overlay.open { display: flex; }
.popup { background: #0a0a0a; border: 1px solid rgba(255,255,255,0.15); padding: 24px; width: 360px; max-width: 90vw; text-align: center; }
.popup h2 { margin: 0 0 20px 0; font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: #ffffff; }
.popup p { font-size: 11px; color: rgba(255,255,255,0.6); margin-bottom: 20px; line-height: 1.5; }
.popup p.warning { color: #ff4444; border: 1px solid rgba(255,0,0,0.2); padding: 10px; background: rgba(255,0,0,0.05); }
.field { margin-bottom: 14px; text-align: left; }
.field label { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.field input, .field select { width: 100%; padding: 8px; background: #111; border: 1px solid rgba(255,255,255,0.1); color: #fff; font-family: "Courier New", monospace; font-size: 13px; box-sizing: border-box; outline: none; }
.field input:focus, .field select:focus { border-color: rgba(255,255,102,0.5); }
.field select { cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 28px; }
.field select option { background: #0a0a0a; color: #fff; }
.field select option:checked { background: #1a1a1a; color: #ffff66; }
.field input:disabled, .field select:disabled { opacity: 0.5; cursor: not-allowed; }
.popup-buttons { display: flex; gap: 10px; margin-top: 20px; }
.popup-btn { flex: 1; padding: 10px; background: #111; border: 1px solid rgba(255,255,255,0.1); color: #fff; font-family: "Courier New", monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; text-align: center; }
.popup-btn:hover { background: #1a1a1a; color: #ffff66; }
.popup-btn.primary { background: #0a1a0a; border-color: rgba(0,255,102,0.3); color: #00ff66; }
.popup-btn.primary:hover { background: #0a2a0a; }
.popup-btn.disconnect { background: #1a0000; border-color: rgba(255,0,0,0.3); color: #ff4444; }
.popup-btn.disconnect:hover { background: #2a0000; color: #ff6666; }
.popup-btn.discord { background: #5865F2; border-color: rgba(255,255,255,0.2); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; }
.popup-btn.discord:hover { background: #4752C4; color: #fff; }

/* runway popup */
.runway-popup { width: 640px; max-width: 92vw; max-height: 82vh; text-align: left; display: flex; flex-direction: column; }
.runway-popup-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.runway-popup-header h2 { color: #ffffff; }
.runway-close-btn { flex: none; padding: 8px 14px; background: #1a0000; border-color: rgba(255,0,0,0.3); color: #ff6666; }
.runway-close-btn:hover { background: #2a0000; color: #ff8888; }
.runway-table-wrap { overflow-y: auto; border: 1px solid rgba(0,255,102,0.15); }
.runway-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.runway-table thead th {
  position: sticky; top: 0;
  background: #ffffff;
  color: #000000;
  text-align: center;
  padding: 8px 6px;
  border-bottom: 1px solid rgb(255, 255, 255);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}
.runway-table thead th:first-child { text-align: left; padding-left: 12px; }
.runway-table td { text-align: center; padding: 7px 6px; border-bottom: 1px solid rgba(255,255,255,0.06); color: #d7f5e4; }
.runway-table td:first-child { text-align: left; padding-left: 12px; }
.runway-table tbody tr:hover { background: rgba(0,255,102,0.05); }
.runway-table input[type="checkbox"] { width: 14px; height: 14px; cursor: pointer; accent-color: #ffffff; }
.runway-table tr.runway-active td:first-child { color: #ffffff; }