/* PMD_DASHBOARD_SWITCHER_FIRSTPAINT_R34
 * Dashboard chart controls are 30px segmented selectors, NOT global 40px
 * "choice" actions. The R29 DOMContentLoaded classifier adds action attrs
 * after first paint and was overriding the shared compact chart geometry.
 * This real-head CSS is unconditional: the same visual treatment applies
 * before and after R29 initialisation, on Owner/Manager/Accountant surfaces.
 * Preserve button states, ARIA, link targets, handlers and the Floor engine.
 */

/* The card owns ONE segmented frame: not a second frame per tiny button. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar {
  box-sizing:border-box!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:2px!important;
  width:auto!important;
  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;
  margin:0 0 0 auto!important;
  padding:2px!important;
  overflow:hidden!important;
  border:1px solid #d5e4e0!important;
  border-radius:11px!important;
  background:#f8fbfa!important;
  background-image:none!important;
  box-shadow:0 2px 7px rgba(16,42,67,.055)!important;
  white-space:nowrap!important;
}

/* Match just the chart/period mode switches, not Floor, headers or KPIs.
 * Target R29-tagged and untagged buttons with the SAME selector so styles
 * never jump during the deferred classifier startup. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar
> button:is([data-pmd-lab-chart-mode],[data-pmd-lab-period]) {
  box-sizing:border-box!important;
  -webkit-appearance:none!important;
  appearance:none!important;
  position:relative!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:28px!important;
  min-height:28px!important;
  max-height:28px!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
  border:0!important;
  border-width:0!important;
  border-radius:8px!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#365d56!important;
  font:800 12px/1 Roboto,Arial,sans-serif!important;
  letter-spacing:0!important;
  text-transform:none!important;
  text-shadow:none!important;
  transform:none!important;
  transition:none!important;
  animation:none!important;
  cursor:pointer!important;
}

/* Server creates .is-active/aria-pressed before paint; JS updates them
 * when user changes chart mode. Same jade as Create Table Save action. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar
> button:is([data-pmd-lab-chart-mode],[data-pmd-lab-period]):is(.is-active,[aria-pressed="true"]) {
  border:0!important;
  border-radius:8px!important;
  background:#0b765e!important;
  background-image:linear-gradient(180deg,#0b765e 0%,#075c47 100%)!important;
  color:#fff!important;
  box-shadow:0 1px 3px rgba(7,92,71,.20)!important;
}

/* Not selected means NOT green. Combined R29 classes cannot reset state. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar
> button:is([data-pmd-lab-chart-mode],[data-pmd-lab-period]):not(.is-active):not([aria-pressed="true"]):hover {
  background:#e7f3ee!important;
  background-image:none!important;
  color:#075c47!important;
}

/* External detailed-report link shares this single frame; never a second
 * full-size Table-like button with a 40px R29 secondary shell. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar
> a[href] {
  box-sizing:border-box!important;
  display:inline-flex!important;
  flex:0 0 30px!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  min-width:30px!important;
  max-width:30px!important;
  height:28px!important;
  min-height:28px!important;
  max-height:28px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-left:1px solid #dfebe6!important;
  border-radius:0!important;
  background:transparent!important;
  background-image:none!important;
  box-shadow:none!important;
  color:#08745d!important;
  text-decoration:none!important;
  transform:none!important;
  transition:none!important;
}
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar
> a[href]:hover {
  background:#e7f3ee!important;
  color:#075c47!important;
}
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-dashboard-lab-analytics-v1
.pmd-dashboard-lab-analytics__toolbar
> :is(button,a):focus-visible {
  outline:2px solid #21876b!important;
  outline-offset:-2px!important;
  z-index:1!important;
}

/* R33 had to wait for the R29 role tag on Add table. In live Floor
 * hydration the toolbar can be reconstructed, briefly losing that tag and
 * going from jade back to white. Resolve this exact primary action
 * independent of R29, from the first server-rendered paint onwards. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-r2-floor-toolbar-v316
button.pmd-r2-floor-tool-v316.pmd-floor-table-manager__toolbar-button.is-add[data-pmd-floor-table-add]:not(:disabled) {
  box-sizing:border-box!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:46px!important;
  height:46px!important;
  border:1px solid #064b3c!important;
  border-radius:14px!important;
  background:#0b765e!important;
  background-image:linear-gradient(180deg,#0b765e,#075c47)!important;
  color:#fff!important;
  box-shadow:0 9px 20px rgba(7,92,71,.15)!important;
  text-shadow:none!important;
  transform:none!important;
}
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-r2-floor-toolbar-v316
button.pmd-r2-floor-tool-v316.pmd-floor-table-manager__toolbar-button.is-add[data-pmd-floor-table-add]:hover:not(:disabled) {
  background:#086c56!important;
  background-image:linear-gradient(180deg,#086c56,#064b3c)!important;
  border-color:#064b3c!important;
  color:#fff!important;
}
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-r2-floor-toolbar-v316
button.pmd-r2-floor-tool-v316.pmd-floor-table-manager__toolbar-button.is-add[data-pmd-floor-table-add]:focus-visible {
  outline:2px solid #21876b!important;
  outline-offset:2px!important;
}

/* PMD_DASHBOARD_FLOOR_FLAT_TABLES_R35
 * R34 unintentionally gave Floor cards a 6px colored OUTER ring and thick
 * shadow, making the tables look double-framed. Restore the previous plain,
 * flat table appearance: the real operational status color still fills the
 * table, and its thin border remains. Never create a surrounding glow.
 * This is the same R34 stylesheet: no new competing CSS layer is added.
 * Exclude selected/dragging tables so their distinct interaction feedback
 * and native focus-visible behavior remain available. */
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-r2-shared-floor-canvas-v310
.pmd-floor-v1__table[data-floor-table]:not(.is-selected):not(.is-dragging) {
  box-sizing:border-box!important;
  border-style:solid!important;
  border-width:1px!important;
  box-shadow:none!important;
  animation:none!important;
  transition:none!important;
}
html body.pmd-dashboard-lab-page
#pmd-dashboard-lab
#pmd-r2-shared-floor-canvas-v310
.pmd-floor-v1__table[data-floor-table]:not(.is-selected):not(.is-dragging):hover {
  box-shadow:none!important;
}
/* No need to apply to POS/KDS touch tables, floor edit modals or Floor
 * management forms. Only the visible Owner/Manager shared Floor canvas. */

@media(prefers-reduced-motion:reduce) {
  html body.pmd-dashboard-lab-page
  #pmd-dashboard-lab
  #pmd-dashboard-lab-analytics-v1
  .pmd-dashboard-lab-analytics__toolbar > :is(button,a) {
    animation:none!important;
    transition:none!important;
  }
}
