/* -------------------------------------------------------------------------
   Unified administration shell
   This final layer replaces the inherited oversized header treatment across
   all workspaces. Operations Home adds its contextual map controls inside
   this same bar; every other workspace keeps a calm page title and actions.
   ------------------------------------------------------------------------- */

#dashboard-shell .topbar {
  width: calc(100% - 20px) !important;
  min-height: 52px !important;
  height: 52px !important;
  margin: 8px 10px 0 !important;
  padding: 5px 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 3px 12px rgba(15, 23, 42, .045) !important;
  overflow: hidden;
}

#dashboard-shell .topbar-left,
#dashboard-shell .topbar-right,
#dashboard-shell .topbar-actions {
  min-width: 0;
  gap: 5px !important;
  flex-wrap: nowrap !important;
}

#dashboard-shell .topbar-left {
  flex: 1 1 auto;
  overflow: hidden;
}

#dashboard-shell .topbar-title { gap: 0 !important; }
#dashboard-shell .page-title {
  font-size: 14px !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: -.02em;
}

/* The sidebar already provides orientation. Breadcrumbs consumed valuable
   vertical space without helping an operator make the next decision. */
#dashboard-shell .breadcrumbs { display: none !important; }

#dashboard-shell .mobile-toggle,
#dashboard-shell #admin-back-btn,
#dashboard-shell .topbar-actions .icon-btn {
  width: 29px !important;
  min-width: 29px !important;
  height: 29px !important;
  min-height: 29px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

#dashboard-shell .topbar .material-icons-outlined { font-size: 15px !important; }

/* Date range belongs to the operations summary, not generic detail, people,
   or configuration pages. It remains available on desktop Operations Home. */
body:not(.ec-operations-summary-active) #dashboard-shell .topbar-chip {
  display: none !important;
}

#dashboard-shell .profile-chip {
  max-width: 146px !important;
  min-width: 0;
  height: 30px !important;
  padding: 2px 7px 2px 3px !important;
  gap: 5px !important;
  border-radius: 9px !important;
  font-size: 10px !important;
  overflow: hidden;
}

#dashboard-shell #profile-avatar {
  width: 22px !important;
  height: 22px !important;
}

#dashboard-shell #profile-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* A single, even workspace rhythm removes the legacy double gaps between the
   shared header, a page hero, and its first working panel. */
#dashboard-shell .content-area {
  padding: 8px 10px 42px !important;
  scrollbar-gutter: stable;
}

#dashboard-shell .view-section {
  width: 100%;
  min-width: 0;
}

#overview-view.ec-overview-map-only.hidden {
  /* Older map rules forced this section visible even after navigation. That
     reserved an empty block above every other workspace. */
  display: none !important;
}

#dashboard-shell .view-section > :first-child { margin-top: 0 !important; }

#dashboard-shell .prd-page,
#dashboard-shell .prd-pro-shell,
#dashboard-shell .qa-page,
#dashboard-shell .fin-shell,
#dashboard-shell .mkt-page,
#dashboard-shell .mktmail-page,
#dashboard-shell .admin-pro-page,
#dashboard-shell .emp-admin-page,
#dashboard-shell .owner-records-page {
  gap: 10px !important;
}

#dashboard-shell .event-page-hero,
#dashboard-shell .event-list-hero,
#dashboard-shell .event-detail-hero,
#dashboard-shell .evl-header,
#dashboard-shell .admin-pro-hero,
#dashboard-shell .emp-admin-hero,
#dashboard-shell .fin-dashboard-hero,
#dashboard-shell .fin-toolbar-hero,
#dashboard-shell .mkt-topbar,
#dashboard-shell .prd-pro-toolbar {
  margin-top: 0 !important;
  margin-bottom: 10px !important;
}

#dashboard-shell .panel,
#dashboard-shell .prd-panel,
#dashboard-shell .qa-card,
#dashboard-shell .qa-kpi,
#dashboard-shell .fin-panel,
#dashboard-shell .fin-stat-card,
#dashboard-shell .mkt-card,
#dashboard-shell .mkt-kpi-card,
#dashboard-shell .admin-pro-panel,
#dashboard-shell .emp-panel,
#dashboard-shell .owner-card,
#dashboard-shell .cs-panel {
  border-radius: 10px !important;
}

/* Page-local list controls remain close to the records they affect. */
#dashboard-shell .ec-context-list-tools {
  margin: 8px 0 !important;
}

/* -------------------------------------------------------------------------
   Flat workspace introductions
   The shared header supplies page identity. Large repeated introduction cards
   were consuming space without helping an operator complete a task, so they
   now become quiet inline action rows. Their controls remain fully usable.
   ------------------------------------------------------------------------- */
#dashboard-shell .bd-hero,
#dashboard-shell .ec-ops-hero,
#dashboard-shell .gta-hero,
#dashboard-shell .tca-hero,
#dashboard-shell .tf-hero,
#dashboard-shell .owner-hero,
#dashboard-shell .admin-pro-hero,
#dashboard-shell .emp-admin-hero,
#dashboard-shell .fin-dashboard-hero,
#dashboard-shell .fin-toolbar-hero,
#dashboard-shell .mkt-topbar,
#dashboard-shell .ec-report-hero,
#dashboard-shell .ecr-hero,
#dashboard-shell .kenn-admin-hero,
#dashboard-shell .cc-operations-bar {
  min-height: 30px !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--text) !important;
}

