/* Screen-only administration presentation. Public pages and printed reports keep their original styles. */
@media screen {
  html[data-admin-ui]{--admin-text-scale:1;font-size:100%;scroll-behavior:auto;scroll-padding-top:1rem}
  .admin-page{--ink:#162e23;--ink-soft:#46594c;--line:#bdcec2;font-size:calc(1rem * var(--admin-text-scale))!important;line-height:1.65rem;background:#f4f7f5;color:var(--ink);min-width:320px;overflow-wrap:anywhere}
  .admin-page :where(*:not(svg,svg *)){font-size:inherit!important}
  .admin-page h1{font-size:calc(1.75rem * var(--admin-text-scale))!important;line-height:2.45rem!important;word-break:normal;overflow-wrap:anywhere}
  .admin-page h2{font-size:calc(1.375rem * var(--admin-text-scale))!important;line-height:1.925rem!important;overflow-wrap:anywhere}
  .admin-page h3,.admin-page h4{font-size:calc(1.125rem * var(--admin-text-scale))!important;line-height:1.6875rem!important;overflow-wrap:anywhere}
  .admin-page small,.admin-page .eyebrow,.admin-page .gsi-note,.admin-page .muted{font-size:calc(.875rem * var(--admin-text-scale))!important;line-height:1.4rem!important}
  .admin-page :where(p,label,td,th,li,legend){line-height:1.65rem!important;overflow-wrap:anywhere}
  .admin-page :where(input,select,textarea,button),.admin-page .btn{font-size:calc(1rem * var(--admin-text-scale))!important}
  .admin-page input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.admin-page select,.admin-page textarea{min-height:2.75rem!important;min-width:0;max-width:100%;padding:.5rem .65rem;line-height:1.5rem!important}
  .admin-page input[type=checkbox],.admin-page input[type=radio]{width:1.2rem!important;height:1.2rem!important;accent-color:#174c35;flex-shrink:0}
  .admin-page button,.admin-page .btn,.admin-page summary{min-height:2.75rem!important;height:auto;white-space:normal!important;line-height:1.5rem!important;overflow-wrap:anywhere}
  .admin-page summary em{white-space:normal;max-width:100%;overflow-wrap:anywhere}
  .admin-page button,.admin-page .btn{padding:.55rem .85rem}
  .admin-page .btn--primary,.admin-page .btn--accent{background:#174c35!important;color:#fff!important;border:2px solid #174c35}
  .admin-page .btn--ghost{background:#fff;color:#174c35;border:1px solid #6d8d79}
  .admin-page .btn--danger{background:#922d25!important;color:#fff!important;border-color:#922d25}
  .admin-page :where(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #005fcc!important;outline-offset:3px;box-shadow:0 0 0 3px #fff!important}
  .admin-page [hidden]{display:none!important}
  .admin-page details:not([open])>:not(summary){display:none}
  .admin-page .field{min-width:0;max-width:100%;grid-template-columns:minmax(0,1fr);gap:.4rem}
  .admin-page .field>input,.admin-page .field>select,.admin-page .field>textarea{width:100%;min-width:0}
  .admin-page .panel__header>*{min-width:0;max-width:100%}
  .admin-page .eyebrow{max-width:100%;flex-wrap:wrap;overflow-wrap:anywhere}
  .admin-page :where(.status,.count-chip,.permission-badge,.role-chip){max-width:100%;white-space:normal;height:auto;overflow-wrap:anywhere}
  .admin-page .admin-heading,.admin-page .panel__header,.admin-page .admin-session{flex-wrap:wrap;gap:1rem}
  .admin-page .admin-heading>*{min-width:0;max-width:100%}
  .admin-page .admin-grid--2{grid-template-columns:repeat(auto-fit,minmax(min(100%,26rem),1fr))}
  .admin-page .admin-grid--menu{grid-template-columns:repeat(auto-fit,minmax(min(100%,26rem),1fr))}
  .admin-page .menu-type-detail-admin-card__head{flex-wrap:wrap;gap:.5rem}
  .admin-page .procurement-attention li small{white-space:normal;min-width:0}
  .admin-page .procurement-attention li{grid-template-columns:minmax(0,1fr)}
  .admin-page .admin-grid--accounts,.admin-page .settings-layout{grid-template-columns:repeat(auto-fit,minmax(min(100%,26rem),1fr))}
  .admin-page :where(.admin-grid,.settings-layout)>*{min-width:0}
  .admin-page .filter-form{flex-wrap:wrap}
  .admin-page .order-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
  .admin-page .month-button{width:auto;max-width:100%;white-space:normal;min-height:2.75rem}
  .admin-page .month-title{min-width:0;max-width:100%}
  .admin-page .month-switcher{max-width:100%;flex-wrap:wrap}
  .admin-page .month-switcher a{width:2.75rem;height:2.75rem;flex-shrink:0}
  .admin-page .procurement-month{overflow-x:auto}
  .admin-page .procurement-calendar-grid{min-width:42rem}
  .admin-page .procurement-cycle-guide__summary>strong{font-size:calc(1.125rem * var(--admin-text-scale))!important}
  .admin-page .procurement-batch-count{font-size:calc(.875rem * var(--admin-text-scale))!important}
  .admin-page .sr-button{white-space:normal;max-width:100%;min-height:2.75rem;overflow-wrap:anywhere}
  .admin-page .sr-heading-actions{max-width:100%;min-width:0;flex-wrap:wrap}
  .admin-page .sr-heading{flex-wrap:wrap}
  .admin-page .sr-heading>*{min-width:0;max-width:100%}
  .admin-page svg.sr-chart{min-width:var(--admin-chart-width,60rem);max-height:none}
  .admin-page .sr-chart-scroll{max-width:100%;overflow-x:auto}
  .admin-page .form-grid--2{grid-template-columns:repeat(auto-fit,minmax(min(100%,16rem),1fr))}
  .admin-page .form-grid--type{grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr))}
  .admin-page .product-type-admin-card{min-width:0;max-width:100%}
  .admin-page .management-account-actions{display:flex;flex-wrap:wrap;max-width:100%;min-width:0}
  .admin-page .management-account-edit[open]{flex:1 1 100%;min-width:0}
  .admin-page .management-account-edit>form{position:static;width:100%;max-height:none;margin-top:.5rem;padding:1rem}
  .admin-page .management-account-actions:has(.management-account-edit[open]){grid-column:1/-1}
  .admin-page .qr-bulk-toolbar{flex-wrap:wrap}
  .admin-page .qr-bulk-toolbar>*{min-width:0;max-width:100%;overflow-wrap:anywhere}
  .admin-page .qr-bulk-toolbar__actions{flex-wrap:wrap}
  .admin-page .qr-bulk-toolbar__status{min-height:1.4rem}
  .admin-page .ingredient-usage-list{max-width:100%;overflow-x:auto}
  .admin-page .admin-stat-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr));gap:1rem}
  .admin-page .admin-stat-grid strong,.admin-page .sr-kpi>strong,.admin-page .points-stat-grid strong{font-size:calc(2rem * var(--admin-text-scale))!important;line-height:2.6rem!important;overflow-wrap:anywhere}
  .admin-page .admin-stat-grid strong small{font-size:calc(1rem * var(--admin-text-scale))!important}
  .admin-page .admin-site-header__inner{flex-wrap:wrap;gap:1rem;padding-block:1rem;min-height:0}
  .admin-page .admin-brand{min-width:0;max-width:100%;white-space:normal}
  .admin-page .admin-brand strong{font-size:calc(1.125rem * var(--admin-text-scale))!important}
  .admin-page .admin-session{margin-left:auto;max-width:100%}
  .admin-page .admin-session>span{white-space:normal}
  .admin-page .admin-session a,.admin-page .admin-logout{min-height:2.75rem;padding:.5rem .75rem;display:inline-flex;align-items:center}
  .admin-page .flash-stack{position:static;width:min(calc(100% - 2rem),1360px);max-width:none;margin:1rem auto;transform:none}
  .admin-page .flash{position:relative;height:auto;max-height:none;overflow:visible}
  .admin-page :where(.table-wrap,.responsive-table,.gsi-scroll,.sr-table-wrap,.analysis-table-wrap){max-width:100%;overflow-x:auto}
  .admin-page :where(div,section):has(>table){max-width:100%;overflow-x:auto}
  .admin-page th,.admin-page td{padding:.7rem .8rem;height:auto;white-space:normal}
  .admin-page :where(.panel,.admin-task-hub,.admin-feature-panel,.admin-feature-group){min-width:0}
  .admin-page :where(.gsi-scroll,.responsive-table,.table-wrap) a{white-space:normal!important}
  .admin-page .invoice-subtabs,.admin-page .receipt-scope-tabs{flex-wrap:wrap;gap:.5rem}
  .admin-page .invoice-subtabs a,.admin-page .receipt-scope-tabs a{min-height:2.75rem;padding:.6rem .85rem;white-space:normal}
  .admin-page .gsi-materials-table table{table-layout:auto}
  .admin-page dialog{max-width:calc(100vw - 1rem);max-height:calc(100dvh - 1rem);overflow-y:auto}
  .admin-page .gsi-stock-shell{max-height:none}
  .admin-page .gsi-stock-results{max-height:42dvh}
  .admin-page .gsi-stock-actions{flex-wrap:wrap}
  .admin-page .gsi-stock-toolbar{align-items:start}
  .admin-page .gsi-controls label{min-width:0;flex:1 1 16rem;max-width:100%}
  .admin-page .gsi-controls input,.admin-page .gsi-controls select{width:100%;min-width:0}
  .admin-page .gsi-stock-pager{flex-wrap:wrap;gap:.5rem}
  .admin-page .admin-login-card{width:min(100%,34rem);padding:clamp(1rem,4vw,3rem)}
  .admin-page .admin-login-shell{min-height:0;grid-template-columns:repeat(auto-fit,minmax(min(100%,28rem),1fr))}
  .admin-page .admin-login-intro,.admin-page .admin-login-panel{min-height:0;padding:clamp(1rem,4vw,3rem)}
  .admin-page .admin-login-intro p,.admin-page .admin-login-intro small{color:#fff}

  .admin-display-preferences{max-width:56rem}
  .admin-display-settings fieldset{margin:0;padding:0;border:0;min-width:0}
  .admin-display-settings legend{font-weight:700;margin-bottom:.75rem}
  .admin-size-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(3.5rem,1fr));gap:.5rem}
  .admin-size-options button{border:1px solid #6d8d79;border-radius:.5rem;background:#fff;color:#173b28;min-width:0;min-height:2.75rem}
  .admin-size-options button[aria-pressed=true]{background:#174c35;color:#fff;border-color:#174c35;font-weight:800!important;box-shadow:inset 0 0 0 1px #174c35}
  .admin-bold-option{display:flex;align-items:center;gap:.75rem;min-height:2.75rem;margin-top:1rem;font-weight:700}
  .admin-display-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-top:1rem}
  .admin-display-footer button{border:1px solid #9bb5a4;border-radius:.5rem;background:#fff;color:#173b28}
  .admin-display-preview{max-width:56rem}
  html[data-admin-bold=bold] .admin-page :where(*:not(svg,svg *)){font-weight:700!important}
  html[data-admin-bold=bold] .admin-page :where(h1,h2,h3,h4){font-weight:800!important}
  .admin-page svg.sr-chart text{font-size:calc(var(--admin-chart-label-size,11px) * var(--admin-text-scale))}
  html[data-admin-bold=bold] .admin-page svg text{font-weight:700!important}
  .admin-shell{display:grid;grid-template-columns:clamp(248px,20vw,288px) minmax(0,1fr);align-items:start;min-height:100dvh}
  html[data-admin-sidebar=closed] .admin-shell{grid-template-columns:minmax(0,1fr)}
  html[data-admin-sidebar=closed] .admin-sidebar{display:none}
  .admin-content{min-width:0}
  .admin-sidebar-page .admin-main{min-height:100dvh;padding-top:1.25rem}
  .admin-sidebar-page .admin-workspace-header{display:none}
  .admin-sidebar{position:sticky;top:0;height:100dvh;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;background:#fff;border-right:1px solid #bdcec2;padding:0 .85rem 1rem;min-width:0}
  .admin-sidebar-brand{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;background:#fff;padding:1rem 0;border-bottom:1px solid #dce6df}
  .admin-sidebar .admin-brand{color:#173b28;gap:.65rem}
  .admin-sidebar .admin-brand small{color:#46594c}
  .admin-sidebar .brand__mark{width:2.5rem;height:2.5rem;flex-shrink:0}
  .admin-sidebar-nav{padding-top:.65rem}
  .admin-sidebar-home{display:flex;align-items:center;gap:.65rem;min-height:2.75rem;padding:.65rem;border-radius:.5rem}
  .admin-sidebar-home svg{width:1.4rem;height:1.4rem;flex-shrink:0}
  .admin-sidebar-home[aria-current=page]{background:#eaf3ed;color:#173b28;border-left:4px solid #174c35}
  .admin-feature-search{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.35rem;margin:.75rem 0}
  .admin-feature-search label{display:grid;gap:.35rem;min-width:0;font-weight:700}
  .admin-feature-search input{width:100%;min-width:0;border:1px solid #6d8d79;border-radius:.4rem;background:#fff}
  .admin-feature-search button{min-width:2.75rem;border:1px solid #9bb5a4;border-radius:.4rem;background:#fff;color:#173b28}
  .admin-feature-result{margin:.5rem 0;color:#46594c;font-size:calc(.875rem * var(--admin-text-scale))!important}
  .admin-feature-group{border-top:1px solid #dce6df}
  .admin-feature-group>summary{display:flex;align-items:center;gap:.6rem;list-style:none;padding:.8rem .5rem;cursor:pointer;border-radius:.4rem}
  .admin-feature-group>summary::-webkit-details-marker{display:none}
  .admin-feature-group>summary svg{flex:0 0 1.4rem;width:1.4rem;height:1.4rem;color:#174c35}
  .admin-feature-group>summary strong{min-width:0;flex:1}
  .admin-feature-group>summary:hover,.admin-feature-group[open]>summary{background:#edf5ef}
  .admin-group-arrow{flex-shrink:0;line-height:1}
  .admin-feature-group[open] .admin-group-arrow{transform:rotate(180deg)}
  .admin-feature-group ul{list-style:none;margin:0;padding:0 0 .5rem .5rem}
  .admin-feature-group a{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;min-height:2.75rem;padding:.65rem .65rem .65rem .85rem;border-left:2px solid #dce6df;margin:.15rem 0;overflow-wrap:anywhere}
  .admin-feature-group a>span{flex:1 1 100%;min-width:0}
  .admin-feature-group a:hover{background:#f2f7f3}
  .admin-feature-group a[aria-current=page]{background:#eaf3ed;border-left:4px solid #174c35;font-weight:700}
  .admin-feature-group a small{font-weight:600;color:#345f45}
  .admin-unread-badge{background:#962f25;color:#fff;border-radius:.5rem;padding:.1rem .4rem;font-size:calc(.875rem * var(--admin-text-scale))!important}
  .admin-sidebar-tools{margin-top:1rem;border-top:1px solid #bdcec2;padding-top:.5rem}
  .admin-sidebar .admin-session{display:grid;gap:.25rem;margin:1rem 0 0;padding:.75rem .25rem 0;border-top:1px solid #dce6df}
  .admin-sidebar .admin-session>span{display:grid;gap:.25rem;color:#173b28;text-align:left}
  .admin-sidebar .admin-session small{color:#46594c}
  .admin-sidebar .admin-session a{color:#174c35;text-decoration:underline;padding:.5rem 0}
  .admin-sidebar .admin-logout{color:#174c35;border:1px solid #6d8d79;background:#fff;border-radius:.5rem;margin-top:.5rem}
  .admin-sidebar-close,.admin-sidebar-toggle{border:1px solid #6d8d79;border-radius:.5rem;background:#fff;color:#173b28;cursor:pointer}
  .admin-sidebar-close{margin-left:auto}
  .admin-sidebar-close-icon{display:none}
  .admin-sidebar-backdrop{position:fixed;inset:0;z-index:200;min-height:100dvh!important;width:100%;padding:0!important;border:0;background:#102b2070;cursor:pointer}
  .admin-workspace-location{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin:0 0 1rem;font-size:calc(.875rem * var(--admin-text-scale))!important}
  .admin-workspace-location a{display:inline-flex;align-items:center;min-height:2.75rem;text-decoration:underline;text-underline-offset:.2em}
  @media(min-width:1101px){
    .admin-sidebar-brand .admin-brand{flex:1;min-width:0}
    .admin-sidebar-brand .admin-brand>span:last-child{min-width:0}
    .admin-sidebar-close{flex-shrink:0;min-width:2.75rem;padding:.3rem!important}
    .admin-sidebar-close-icon{display:block;font-size:1.5rem!important;line-height:1.5rem}
    .admin-sidebar-close-text{display:none}
    html[data-admin-sidebar=closed] .admin-sidebar-page .admin-workspace-header{display:block;position:sticky;top:0;z-index:150;min-height:0;background:#f4f7f5;box-shadow:none}
    .admin-sidebar-page .admin-workspace-header .admin-site-header__inner{width:100%;padding:.5rem 1.25rem;gap:.75rem;min-height:0;justify-content:flex-start}
    .admin-workspace-header strong{display:none}
  }
  @media(max-width:1100px){
    .admin-shell{display:block}
    .admin-sidebar{height:auto;position:static;width:100%;border-right:0}
    .admin-sidebar-page .admin-workspace-header{display:block;position:sticky;top:0;z-index:150;min-height:0}
    .admin-sidebar-page .admin-workspace-header .admin-site-header__inner{width:100%;padding:.4rem .75rem;gap:.75rem;min-height:0;justify-content:flex-start;flex-wrap:wrap}
    .admin-workspace-header strong{min-width:0}
    html[data-admin-sidebar] .admin-sidebar{position:fixed;inset:0 auto 0 0;z-index:300;width:min(360px,calc(100vw - 24px));height:100dvh;overflow-y:auto;border-right:1px solid #bdcec2}
    html[data-admin-sidebar=closed] .admin-sidebar{display:none}
    .admin-sidebar-open{overflow:hidden}
    .admin-sidebar-page .admin-main{min-height:calc(100dvh - 4rem);padding-top:1rem}
  }
  .admin-display-info{margin-bottom:1.5rem;padding:1.25rem;border:1px solid #b8cebf;background:#edf5ef;border-radius:.8rem}
  @media(max-width:640px){.admin-page .admin-session{margin-left:0}.admin-page .admin-site-header__inner{padding:1rem}.admin-page .container{width:calc(100% - 1.5rem)}.admin-page .admin-login-intro{display:none}}
  @media(prefers-reduced-motion:reduce){.admin-page *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
}
