/*
 GreenEco — Meetings: ALL screens
 Fixed Control Region + Scrollable Data Region
 Version: 3.3.16.44.2.547

 Rule applied to every Meetings tab:
 - Control Region stays fixed in the visible Meetings workspace.
 - Main table/data region consumes the remaining height.
 - Table screens scroll inside their table wrapper only.
 - Non-table screens (dashboard/activity/calendar/minutes) scroll only inside
   their main data panel, because those screens do not have a literal table.
 - Table headings remain sticky.
 - No app.js, business logic, data, modal, or print changes.
*/

@media screen {

  /* =========================================================
     MODULE FRAME
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .app-shell{
    height:100vh!important;
    min-height:100vh!important;
    max-height:100vh!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .app-shell > .app-workspace{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;

    overflow:hidden!important;
    position:relative!important;
    z-index:1!important;
  }

  /* Every actual Meetings main screen uses the remaining workspace height. */
  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .app-workspace > .page-container:is(
    :has(> .meeting-dashboard-toolbar),
    :has(> .meeting-subject-register),
    :has(> .meeting-goals-register),
    :has(> .meeting-topics-register),
    :has(> .meeting-issues-register),
    :has(> .meeting-prep-shell),
    :has(> .attendance-invitation-independent-screen),
    :has(> .attendance-independent-screen),
    :has(> .meeting-minutes-toolbar),
    :has(> .meeting-issue-workflow-panel),
    :has(> .meeting-results-register),
    .meeting-approval-page,
    :has(> .meeting-archive-safe-workspace),
    :has(> .meeting-followup-table),
    :has(> .meeting-activity-toolbar),
    :has(> .meeting-calendar-toolbar),
    :has(> .meeting-reports-page-title)
  ){
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;

    display:flex!important;
    flex-direction:column!important;
    flex-wrap:nowrap!important;

    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  /* =========================================================
     CONTROL REGION — COMMON
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .app-workspace > .page-container
  > :is(
    .page-title,
    .meeting-prep-page-head,
    .meeting-attendance-page-head,
    .meeting-lifecycle-bar,
    .toolbar,
    .attendance-one-row-toolbar,
    .meeting-structure-lock-note,
    .meeting-structure-hint,
    .meeting-subject-cancelled-note,
    .meeting-structure-summary,
    .meeting-issue-workflow-summary,
    .meeting-results-overview,
    .meeting-approval-stagebar,
    .meeting-followup-dashboard,
    .meeting-followup-summaryline,
    .meeting-report-more-options,
    .meeting-feedback-toast,
    .form-alert,
    .notice-box,
    .meeting-calendar-summary,
    .meeting-activity-overview,
    .meeting-minutes-readiness,
    .meeting-minutes-page-summary,
    .meeting-archive-safe-record
  ){
    flex:0 0 auto!important;
  }

  /* Do not let old sticky experiments create a second scroll system. */
  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-reports-page-title,

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container > .toolbar{
    top:auto!important;
  }

  /* =========================================================
     COMMON TABLE RULE
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container
  .table-panel{
    min-height:0!important;
    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container
  .table-panel
  > .table-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;

    overflow-y:auto!important;
    overflow-x:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container
  .data-table thead th{
    position:sticky!important;
    top:0!important;
    z-index:8!important;
  }

  /* =========================================================
     1) DASHBOARD
     Control: title/lifecycle/toolbar
     Data: KPI + operational panels + alerts/quick links
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-dashboard-toolbar)
  > .meeting-dashboard-kpis{
    flex:0 1 auto!important;
    min-height:0!important;
    max-height:110px!important;
    overflow:auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-dashboard-toolbar)
  > .meeting-dashboard-grid{
    flex:1 1 0!important;
    min-height:120px!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-dashboard-toolbar)
  > :is(.meeting-dashboard-alerts,.meeting-dashboard-quicklinks){
    flex:0 1 auto!important;
    min-height:0!important;
    max-height:150px!important;
    overflow:auto!important;
  }

  /* =========================================================
     2) SUBJECT
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-subject-register)
  > .meeting-subject-register{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-subject-register
  > .table-panel{
    flex:1 1 auto!important;
    height:100%!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  /* =========================================================
     3) GOALS
     4) TOPICS
     5) ISSUES
     10) ISSUE WORKFLOW
     11) RESULTS
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container
  > :is(
    .meeting-goals-register,
    .meeting-topics-register,
    .meeting-issues-register,
    .meeting-issue-workflow-panel,
    .meeting-results-register
  ){
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container
  > :is(
    .meeting-goals-register,
    .meeting-topics-register,
    .meeting-issues-register,
    .meeting-issue-workflow-panel,
    .meeting-results-register
  )
  > :is(
    .meeting-structure-register-head,
    .meeting-issues-register-head,
    .meeting-issue-workflow-head,
    .meeting-results-register-head
  ){
    flex:0 0 auto!important;
  }

  /* =========================================================
     6) PREPARATION
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-prep-shell)
  > .meeting-prep-shell{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    grid-template-rows:auto minmax(0,1fr)!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-prep-shell
  > .meeting-prep-sidebar{
    min-height:0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-prep-shell
  > .meeting-prep-workspace{
    min-height:0!important;
    height:100%!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-prep-workspace
  > .meeting-prep-register{
    flex:1 1 auto!important;
    height:100%!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-prep-register
  > .meeting-prep-register-head{
    flex:0 0 auto!important;
  }

  /* Internal preparation forms are the data region when the table is hidden. */
  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-prep-workspace
  > .meeting-prep-work-card{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
  }

  /* =========================================================
     7) ATTENDANCE INVITATION
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .attendance-invitation-independent-screen)
  > .attendance-invitation-independent-screen{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .attendance-invitation-independent-screen
  > :is(
    .attendance-invitation-screen-head,
    .attendance-invitation-summary,
    .attendance-invitation-command-bar,
    .empty-state
  ){
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .attendance-invitation-independent-screen
  > .attendance-invitation-tracking{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .attendance-invitation-tracking
  > .attendance-approval-head{
    flex:0 0 auto!important;
  }

  /* =========================================================
     8) ATTENDANCE
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .attendance-independent-screen)
  > .attendance-independent-screen{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .attendance-independent-screen
  > .attendance-independent-summary{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .attendance-independent-screen
  > .table-panel{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  /* =========================================================
     9) MINUTES
     No literal main table: document preview is the data panel.
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-minutes-toolbar)
  > .meeting-minutes-document-preview{
    flex:1 1 auto!important;
    height:0!important;
    min-height:90px!important;
    max-height:none!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-minutes-document-preview
  > h3{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-minutes-document-preview
  > div{
    flex:1 1 auto!important;
    min-height:0!important;

    overflow:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  /* =========================================================
     12) APPROVAL
     Fixed: stage/overview/action controls
     Scroll: approval-history table.
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container.meeting-approval-page
  > :is(
    .meeting-approval-overview,
    .meeting-approval-workflow
  ){
    flex:0 0 auto!important;
    height:auto!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-approval-overview
  > .table-scroll{
    flex:0 0 auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container.meeting-approval-page
  > .meeting-approval-history{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  /* =========================================================
     13) ARCHIVE
     Two data tables: files + archive history.
     Both remain inside the remaining data region.
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-archive-safe-workspace)
  > .meeting-archive-safe-workspace{
    flex:1 1 0!important;
    min-height:130px!important;
    max-height:none!important;

    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-safe-workspace
  > .meeting-archive-safe-preview{
    min-height:0!important;
    overflow:auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-safe-workspace
  > .meeting-archive-safe-files{
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-safe-files
  > header{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-safe-files
  > .table-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-archive-safe-workspace)
  > .meeting-archive-safe-events{
    flex:1 1 0!important;
    min-height:120px!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  /* Standalone archive screen follows the same rule. */
  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-standalone-page{
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-standalone-page
  > :is(
    .meeting-archive-standalone-title,
    .meeting-archive-standalone-toolbar,
    .meeting-archive-standalone-search,
    .meeting-archive-standalone-record,
    .form-alert
  ){
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-standalone-page
  > .meeting-archive-standalone-workspace{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-standalone-documents{
    height:100%!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-standalone-documents
  > header{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-archive-standalone-documents
  > .table-scroll{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow:auto!important;
  }

  /* =========================================================
     14) FOLLOW-UP
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-followup-table)
  > .meeting-followup-table{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-followup-table)
  > .table-footer{
    flex:0 0 auto!important;
  }

  /* =========================================================
     15) ACTIVITY
     No literal table: timeline panel is the data region.
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-activity-toolbar)
  > .meeting-activity-panel{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-activity-panel
  > header{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-activity-panel
  > .meeting-activity-timeline{
    flex:1 1 auto!important;
    min-height:0!important;

    overflow:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  /* =========================================================
     16) CALENDAR
     No literal table: calendar grid is the data region.
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-calendar-toolbar)
  > .meeting-calendar{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-calendar
  > .meeting-calendar-weekdays{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-calendar
  > .meeting-calendar-grid{
    flex:1 1 auto!important;
    min-height:0!important;

    overflow:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-calendar-toolbar)
  > .meeting-export-note{
    flex:0 0 auto!important;
  }

  /* =========================================================
     17) REPORTS
     Control: title/lifecycle/toolbar + filters.
     Data: report table / detailed preview / summary.
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .app-shell:has(.meeting-reports-page-title)
  > .app-workspace{
    overflow:hidden!important;
    scrollbar-gutter:auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-reports-page-title){
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container:has(> .meeting-reports-page-title)
  > :is(
    .meeting-report-print-area,
    .meeting-detail-preview-panel,
    .meeting-report-safe-summary-preview,
    .meeting-reports-all-preview,
    .meeting-report-summary-preview
  ){
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;
    max-height:none!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-report-print-area{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-report-print-area
  > .meeting-report-table-caption{
    flex:0 0 auto!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .meeting-report-print-area
  > .meeting-report-table{
    flex:1 1 auto!important;
    height:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  :is(
    .meeting-detail-preview-panel,
    .meeting-report-safe-summary-preview,
    .meeting-reports-all-preview,
    .meeting-report-summary-preview
  ){
    overflow:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }

  /* =========================================================
     INTERACTION STABILITY
     ========================================================= */

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container button:hover:not(:disabled),

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container button:focus-visible,

  html.greeneco-meetings-route
  body.greeneco-meetings-route
  .page-container button:active{
    translate:none!important;
    scale:none!important;
  }
}
