/* PharmaSync v95.20zzpq — Pharmacy Owner interface system consolidation.
   Presentation-only: shared tokens, tablet consistency, calmer typography/card density,
   coarse-pointer touch targets, and source-rendered SVG sizing. */
html[data-ps-role="owner"]{
  --ps-ui-surface:#ffffff;
  --ps-ui-surface-soft:#f7f9fc;
  --ps-ui-surface-muted:#f1f5f9;
  --ps-ui-border:rgba(100,116,139,.20);
  --ps-ui-border-soft:rgba(148,163,184,.16);
  --ps-ui-text:#10233f;
  --ps-ui-muted:#64748b;
  --ps-ui-primary:#2563eb;
  --ps-ui-radius-sm:11px;
  --ps-ui-radius-md:15px;
  --ps-ui-radius-lg:20px;
  --ps-ui-shadow-sm:0 4px 14px rgba(15,23,42,.055);
  --ps-ui-shadow-md:0 12px 30px rgba(15,23,42,.09);
  --ps-ui-font-strong:800;
}
html[data-ps-role="owner"][data-ps-owner-theme="dark"],
html[data-ps-role="owner"][data-ps-ui-theme="dark"],
html[data-ps-role="owner"][data-theme="dark"]{
  --ps-ui-surface:#111c2b;
  --ps-ui-surface-soft:#152235;
  --ps-ui-surface-muted:#19283b;
  --ps-ui-border:rgba(148,163,184,.22);
  --ps-ui-border-soft:rgba(148,163,184,.14);
  --ps-ui-text:#edf4fb;
  --ps-ui-muted:#9fb0c5;
  --ps-ui-primary:#60a5fa;
  --ps-ui-shadow-sm:0 4px 14px rgba(0,0,0,.18);
  --ps-ui-shadow-md:0 12px 30px rgba(0,0,0,.28);
}
.ps-owner-svg-icon{display:block;width:1.1em;height:1.1em;flex:0 0 auto;color:currentColor;vertical-align:-.15em}
button .ps-owner-svg-icon,a .ps-owner-svg-icon{pointer-events:none}
.ps-owner-icon-label{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:0}

/* Calmer typography: keep hierarchy strong without synthetic 900/950 weights. */
html[data-ps-role="owner"] :is(
  [data-ps-owner-dashboard-title="1"],[data-ps-owner-stat-value="1"],[data-ps-owner-stat-label="1"],
  .ps-ota-title,.ps-ota-head-copy h2,.ps-ota-item-name,.ps-ota-item-title,.ps-ota-summary-count,
  .ps-cc-head-avatar,.ps-cc-head-kicker,.ps-cc-close,.ps-cc-tab,.ps-cc-next-kicker,.ps-cc-next-title,.ps-cc-next button,
  .ps-cc-card-kicker,.ps-cc-value,.ps-cc-card-link,.ps-cc-status,.ps-cc-section-title h3,.ps-cc-today-manual-note strong,
  .ps-ux-sheet-close,.ps-ux-sheet-action,.ps-ux-more-badge,
  .ps-ai-title h2,.ps-ai-tools-toggle,.ps-ai-chip,.ps-ai-pdf-actions button
){font-weight:var(--ps-ui-font-strong)!important}

/* Flatten nested cards slightly: section hierarchy carries more of the visual structure. */
html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-section{
  box-shadow:var(--ps-ui-shadow-sm)!important;
  border-color:var(--ps-ui-border)!important;
}
html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-section .ps-cc-card{
  box-shadow:none!important;
  border-color:var(--ps-ui-border-soft)!important;
  background:color-mix(in srgb,var(--ps-ui-surface) 96%,var(--ps-ui-surface-muted))!important;
}
html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-profile-box{
  box-shadow:none!important;border-color:var(--ps-ui-border-soft)!important
}
html[data-ps-role="owner"] #pharmasync-owner-manual-leave-toolbar button,
html[data-ps-role="owner"] #ps-owner-today-alerts-card-v94-267,
html[data-ps-role="owner"] [data-ps-owner-stat-card="1"]{
  box-shadow:var(--ps-ui-shadow-sm)!important;
}

