:root {
  --fort-black: #02060d;
  --fort-bg-top: #171a1f;
  --fort-bg-mid: #07090c;
  --fort-bg-bottom: #020304;
  --fort-night: #06111f;
  --fort-panel: #11161d;
  --fort-panel-raised: #17263b;
  --fort-drawer: #050607;
  --fort-control: #1f2430;
  --fort-control-2: #25282e;
  --fort-border: rgba(255, 255, 255, 0.14);
  --fort-border-cyan: rgba(25, 199, 212, 0.72);
  --fort-orange: #e87800;
  --fort-orange-bright: #ff8a00;
  --fort-cyan: #19c7d4;
  --fort-green: #46d37b;
  --fort-amber: #ffc247;
  --fort-red: #ff5252;
  --fort-text: #f4f7fb;
  --fort-muted: #a9b4c4;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-root {
  width: 100%;
  height: 100%;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  margin: 0;
  overflow: hidden;
  background: #020304;
  color: var(--fort-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-root {
  position: relative;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  overflow: hidden;
}

.tactical-bg {
  background:
    linear-gradient(180deg, var(--fort-bg-top) 0%, var(--fort-bg-mid) 48%, var(--fort-bg-bottom) 100%);
}

.tactical-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.54)),
    repeating-linear-gradient(122deg, transparent 0 56px, rgba(255, 255, 255, 0.018) 57px 58px),
    linear-gradient(90deg, transparent 12%, rgba(255, 255, 255, 0.035) 12% 92%, transparent 92%);
  opacity: 1;
}

.tactical-bg::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 22%;
  top: 61%;
  height: 1px;
  background: rgba(255, 255, 255, 0.028);
  pointer-events: none;
}

.safe-column {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 18px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.splash-screen {
  display: grid;
  place-items: center;
}

.splash-logo {
  width: min(290px, 72vw);
  height: min(290px, 72vw);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.7);
  animation: splash-pop 1.25s cubic-bezier(0.2, 0.9, 0.25, 1) forwards;
}

@keyframes splash-pop {
  0% { opacity: 0; transform: scale(0.7); }
  35% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}

.choice-shield-wrap {
  position: absolute;
  z-index: 1;
  top: clamp(54px, 12vh, 120px);
  left: 50%;
  width: min(330px, 72vw, 34vh);
  height: min(330px, 72vw, 34vh);
  transform: translateX(-50%);
}

.choice-shield {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.signal-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.signal-canvas .pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(232, 120, 0, 0.2);
  transform: translate(-50%, -50%);
}

.signal-canvas .pin::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 999px;
  border: 2px solid rgba(232, 120, 0, 0.28);
  animation: pin-pulse 1.45s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.signal-canvas .pin.one {
  left: 27.8%;
  top: 58.5%;
}

.signal-canvas .pin.two {
  left: 67%;
  top: 43%;
}

.signal-canvas .pin.two::before {
  animation-delay: 0.22s;
}

@keyframes pin-pulse {
  0% { opacity: 0.28; transform: scale(0.3); }
  100% { opacity: 0; transform: scale(2.6); }
}

.choice-bottom {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: calc(clamp(28px, 8vh, 80px) + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 28px;
}

.wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  transform: translateY(-14px);
}

.wordmark .letter {
  color: white;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  animation: word-reveal 6.2s linear infinite;
  opacity: 0;
}

.wordmark .letter:nth-child(3) { animation-delay: 1.24s; }
.wordmark .letter:nth-child(4) { animation-delay: 1.86s; }

.wordmark-pin {
  position: relative;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--fort-orange);
  animation: word-reveal 6.2s linear infinite;
  animation-delay: 0.62s;
  opacity: 0;
}

.wordmark-pin::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(232, 120, 0, 0.18);
  transform: translateX(-50%);
  animation: pin-pulse 1.45s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes word-reveal {
  0%, 9% { opacity: 0; }
  17%, 84% { opacity: 1; }
  100% { opacity: 0; }
}

.mode-title {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 22px;
  font-weight: 800;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.round-button,
.danger-button,
.mini-button {
  border: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.primary-button,
.secondary-button {
  width: 100%;
  height: 62px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: white;
}

.primary-button {
  background: var(--fort-orange);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.secondary-button {
  background: rgba(16, 21, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.primary-button:disabled,
.secondary-button:disabled,
.mini-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.back-row {
  width: 100%;
  display: flex;
  align-items: center;
}

.back-button {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(8, 10, 13, 0.8);
  border: 1px solid rgba(25, 199, 212, 0.48);
  color: white;
  display: grid;
  place-items: center;
}

.form-logo {
  width: 100%;
  height: 220px;
  margin-top: 18px;
  display: grid;
  place-items: center;
}

.form-logo img {
  width: min(196px, 56vw);
  height: min(196px, 56vw);
  object-fit: contain;
}

.screen-heading {
  margin: 22px 0 16px;
  color: white;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 700;
}

.form-stack {
  width: min(100%, 430px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fort-field {
  width: 100%;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(17, 22, 29, 0.64);
  color: white;
  padding: 20px 16px 6px;
  outline: none;
}

.fort-field:focus {
  border-color: var(--fort-border-cyan);
  background: rgba(17, 22, 29, 0.74);
}

.field-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
}

.field-wrap label {
  position: absolute;
  top: 8px;
  left: 16px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  pointer-events: none;
}

.error-text {
  min-height: 30px;
  margin: 0 0 10px;
  color: #ff4d4d;
  font-size: 14px;
  text-align: center;
}

.text-link {
  margin-top: 12px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border: 0;
  padding: 10px 12px;
}

.qr-card {
  position: relative;
  width: min(78%, 340px);
  height: 170px;
  margin-top: 8px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
}

.qr-card.shake {
  animation: shake 0.28s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-24px); }
  40% { transform: translateX(24px); }
  60% { transform: translateX(-16px); }
  80% { transform: translateX(16px); }
}

.qr-card.valid-flash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 255, 102, 0.42);
  animation: valid-flash 0.35s ease-out forwards;
}

@keyframes valid-flash {
  from { opacity: 1; }
  to { opacity: 0; }
}

.qr-patch {
  position: relative;
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
}

.qr-grid {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(70, 211, 123, 0.34) 0 8%, transparent 8% 22%, rgba(255, 255, 255, 0.18) 22% 30%, transparent 30% 54%, rgba(70, 211, 123, 0.86) 54% 62%, transparent 62%),
    linear-gradient(0deg, rgba(70, 211, 123, 0.34) 0 8%, transparent 8% 22%, rgba(255, 255, 255, 0.18) 22% 30%, transparent 30% 54%, rgba(70, 211, 123, 0.86) 54% 62%, transparent 62%);
  opacity: 0.9;
  clip-path: polygon(0 0, 34% 0, 34% 34%, 0 34%, 0 0, 66% 0, 100% 0, 100% 34%, 66% 34%, 66% 0, 0 66%, 34% 66%, 34% 100%, 0 100%, 0 66%, 44% 36%, 100% 66%, 100% 100%, 44% 100%);
}

.qr-patch img {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: #46d37b;
  box-shadow: 0 -12px 0 rgba(183, 255, 214, 0.18), 0 12px 0 rgba(183, 255, 214, 0.14), 0 0 18px rgba(70, 211, 123, 0.9);
  animation: scan 1.4s linear infinite alternate;
}

@keyframes scan {
  from { top: 0; }
  to { top: calc(100% - 3px); }
}

.qr-note {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.7);
}

