/* ShoreBuild V113 — hard theme lock. Loaded LAST on Admin, Staff Panels and Orders.
   Purpose: stop legacy cyan/blue CSS from leaking into panel controls, dialogs and staff orders. */
:root{--mc:"Minecraft Ten","Press Start 2P",ui-monospace,monospace;--ease:cubic-bezier(.2,.8,.2,1)}

/* =========================================================
   ADMIN / AP — STRICT BLACK + WHITE
========================================================= */
body:has(.admin-layout){--lock-bg:#f2f2f2;--lock-surface:#fff;--lock-text:#0a0a0a;--lock-muted:#666;--lock-border:#cfcfcf;--lock-accent:#090909;--lock-accent-hover:#292929;--lock-soft:#ededed}
body:has(.admin-layout),body:has(.admin-layout) .admin-layout,body:has(.admin-layout) .admin-main{background:var(--lock-bg)!important;color:var(--lock-text)!important}
body:has(.admin-layout) :is(h1,h2,h3,h4,h5,h6,.panel-title,.popup-title,.modal-title){color:#0a0a0a!important}
body:has(.admin-layout) :is(.page-label,.card-label,.helper-text,.muted,.empty-state,small){color:#666!important}

/* All admin buttons are monochrome unless they are the nav's active white button. */
body:has(.admin-layout) button:not(.sidebar-button):not(.mobile-panel-menu):not(.mobile-panel-backdrop),
body:has(.admin-layout) [role="button"]:not(.sidebar-button),
body:has(.admin-layout) :is(.primary-button,.quick-action,.action-button,.stock-button,.shulker-button,.editor-button,.save-button,.send-button,.upload-button,.game-creator-props button,.game-creator-tabs button,.scratch-designer button,.scratch-block,.scratch-upload-button){
  background:#0a0a0a!important;color:#fff!important;border-color:#0a0a0a!important;box-shadow:none!important;
  transition:transform .16s var(--ease),background .16s,border-color .16s,box-shadow .16s!important
}
body:has(.admin-layout) button:not(.sidebar-button):not(.mobile-panel-menu):not(.mobile-panel-backdrop):hover:not(:disabled),
body:has(.admin-layout) [role="button"]:hover:not(:disabled){background:#292929!important;color:#fff!important;border-color:#292929!important;transform:translateY(-2px) scale(1.025)!important;box-shadow:0 9px 20px rgba(0,0,0,.14)!important}
body:has(.admin-layout) :is(.secondary-button,.cancel-button,.close-button,.admin-popup-close,.admin-user-popup-close,.feature-disabler-close,.interactive-preview-close,.tutorial-preview-close){background:#fff!important;color:#111!important;border:1px solid #bdbdbd!important}
body:has(.admin-layout) :is(.secondary-button,.cancel-button,.close-button,.admin-popup-close,.admin-user-popup-close,.feature-disabler-close,.interactive-preview-close,.tutorial-preview-close):hover{background:#ededed!important;color:#111!important;border-color:#111!important}

/* Admin forms, toggles and selectors */
body:has(.admin-layout) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select,.admin-search,.admin-select){background:#fff!important;color:#111!important;border-color:#bdbdbd!important;box-shadow:none!important;caret-color:#111!important}
body:has(.admin-layout) :is(input,textarea,select):focus{border-color:#111!important;box-shadow:0 0 0 3px rgba(0,0,0,.10)!important;outline:0!important}
body:has(.admin-layout) :is(input[type="checkbox"],input[type="radio"]){accent-color:#111!important}

/* Kill legacy blues in every Admin popup/modal/dialog and nested component. */
body:has(.admin-layout) :is([class*="popup"],[class*="modal"],[class*="dialog"]):not(.mobile-panel-backdrop){--popup-a:#0a0a0a!important;--popup-b:#292929!important;color:#111!important}
body:has(.admin-layout) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(.admin-popup-content,.admin-user-popup-card,.feature-disabler-dialog,.interactive-preview-dialog,.tutorial-preview-dialog,.game-creator-dialog,.shulker-enchant-picker-content,.build-info-panel,.order-chat-popup,.order-chat-main,[class$="-card"],[class$="-content"]){background:#fff!important;color:#111!important;border-color:#c9c9c9!important;box-shadow:0 24px 70px rgba(0,0,0,.22)!important}
body:has(.admin-layout) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(header,.popup-header,.modal-header,.dialog-header,.order-chat-header,.customer-chat-heading){background:#f3f3f3!important;color:#111!important;border-color:#d1d1d1!important}
body:has(.admin-layout) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(a,span,strong,label,p,small,h1,h2,h3,h4){border-color:#c9c9c9!important;text-shadow:none!important}
body:has(.admin-layout) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(a:not(.danger),span,strong,label,h1,h2,h3,h4){color:#111!important}
body:has(.admin-layout) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(p,small,.muted,.description){color:#686868!important}

/* Stock / shulker / game creator / scratch sections — hard monochrome */
body:has(.admin-layout) :is(.shulker-admin-toolbar,.shulker-admin-item-card,.shulker-admin-image-frame,.shulker-admin-grid,.stock-editor,.stock-card,.stock-row,.stock-item,.game-creator-shell,.game-creator-settings,.game-creator-workspace,.game-creator-props,.game-creator-stage-shell,.game-creator-panel,.scratch-designer,.scratch-categories,.scratch-blocks,.scratch-stage-column,.scratch-asset-list){background:#fff!important;color:#111!important;border-color:#c9c9c9!important}
body:has(.admin-layout) :is(.shulker-admin-image-frame,.game-creator-cover-preview,.scratch-script-area,.game-creator-stage){background-color:#f1f1f1!important;border-color:#bdbdbd!important}
body:has(.admin-layout) :is(.game-creator-tabs button.active,.shulker-admin-view-switch button.active,.yes-no-button.active){background:#111!important;color:#fff!important;border-color:#111!important}
body:has(.admin-layout) :is(.shulker-admin-view-switch button:not(.active),.yes-no-button:not(.active)){background:#fff!important;color:#111!important;border-color:#bdbdbd!important}

/* Admin order list + chat — no cyan at all */
body:has(.admin-layout) :is(.order-row,.order-card,.order-detail-card,.order-detail-extra-box,.order-chat-section,.order-conversation-shell,.order-customer-bar,.order-chat-header,.order-chat-input-area){background:#fff!important;color:#111!important;border-color:#cfcfcf!important}
body:has(.admin-layout) :is(.order-chat-messages,.order-messages){background:#f2f2f2!important;color:#111!important}
body:has(.admin-layout) :is(.order-chat-send,.order-chat-remind,.chat-attachment-button){background:#111!important;color:#fff!important;border-color:#111!important}
body:has(.admin-layout) :is(.order-chat-input,.order-chat-input-area textarea){background:#fff!important;color:#111!important;border-color:#bdbdbd!important;font-size:16px!important}

/* =========================================================
   STAFF PANELS — EVERY CONTROL FOLLOWS ROLE COLOR
========================================================= */
body.role-dev{--role-bg:#efe7ff;--role-surface:#fcfaff;--role-soft:#e7d9fa;--role-text:#2e1d46;--role-muted:#76658c;--role-border:#c8b2ed;--role-accent:#8250cf;--role-accent-dark:#6033a8}
body.role-manager{--role-bg:#ffe8eb;--role-surface:#fffafb;--role-soft:#f9dadd;--role-text:#4c2025;--role-muted:#8a5e64;--role-border:#efb2ba;--role-accent:#d85d68;--role-accent-dark:#a93640}
body.role-builder{--role-bg:#e2f4ff;--role-surface:#fbfdff;--role-soft:#d8eef9;--role-text:#17394b;--role-muted:#5c7b8a;--role-border:#a2d4eb;--role-accent:#459fd0;--role-accent-dark:#2477a0}
body.role-owner{--role-bg:#f1f1f1;--role-surface:#fff;--role-soft:#ededed;--role-text:#111;--role-muted:#666;--role-border:#cfcfcf;--role-accent:#111;--role-accent-dark:#000}
body:is(.role-dev,.role-manager,.role-builder,.role-owner) :is(.staff-shell,.staff-workspace,.staff-tab){color:var(--role-text)!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner) .staff-workspace :is(button,.staff-row,.staff-order-row,.admin-build-card,.admin-search,.admin-select,input,textarea,select){border-color:var(--role-border)!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner) .staff-workspace button:not(.staff-tabs button){background:var(--role-accent)!important;color:#fff!important;border-color:var(--role-accent-dark)!important;transition:transform .16s var(--ease),background .16s,box-shadow .16s!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner) .staff-workspace button:not(.staff-tabs button):hover:not(:disabled){background:var(--role-accent-dark)!important;transform:translateY(-2px) scale(1.025)!important;box-shadow:0 9px 20px rgba(0,0,0,.12)!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner) .staff-workspace :is(input,textarea,select,.admin-search,.admin-select){background:var(--role-surface)!important;color:var(--role-text)!important;border-color:var(--role-border)!important;font-size:16px!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner) .staff-workspace :is(input,textarea,select):focus{border-color:var(--role-accent-dark)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--role-accent) 20%,transparent)!important;outline:0!important}

/* ALL staff-panel popups are neutral black/white — never legacy cyan. */
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]):not(.mobile-panel-backdrop){color:#111!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is([class$="-content"],[class$="-card"],[class$="-dialog"],.admin-popup-content,.customer-order-dialog,.customer-reminder-dialog,.order-participant-profile-card,.shulker-enchant-picker-content){background:#fff!important;color:#111!important;border-color:#c9c9c9!important;box-shadow:0 24px 70px rgba(0,0,0,.23)!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(h1,h2,h3,h4,strong,label,span){color:#111!important;text-shadow:none!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(p,small,.muted,.description){color:#686868!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]) :is(input,textarea,select){background:#fff!important;color:#111!important;border-color:#bbb!important;font-size:16px!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]) button{background:#111!important;color:#fff!important;border-color:#111!important}
body:is(.role-dev,.role-manager,.role-builder,.role-owner):has(.staff-shell) :is([class*="popup"],[class*="modal"],[class*="dialog"]) button:hover:not(:disabled){background:#292929!important;color:#fff!important;border-color:#292929!important}

/* =========================================================
   STAFF ORDER PAGE — OLD orders.css HAS LOTS OF CYAN; OVERRIDE IT ALL
========================================================= */
body.staff-order-view{--order-bg:#f1f1f1;--order-surface:#fff;--order-soft:#f3f3f3;--order-text:#111;--order-muted:#666;--order-border:#ccc;--order-accent:#111;--order-accent-dark:#000;background:var(--order-bg)!important;color:var(--order-text)!important}
body.staff-order-view.role-dev{--order-bg:#efe7ff;--order-surface:#fcfaff;--order-soft:#e8dcf9;--order-text:#2e1d46;--order-muted:#76658c;--order-border:#c8b2ed;--order-accent:#8250cf;--order-accent-dark:#6033a8}
body.staff-order-view.role-manager{--order-bg:#ffe8eb;--order-surface:#fffafb;--order-soft:#f9dadd;--order-text:#4c2025;--order-muted:#8a5e64;--order-border:#efb2ba;--order-accent:#d85d68;--order-accent-dark:#a93640}
body.staff-order-view.role-builder{--order-bg:#e2f4ff;--order-surface:#fbfdff;--order-soft:#d8eef9;--order-text:#17394b;--order-muted:#5c7b8a;--order-border:#a2d4eb;--order-accent:#459fd0;--order-accent-dark:#2477a0}
body.staff-order-view.role-owner{--order-bg:#f1f1f1;--order-surface:#fff;--order-soft:#f3f3f3;--order-text:#111;--order-muted:#666;--order-border:#ccc;--order-accent:#111;--order-accent-dark:#000}
body.staff-order-view :is(.orders-page,.customer-order-popup){background:var(--order-bg)!important;color:var(--order-text)!important}
body.staff-order-view :is(.customer-order-dialog,.order-livechat-shell,.order-livechat-main,.order-livechat-brand,.order-role-sidebar,.order-detail-box,.customer-order-summary>div,.customer-order-options>div,.customer-order-chat,.customer-chat-heading,.customer-message-compose){background:var(--order-surface)!important;color:var(--order-text)!important;border-color:var(--order-border)!important}
body.staff-order-view :is(.customer-order-messages,.order-livechat-messages){background:var(--order-soft)!important;color:var(--order-text)!important;scrollbar-color:var(--order-accent) var(--order-soft)!important}
body.staff-order-view .customer-order-messages::-webkit-scrollbar-track{background:var(--order-soft)!important}
body.staff-order-view .customer-order-messages::-webkit-scrollbar-thumb{background:var(--order-accent)!important;border-color:var(--order-soft)!important}
body.staff-order-view :is(h1,h2,h3,h4,strong,.order-livechat-brand strong,.customer-chat-heading strong,.customer-order-summary span,.customer-order-options span,.orders-back,.orders-message){color:var(--order-text)!important;text-shadow:none!important}
body.staff-order-view :is(p,small,.customer-chat-empty,.chat-attachment-name,.customer-typing-indicator){color:var(--order-muted)!important}
body.staff-order-view :is(#customerOrderMessageInput,.customer-message-compose textarea,input,select,textarea){background:var(--order-surface)!important;color:var(--order-text)!important;border-color:var(--order-border)!important;font-size:16px!important;caret-color:var(--order-text)!important}
body.staff-order-view :is(#sendCustomerOrderMessage,#customerRemindButton,.customer-staff-tools button,.customer-order-summary button,.customer-shulker-edit,.chat-attachment-button){background:var(--order-accent)!important;color:#fff!important;border-color:var(--order-accent-dark)!important}
body.staff-order-view :is(#sendCustomerOrderMessage,#customerRemindButton,.customer-staff-tools button,.customer-order-summary button,.customer-shulker-edit,.chat-attachment-button):hover{background:var(--order-accent-dark)!important;color:#fff!important}
body.staff-order-view .customer-chat-message{background:transparent!important;color:var(--order-text)!important}
body.staff-order-view .customer-chat-message .customer-chat-message-content{background:var(--order-surface)!important;color:var(--order-text)!important;border:1px solid var(--order-border)!important;border-radius:13px!important}
body.staff-order-view .customer-chat-message.buyer .customer-chat-message-content{background:var(--order-accent)!important;color:#fff!important;border-color:var(--order-accent-dark)!important}
body.staff-order-view .customer-chat-message.buyer .customer-chat-message-content :is(strong,p,small,span){color:#fff!important}
body.staff-order-view .customer-chat-avatar{border-color:var(--order-border)!important;background:var(--order-soft)!important}

/* Every order popup/modal/context menu is monochrome, regardless staff role. */
body.staff-order-view :is(.customer-reminder-modal,.order-participant-profile-modal,.order-shulker-preview-modal){background:rgba(0,0,0,.56)!important;backdrop-filter:blur(6px)!important}
body.staff-order-view :is(.customer-reminder-dialog,.order-participant-profile-card,.order-shulker-preview-dialog,.customer-chat-context-menu,.customer-chat-compose-mode,.customer-chat-close-request){background:#fff!important;color:#111!important;border-color:#c8c8c8!important;box-shadow:0 22px 65px rgba(0,0,0,.25)!important}
body.staff-order-view :is(.customer-reminder-dialog,.order-participant-profile-card,.order-shulker-preview-dialog,.customer-chat-context-menu,.customer-chat-compose-mode,.customer-chat-close-request) :is(h1,h2,h3,h4,strong,label,span){color:#111!important;text-shadow:none!important}
body.staff-order-view :is(.customer-reminder-dialog,.order-participant-profile-card,.order-shulker-preview-dialog,.customer-chat-context-menu,.customer-chat-compose-mode,.customer-chat-close-request) :is(p,small){color:#666!important}
body.staff-order-view :is(.customer-reminder-dialog,.order-participant-profile-card,.order-shulker-preview-dialog,.customer-chat-context-menu,.customer-chat-compose-mode,.customer-chat-close-request) :is(input,textarea,select){background:#fff!important;color:#111!important;border-color:#bbb!important;font-size:16px!important}
body.staff-order-view :is(.customer-reminder-dialog,.order-participant-profile-card,.order-shulker-preview-dialog,.customer-chat-context-menu,.customer-chat-compose-mode,.customer-chat-close-request) button{background:#111!important;color:#fff!important;border-color:#111!important}
body.staff-order-view :is(.customer-reminder-dialog,.order-participant-profile-card,.order-shulker-preview-dialog,.customer-chat-context-menu,.customer-chat-compose-mode,.customer-chat-close-request) button:hover:not(:disabled){background:#292929!important;color:#fff!important;border-color:#292929!important}
body.staff-order-view :is(.customer-order-close,.order-participant-profile-close,.order-shulker-preview-close){background:#fff!important;color:#111!important;border:1px solid #bbb!important}

/* Correct role badge colors (legacy CSS had Dev cyan and Manager purple). */
body.staff-order-view :is(.role-dev .order-role-icon,.order-role-badge.role-dev){background:#8250cf!important;color:#fff!important}
body.staff-order-view :is(.role-manager .order-role-icon,.order-role-badge.role-manager){background:#d85d68!important;color:#fff!important}
body.staff-order-view :is(.role-builder .order-role-icon,.order-role-badge.role-builder){background:#459fd0!important;color:#fff!important}
body.staff-order-view :is(.role-owner .order-role-icon,.order-role-badge.role-owner){background:#111!important;color:#fff!important}

/* Mobile: hamburger is ONLY the top-left control; no duplicate bottom menu. */
@media(max-width:900px){
  .mobile-panel-menu,.staff-mobile-menu{position:fixed!important;top:calc(10px + env(safe-area-inset-top))!important;left:12px!important;right:auto!important;bottom:auto!important;z-index:9999!important;background:#111!important;color:#fff!important;border:1px solid #333!important}
  .mobile-panel-menu span,.staff-mobile-menu span{background:#fff!important}
  .staff-mobile-menu-row{position:static!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  body.staff-order-view textarea,body.staff-order-view input,body.staff-order-view select,
  body:has(.admin-layout) textarea,body:has(.admin-layout) input,body:has(.admin-layout) select,
  body:has(.staff-shell) textarea,body:has(.staff-shell) input,body:has(.staff-shell) select{font-size:16px!important}
}
