/* G2A Gateway – shared prototype UI */
/* Material Symbols: check_circle, error, warning, delete, arrow_forward, folder, campaign, progress_activity */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.g2a-icon-sm {
  font-size: 1rem;
  vertical-align: middle;
}
.g2a-icon-inline {
  font-size: 1.125rem;
  vertical-align: -0.2em;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.subtab-content,
.subtab-content2,
.subtab-content3,
.subtab-content4,
.subtab-content5 { display: none; }
.subtab-content.active,
.subtab-content2.active,
.subtab-content3.active,
.subtab-content4.active,
.subtab-content5.active { display: block; }

.tab-btn {
  border-bottom: 2px solid transparent;
  color: #5f3e39;
  transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active {
  color: #bb0300 !important;
  border-bottom-color: #bb0300 !important;
  font-weight: 700;
}

.subtab-btn.active {
  background-color: #bb0300 !important;
  color: #ffffff !important;
}

.tab-btn-sidebar.active {
  background-color: #dddddd;
  color: #606161;
}
.tab-btn-sidebar:not(.active) {
  color: #5f3e39;
}

/* Role badges */
.role-badge-super, .role-super { background: #6b21a5; color: #fff; }
.role-badge-tenant, .role-tenant { background: #bb0300; color: #fff; }
.role-badge-ops, .role-ops { background: #1e88e5; color: #fff; }
.role-badge-dispatch, .role-dispatch { background: #ff9800; color: #1b1b1b; }
.role-badge-regulator, .role-regulator { background: #43a047; color: #fff; }
.role-badge-readonly, .role-readonly { background: #757575; color: #fff; }
.role-badge-auditor, .role-auditor { background: #00bcd4; color: #1b1b1b; }
.role-badge, .role-badge-super, .role-badge-tenant, .role-badge-ops,
.role-badge-dispatch, .role-badge-regulator, .role-badge-readonly, .role-badge-auditor {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Login / MFA dark scrollbars and number spinners */
.g2a-login ::-webkit-scrollbar { width: 8px; height: 8px; }
.g2a-login ::-webkit-scrollbar-track { background: #0b1326; }
.g2a-login ::-webkit-scrollbar-thumb { background: #2d3449; border-radius: 4px; }
.g2a-login ::-webkit-scrollbar-thumb:hover { background: #404752; }
.g2a-login input[type=number]::-webkit-inner-spin-button,
.g2a-login input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
.g2a-login input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.grid-pattern {
  background-image: linear-gradient(to right, rgba(149, 110, 103, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(149, 110, 103, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
}

.hide-scrollbar::-webkit-scrollbar { display: none; }

.symbol-filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.widget { transition: all 0.2s ease; }
.widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.data-card { transition: all 0.2s ease; cursor: pointer; }
.data-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Route plotting light scrollbars */
.g2a-route ::-webkit-scrollbar { width: 6px; height: 6px; }
.g2a-route ::-webkit-scrollbar-track { background: transparent; }
.g2a-route ::-webkit-scrollbar-thumb { background: #dfe0e0; border-radius: 4px; }
.g2a-route ::-webkit-scrollbar-thumb:hover { background: #c6c6c7; }

.upload-dropzone {
  border: 2px dashed #eabcb4;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  background: #f3f3f3;
  transition: border-color 0.2s, background 0.2s;
}
.upload-dropzone:hover {
  border-color: #bb0300;
  background: #eeeeee;
}

.gis-map-preview {
  min-height: 200px;
  background: #dadada center/cover no-repeat;
  border: 1px solid #eabcb4;
  border-radius: 0.25rem;
}

.modal.g2a-modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); align-items: center; justify-content: center; z-index: 1000; }
.modal.g2a-modal.active, .modal.active { display: flex; }

.tenant-context-bar { display: flex; align-items: center; }

[data-role-visible] { display: none; }
body[data-demo-role="superAdmin"] [data-role-visible="superAdmin"],
body[data-demo-role="tenantAdmin"] [data-role-visible="tenantAdmin"],
body[data-demo-role="ops"] [data-role-visible="ops"],
body[data-demo-role="all"] [data-role-visible] { display: block; }
body[data-demo-role="superAdmin"] .inline[data-role-visible="superAdmin"],
body[data-demo-role="tenantAdmin"] .inline[data-role-visible="tenantAdmin"],
body[data-demo-role="ops"] .inline[data-role-visible="ops"],
body[data-demo-role="all"] .inline[data-role-visible] { display: inline; }
body[data-demo-role="superAdmin"] .flex[data-role-visible="superAdmin"],
body[data-demo-role="tenantAdmin"] .flex[data-role-visible="tenantAdmin"],
body[data-demo-role="all"] .flex[data-role-visible] { display: flex; }

#g2a-toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  z-index: 9999;
  max-width: 28rem;
  padding: 0.625rem 1.25rem;
  background: #1b1b1b;
  color: #f9f9f9;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  border-radius: 0.25rem;
  border: 1px solid #956e67;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#g2a-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* App shell: side nav + breadcrumbs (shell-app layout from 06) */
.g2a-app-sidebar { width: 240px; flex-shrink: 0; }
.g2a-app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.g2a-app-main > header,
.g2a-app-main > nav {
  min-height: 3rem;
  height: auto;
}

.g2a-brand-home { cursor: pointer; text-decoration: none; color: inherit; }
.g2a-brand-home:hover { opacity: 0.9; }

.g2a-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5f3e39;
}
.g2a-breadcrumb-sep { font-size: 14px !important; color: #956e67; }
.g2a-breadcrumb-link {
  color: #5f3e39;
  text-decoration: none;
  transition: color 0.15s;
}
.g2a-breadcrumb-link:hover { color: #bb0300; }
.g2a-breadcrumb-current { color: #1b1b1b; font-weight: 700; }

[data-g2a-app-nav].g2a-app-nav-active,
a[data-g2a-app-nav].g2a-app-nav-active {
  background-color: #dddddd !important;
  color: #606161 !important;
  font-weight: 700;
}

.g2a-continue-card {
  border: 1px solid rgba(187, 3, 0, 0.25);
  background: linear-gradient(135deg, rgba(187, 3, 0, 0.06) 0%, #f3f3f3 100%);
}
.g2a-start-tile {
  transition: transform 0.15s, box-shadow 0.15s;
}
.g2a-start-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.g2a-compact-banner {
  background: #f3f3f3;
  border-bottom: 1px solid #eabcb4;
}

/* In development placeholder */
.g2a-dev-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  border: 1px dashed #eabcb4;
  border-radius: 0.5rem;
  background: #f3f3f3;
}
.g2a-dev-placeholder .material-symbols-outlined {
  font-size: 32px;
  color: #956e67;
}

/* Map toolbar (collapsible, labeled) */
.g2a-map-toolbar {
  width: 148px;
  flex-shrink: 0;
  transition: width 0.2s ease;
}
.g2a-map-toolbar.collapsed {
  width: 48px;
}
.g2a-map-toolbar.collapsed .g2a-map-tool-label {
  display: none;
}
.g2a-map-toolbar.collapsed .g2a-map-toolbar-toggle .material-symbols-outlined {
  transform: rotate(180deg);
}
.g2a-map-tool-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.375rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #5f3e39;
  transition: background 0.15s, color 0.15s;
}
.g2a-map-tool-btn:hover {
  background: #f9f9f9;
  color: #1b1b1b;
}
.g2a-map-tool-btn.active-tool {
  background: #dddddd;
  color: #606161;
}

/* Map layer card */
.g2a-map-layers {
  z-index: 20;
  min-width: 11rem;
  max-width: 14rem;
  background: rgba(249, 249, 249, 0.95);
  border: 1px solid #eabcb4;
  border-radius: 0.375rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(6px);
}
.g2a-map-layers label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  cursor: pointer;
}
.g2a-map-layers label.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.g2a-layer-hidden {
  display: none !important;
}

/* Header panels (notifications, help, profile) */
.g2a-header-panel {
  display: none;
  position: fixed;
  z-index: 200;
  right: 0.5rem;
  left: auto;
  min-width: 0;
  width: min(18rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  box-sizing: border-box;
  background: #eeeeee;
  border: 1px solid #eabcb4;
  border-radius: 0.5rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-family: Inter, sans-serif;
  overflow: hidden;
}
.g2a-header-panel.open {
  display: block;
}
.g2a-header-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eabcb4;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.g2a-header-panel-close {
  color: #5f3e39;
  padding: 0.125rem;
  border-radius: 9999px;
}
.g2a-header-panel-close:hover {
  color: #bb0300;
  background: #e2e2e2;
}
.g2a-header-panel-body {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
}
.g2a-header-panel-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.625rem;
  border-radius: 0.25rem;
}
.g2a-header-panel-item:hover {
  background: #e8e8e8;
}
.g2a-header-panel-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 13px;
  color: #1b1b1b;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}
.g2a-header-panel-link:hover {
  background: #e8e8e8;
  color: #bb0300;
}
.g2a-header-panel-action {
  margin-top: 0.25rem;
  padding: 0.5rem;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #bb0300;
  border-radius: 0.25rem;
  white-space: normal;
  word-break: break-word;
}
.g2a-header-panel-action:hover {
  background: rgba(187, 3, 0, 0.08);
}
.g2a-header-panel-profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem 0.75rem;
  border-bottom: 1px solid #eabcb4;
  margin-bottom: 0.25rem;
}

/* Quick actions dropdown */
.g2a-quick-actions {
  position: relative;
}
.g2a-quick-actions-menu {
  display: none;
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 4px);
  min-width: 0;
  width: min(18rem, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1rem);
  background: #eeeeee;
  border: 1px solid #eabcb4;
  border-radius: 0.375rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 150;
  padding: 0.25rem;
}
.g2a-quick-actions-menu.open {
  display: block;
}
.g2a-quick-actions-menu a,
.g2a-quick-actions-menu button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 13px;
  text-align: left;
  border-radius: 0.25rem;
  color: #1b1b1b;
}
.g2a-quick-actions-menu a:hover,
.g2a-quick-actions-menu button:hover {
  background: #e8e8e8;
  color: #bb0300;
}
[data-g2a-header-search] {
  position: relative;
}
[data-g2a-search-panel] {
  display: none;
}
[data-g2a-header-search].search-open [data-g2a-search-panel] {
  display: block;
}
[data-g2a-header-search] .material-symbols-outlined {
  line-height: 0;
}

/* Standard footer */
.g2a-footer {
  flex-shrink: 0;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 12px;
  padding-right: 12px;
  background: #ffffff;
  border-top: 1px solid #eabcb4;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #5d5f5f;
  z-index: 20;
}
.g2a-footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.g2a-mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #eabcb4;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #1b1b1b;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.g2a-mobile-nav-toggle:hover {
  background: #f3f3f3;
}

.g2a-mobile-nav-toggle .material-symbols-outlined {
  font-size: 24px;
}

body.g2a-overlay-open {
  overflow: hidden;
}

#g2a-overlay-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#g2a-overlay-backdrop.visible {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.g2a-sidebar-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.g2a-sidebar-link span:first-child {
  min-width: 1.25rem;
  display: inline-flex;
  justify-content: center;
}

.g2a-breadcrumb {
  min-width: 0;
  word-break: break-word;
}

/* Horizontal tab bars on narrow viewports */
.g2a-tab-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.g2a-tab-scroll .tab-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* GIS workspace: controls | map | results */
.g2a-gis-workspace {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
@media (min-width: 1024px) {
  .g2a-gis-workspace {
    flex-direction: row;
  }
}
.g2a-gis-map {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 280px;
  min-width: 0;
}
@media (min-width: 1024px) {
  .g2a-gis-map {
    min-height: 0;
  }
}
.g2a-gis-panel {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.g2a-workspace-panel,
.g2a-gis-panel,
.g2a-gis-results {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
  min-width: 0;
}
.g2a-gis-controls,
.g2a-gis-results {
  flex-shrink: 0;
  width: 100%;
}
@media (min-width: 1024px) {
  .g2a-gis-controls,
  .g2a-gis-results {
    width: 20rem;
    max-width: 20rem;
    max-height: none !important;
  }
}
.g2a-gis-list {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
}
#ringContainer,
#proximityOverlay {
  align-items: center;
  justify-content: center;
}

/* Secondary workspace panels (GIS controls, route study) */
.g2a-workspace-panel-toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid #eabcb4;
  border-radius: 0.375rem;
  background: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f3e39;
  cursor: pointer;
}
.g2a-workspace-panel-toggle:hover {
  color: #bb0300;
  border-color: #bb0300;
}

.g2a-shell-top-nav-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 150;
  min-width: auto;
  width: min(17rem, 85vw, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  height: 100%;
  max-height: 100vh;
  background: #eeeeee;
  border-right: 1px solid #eabcb4;
  transform: translateX(-110%);
  transition: transform 0.25s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
  padding: 1rem 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  pointer-events: none;
}
.g2a-shell-top-nav-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}
.g2a-shell-top-nav-drawer a {
  display: block;
  padding: 0.625rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 14px;
  color: #5f3e39;
  text-decoration: none;
}
.g2a-shell-top-nav-drawer a:hover,
.g2a-shell-top-nav-drawer a.text-primary {
  background: #dddddd;
  color: #bb0300;
}

.g2a-map-preview-fab {
  display: none;
  position: fixed;
  bottom: 3.5rem;
  right: 1rem;
  z-index: 35;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  background: #bb0300;
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

body.g2a-header-compact [data-g2a-header-search] {
  display: none;
}

@media (max-width: 1024px) {
  header.flex,
  .g2a-app-main > header {
    position: relative;
    z-index: 140;
  }

  .g2a-app-sidebar {
    display: flex !important;
    position: fixed;
    inset: 0 auto auto 0;
    /* !important beats Tailwind z-20 on markup; 150 keeps the drawer above header chrome (140) */
    z-index: 150 !important;
    width: min(17rem, 80vw);
    max-width: 100%;
    height: 100%;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    background: #ffffff;
    padding-bottom: 3rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
  }
  .g2a-app-sidebar.open {
    transform: translateX(0);
    pointer-events: auto;
  }

    /* Keep the main map (`.g2a-gis-map`) in-flow on the Airspace Explorer page.
      Apply overlay behavior only to other workspace panels (not the map). */
    .g2a-workspace-panel:not(.g2a-gis-map),
    .g2a-map-preview-panel {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto !important;
    width: min(20rem, 92vw) !important;
    max-width: 92vw !important;
    z-index: 150 !important;
    transform: translateX(110%);
    transition: transform 0.25s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
  }
  .g2a-workspace-panel.g2a-workspace-panel-left {
    left: 0 !important;
    right: auto !important;
    transform: translateX(-110%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
  }
  .g2a-workspace-panel:not(.g2a-gis-map).open,
  .g2a-map-preview-panel.open {
    transform: translateX(0);
    pointer-events: auto;
  }
  .g2a-workspace-panel-toggle,
  .g2a-map-preview-fab {
    display: inline-flex;
  }

  .g2a-map-layers {
    top: 3.5rem !important;
    right: 0.5rem !important;
    left: auto !important;
    max-width: calc(100vw - 4rem);
  }

  [data-g2a-map-preview].g2a-map-preview-panel {
    width: min(24rem, 100vw) !important;
    max-width: 100vw !important;
  }

  .g2a-shell-stack {
    flex-direction: column !important;
  }
  /* Do not hide the main map panel on mobile for the Airspace Explorer page */
  .g2a-workspace-panel:not(.g2a-gis-map):not(.open),
  .g2a-map-preview-panel:not(.open) {
    display: none !important;
  }
  .g2a-workspace-panel.open,
  .g2a-map-preview-panel.open {
    display: flex !important;
    flex-direction: column !important;
  }
  .g2a-mobile-nav-toggle {
    display: inline-flex;
    position: relative;
    z-index: 141;
  }

  .g2a-shell-top-nav-drawer {
    z-index: 150 !important;
    pointer-events: none;
  }
  .g2a-shell-top-nav-drawer.open {
    pointer-events: auto;
  }

  /* Map page: full-width canvas, floating tool rail, preview off-canvas */
  body[data-page="map"] > .flex.flex-1.overflow-hidden.relative {
    flex-direction: column;
  }
  body[data-page="map"] .g2a-map-toolbar {
    position: fixed;
    left: 0.5rem;
    bottom: 5rem;
    z-index: 35;
    width: 48px;
    max-height: 60vh;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-right: none;
  }
  body[data-page="map"] .g2a-map-toolbar .g2a-map-tool-label {
    display: none;
  }
  body[data-page="map"] main.flex-1 {
    flex-direction: column;
    width: 100%;
    min-height: 0;
  }
  body[data-page="map"] main.flex-1 > .flex-1.relative {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }
  body[data-page="map"] [data-g2a-map-preview] {
    flex: none !important;
    width: auto !important;
  }
  .g2a-quick-actions {
    flex: 1 1 auto;
  }
  .g2a-breadcrumb {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .g2a-header-panel {
    width: min(18rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    right: 1rem;
    left: auto;
    min-width: 0;
  }
  .g2a-quick-actions-menu {
    right: 0.5rem;
    left: auto;
    width: min(16rem, calc(100vw - 2rem));
    min-width: 0;
  }
  [data-g2a-header-search] {
    width: 100%;
  }
  [data-g2a-header-search] .g2a-search-toggle {
    min-width: 0;
  }
}

@media (min-width: 1024px) {
  #g2a-overlay-backdrop {
    display: none !important;
    pointer-events: none !important;
  }
  body.g2a-overlay-open {
    overflow: visible;
  }
  .g2a-workspace-panel,
  .g2a-map-preview-panel {
    position: static !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: none;
  }
  .g2a-workspace-panel-toggle,
  .g2a-map-preview-fab,
  .g2a-mobile-nav-toggle {
    display: none !important;
  }
  [data-g2a-map-preview].g2a-map-preview-panel {
    width: min(24rem, 40vw) !important;
    max-width: 40vw !important;
  }
  .g2a-gis-workspace > .g2a-gis-controls,
  .g2a-gis-workspace > .g2a-workspace-panel.g2a-gis-controls,
  .g2a-gis-workspace > .g2a-gis-results,
  .g2a-gis-workspace > .g2a-workspace-panel.g2a-gis-results {
    flex: 0 0 20rem;
    width: 20rem;
    max-width: 20rem;
  }
  .g2a-gis-workspace > .g2a-gis-map,
  .g2a-gis-workspace > main.g2a-gis-map,
  .g2a-gis-workspace > .g2a-gis-list {
    flex: 1 1 auto;
    min-width: 0;
  }
  .g2a-gis-workspace > aside.g2a-gis-map,
  .g2a-gis-workspace > .g2a-workspace-panel.g2a-gis-map {
    flex: 1 1 40%;
    min-height: 0;
    position: relative !important;
    overflow: hidden;
    isolation: isolate;
  }
  .g2a-gis-map-canvas {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow: hidden;
    isolation: isolate;
  }
  body[data-page="airspaceExplorer"] .g2a-gis-workspace > .g2a-gis-controls,
  body[data-page="airspaceExplorer"] .g2a-gis-workspace > .g2a-gis-list {
    position: relative;
    z-index: 2;
  }
}

@media (max-width: 768px) {
  body.g2a-header-compact [data-g2a-header-search] {
    display: none;
  }
  .g2a-footer .g2a-footer-stat {
    display: none;
  }
}

@media (max-width: 640px) {
  .g2a-sidebar-link {
    font-size: 0.9rem;
    gap: 0.75rem;
  }
  .g2a-header-panel-body {
    gap: 0.5rem;
  }
  .g2a-map-tool-btn {
    padding: 0.5rem;
    font-size: 10px;
  }
  header.flex {
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 3rem;
    height: auto;

/* Responsive helpers */
.g2a-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.g2a-table-wrapper table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  table-layout: auto;
  border-collapse: collapse;
}
img, svg, .g2a-full-img {
  max-width: 100%;
  height: auto;
}
.break-word {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Ensure flex children can shrink on small viewports */
[class*="flex"] > * {
  min-width: 0;
}
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}