.login-action-button {
  height: 58px;
  border-radius: 18px;
  font-size: 16px;
}

.login-submit-button {
  height: 56px;
  border-radius: 18px;
  font-size: 16px;
}

.divider-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 24px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.divider-row::before,
.divider-row::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-screen {
  background: linear-gradient(180deg, #0d151c, #07090d 55%, #030405);
}

.map-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #eef0e8;
  z-index: 0;
}

.map-layer.satellite {
  background: #050608;
}

.leaflet-map {
  font: inherit;
}

.leaflet-map .leaflet-tile-pane {
  filter: none;
}

.leaflet-map.satellite .leaflet-tile-pane {
  filter: none;
}

.leaflet-map .fort-label-pane {
  z-index: 360;
  filter: brightness(0.92) contrast(1.08);
}

.leaflet-map::before {
  content: none;
}

.leaflet-map::after {
  content: none;
}

.leaflet-map .leaflet-overlay-pane {
  z-index: 500;
  filter: drop-shadow(0 0 8px rgba(255, 138, 0, 0.28));
}

.leaflet-map .leaflet-marker-pane {
  z-index: 650;
}

.leaflet-map .leaflet-control-container {
  position: absolute;
  inset: 0;
  z-index: 800;
  pointer-events: none;
}

.leaflet-map .leaflet-control {
  pointer-events: auto;
}

.leaflet-map .leaflet-control-attribution {
  margin: 0 8px 8px 0;
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.56);
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  line-height: 1.6;
}

.leaflet-map .leaflet-control-attribution a {
  color: rgba(255, 255, 255, 0.78);
}

.map-sdk-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.fort-leaflet-icon {
  background: transparent !important;
  border: 0 !important;
  overflow: visible !important;
}

.fort-user-leaflet-icon,
.fort-place-leaflet-icon,
.fort-alert-leaflet-icon {
  overflow: visible !important;
}

.fort-user-marker {
  width: 96px;
  height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}

.fort-user-bubble {
  position: relative;
  min-width: 38px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--marker-color, #607d8b);
  border: 2px solid #111;
  color: white;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.38);
}

.fort-user-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--marker-color, #607d8b);
  filter: drop-shadow(0 2px 0 #111);
}

.fort-alert-leaflet-icon {
  overflow: visible;
}

.fort-alert-marker {
  position: relative;
  width: 170px;
  height: 124px;
  pointer-events: none;
}

.fort-alert-label {
  position: absolute;
  left: 50%;
  top: 2px;
  max-width: 154px;
  min-width: 78px;
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.94);
  color: #111;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
  font-size: 14px;
  font-weight: 900;
  line-height: 34px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fort-alert-pointer {
  position: absolute;
  left: 50%;
  top: 35px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 11px solid rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.24));
}

.fort-alert-wave,
.fort-alert-dot {
  position: absolute;
  left: 50%;
  top: 82px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
}

.fort-alert-wave {
  width: 78px;
  height: 78px;
  background: var(--alert-color, #ffc107);
  opacity: 0.24;
  animation: fort-alert-wave 1.55s ease-in-out infinite;
}

.fort-alert-dot {
  width: 32px;
  height: 32px;
  background: var(--alert-color, #ffc107);
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
}

@keyframes fort-alert-wave {
  0% { transform: translate(-50%, -50%) scale(0.72); opacity: 0.36; }
  70% { transform: translate(-50%, -50%) scale(1.18); opacity: 0.08; }
  100% { transform: translate(-50%, -50%) scale(1.18); opacity: 0; }
}

.fort-place-marker {
  transform: scale(var(--place-scale, 0.9));
  transform-origin: left center;
  display: flex;
  align-items: center;
  gap: 4px;
  height: auto;
  min-width: max-content;
  padding: 0;
  background: transparent;
  color: rgba(24, 25, 27, 0.9);
  pointer-events: none;
}

.fort-place-icon {
  position: relative;
  flex: 0 0 auto;
}

.fort-place-marker.flag .fort-place-icon {
  width: 15px;
  height: 16px;
  filter: drop-shadow(0 1px 1px rgba(255, 255, 255, 0.85)) drop-shadow(0 1px 1px rgba(0, 0, 0, 0.22));
}

.fort-place-marker.flag .fort-place-icon::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 2px;
  height: 15px;
  background: var(--place-color, #ff8a00);
  border-radius: 999px;
}

.fort-place-marker.flag .fort-place-icon::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 14px;
  height: 8px;
  background: var(--place-color, #ff8a00);
}

.fort-place-marker.dot .fort-place-icon {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--place-color, #ff8a00);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.82), 0 1px 2px rgba(0, 0, 0, 0.22);
}

.fort-place-label {
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--place-font, 10px);
  font-weight: 700;
  color: rgba(33, 34, 36, 0.9);
  max-width: 96px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.94),
    1px 0 0 rgba(255, 255, 255, 0.84),
    -1px 0 0 rgba(255, 255, 255, 0.84),
    0 -1px 0 rgba(255, 255, 255, 0.72),
    0 1px 2px rgba(0, 0, 0, 0.18);
}