/* Wide touch tablets: preserve desktop/wide shell but use touch-safe targets. */
@media (min-width:821px) and (max-width:1180px) and (any-pointer:coarse){
  html[data-ps-role="owner"] #ps-desktop-sidebar-tabs-scroll-v94-426 > [role="button"]{
    min-height:46px!important;max-height:none!important;padding-top:8px!important;padding-bottom:8px!important
  }
  html[data-ps-role="owner"] :has(> #ps-desktop-sidebar-tabs-scroll-v94-426) > :last-child > [role="button"]{
    min-height:46px!important
  }
  html[data-ps-role="owner"] button,html[data-ps-role="owner"] [role="button"]{touch-action:manipulation}
  html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-tab{min-height:44px!important;padding-block:10px!important}
}

/* Compact-tablet contract: 761–820px consistently uses the bottom-sheet/full-screen working surface. */
@media (min-width:761px) and (max-width:820px){
  html[data-ps-role="owner"] #ps-ai-owner-v94-218{align-items:flex-end!important}
  html[data-ps-role="owner"] #ps-ai-owner-v94-218 .ps-ai-panel{
    width:100%!important;height:min(93dvh,860px)!important;max-height:93dvh!important;
    border-radius:26px 26px 0 0!important;border-left:0!important;
    box-shadow:0 -18px 55px rgba(4,20,52,.26)!important;
    transform:translateY(22px) scale(.994)
  }
  html[data-ps-role="owner"] #ps-ai-owner-v94-218[data-motion="opening"] .ps-ai-panel,
  html[data-ps-role="owner"] #ps-ai-owner-v94-218[data-motion="open"] .ps-ai-panel{transform:translateY(0) scale(1)!important}
  html[data-ps-role="owner"] #ps-ai-owner-v94-218[data-motion="closing"] .ps-ai-panel{transform:translateY(18px) scale(.996)!important}

  html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252{padding:0!important;align-items:flex-end!important}
  html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-shell{
    width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important
  }
  html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-grid{grid-template-columns:1fr 1fr!important}
  html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-tab{min-height:44px!important}

  html[data-ps-role="owner"] #pharmasync-owner-manual-leave-modal,
  html[data-ps-role="owner"] #pharmasync-leave-pdf-modal,
  html[data-ps-role="owner"] #ps-owner-today-alerts-modal-v94-267{align-items:flex-end!important;padding:0!important}
  html[data-ps-role="owner"] #pharmasync-owner-manual-leave-modal .ps-leave-sheet,
  html[data-ps-role="owner"] #pharmasync-leave-pdf-modal .ps-pdf-sheet,
  html[data-ps-role="owner"] #ps-owner-today-alerts-modal-v94-267 .ps-ota-dialog{
    width:100%!important;max-width:none!important;max-height:92dvh!important;border-radius:24px 24px 0 0!important;border-bottom:0!important
  }
  html[data-ps-role="owner"] #pharmasync-owner-manual-leave-modal button,
  html[data-ps-role="owner"] #pharmasync-leave-pdf-modal button,
  html[data-ps-role="owner"] #ps-owner-today-alerts-modal-v94-267 button{min-height:44px}
}

/* Small phones stay compact; tablet+ uses two-column content only where it has room. */
@media (max-width:760px){
  html[data-ps-role="owner"] #ps-employee-control-center-dom-v94-252 .ps-cc-grid{grid-template-columns:1fr!important}
}

/* Reduced motion is a global accessibility promise for the new Owner system layer. */
@media (prefers-reduced-motion:reduce){
  html[data-ps-role="owner"] *,html[data-ps-role="owner"] *::before,html[data-ps-role="owner"] *::after{
    scroll-behavior:auto!important
  }
}

