/*
 * Final TableBuddy x64 Admin consistency layer.
 *
 * This file is deliberately loaded after the historical Manager styles. It
 * gives every routed Content Editor page the same readable type, geometry,
 * light surfaces and scrolling rules while leaving the live table preview's
 * real artwork and kiosk renderer untouched.
 */
.manager-surface{
  --cms-canvas:#f7f4ec;
  --cms-surface:#fff;
  --cms-surface-soft:#f5f8f8;
  --cms-text:#102d36;
  --cms-muted:#536b76;
  --cms-border:#a5b7be;
  --cms-border-soft:#c8d5da;
  --cms-action:#168b87;
  --cms-action-strong:#0d706d;
  --cms-focus:#173f52;
  --cms-font-body:16px;
  --cms-font-small:14px;
  --cms-font-label:15px;
  --cms-font-heading:22px;
  --cms-control-height:52px;
  --cms-button-height:48px;
  --cms-space:16px;
  --cms-card-padding:16px
}

.table-setup-workspace {
  color:var(--cms-text);
  background:var(--cms-canvas);
  font-family:"Segoe UI",Arial,sans-serif;
  font-size:var(--cms-font-body);
  line-height:1.45
}
.table-setup-workspace *{box-sizing:border-box}
.manager-surface #notice:empty{display:none!important}
.table-setup-workspace .publish-layout{gap:0;background:var(--cms-canvas)}
.table-setup-workspace .publish-editor{
  padding:0 16px 0 16px!important;
  padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important;
  scroll-padding-block:20px 128px;
  scrollbar-gutter:stable;
  color:var(--cms-text)!important;
  background:var(--cms-canvas)!important
}
#publish-experience-fields>details[data-editor-section],
#publish-experience-fields>details:not([hidden]){
  width:100%;
  max-width:none;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  color:var(--cms-text)!important;
  background:transparent!important;
  box-shadow:none!important
}
#publish-experience-fields>details:not([hidden]){display:grid;gap:var(--cms-space)}

/* One page header and one content rhythm. */
.table-setup-workspace .modal-head{
  min-height:94px;
  padding:16px 18px!important;
  border-bottom:2px solid var(--cms-border-soft)!important;
  background:var(--cms-surface)!important
}
.table-setup-workspace .modal-head h2{margin:3px 0 4px!important;color:var(--cms-text)!important;font-size:24px!important;line-height:1.2}
.table-setup-workspace .modal-head .eyebrow{font-size:12px!important;line-height:1.25;letter-spacing:.14em}
.table-setup-workspace .modal-head .section-intro{margin:0!important;color:var(--cms-muted)!important;font-size:var(--cms-font-small)!important;line-height:1.45}
.table-setup-workspace .editor-header-actions{align-self:center;gap:10px}
.table-setup-workspace .current-x64-editor-intro,
.table-setup-workspace .phase-five-heading{
  width:100%;
  margin:0!important;
  padding:var(--cms-card-padding)!important;
  border:1px solid var(--cms-border)!important;
  border-radius:12px!important;
  color:var(--cms-text)!important;
  background:var(--cms-surface)!important
}
.table-setup-workspace .current-x64-editor-intro>span,
.table-setup-workspace .phase-five-heading .eyebrow{font-size:12px!important;font-weight:900;letter-spacing:.13em}
.table-setup-workspace .current-x64-editor-intro h3,
.table-setup-workspace .phase-five-heading h3{margin:5px 0 4px!important;font-size:var(--cms-font-heading)!important;line-height:1.25}
.table-setup-workspace .current-x64-editor-intro p,
.table-setup-workspace .phase-five-heading p,
.table-setup-workspace .section-intro{color:var(--cms-muted)!important;font-size:var(--cms-font-body)!important;line-height:1.5}