.fort-map-popup .leaflet-popup-content-wrapper {
  border-radius: 12px;
  background: rgba(5, 6, 7, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

.fort-map-popup .leaflet-popup-content {
  margin: 8px 10px;
}

.fort-map-popup .leaflet-popup-tip {
  background: rgba(5, 6, 7, 0.88);
}

.fort-marker-popup {
  display: grid;
  gap: 2px;
  min-width: 118px;
  color: white;
  line-height: 1.25;
}

.fort-marker-popup strong {
  font-size: 12px;
  font-weight: 900;
}

.fort-marker-popup span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.fort-marker-popup small {
  font-size: 10px;
  color: var(--fort-cyan);
  font-weight: 800;
}

.map-popup-action {
  margin-top: 6px;
  min-height: 26px;
  border: 0;
  border-radius: 9px;
  background: var(--fort-orange-bright);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.top-controls {
  position: absolute;
  z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.left-controls,
.right-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
}

.right-controls {
  align-items: flex-end;
}

.profile-menu-button {
  position: relative;
  width: 112px;
  height: 54px;
  border: 2px solid black;
  border-radius: 28px;
  background: var(--fort-control);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 0 12px;
}

.profile-avatar {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid black;
  font-weight: 800;
  color: white;
}

.logout-square {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  border: 2px solid black;
  background: #d82020;
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

.status-pill,
.location-toggle-card {
  background: rgba(17, 24, 32, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  color: white;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.status-pill {
  min-width: 74px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
}

.status-pill.cyan {
  color: var(--fort-cyan);
}

.status-pill.orange {
  color: var(--fort-orange-bright);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.tactical-signal-pill,
.fcr-signal-pill {
  position: relative;
  min-width: 66px;
  height: 36px;
  border-radius: 18px;
  background: rgba(5, 6, 7, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.signal-bars {
  height: 22px;
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
}

.signal-bars i {
  width: 5px;
  height: calc(5px + var(--bar) * 3px);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
}

.signal-bars i.active {
  background: #46d37b;
  box-shadow: 0 0 8px rgba(70, 211, 123, 0.42);
}

.tactical-badge {
  position: absolute;
  right: -7px;
  top: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ff2d2d;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.78);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.tactical-badge.danger {
  background: #ff2d2d;
}

.fcr-signal-pill {
  min-width: 78px;
  gap: 7px;
  padding: 0 9px;
}

.fcr-radio-status-icon {
  width: 25px;
  height: 25px;
  color: #ff5252;
  display: grid;
  place-items: center;
}

.fcr-radio-status-icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
}

.fcr-radio-status-icon .wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.fcr-radio-status-icon circle {
  fill: currentColor;
}

.fcr-signal-text {
  color: white;
  font-size: 11px;
  font-weight: 900;
  min-width: 24px;
  text-align: left;
}

.location-toggle-card {
  width: 126px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.live-label {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  justify-content: center;
}

.live-label strong {
  display: block;
  font-size: 11px;
  line-height: 1;
}

.live-label span {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 10px;
  font-weight: 700;
}

.switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  padding: 3px;
  background: #5c2525;
  border: 0;
}

.switch span {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: white;
  transition: transform 0.16s ease;
}

.switch.on {
  background: #00c853;
}

.switch.on span {
  transform: translateX(20px);
}

.map-quick-controls {
  position: absolute;
  z-index: 34;
  right: 16px;
  bottom: calc(8px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.round-map-button,
.recenter-pill {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(10, 18, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.35);
}

.round-map-button.compass {
  color: white;
}

.round-map-button.refresh {
  color: white;
}

.round-map-button svg {
  width: 24px;
  height: 24px;
}

.bottom-bar,
.zone-slider,
.history-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  min-height: calc(72px + var(--safe-bottom));
  border-radius: 22px 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, #1c1f24, rgba(5, 6, 7, 0.95));
}

.bottom-bar-inner {
  height: 72px;
  padding: 8px 18px 6px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.nav-item {
  position: relative;
  height: 40px;
  min-width: 52px;
  border-radius: 20px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.nav-item.selected {
  min-width: 112px;
  background: var(--fort-control-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--fort-orange-bright);
}

.nav-fcr-icon {
  width: 25px;
  height: 25px;
  color: currentColor;
  display: grid;
  place-items: center;
}

.nav-fcr-icon svg {
  width: 25px;
  height: 25px;
}

.nav-fcr-icon .wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.nav-fcr-icon circle {
  fill: currentColor;
}

.badge {
  position: absolute;
  top: -3px;
  right: -1px;
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  border: 1.5px solid white;
  background: #ff2d2d;
  color: white;
  font-size: 10px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.zone-slider {
  min-height: calc(72px + var(--safe-bottom));
  display: flex;
  align-items: center;
  padding: 8px 10px calc(6px + var(--safe-bottom)) 12px;
  gap: 8px;
}

.zone-count {
  width: 64px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 138, 0, 0.4);
  background: #25282e;
  color: var(--fort-orange-bright);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.chip-row {
  flex: 1;
  overflow-x: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.zone-chip {
  flex: 0 0 auto;
  min-width: 78px;
  max-width: 150px;
  height: 44px;
  padding: 0 12px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zone-chip span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--chip-color, var(--fort-orange-bright));
  box-shadow: 0 0 10px color-mix(in srgb, var(--chip-color, var(--fort-orange-bright)) 45%, transparent);
  flex: 0 0 auto;
}

.zone-chip.selected {
  color: var(--chip-color, var(--fort-orange-bright));
  border-color: color-mix(in srgb, var(--chip-color, var(--fort-orange-bright)) 65%, transparent);
  background: color-mix(in srgb, var(--chip-color, var(--fort-orange-bright)) 18%, transparent);
}

.zone-popup {
  position: absolute;
  z-index: 27;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 88px);
  width: min(760px, calc(100vw - 28px));
  max-height: min(46vh, 360px);
  transform: translateX(-50%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(18, 23, 31, 0.92), rgba(5, 6, 7, 0.88));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.zone-popup-head {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.zone-popup-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.zone-popup-head p {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.58);
}

.zone-popup-head .zone-count {
  margin-left: auto;
}

.zone-popup-grid {
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  overflow: auto;
}

.panel-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(72px + var(--safe-bottom));
  z-index: 28;
  max-height: min(68vh, 620px);
  border-radius: 28px 28px 0 0;
  background: rgba(8, 11, 15, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.46);
  overflow: hidden;
}

.panel-sheet.nav-workspace {
  inset: 0;
  bottom: 0;
  z-index: 28;
  max-height: none;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  background:
    linear-gradient(180deg, rgba(2, 6, 13, 0.88), rgba(5, 6, 7, 0.98)),
    repeating-linear-gradient(122deg, transparent 0 58px, rgba(255, 255, 255, 0.018) 59px 60px);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(72px + var(--safe-bottom));
}

.panel-sheet.nav-workspace::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 38%, rgba(25, 199, 212, 0.08), transparent 36%),
    radial-gradient(circle at 48% 100%, rgba(255, 138, 0, 0.08), transparent 44%);
}

.panel-sheet.nav-workspace.route-workspace {
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(13, 17, 23, 0.96), rgba(3, 5, 8, 0.98)),
    repeating-linear-gradient(122deg, transparent 0 58px, rgba(255, 255, 255, 0.018) 59px 60px);
  backdrop-filter: blur(6px);
}

.route-head {
  position: relative;
  z-index: 1;
  min-height: 86px;
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.route-head-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--fort-orange-bright);
  background: rgba(255, 138, 0, 0.11);
}

.route-head h2 {
  margin: 0;
  font-size: clamp(23px, 2vw, 34px);
  font-weight: 950;
  letter-spacing: -0.03em;
}

.route-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.route-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 18px 0 calc(112px + var(--safe-bottom));
  overflow: auto;
}

.route-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.route-stat {
  min-height: 82px;
  border-radius: 20px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--stat-color, var(--fort-orange-bright));
  display: grid;
  align-content: center;
  gap: 6px;
}

.route-stat small {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.route-stat strong {
  color: white;
  font-size: clamp(20px, 1.6vw, 28px);
  font-weight: 950;
  line-height: 1;
}

.route-card {
  margin-bottom: 14px;
  border-radius: 24px;
  background: rgba(12, 16, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}

.route-card-head {
  min-height: 66px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.route-card-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 950;
}

.route-card-head p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.route-form {
  padding-bottom: 18px;
}

.route-form-grid {
  padding: 16px 18px 4px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.route-form label,
.route-wide-label {
  display: grid;
  gap: 7px;
}

.route-form label span,
.route-wide-label span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 850;
}

.route-form .fort-field {
  margin: 0;
}

.route-wide-label {
  margin: 12px 18px 0;
}

.route-action-button {
  width: calc(100% - 36px);
  margin: 16px 18px 0;
  height: 56px;
  border-radius: 18px;
}

.route-table {
  padding: 12px;
}

.route-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.052);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

.route-row strong,
.credential-card strong,
.zone-page-card strong {
  display: block;
  color: white;
  font-size: 14px;
  font-weight: 950;
}

.route-row small,
.credential-card span,
.zone-page-card small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.route-row i {
  min-width: 72px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 194, 71, 0.12);
  color: #ffd084;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.route-row i.online {
  background: rgba(70, 211, 123, 0.12);
  color: #46d37b;
}

.credential-grid,
.zone-page-grid,
.config-grid,
.map-mode-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.credential-card,
.zone-page-card,
.config-row,
.map-mode-card {
  min-height: 96px;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
}

.credential-card code {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  margin: 12px 0;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 138, 0, 0.12);
  color: var(--fort-orange-bright);
  font-size: 18px;
  font-weight: 950;
}

.qr-output-card {
  min-height: 260px;
}

.qr-output-empty {
  min-height: 190px;
}

.generated-credential {
  padding: 18px;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.generated-credential strong,
.generated-credential span,
.generated-credential code {
  display: block;
}

.generated-credential strong {
  color: white;
  font-size: 20px;
  font-weight: 950;
}

.generated-credential span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 780;
}

.generated-credential code {
  width: fit-content;
  margin: 14px 0;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 138, 0, 0.14);
  color: var(--fort-orange-bright);
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.web-qr-card {
  width: 164px;
  height: 164px;
  border-radius: 18px;
  padding: 16px;
  background: white;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 8px rgba(255, 138, 0, 0.12), 0 16px 34px rgba(0, 0, 0, 0.28);
}

.web-qr-card > span {
  width: 122px;
  height: 122px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.web-qr-card i {
  border-radius: 2px;
  background: #f2f2f2;
}

.web-qr-card i.on {
  background: #111;
}

.member-route-row {
  grid-template-columns: 34px 46px minmax(0, 1fr) auto;
}

.member-serial {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 850;
}

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

.member-icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.member-icon-button svg {
  width: 19px;
  height: 19px;
}

.member-toggle {
  width: 46px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 3px;
  background: rgba(255, 82, 82, 0.32);
}

.member-toggle span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: white;
  transition: transform 0.16s ease;
}

.member-toggle.on {
  background: #24c76b;
}

.member-toggle.on span {
  transform: translateX(20px);
}

.force-logout-button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 82, 82, 0.18);
  color: #ff8a8a;
  font-size: 10px;
  font-weight: 950;
}

.alert-route-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.alert-instruction-body {
  padding: 18px;
  display: flex;
  gap: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 750;
}

.alert-instruction-body > span {
  color: var(--fort-orange-bright);
}

.zone-page-card {
  border-left: 5px solid var(--zone-color, var(--fort-orange-bright));
}

.zone-page-card > span {
  width: 18px;
  height: 18px;
  display: block;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--zone-color, var(--fort-orange-bright));
  box-shadow: 0 0 20px color-mix(in srgb, var(--zone-color, var(--fort-orange-bright)) 34%, transparent);
}

.config-row strong {
  display: block;
  margin-bottom: 8px;
  color: var(--fort-orange-bright);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.config-row span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.profile-route-card {
  padding: 18px;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.profile-logo-ring {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  padding: 4px;
  border: 2px solid var(--fort-cyan);
  background: rgba(5, 6, 7, 0.72);
  display: grid;
  place-items: center;
}

.profile-logo-ring img {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 2px solid var(--fort-orange-bright);
  object-fit: contain;
}

.profile-route-card h3 {
  margin: 0;
  font-size: 26px;
  font-weight: 950;
}

.profile-route-card p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 800;
}

.profile-route-card .data-row {
  grid-column: 1 / -1;
}

.map-mode-card {
  min-height: 132px;
  display: grid;
  justify-items: start;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.045);
  text-align: left;
}

.map-mode-card.selected {
  border-color: rgba(255, 138, 0, 0.46);
  background: rgba(255, 138, 0, 0.12);
  color: var(--fort-orange-bright);
}

.map-mode-card span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.panel-head p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.panel-body {
  position: relative;
  z-index: 1;
  overflow: auto;
  max-height: calc(min(68vh, 620px) - 74px);
  padding: 12px 14px 18px;
}

.nav-workspace .panel-head {
  padding: calc(env(safe-area-inset-top, 0px) + 18px) 22px 16px;
}

.nav-workspace .panel-body {
  flex: 1;
  max-height: none;
  padding: 16px 18px calc(18px + var(--safe-bottom));
}

.messages-workspace .search-field {
  height: 58px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.panel-sheet.nav-workspace.whatsapp-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  padding: 0 0 calc(72px + var(--safe-bottom));
  background: rgba(5, 6, 7, 0.84);
  backdrop-filter: blur(5px);
}

.panel-sheet.nav-workspace.whatsapp-workspace::before {
  background:
    linear-gradient(180deg, rgba(4, 8, 12, 0.72), rgba(4, 7, 9, 0.92)),
    radial-gradient(circle at 72% 12%, rgba(25, 199, 212, 0.12), transparent 34%),
    radial-gradient(circle at 34% 82%, rgba(255, 138, 0, 0.1), transparent 38%);
}

.chat-list-pane,
.chat-conversation-pane {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden;
}

.chat-list-pane {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(28, 31, 33, 0.88);
  display: flex;
  flex-direction: column;
}

.whatsapp-chat-head,
.conversation-head {
  min-height: 70px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(32, 34, 36, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.whatsapp-chat-head h2,
.conversation-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 900;
}

.whatsapp-chat-head p,
.conversation-head p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  font-weight: 700;
}

.compose-button,
.conversation-icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  display: grid;
  place-items: center;
}