/* Inline SVG alignment for source-rendered Owner controls. */
html[data-ps-role="owner"] :is(
  #pharmasync-owner-manual-leave-toolbar button,
  #pharmasync-owner-manual-leave-modal .ps-choice button,
  #pharmasync-owner-manual-leave-modal .ps-submit,
  #pharmasync-leave-pdf-modal .ps-pdf-print,
  #ps-employee-control-center-dom-v94-252 .ps-cc-close,
  #ps-employee-control-center-dom-v94-252 .ps-cc-tab,
  #ps-employee-control-center-dom-v94-252 .ps-cc-refresh,
  #ps-employee-attendance-center-v94-214 .ps-ac-action,
  #ps-ux-more-tab-v94-218
){display:flex;align-items:center;justify-content:center;gap:7px}
html[data-ps-role="owner"] #pharmasync-owner-manual-leave-modal .ps-leave-head h2,
html[data-ps-role="owner"] #pharmasync-leave-pdf-modal .ps-pdf-head h2{display:flex;align-items:center;gap:8px}
html[data-ps-role="owner"] :is(.ps-ota-icon,.ps-ota-head-icon,.ps-ota-item-icon,.ps-ota-empty-icon,.ps-map-title,.ps-map-open,.ps-mpd-icon,.ps-ux-sheet-icon,.ps-cc-card-icon,.ps-cc-section-icon) .ps-owner-svg-icon{width:20px;height:20px}
html[data-ps-role="owner"] .ps-ota-empty-icon .ps-owner-svg-icon{width:36px;height:36px;margin-inline:auto}
html[data-ps-role="owner"] .ps-map-title .ps-owner-svg-icon,html[data-ps-role="owner"] .ps-map-open .ps-owner-svg-icon{width:18px;height:18px}
html[data-ps-role="owner"] #ps-ux-more-tab-v94-218 .ps-owner-svg-icon{width:22px;height:22px}

/* Membership / Support: calm typography, shallower nesting, and touch-safe controls. */
html[data-ps-role="owner"] #ps-ms-root :is(.ms-tab,.ms-small-btn,.ms-primary,.ms-suggestion,.ms-close){
  font-weight:var(--ps-ui-font-strong)!important;
}
html[data-ps-role="owner"] #ps-ms-root :is(.ms-list-title,.ms-form h3,.ms-section-title,.ms-field label){
  font-weight:var(--ps-ui-font-strong)!important;
}
html[data-ps-role="owner"] #ps-ms-root .ms-form{
  box-shadow:var(--ps-ui-shadow-sm)!important;
  border-color:var(--ps-ui-border)!important;
}
html[data-ps-role="owner"] #ps-ms-root :is(.ms-tab,.ms-small-btn,.ms-primary,.ms-suggestion){min-height:44px}
html[data-ps-role="owner"] #ps-ms-root :is(.ms-tab,.ms-small-btn,.ms-primary,.ms-suggestion,.ms-send,.ms-mobile-back){
  display:flex;align-items:center;justify-content:center;gap:7px;
}
html[data-ps-role="owner"] #ps-ms-root :is(.ms-brand-icon,.ms-empty-icon,.ms-suggestion-icon) .ps-owner-svg-icon{width:22px;height:22px}
html[data-ps-role="owner"] #ps-ms-root .ms-file-preview-name .ps-owner-svg-icon{width:16px;height:16px;vertical-align:-3px;margin-inline-end:4px}

/* Plan: source SVGs and the same surface/touch contract as the rest of Owner. */
html[data-ps-role="owner"] #ps-owner-plan-overlay :is(.ps-plan-action,.ps-plan-close,.ps-plan-open-thread,.ps-plan-finish,.ps-plan-copy,.ps-plan-cancel){min-height:44px}
html[data-ps-role="owner"] #ps-owner-plan-overlay :is(.ps-plan-logo,.ps-plan-icon,.ps-plan-success-icon,.ps-plan-footer){color:inherit}
html[data-ps-role="owner"] #ps-owner-plan-overlay .ps-plan-card{box-shadow:var(--ps-ui-shadow-sm)!important}

@media (min-width:761px) and (max-width:820px){
  html[data-ps-role="owner"] #ps-ms-root{padding:0!important;align-items:flex-end!important}
  html[data-ps-role="owner"] #ps-ms-root .ms-shell{
    width:100%!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important;border:0!important
  }
  html[data-ps-role="owner"] #ps-ms-root :is(.ms-tab,.ms-close,.ms-small-btn,.ms-primary,.ms-suggestion){min-height:44px!important}
  html[data-ps-role="owner"] #ps-owner-plan-overlay{align-items:flex-end!important;padding:0!important}
  html[data-ps-role="owner"] #ps-owner-plan-overlay .ps-plan-shell{
    width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important
  }
}