/* Do not repeat the page title or a marketing paragraph below the shared
   top bar. Review/detail titles that identify a specific record remain. */
#dashboard-shell .bd-hero > :first-child,
#dashboard-shell .ec-ops-hero > :first-child,
#dashboard-shell .gta-hero > :first-child,
#dashboard-shell .tca-hero > :first-child,
#dashboard-shell .tf-hero > :first-child,
#dashboard-shell .owner-hero > :first-child,
#dashboard-shell .admin-pro-hero > :first-child,
#dashboard-shell .emp-admin-hero > :first-child,
#dashboard-shell .fin-dashboard-hero > :first-child,
#dashboard-shell .fin-toolbar-hero > :first-child,
#dashboard-shell .mkt-topbar > :first-child,
#dashboard-shell .ec-report-hero > :first-child,
#dashboard-shell .cc-operations-bar > .cc-title {
  display: none !important;
}

#dashboard-shell .kenn-admin-hero .kenn-admin-kicker,
#dashboard-shell .kenn-admin-hero p,
#dashboard-shell .ecr-hero .ecr-kicker,
#dashboard-shell .ecr-hero p,
#dashboard-shell .ec-report-hero p,
#dashboard-shell .cc-title small {
  display: none !important;
}

#dashboard-shell .bd-hero-actions,
#dashboard-shell .ec-ops-hero-actions,
#dashboard-shell .gta-hero-actions,
#dashboard-shell .tca-hero-actions,
#dashboard-shell .tf-hero-actions,
#dashboard-shell .owner-actions,
#dashboard-shell .fin-hero-actions,
#dashboard-shell .cc-hero-actions,
#dashboard-shell .kenn-admin-actions,
#dashboard-shell .ecr-hero-badges {
  display: inline-flex !important;
  width: auto !important;
  margin-left: auto !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

#dashboard-shell .bd-hero .btn,
#dashboard-shell .bd-hero .bd-action,
#dashboard-shell .ec-ops-hero .btn,
#dashboard-shell .gta-hero .btn,
#dashboard-shell .tca-hero .btn,
#dashboard-shell .tf-hero .btn,
#dashboard-shell .owner-hero .btn,
#dashboard-shell .fin-dashboard-hero .btn,
#dashboard-shell .fin-toolbar-hero .btn,
#dashboard-shell .cc-operations-bar .btn,
#dashboard-shell .kenn-admin-hero .btn,
#dashboard-shell .ecr-hero .btn {
  min-height: 29px !important;
  height: 29px !important;
  padding: 0 8px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  box-shadow: none !important;
}

#dashboard-shell .bd-hero .material-icons-outlined,
#dashboard-shell .ec-ops-hero .material-icons-outlined,
#dashboard-shell .gta-hero .material-icons-outlined,
#dashboard-shell .tca-hero .material-icons-outlined,
#dashboard-shell .tf-hero .material-icons-outlined,
#dashboard-shell .owner-hero .material-icons-outlined,
#dashboard-shell .fin-dashboard-hero .material-icons-outlined,
#dashboard-shell .fin-toolbar-hero .material-icons-outlined,
#dashboard-shell .cc-operations-bar .material-icons-outlined,
#dashboard-shell .kenn-admin-hero .material-icons-outlined,
#dashboard-shell .ecr-hero .material-icons-outlined {
  font-size: 14px !important;
}

/* These two queue summaries carried no controls. The unified header already
   tells the operator where they are, and the total is available in the table. */
#dashboard-shell .orgx-hero,
#dashboard-shell .event-list-hero {
  display: none !important;
}

#dashboard-shell .profile-hero {
  margin: 0 0 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Tours: one operational command line, not four separate introduction and
   status cards. Nodes are moved here by the contextual layout controller so
   their existing buttons, values and event handlers remain untouched. */
#programs-view #ec-tour-commandline {
  min-height: 40px;
  margin: 0 0 10px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
  scrollbar-width: thin;
}

#programs-view #ec-tour-commandline > * { flex: 0 0 auto; }

#programs-view #ec-tour-hub,
#programs-view .prd-pro-toolbar,
#programs-view #ecw-completion-card {
  min-height: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* The shared header names this workspace. Keep only its two work modes. */
#programs-view #ec-tour-hub > :first-child { display: none !important; }
#programs-view #ec-tour-hub .ec-tour-tools {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 3px !important;
}

#programs-view #ec-tour-hub .ec-tour-tools button {
  width: auto !important;
  min-width: auto !important;
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #64748b !important;
}

#programs-view #ec-tour-hub .ec-tour-tools button.active {
  border-color: #fed7aa !important;
  background: #fff7ed !important;
  color: #c2410c !important;
}

#programs-view #ec-tour-hub .ec-tour-tools button .material-icons-outlined { font-size: 14px !important; }
#programs-view #ec-tour-hub .ec-tour-tools button b {
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: -.01em;
  white-space: nowrap;
}
#programs-view #ec-tour-hub .ec-tour-tools button small { display: none !important; }