.whatsapp-search {
  width: calc(100% - 28px);
  min-height: 44px;
  height: 44px !important;
  margin: 14px 14px 10px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.045);
}

.message-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.message-filter-row::-webkit-scrollbar {
  display: none;
}

.message-filter-chip {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 900;
}

.message-filter-chip.selected {
  background: rgba(0, 168, 132, 0.26);
  border-color: rgba(0, 168, 132, 0.45);
  color: #7ff0bd;
}

.chat-thread-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 8px 16px;
}

.whatsapp-thread-row {
  position: relative;
  width: 100%;
  min-height: 72px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: white;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.whatsapp-thread-row:hover,
.whatsapp-thread-row.selected {
  background: rgba(255, 255, 255, 0.07);
}

.whatsapp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.22);
}

.whatsapp-thread-copy {
  min-width: 0;
  display: block;
}

.whatsapp-thread-copy strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
}

.whatsapp-thread-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  font-weight: 700;
}

.whatsapp-thread-meta {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
}

.whatsapp-thread-meta time {
  color: #21d36b;
  font-size: 11px;
  font-weight: 800;
}

.whatsapp-thread-meta i {
  min-width: 21px;
  height: 21px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #25d366;
  color: #061007;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.chat-list-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.52);
  font-weight: 800;
}