/* Consistent, readable form and action controls. */
.table-setup-workspace .button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:var(--cms-button-height)!important;
  padding:10px 16px!important;
  border-radius:9px!important;
  font:800 var(--cms-font-label)/1.2 "Segoe UI",Arial,sans-serif!important;
  white-space:normal
}
.table-setup-workspace .button.compact{min-height:var(--cms-button-height)!important;padding:9px 14px!important;font-size:var(--cms-font-small)!important}
.table-setup-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),select,textarea){
  width:100%;
  min-height:var(--cms-control-height)!important;
  padding:12px 14px!important;
  border:1px solid #82979f!important;
  border-radius:10px!important;
  color:var(--cms-text)!important;
  background-color:var(--cms-surface)!important;
  font:600 var(--cms-font-body)/1.35 "Segoe UI",Arial,sans-serif!important
}
.table-setup-workspace .publish-editor textarea{min-height:112px!important}
.table-setup-workspace .publish-editor :is(label,legend){color:var(--cms-text)!important;font-size:var(--cms-font-label)!important;font-weight:800;line-height:1.35}
.table-setup-workspace :is(button,input,select,textarea):focus-visible{outline:3px solid var(--cms-focus)!important;outline-offset:2px}
.table-setup-workspace .editor-content-source{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.8fr);gap:16px;margin:0;padding:var(--cms-card-padding);color:var(--cms-text);background:#fff;border:1px solid var(--cms-border);border-left:5px solid var(--cms-action);border-radius:12px}
.table-setup-workspace .editor-content-source>div:first-child{display:grid;align-content:start;gap:4px}
.table-setup-workspace .editor-content-source .eyebrow{margin:0;font-size:12px!important;letter-spacing:.13em}
.table-setup-workspace .editor-content-source>div>strong{font-size:18px;line-height:1.3}
.table-setup-workspace .editor-content-source>div>small{color:var(--cms-muted);font-size:var(--cms-font-small)!important;line-height:1.45}
.table-setup-workspace .editor-source-facts{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}
.table-setup-workspace .editor-source-facts>div{display:grid;gap:3px;align-content:start;min-height:64px;padding:10px 12px;background:var(--cms-surface-soft);border:1px solid var(--cms-border-soft);border-radius:9px}
.table-setup-workspace .editor-source-facts dt{color:var(--cms-muted);font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.table-setup-workspace .editor-source-facts dd{margin:0;font-size:var(--cms-font-small)!important;font-weight:750;line-height:1.4}
.table-setup-workspace .publish-editor>.remote-editor-context{display:grid!important;grid-template-columns:minmax(160px,.7fr) minmax(180px,1fr) minmax(260px,1.35fr);gap:12px;margin:0 0 12px;padding:12px 14px;background:var(--cms-surface-soft);border:1px solid var(--cms-border);border-radius:12px}
.table-setup-workspace .remote-editor-context label{display:grid;gap:6px;margin:0;color:var(--cms-text);font-size:var(--cms-font-label);font-weight:800}
.table-setup-workspace .remote-editor-context :is(input,select){min-height:48px;margin:0;background:#fff}
.table-setup-workspace .editor-source-facts>div[data-delivery-state="applied"]{border-color:#65aaa2;background:#eef9f7}
.table-setup-workspace .editor-source-facts>div[data-delivery-state="applied"] dd{color:#126c67}
.table-setup-workspace .editor-source-facts>div:is([data-delivery-state="failed"],[data-delivery-state="mismatch"]){border-color:#c77777;background:#fff4f4}
.table-setup-workspace .editor-source-facts>div:is([data-delivery-state="failed"],[data-delivery-state="mismatch"]) dd{color:#8e2929}

/* The same light card primitive is used by Books, What's On, navigation,
   Dashboard, accessibility, language, apps and table settings. */
.table-setup-workspace .publish-editor :is(
  .light-admin-row,
  .remote-switch-row,
  .remote-bottom-navigation>article,
  .mode-content-editor>fieldset,
  .new-books-editor>section,
  .new-books-editor fieldset,
  .x64-schedule-card,
  .x64-dashboard-owner,
  .x64-schedule-mode-picker,
  .x64-event-row,
  .event-field,
  .manager-dashboard-buddies,
  .manager-dashboard-metrics article,
  .manager-dashboard-panels>section,
  .manager-dashboard-row,
  .catalogue-settings-secondary,
  .remote-module-controls,
  .category-control-grid>article,
  .application-picker-card,
  .remote-operations-grid>section,
  .remote-operations-grid>aside
){
  color:var(--cms-text)!important;
  background:#fff!important;
  border-color:var(--cms-border)!important;
  box-shadow:none!important
}
.table-setup-workspace .publish-editor :is(.remote-switch-row,.light-admin-row,.manager-dashboard-row):hover{color:var(--cms-text)!important;background:#eef8f6!important;border-color:#4b9c98!important}
.table-setup-workspace .publish-editor :is(.remote-switch-copy b,.remote-switch-state,.light-admin-row-copy b,.light-admin-row-state){color:var(--cms-text)!important;font-size:var(--cms-font-small)!important}
.table-setup-workspace .publish-editor :is(p,small){font-size:var(--cms-font-small)!important;line-height:1.45}
.table-setup-workspace .publish-editor :is(.eyebrow,.phase-five-heading>span){font-size:12px!important;line-height:1.3}

/* Bottom navigation is a set of standard x64 cards, never a dark kiosk row. */
.table-setup-workspace .remote-bottom-navigation{display:grid;gap:var(--cms-space);margin:0;padding:0}
.table-setup-workspace .remote-bottom-navigation>.section-intro{margin:0;padding:0 2px}
.table-setup-workspace .remote-bottom-navigation>article{padding:var(--cms-card-padding)!important;border-radius:12px!important}
.table-setup-workspace .remote-bottom-navigation>article>header{margin-bottom:12px;gap:12px}
.table-setup-workspace .remote-bottom-navigation header small{color:var(--cms-muted)!important;font-size:12px!important}
.table-setup-workspace .remote-bottom-navigation h3{font-size:19px!important;line-height:1.25}
.table-setup-workspace .remote-nav-audiences{gap:10px}
.table-setup-workspace .remote-nav-audiences .light-admin-row{min-height:var(--cms-control-height)!important;padding:10px 12px!important;border:1px solid var(--cms-border)!important;border-radius:9px!important}

/* Dashboard was previously styled as a scaled thumbnail. It now uses the
   same working-distance typography and touch geometry as x64 Admin. */
.table-setup-workspace .manager-dashboard{gap:var(--cms-space);padding:0 0 24px;color:var(--cms-text)!important}
.table-setup-workspace .manager-dashboard-title h3{font-size:var(--cms-font-heading)!important}
.table-setup-workspace .manager-dashboard-title p{font-size:var(--cms-font-small)!important;line-height:1.45}
.table-setup-workspace .manager-dashboard-buddies{gap:12px;padding:var(--cms-card-padding)!important;border-radius:12px!important}
.table-setup-workspace .manager-dashboard-buddy-label{gap:4px;padding:4px 2px}
.table-setup-workspace .manager-dashboard-buddy-label b{font-size:var(--cms-font-label)!important}
.table-setup-workspace .manager-dashboard-buddy-label span{color:var(--cms-muted)!important;font-size:var(--cms-font-small)!important;line-height:1.4}
.table-setup-workspace .manager-dashboard-buddy-buttons{gap:10px}
.table-setup-workspace .manager-dashboard-buddy>button{min-height:var(--cms-control-height)!important;padding:10px 12px!important}
.table-setup-workspace .manager-dashboard-buddy>button:first-child b{font-size:var(--cms-font-label)!important}
.table-setup-workspace .manager-dashboard-buddy>button:first-child small{font-size:13px!important}
.table-setup-workspace .manager-dashboard-metrics{gap:12px}
.table-setup-workspace .manager-dashboard-metrics article{min-height:78px;padding:14px!important;border-radius:10px!important}
.table-setup-workspace .manager-dashboard-metrics small{font-size:var(--cms-font-small)!important;line-height:1.35}
.table-setup-workspace .manager-dashboard-metrics strong{margin-top:6px;font-size:21px!important}
.table-setup-workspace .manager-dashboard-panels{gap:12px}
.table-setup-workspace .manager-dashboard-panels>section{padding:var(--cms-card-padding)!important;border-radius:12px!important}
.table-setup-workspace .manager-dashboard-panels h3{margin:0 0 10px;font-size:18px!important}
.table-setup-workspace .manager-dashboard-row{grid-template-columns:minmax(0,1fr) 46px 46px;gap:10px;min-height:var(--cms-control-height)!important;margin-top:8px;padding:10px 12px!important;border-radius:9px!important}
.table-setup-workspace .manager-dashboard-row b{font-size:var(--cms-font-small)!important;line-height:1.35;white-space:normal}
.table-setup-workspace .manager-dashboard-row small{font-size:13px!important;line-height:1.35;white-space:normal}
.table-setup-workspace .manager-dashboard-state{font-size:13px!important;font-weight:800}

/* Books and event schedules share the same card, label and gap system. */
.table-setup-workspace :is(.mode-content-editor,.new-books-editor,.x64-event-list,.x64-event-fields){display:grid;gap:var(--cms-space)!important;margin-top:0!important}
.table-setup-workspace :is(.mode-content-editor>fieldset,.new-books-editor>section,.new-books-editor fieldset,.event-field){padding:var(--cms-card-padding)!important;border:1px solid var(--cms-border)!important;border-radius:12px!important}
.table-setup-workspace :is(.mode-content-editor>fieldset>legend,.new-books-editor>section>h3,.new-books-editor fieldset>legend,.event-field>legend){color:var(--cms-text)!important;font-size:18px!important;font-weight:850}
.table-setup-workspace .x64-admin-page{width:100%;max-width:1080px;margin:0 auto;padding:0 0 24px!important;color:var(--cms-text);background:transparent!important}
.table-setup-workspace .x64-schedule-card{gap:var(--cms-space);padding:var(--cms-card-padding)!important;border-radius:12px!important}
.table-setup-workspace .x64-schedule-card>header h3{font-size:20px!important}
.table-setup-workspace .x64-schedule-card>header p,
.table-setup-workspace .x64-dashboard-owner small,
.table-setup-workspace .x64-schedule-mode-picker p{color:var(--cms-muted)!important;font-size:var(--cms-font-small)!important;line-height:1.45}
.table-setup-workspace .x64-schedule-mode-picker>div{gap:10px}
.table-setup-workspace .x64-schedule-mode-picker button,
.table-setup-workspace .x64-schedule-mode-picker footer button{min-height:var(--cms-button-height)!important;padding:9px 13px;font-size:var(--cms-font-small)!important}
.table-setup-workspace .x64-event-row{grid-template-columns:auto minmax(0,1fr) auto auto;gap:12px;padding:12px 14px!important;border-radius:10px!important}
.table-setup-workspace .x64-event-row strong{font-size:var(--cms-font-label)!important}.table-setup-workspace .x64-event-row small{color:var(--cms-muted)!important;font-size:13px!important}

/* Scene cards retain their real image artwork, while every surrounding Admin
   surface and all card copy follow the light x64 system. */
.table-setup-workspace .x64-scene-swapper{gap:var(--cms-space);padding:var(--cms-card-padding);color:var(--cms-text);background:#edf3f5;border-color:var(--cms-border)}
.table-setup-workspace .x64-scene-gallery{gap:12px}
.table-setup-workspace .x64-scene-gallery>button{color:var(--cms-text);background:#fff;border-color:var(--cms-border)}
.table-setup-workspace .x64-scene-gallery>button>span:nth-child(2){gap:6px;padding:0 12px}
.table-setup-workspace .x64-scene-gallery strong{font-size:var(--cms-font-label)!important}
.table-setup-workspace .x64-scene-gallery small{min-height:42px;color:var(--cms-muted)!important;font-size:13px!important;line-height:1.4}
.table-setup-workspace .x64-scene-gallery em{font-size:12px!important}
.table-setup-workspace .x64-scene-gallery>button>i{padding:6px 8px;font-size:12px!important}
.table-setup-workspace .x64-scene-swapper>header :is(span,strong){font-size:12px!important;line-height:1.3}
.table-setup-workspace .x64-scene-status,.table-setup-workspace .x64-scene-swapper>footer{font-size:var(--cms-font-small)!important}

/* Stable navigation and review footer geometry. */
.table-setup-workspace .remote-admin-nav{width:180px;min-width:180px;padding:14px 10px;background:#edf2f3!important}
.table-setup-workspace .remote-admin-group-label{font-size:11px!important;line-height:1.25}
.table-setup-workspace .remote-admin-item{min-height:48px;padding:10px!important}
.table-setup-workspace .remote-admin-item>b{font-size:13px!important;line-height:1.3}
.table-setup-workspace .modal-actions{min-height:76px;gap:10px;padding:12px 16px max(12px,env(safe-area-inset-bottom,0px))!important;background:#edf2f3!important;border-top:1px solid var(--cms-border-soft)!important;box-shadow:0 -8px 20px rgba(16,45,54,.08)!important}

@media(max-width:1180px){
  .table-setup-workspace .publish-editor>.remote-editor-context{grid-template-columns:1fr 1fr}
  .table-setup-workspace .publish-editor>.remote-editor-context label:last-child{grid-column:1/-1}
  .table-setup-workspace .manager-dashboard-panels{grid-template-columns:1fr 1fr}
  .table-setup-workspace .remote-nav-audiences{grid-template-columns:1fr}
}
@media(max-width:820px){
  .table-setup-workspace{font-size:16px}
  .table-setup-workspace .publish-editor{padding-inline:12px!important}
  .table-setup-workspace .manager-dashboard-buddies,.table-setup-workspace .manager-dashboard-panels{grid-template-columns:1fr}
  .table-setup-workspace .manager-dashboard-buddy-buttons{grid-template-columns:1fr}
  .table-setup-workspace .x64-event-row{grid-template-columns:auto minmax(0,1fr)}
  .table-setup-workspace .x64-event-row>.button,.table-setup-workspace .x64-event-row>.x64-event-visibility{grid-row:auto}
  .table-setup-workspace .editor-content-source{grid-template-columns:1fr}
}
@media(max-width:560px){
  .table-setup-workspace .publish-editor>.remote-editor-context{grid-template-columns:1fr}
  .table-setup-workspace .publish-editor>.remote-editor-context label:last-child{grid-column:auto}
  .table-setup-workspace .modal-head{grid-template-columns:1fr}
  .table-setup-workspace .manager-dashboard-metrics{grid-template-columns:1fr}
  .table-setup-workspace .editor-header-actions{width:100%}
  .table-setup-workspace .editor-header-actions .button{flex:1 1 140px}
}