#programs-view .prd-pro-toolbar { margin-left: 2px !important; }
#programs-view .prd-pro-stats {
  width: auto !important;
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 0 !important;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
}

#programs-view .prd-pro-stats > div {
  min-width: 40px !important;
  height: 26px !important;
  padding: 2px 6px !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  gap: 0 !important;
  border: 0 !important;
  border-right: 1px solid #eef2f7 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#programs-view .prd-pro-stats > div:last-child { border-right: 0 !important; }
#programs-view .prd-pro-stats span {
  font-size: 8px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: .035em;
  text-transform: uppercase;
  color: #94a3b8 !important;
}
#programs-view .prd-pro-stats strong {
  margin: 2px 0 0 !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  color: #0f172a !important;
}

#programs-view .prd-pro-actions {
  display: inline-flex !important;
  align-items: center;
  gap: 4px !important;
  flex-wrap: nowrap !important;
}

#programs-view .prd-pro-actions .prd-select,
#programs-view .prd-pro-actions .btn {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 7px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  box-shadow: none !important;
  white-space: nowrap;
}

#programs-view .prd-pro-actions .material-icons-outlined { font-size: 14px !important; }

#programs-view #ecw-completion-card {
  min-width: 0;
  max-width: 270px;
  margin-left: auto !important;
  padding-left: 7px !important;
  border-left: 1px solid #e2e8f0 !important;
}

#programs-view #ecw-completion-card > div:first-child { min-width: 0; }
#programs-view #ecw-completion-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px !important;
  line-height: 1 !important;
  color: #475569 !important;
}
#programs-view #ecw-completion-card small { display: none !important; }
#programs-view .ecw-completion-meter {
  width: 68px !important;
  min-width: 68px !important;
  height: 5px !important;
}
#programs-view #ecw-completion-card .btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 6px !important;
  border-radius: 7px !important;
  font-size: 9px !important;
  white-space: nowrap;
}

/* The approval route is enforced by status and permissions; the static five
   step diagram no longer provides an actionable control for staff. */
#programs-view #ec-tour-workflow-strip { display: none !important; }

@media (max-width: 760px) {
  #programs-view #ec-tour-commandline { margin-bottom: 8px; }
  #programs-view #ecw-completion-card { margin-left: 0 !important; }
}

@media (max-width: 1100px) {
  /* Keep the same command line on laptops: icon actions retain their labels
     for assistive technology through the existing aria-label attributes. */
  #programs-view .prd-pro-actions .btn {
    width: 28px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  #programs-view .prd-pro-actions .btn .material-icons-outlined { font-size: 14px !important; }
  #programs-view #ec-tour-hub .ec-tour-tools button:not(.active) {
    width: 28px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }
  #programs-view #ec-tour-hub .ec-tour-tools button:not(.active) .material-icons-outlined { font-size: 14px !important; }
  #programs-view .prd-pro-stats > div {
    min-width: 35px !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  #programs-view #ecw-completion-card { max-width: 122px; }
  #programs-view #ecw-completion-card strong {
    max-width: 54px;
    font-size: 0 !important;
  }
  #programs-view #ecw-completion-card strong::before {
    content: attr(data-ec-compact-label);
    font-size: 10px;
    line-height: 1;
  }
  #programs-view .ecw-completion-meter {
    width: 36px !important;
    min-width: 36px !important;
  }
  #programs-view #ecw-completion-card .btn {
    max-width: 44px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 680px) {
  #dashboard-shell .bd-hero,
  #dashboard-shell .ec-ops-hero,
  #dashboard-shell .gta-hero,
  #dashboard-shell .tca-hero,
  #dashboard-shell .tf-hero,
  #dashboard-shell .owner-hero,
  #dashboard-shell .fin-dashboard-hero,
  #dashboard-shell .fin-toolbar-hero,
  #dashboard-shell .mkt-topbar,
  #dashboard-shell .cc-operations-bar {
    justify-content: flex-start !important;
  }

  #dashboard-shell .bd-hero-actions,
  #dashboard-shell .ec-ops-hero-actions,
  #dashboard-shell .gta-hero-actions,
  #dashboard-shell .tca-hero-actions,
  #dashboard-shell .tf-hero-actions,
  #dashboard-shell .owner-actions,
  #dashboard-shell .fin-hero-actions,
  #dashboard-shell .cc-hero-actions {
    margin-left: 0 !important;
  }
}

@media (max-width: 1100px) {
  #dashboard-shell .profile-chip { width: 30px !important; padding-right: 3px !important; }
  #dashboard-shell #profile-name { display: none !important; }
}

@media (max-width: 680px) {
  #dashboard-shell .topbar {
    min-height: 48px !important;
    height: 48px !important;
    margin-top: 6px !important;
    padding: 4px 6px !important;
  }

  #dashboard-shell .page-title { font-size: 13px !important; }
  #dashboard-shell .topbar-actions #refresh-btn { display: none !important; }
  #dashboard-shell .content-area { padding: 7px 8px 38px !important; }
}