.chat-conversation-pane {
  display: flex;
  flex-direction: column;
  background: #080b0b;
}

.chat-conversation-pane::before {
  content: "";
  position: absolute;
  inset: 70px 0 0;
  opacity: 0.28;
  pointer-events: none;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.12) 1px, transparent 1.5px),
    radial-gradient(circle at 50px 42px, rgba(255, 255, 255, 0.1) 1px, transparent 1.5px),
    linear-gradient(135deg, transparent 0 46px, rgba(255, 255, 255, 0.07) 47px 48px, transparent 49px 94px);
  background-size: 72px 72px, 72px 72px, 96px 96px;
}

.conversation-head {
  padding-left: 18px;
}

.conversation-body {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-day-chip {
  align-self: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
}

.message-bubble {
  max-width: min(62%, 620px);
  border-radius: 12px;
  padding: 9px 11px 7px;
  display: grid;
  gap: 3px;
  color: white;
  font-size: 14px;
  line-height: 1.38;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.message-bubble.incoming {
  align-self: flex-start;
  background: #202c33;
}

.message-bubble.outgoing {
  align-self: flex-end;
  background: #005c4b;
}

.message-bubble strong {
  color: #ff6fa9;
  font-size: 12px;
  font-weight: 900;
}

.message-bubble time {
  justify-self: end;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
  font-weight: 800;
}

.chat-empty-state {
  margin: auto;
  display: grid;
  place-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

.chat-empty-state.inline {
  margin: auto;
  padding: 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
}

.chat-empty-state strong {
  color: rgba(255, 255, 255, 0.78);
}

.chat-empty-state p {
  margin: 0;
  max-width: 320px;
  line-height: 1.45;
}

.conversation-input {
  position: relative;
  z-index: 1;
  min-height: 62px;
  display: grid;
  grid-template-columns: 42px 1fr 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(32, 34, 36, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.conversation-input button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  display: grid;
  place-items: center;
}

.conversation-input .send-message-button {
  width: 46px;
  height: 46px;
  background: #25d366;
  color: #041107;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.24);
}

.conversation-input .send-message-button svg {
  width: 22px;
  height: 22px;
}

.conversation-input-box {
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border: 0;
  outline: none;
  width: 100%;
}

.conversation-input-box::placeholder {
  color: rgba(255, 255, 255, 0.46);
}

.new-chat-fab {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 78px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #041107;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
}

.new-chat-overlay {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.46);
}

.new-chat-panel {
  width: min(520px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 160px));
  border-radius: 24px;
  background: rgba(28, 31, 33, 0.96);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
  display: flex;
  flex-direction: column;
}

.new-chat-panel header {
  min-height: 70px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(32, 34, 36, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.new-chat-panel h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
}

.new-chat-panel p {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.new-chat-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 10px;
  flex-wrap: wrap;
}

.new-chat-actions .mini-button,
.new-chat-actions .ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chat-picker-choices {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.chat-picker-choice {
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  color: white;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-align: left;
}

.chat-picker-choice:hover {
  background: rgba(255, 138, 0, 0.11);
  border-color: rgba(255, 138, 0, 0.3);
}

.chat-picker-choice svg {
  width: 24px;
  height: 24px;
  color: var(--fort-orange-bright);
  justify-self: center;
}

.chat-picker-choice strong,
.chat-picker-choice small {
  display: block;
}

.chat-picker-choice small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.new-chat-list {
  min-height: 0;
  overflow: auto;
  padding: 4px 8px 14px;
}

.new-chat-contact {
  width: 100%;
  min-height: 64px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: white;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.new-chat-contact:hover {
  background: rgba(255, 255, 255, 0.07);
}

.new-chat-contact strong,
.new-chat-contact small {
  display: block;
}

.new-chat-contact small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  font-weight: 750;
}

.new-chat-contact i,
.member-actions i {
  min-width: 64px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 82, 82, 0.12);
  color: #ff8a8a;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.new-chat-contact i.online,
.member-actions i.online {
  background: rgba(70, 211, 123, 0.12);
  color: #46d37b;
}

.group-builder {
  margin: 0 14px 12px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.09);
  display: grid;
  gap: 10px;
}

.group-builder label {
  display: grid;
  gap: 6px;
}

.group-builder label span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.group-member-picker {
  max-height: 160px;
  overflow: auto;
  display: grid;
  gap: 7px;
}

.group-member-picker label {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}

.fcr-dashboard {
  backdrop-filter: blur(5px);
}

.fcr-panel-head .fcr-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #ff5252;
  background: rgba(255, 82, 82, 0.11);
}

.fcr-panel-head .fcr-panel-icon svg {
  width: 30px;
  height: 30px;
}

.fcr-panel-icon .wave,
.fcr-status-orb .wave {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.fcr-panel-icon circle,
.fcr-status-orb circle {
  fill: currentColor;
}

.fcr-status-card,
.fcr-code-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.fcr-status-orb {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 82, 82, 0.12);
  color: #ff5252;
}

.fcr-status-orb svg {
  width: 34px;
  height: 34px;
}

.fcr-status-card strong,
.fcr-code-card strong {
  display: block;
  font-size: 16px;
  font-weight: 900;
}

.fcr-status-card small,
.fcr-code-card span span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 700;
}

.fcr-status-card i {
  margin-left: auto;
  min-width: 74px;
  height: 30px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.fcr-status-card i.waiting {
  color: #ffd084;
  background: rgba(255, 194, 71, 0.12);
}

.fcr-status-card i.ready {
  color: #46d37b;
  background: rgba(70, 211, 123, 0.12);
}

.fcr-qr-dot {
  background: #0a9dff !important;
  color: #03111f !important;
}

.fcr-field-wrap {
  margin-top: 6px;
}

.fcr-connect-button {
  height: 58px;
  border-radius: 18px;
  font-size: 16px;
}

.fcr-helper-copy {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  line-height: 1.45;
}

.fcr-node-row {
  background: rgba(255, 255, 255, 0.055);
}

.fcr-node-dot {
  background: #25282e !important;
  color: #ff8a00 !important;
}

.thread-row,
.member-row,
.data-row,
.fcr-node-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
}

.thread-row strong,
.member-row strong,
.data-row strong,
.fcr-node-row strong {
  display: block;
  font-size: 14px;
}

.thread-row span,
.member-row span,
.data-row span,
.fcr-node-row span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
}

