/* 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;
}

.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-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;
  width: 18rem;
  max-width: calc(100vw - 1rem);
  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;
}
.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;
}
.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;
}
.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;
}
.g2a-header-panel-action:hover {
  background: rgba(187, 3, 0, 0.08);
}
.g2a-header-panel-profile {
  display: flex;
  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;
  top: calc(100% + 4px);
  min-width: 11rem;
  background: #eeeeee;
  border: 1px solid #eabcb4;
  border-radius: 0.375rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 100;
  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;
}

/* 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: 50;
}
.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;
}

.g2a-app-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 45;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.g2a-app-sidebar-backdrop.visible {
  display: block;
  opacity: 1;
}

.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;
}

@media (max-width: 1024px) {
  .g2a-app-sidebar {
    position: fixed;
    inset: 0 auto auto 0;
    z-index: 50;
    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;
  }
  .g2a-app-sidebar.open {
    transform: translateX(0);
  }
  .g2a-mobile-nav-toggle {
    display: inline-flex;
  }
  .g2a-quick-actions {
    flex: 1 1 auto;
  }
  .g2a-breadcrumb {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .g2a-header-panel {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    right: 0.5rem;
    left: auto;
  }
  .g2a-quick-actions-menu {
    right: 0;
    left: auto;
    min-width: 14rem;
  }
}

@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;
  }
}
