/*
 GreenEco Meetings — Reports toolbar organized like Attendance
 Screen: تقارير الاجتماعات
 Layout:
 Row 1: Search | Refresh | Print | Run Report
 Row 2: Report Type | View Mode | From | To | Branch | Department | More Options
 Expanded options stay in a compact horizontal grid below.
 CSS only. No app.js / business logic / print changes.
 Version: 3.3.16.44.2.523
*/

@media screen {

  /*
   * Strict scope:
   * only the native toolbar whose extra area contains
   * .meeting-report-toolbar-controls.
   */
  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls){
    direction:rtl!important;

    display:grid!important;
    grid-template-columns:repeat(28,minmax(0,1fr))!important;
    grid-template-rows:auto auto!important;
    grid-auto-flow:row!important;

    align-items:stretch!important;
    gap:6px!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    margin:0 0 7px!important;
    padding:7px!important;

    border:1px solid #b9c4c9!important;
    border-radius:0!important;
    background:#f7f9fa!important;
    box-shadow:none!important;

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

  /*
   * Flatten only the internal wrappers of the Reports toolbar so the
   * current controls can participate in the same two-row grid.
   * No DOM movement and no JavaScript.
   */
  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  > .toolbar-actions,

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  > .toolbar-extra,

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  > .toolbar-extra
  > .meeting-report-toolbar-controls{
    display:contents!important;
  }

  /* ------------------------------------------------------------
     ROW 1 — commands: 4 equal horizontal buttons
     Search | Refresh | Print | Run Report
     ------------------------------------------------------------ */

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  > .toolbar-actions > *{
    grid-row:1!important;
    grid-column:span 7!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;

    margin:0!important;
    padding:5px 10px!important;

    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;

    white-space:nowrap!important;
    box-sizing:border-box!important;

    transform:none!important;
    translate:none!important;
    scale:none!important;
    box-shadow:none!important;
    filter:none!important;
  }

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > .report-run-button{
    grid-row:1!important;
    grid-column:span 7!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;

    margin:0!important;
    padding:5px 10px!important;

    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;

    white-space:nowrap!important;
    box-sizing:border-box!important;

    transform:none!important;
    translate:none!important;
    scale:none!important;
    box-shadow:none!important;
    filter:none!important;
  }

  /* ------------------------------------------------------------
     ROW 2 — seven equal filter/action cells
     Type | View | From | To | Branch | Department | More Options
     ------------------------------------------------------------ */

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > label{
    grid-row:2!important;
    grid-column:span 4!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;

    margin:0!important;
    padding:4px 6px!important;

    display:grid!important;
    grid-template-rows:16px 30px!important;
    align-items:center!important;
    gap:0!important;

    border:1px solid #c4cdd1!important;
    border-radius:0!important;
    background:#fff!important;

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

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > label > span{
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;

    color:#425b66!important;
    font-size:9px!important;
    font-weight:800!important;
    line-height:16px!important;
  }

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > label > select,

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > label > input{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;

    margin:0!important;
    padding:3px 6px!important;

    border:1px solid #8f9ca2!important;
    border-radius:0!important;
    background:#fff!important;
    box-sizing:border-box!important;

    font-size:9px!important;
  }

  /* Cancel older report-specific min-width rules. */
  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > label.report-type,

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > label.report-view-mode{
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
  }

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  .meeting-report-toolbar-controls > .report-more-button{
    grid-row:2!important;
    grid-column:span 4!important;

    width:100%!important;
    min-width:0!important;
    max-width:none!important;

    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;

    margin:0!important;
    padding:5px 8px!important;

    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;

    border-radius:0!important;
    white-space:nowrap!important;
    box-sizing:border-box!important;

    transform:none!important;
    translate:none!important;
    scale:none!important;
    box-shadow:none!important;
    filter:none!important;
  }

  /* Stable hover/focus/active geometry — no button jump. */
  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  button:hover:not(:disabled),

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  button:focus-visible,

  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls)
  button:active{
    transform:none!important;
    translate:none!important;
    scale:none!important;
    box-shadow:none!important;
    filter:none!important;
  }

  /* Expanded "More Options": compact horizontal grid, no side columns. */
  html.greeneco-meetings-route .meeting-report-more-options{
    direction:rtl!important;

    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:end!important;
    gap:7px!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;

    margin:0 0 7px!important;
    padding:7px!important;

    border:1px solid #b9c4c9!important;
    border-radius:0!important;
    background:#f7f9fa!important;
    box-shadow:none!important;

    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route .meeting-report-more-options > label{
    min-width:0!important;
    width:100%!important;
    margin:0!important;

    display:grid!important;
    grid-template-rows:16px 30px!important;
    gap:0!important;
  }

  html.greeneco-meetings-route .meeting-report-more-options > label.meeting{
    grid-column:auto!important;
  }

  html.greeneco-meetings-route .meeting-report-more-options select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    border-radius:0!important;
    box-sizing:border-box!important;
  }

  html.greeneco-meetings-route .meeting-report-more-options > button{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    margin:0!important;
    border-radius:0!important;
    transform:none!important;
    translate:none!important;
    scale:none!important;
  }
}

/* On narrower windows keep the same two rows and scroll horizontally. */
@media screen and (max-width:1180px){
  html.greeneco-meetings-route
  .toolbar:has(> .toolbar-extra > .meeting-report-toolbar-controls){
    min-width:1120px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
  }

  html.greeneco-meetings-route .meeting-report-more-options{
    min-width:900px!important;
    overflow-x:auto!important;
  }
}