.avatar-dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  flex: 0 0 auto;
}

.drawer-scrim {
  position: absolute;
  z-index: 70;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.drawer {
  position: absolute;
  z-index: 72;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(330px, 88vw);
  background: var(--fort-drawer);
  color: white;
  border-radius: 0 28px 28px 0;
  overflow: hidden;
  box-shadow: 20px 0 60px rgba(0, 0, 0, 0.48);
}

.drawer-head {
  height: 196px;
  padding: 92px 22px 0 30px;
  background: linear-gradient(180deg, #24272d, #050607);
  display: flex;
  align-items: flex-start;
  gap: 18px;
  position: relative;
}

.drawer-logo {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: rgba(5, 6, 7, 0.68);
  border: 2px solid var(--fort-cyan);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.drawer-logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 999px;
}

.drawer-welcome {
  margin-top: 3px;
}

.drawer-welcome .hello {
  font-size: 16px;
  font-weight: 700;
}

.drawer-welcome .name {
  margin-top: 1px;
  color: var(--fort-orange-bright);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.05;
}

.drawer-welcome .zone {
  margin-top: 4px;
  color: var(--fort-cyan);
  font-size: 13px;
  font-weight: 800;
}

.close-button {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: white;
  display: grid;
  place-items: center;
}

.drawer-head .close-button {
  position: absolute;
  right: 12px;
  top: 12px;
}

.drawer-list {
  height: calc(100% - 200px);
  overflow-y: auto;
  padding: 10px 0 126px;
}

.drawer-item {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 30px;
  background: transparent;
  border: 0;
  color: white;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
}

.drawer-item .drawer-icon {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.drawer-item .drawer-icon svg {
  width: 26px;
  height: 26px;
}

.drawer-item .drawer-icon::after {
  content: "";
  position: absolute;
  left: 25px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fort-orange-bright);
  box-shadow: 0 0 0 2px #050607;
}

.drawer-item.logout {
  color: var(--fort-orange-bright);
}

.drawer-item.logout .drawer-icon::after {
  display: none;
}

.drawer-foot {
  padding: 24px 30px;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

.modal-backdrop {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.65);
}

.dialog,
.profile-card {
  width: min(100%, 430px);
  border-radius: 28px;
  background: #111827;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.58);
  padding: 24px;
}

.dialog h2,
.profile-card h2 {
  margin: 0 0 12px;
  font-size: 25px;
  line-height: 1.1;
  font-weight: 900;
}

.dialog p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
}

.dialog-actions {
  margin-top: 24px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.member-detail-dialog {
  width: min(100%, 620px);
}

.member-detail-grid {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 18px 0 8px;
}

.member-qr-card {
  width: 190px;
  height: 190px;
  padding: 12px;
  background: #fff;
}

.member-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.member-detail-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.detail-code-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.detail-code-row span {
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-code-row code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.detail-code-row .member-icon-button {
  width: 34px;
  height: 34px;
}

.map-add-dialog {
  width: min(100%, 520px);
}

.map-add-dialog.route-form {
  display: grid;
  gap: 12px;
}

.map-add-dialog.route-form label {
  display: grid;
  gap: 7px;
}

.map-add-dialog.route-form label span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.coordinate-copy {
  display: inline-flex;
  width: fit-content;
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  font-weight: 850;
}

.map-add-choice-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.map-add-choice {
  min-height: 132px;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  justify-items: start;
  gap: 8px;
  text-align: left;
  background: rgba(255, 138, 0, 0.12);
  border: 1px solid rgba(255, 138, 0, 0.34);
  color: white;
}

.map-add-choice.alert {
  background: rgba(255, 82, 82, 0.12);
  border-color: rgba(255, 82, 82, 0.34);
}

.map-add-choice > span {
  color: var(--fort-orange-bright);
}

.map-add-choice.alert > span {
  color: #ff5252;
}

.map-add-choice strong {
  font-size: 16px;
  font-weight: 950;
}

.map-add-choice small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 750;
}

.alert-detail-dialog.red {
  border-color: rgba(255, 82, 82, 0.28);
}

.alert-detail-dialog.yellow {
  border-color: rgba(255, 194, 71, 0.28);
}

.ghost-button,
.mini-button,
.danger-button {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 16px;
  font-weight: 800;
}

.ghost-button {
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
}

.mini-button {
  background: var(--fort-orange-bright);
  color: white;
}

.danger-button {
  background: #d82020;
  color: white;
}

.loader {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.32);
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.45;
}

.search-field {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 0 14px;
  outline: none;
  margin-bottom: 12px;
}

.history-bar {
  min-height: calc(76px + var(--safe-bottom));
  border-color: rgba(255, 138, 0, 0.34);
  padding: 8px 10px calc(6px + var(--safe-bottom)) 12px;
}

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

.history-title {
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.history-value {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 6px 8px;
  font-size: 11px;
}

.history-range {
  width: 100%;
  accent-color: var(--fort-orange-bright);
}

.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: calc(18px + var(--safe-bottom));
  transform: translate(-50%, 120%);
  min-width: 220px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(5, 6, 7, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 13px;
  text-align: center;
  transition: transform 0.2s ease;
}

.toast.show {
  transform: translate(-50%, 0);
}

svg {
  width: 24px;
  height: 24px;
  display: block;
}

@media (max-width: 720px) {
  .map-quick-controls {
    bottom: calc(78px + var(--safe-bottom));
  }

  .route-head,
  .route-body {
    width: calc(100vw - 24px);
  }

  .route-head {
    min-height: 76px;
  }

  .route-stats,
  .route-form-grid {
    grid-template-columns: 1fr;
  }

  .route-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .member-route-row {
    grid-template-columns: 28px 42px minmax(0, 1fr);
  }

  .member-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .route-row i {
    grid-column: 2;
    justify-self: start;
  }

  .member-route-row .member-actions i {
    grid-column: auto;
  }

  .credential-grid,
  .zone-page-grid,
  .config-grid,
  .map-mode-grid {
    grid-template-columns: 1fr;
  }

  .generated-credential {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .member-detail-grid {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .member-detail-fields {
    width: 100%;
  }

  .detail-code-row {
    grid-template-columns: 74px minmax(0, 1fr) 36px;
  }

  .map-add-choice-grid {
    grid-template-columns: 1fr;
  }

  .profile-route-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .panel-sheet.nav-workspace.whatsapp-workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(260px, 44%) minmax(0, 1fr);
  }

  .chat-list-pane {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .whatsapp-chat-head,
  .conversation-head {
    min-height: 62px;
    padding-left: 14px;
    padding-right: 10px;
  }

  .whatsapp-avatar {
    width: 42px;
    height: 42px;
  }

  .whatsapp-thread-row {
    min-height: 64px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .message-bubble {
    max-width: 84%;
  }

  .zone-popup {
    top: calc(env(safe-area-inset-top, 0px) + 78px);
    max-height: min(50vh, 390px);
  }

  .zone-popup-head {
    align-items: flex-start;
  }

  .zone-popup-head .zone-count {
    display: none;
  }
}

@media (min-width: 760px) {
  .panel-sheet.drawer-workspace {
    left: 50%;
    right: auto;
    width: min(560px, calc(100vw - 32px));
    transform: translateX(-50%);
    border-radius: 28px;
    bottom: calc(88px + var(--safe-bottom));
  }

  .nav-workspace .panel-head,
  .nav-workspace .panel-body {
    width: min(760px, calc(100vw - 48px));
    margin-left: auto;
    margin-right: auto;
  }

  .fcr-workspace .panel-head,
  .fcr-workspace .panel-body {
    width: min(720px, calc(100vw - 48px));
  }

  .bottom-bar,
  .zone-slider,
  .history-bar {
    left: 50%;
    right: auto;
    width: min(640px, calc(100vw - 28px));
    transform: translateX(-50%);
    border-radius: 22px 22px 0 0;
  }
}

@media (min-width: 1000px) {
  .choice-screen {
    display: grid;
    grid-template-columns: minmax(380px, 1fr) minmax(420px, 0.88fr);
    align-items: center;
    justify-items: center;
    gap: clamp(42px, 6vw, 110px);
    padding: clamp(42px, 5vw, 88px);
  }

  .choice-screen .choice-shield-wrap {
    position: relative;
    top: auto;
    left: auto;
    width: clamp(380px, 32vw, 560px);
    height: clamp(380px, 32vw, 560px);
    transform: none;
  }

  .choice-screen .choice-bottom {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(540px, 100%);
    padding: 0;
    transform: none;
    align-items: stretch;
  }

  .choice-screen .wordmark {
    margin-bottom: 8px;
  }

  .choice-screen .wordmark .letter {
    font-size: clamp(54px, 4.2vw, 76px);
  }

  .choice-screen .wordmark-pin {
    width: clamp(58px, 4.4vw, 78px);
    height: clamp(58px, 4.4vw, 78px);
  }

  .choice-screen .wordmark-pin svg {
    width: clamp(44px, 3.4vw, 60px);
    height: clamp(44px, 3.4vw, 60px);
  }

  .choice-screen .mode-title {
    margin-bottom: 34px;
    font-size: clamp(26px, 2.1vw, 36px);
    text-align: center;
  }

  .choice-screen .primary-button,
  .choice-screen .secondary-button {
    height: clamp(68px, 5.5vh, 82px);
    border-radius: 999px;
    font-size: clamp(24px, 1.9vw, 32px);
  }

  .auth-screen .safe-column.form-stack {
    width: min(1360px, calc(100vw - 64px));
    height: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(400px, 560px);
    align-content: center;
    align-items: center;
    column-gap: clamp(32px, 6vw, 128px);
    padding: clamp(30px, 4vw, 76px);
    overflow: hidden;
  }

  .auth-screen .back-row {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 38px);
    left: clamp(34px, 4vw, 70px);
    width: auto;
    z-index: 5;
  }

  .auth-screen .back-button {
    width: 58px;
    height: 58px;
  }

  .auth-screen .form-logo {
    grid-column: 1;
    grid-row: 1 / span 8;
    width: 100%;
    height: auto;
    margin: 0;
  }

  .auth-screen .form-logo img {
    width: clamp(360px, 31vw, 560px);
    height: clamp(360px, 31vw, 560px);
  }

  .auth-screen .screen-heading,
  .auth-screen .field-wrap,
  .auth-screen .error-text,
  .auth-screen .primary-button,
  .auth-screen .secondary-button,
  .auth-screen .text-link,
  .auth-screen .divider-row,
  .auth-screen .qr-note {
    grid-column: 2;
  }

  .auth-screen .screen-heading {
    align-self: end;
    margin: 0 0 26px;
    font-size: clamp(30px, 2.3vw, 42px);
    text-align: left;
  }

  .auth-screen .fort-field {
    height: 66px;
    border-radius: 20px;
    font-size: 16px;
  }

  .auth-screen .field-wrap label {
    top: 9px;
    font-size: 13px;
  }

  .auth-screen .primary-button,
  .auth-screen .secondary-button {
    height: 66px;
    border-radius: 22px;
  }

  .auth-screen .login-action-button,
  .auth-screen .login-submit-button {
    height: 66px;
    border-radius: 22px;
    font-size: clamp(18px, 1.25vw, 21px);
  }

  .admin-auth-screen .text-link {
    justify-self: center;
  }

  .user-auth-screen .qr-card {
    grid-column: 1;
    grid-row: 1 / span 9;
    width: clamp(340px, 34vw, 620px);
    height: clamp(230px, 27vw, 430px);
    margin: 0;
    align-self: center;
    justify-self: center;
  }

  .user-auth-screen .qr-patch {
    width: clamp(190px, 16vw, 280px);
    height: clamp(190px, 16vw, 280px);
  }

  .user-auth-screen .qr-patch img {
    width: 52%;
    height: 52%;
  }

  .user-auth-screen .qr-note {
    margin: 0 0 16px;
    text-align: center;
    font-size: clamp(17px, 1.25vw, 22px);
  }

  .user-auth-screen .divider-row {
    margin: 22px 0 20px;
  }

  .user-auth-screen .form-stack > .stack-gap,
  .user-auth-screen .form-stack > div[style] {
    grid-column: 2;
  }

  .drawer {
    width: clamp(330px, 26vw, 440px);
  }

  .drawer-head {
    height: 220px;
    padding-top: 106px;
  }
}

@media (min-width: 1000px) and (max-height: 760px) {
  .choice-screen {
    gap: 40px;
    padding: 32px 56px;
  }

  .choice-screen .choice-shield-wrap {
    width: min(400px, 45vh);
    height: min(400px, 45vh);
  }

  .choice-screen .choice-bottom {
    width: min(500px, 100%);
  }

  .choice-screen .primary-button,
  .choice-screen .secondary-button {
    height: 62px;
    font-size: 24px;
  }

  .choice-screen .mode-title {
    margin-bottom: 22px;
  }

  .auth-screen .safe-column.form-stack {
    width: min(1240px, calc(100vw - 56px));
    column-gap: 42px;
    padding: 28px 44px;
  }

  .auth-screen .form-logo img {
    width: min(380px, 48vh);
    height: min(380px, 48vh);
  }

  .user-auth-screen .qr-card {
    width: min(500px, 46vw);
    height: min(300px, 40vh);
  }
}

@media (min-width: 760px) and (max-width: 999px) {
  .screen:not(.home-screen) .safe-column,
  .choice-bottom {
    width: min(560px, calc(100vw - 56px));
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .choice-shield-wrap {
    width: min(380px, 58vw, 42vh);
    height: min(380px, 58vw, 42vh);
  }

  .choice-bottom .primary-button,
  .choice-bottom .secondary-button {
    width: 100%;
  }

  .form-stack {
    width: min(560px, calc(100vw - 56px));
  }
}

@media (max-width: 480px) {
  .choice-shield-wrap {
    width: min(330px, 76vw, 34vh);
    height: min(330px, 76vw, 34vh);
  }

  .choice-bottom {
    padding: 0 28px;
  }

  .wordmark .letter {
    font-size: 42px;
  }

  .primary-button,
  .secondary-button {
    height: 62px;
    font-size: 22px;
  }

  .login-action-button {
    height: 58px;
    border-radius: 18px;
    font-size: 16px;
  }

  .login-submit-button {
    height: 56px;
    border-radius: 18px;
    font-size: 16px;
  }
}
