/* Shared screen scale. Printed technical sheets keep their own export styles. */
:root{
 --ui-font:14px;--ui-text-sm:12px;--ui-caption:11px;--ui-h1:28px;--ui-h2:20px;--ui-h3:16px;
 --ui-button-font:13px;--ui-control-font:14px;--ui-table-font:13px;--ui-dense-font:12px;
 --ui-control-height:38px;--ui-compact-height:26px;--ui-radius:9px;
 --ui-space-1:4px;--ui-space-2:8px;--ui-space-3:12px;--ui-space-4:16px;--ui-space-6:24px;
}
@media screen{
 body{font-size:var(--ui-font);line-height:1.45}
 button,input,select,textarea{font-family:inherit;line-height:1.35}
 #content>.title h1,.auth-card h1{font-size:var(--ui-h1);line-height:1.2;letter-spacing:-.02em}
 #content>.title p{font-size:var(--ui-font);line-height:1.5;margin-top:var(--ui-space-2)}
 #content h2,#modal h2{font-size:var(--ui-h2);line-height:1.3}
 #content h3,#modal h3{font-size:var(--ui-h3);line-height:1.35}
 #content>.title{gap:var(--ui-space-4);margin-bottom:var(--ui-space-4)}
 #content .primary,#modal .primary,.auth-card .primary{font-size:var(--ui-button-font);min-height:var(--ui-control-height);padding:9px 14px;border-radius:var(--ui-radius)}
 #content .link,#modal .link,.logout,.theme-toggle{font-size:var(--ui-button-font);line-height:1.35}
 #content .link,#modal .link{min-height:30px;padding:6px 8px}
 #content input:not([type=checkbox]):not([type=radio]),#content select,#content textarea,
 #modal input:not([type=checkbox]):not([type=radio]),#modal select,#modal textarea,
 .auth-card input{font-size:var(--ui-control-font);min-height:var(--ui-control-height);padding:9px 10px;line-height:1.35;box-sizing:border-box}
 #content input[type=checkbox],#content input[type=radio],#modal input[type=checkbox],#modal input[type=radio]{width:16px;height:16px;min-height:0;padding:0;flex-shrink:0}
 #content input[type=file],#modal input[type=file]{font-size:var(--ui-text-sm)}
 input::file-selector-button{font:inherit;padding:5px 8px;margin-right:8px}
 #content label,#modal label,.user-edit-grid label,.users-restaurants label{font-size:var(--ui-text-sm);line-height:1.4}
 #content .dashboard-toolbar label,#content .ingredient-catalog-toolbar label{font-size:var(--ui-text-sm);gap:6px;letter-spacing:.05em}
 #content .dashboard-toolbar input,#content .dashboard-toolbar select{font-size:var(--ui-control-font)}
 #content .muted,#modal .muted,.card small,.restaurant-setting-field small{font-size:var(--ui-text-sm);line-height:1.45}
 #content .badge,#modal .badge,.classification-orders{font-size:var(--ui-caption);line-height:1.4}
 #content .table th,#modal .table th{font-size:var(--ui-caption);line-height:1.4;letter-spacing:.035em;padding:10px 12px}
 #content .table td,#modal .table td{font-size:var(--ui-table-font);line-height:1.4;padding:10px 12px}
 #content .table td .link,#modal .table td .link{font-size:var(--ui-text-sm)}
 #content .panel,#content .card{padding:var(--ui-space-4);border-radius:12px}
 #content .cards,#content .dashboard-detail{gap:var(--ui-space-4)}
 #content .card{min-height:124px}
 #content .metric{font-size:28px;line-height:1.15;margin:12px 0 6px;font-weight:750}
 #content .dashboard-rankings .ranking-list li{min-height:64px;padding:12px 0;gap:var(--ui-space-4)}
 #content .ranking-list strong{font-size:var(--ui-font)}
 #content .ranking-list small,#content .ranking-value small{font-size:var(--ui-text-sm)}
 #content .ranking-value span{font-size:var(--ui-font)}
 #modal{font-size:var(--ui-font)}
 #modal h2{margin:0 0 var(--ui-space-4)}
 #modal h3{margin:var(--ui-space-6) 0 var(--ui-space-3)}
 #modal textarea{min-height:96px}
 #modal .close{width:38px;height:38px;min-height:38px;font-size:24px;line-height:1;padding:0}
 #modal .recipe-name-bar input{font-size:20px;font-weight:750}
 #modal .recipe-grid-head,#modal .component-field>span,#modal .recipe-description label,#modal .recipe-config-title,#modal .recipe-development label,#modal .recipe-operations strong{font-size:var(--ui-text-sm);line-height:1.4}
 #modal .recipe-component .kind-label,#modal .recipe-component .component-yield-value{font-size:var(--ui-control-font);min-height:var(--ui-control-height);padding:9px 10px}
 #modal .recipe-component .remove{font-size:20px;min-width:32px;padding:4px}
 #modal .search-select-options button{font-size:var(--ui-control-font);min-height:var(--ui-control-height);padding:10px}
 .auth-card{padding:var(--ui-space-6)}
 .auth-card p,.auth-card .auth-error{font-size:var(--ui-font);line-height:1.45}
 .sidebar nav button{font-size:var(--ui-button-font)}
 .restaurant-switcher label small{font-size:var(--ui-caption)}
 .user div{font-size:var(--ui-text-sm)}
 .toast{font-size:var(--ui-button-font);line-height:1.4}
 #content .title .floating-create{font-size:var(--ui-button-font);width:auto;min-height:48px;padding:12px 18px;line-height:1.35}
}
@media screen and (min-width:601px){
 #content .entity-list-table th{font-size:var(--ui-caption);padding:8px 6px}
 #content .entity-list-table td{font-size:var(--ui-dense-font);padding:7px 6px}
 #content .entity-list-table .entity-name{font-size:var(--ui-dense-font);padding:2px 0;min-height:var(--ui-compact-height)}
 #content .entity-list-table .entity-actions .link{font-size:var(--ui-dense-font);min-height:var(--ui-compact-height);line-height:1.25;padding:2px 0}
 #content .entity-list-table .photo-upload-action{font-size:var(--ui-caption);min-height:24px}
}
@media screen and (max-width:820px){
 :root{--ui-control-font:16px;--ui-button-font:14px;--ui-table-font:14px;--ui-dense-font:14px;--ui-control-height:44px;--ui-compact-height:44px;--ui-h1:24px}
 #content .title .primary,#content .catalog-title .primary{min-height:44px}
 #content .link,#modal .link{min-height:44px;padding:9px 8px}
 #content input[type=checkbox],#content input[type=radio],#modal input[type=checkbox],#modal input[type=radio]{width:20px;height:20px}
 #content input[type=file],#modal input[type=file]{font-size:var(--ui-control-font)}
 #content .theme-toggle{width:44px;height:44px;min-height:44px}
 #modal .close{width:44px;height:44px;min-height:44px}
 #modal .recipe-name-bar input{font-size:18px}
 #modal .recipe-component .remove{min-height:44px;min-width:34px}
 #modal .price-batch-row input,#modal .price-batch-row select{font-size:16px;min-height:44px}
 .auth-card input,.auth-card button{min-height:44px}
}
@media screen and (max-width:600px){
 #content .mobile-card-table tbody td,#content .mobile-card-table tbody td:nth-child(n){font-size:var(--ui-table-font);padding:9px 0}
 #content .mobile-card-table tbody td::before,#content .mobile-card-table tbody td:nth-child(n)::before{font-size:var(--ui-text-sm)}
 #content .mobile-card-table tbody td.mobile-actions-cell .link,#content .mobile-card-table tbody td.mobile-actions-cell .mobile-card-toggle{font-size:var(--ui-button-font);min-height:44px;padding:9px 8px}
 #content .entity-list-table.mobile-card-table tbody tr.mobile-card-compact td.mobile-card-name{font-size:var(--ui-h3)}
 #content .mobile-card-table tbody td .ingredient-origin-link{font-size:var(--ui-font)}
 #content .entity-list-table.mobile-card-table tbody tr.mobile-card-compact td:first-child{padding:0}
 #modal .dialog-card-table tbody td{font-size:var(--ui-table-font);padding:9px 0}
}
@media screen{
 #modalContent :is(#ingredientForm,#priceForm) label{font-size:var(--ui-text-sm)}
 #modal .recipe-development textarea{min-height:140px}
 #modal .recipe-operations textarea{min-height:104px}
}
@media screen and (max-width:820px){
 .sidebar nav button{min-height:44px}
 #content .entity-list-table .photo-upload-action{min-height:44px}
 #content .mobile-card-table tbody tr.mobile-card-compact td.mobile-actions-cell .link,
 #content .mobile-card-table tbody tr.mobile-card-compact td.mobile-actions-cell .mobile-card-toggle{font-size:var(--ui-button-font);min-height:44px}
}
@media screen and (max-width:520px){
 #modal .recipe-component{padding-right:56px}
 #modal .recipe-component .remove{width:44px;min-width:44px;height:44px;padding:0}
}

@media screen{#modal .recipe-bottom.recipe-bottom-photo-only{grid-template-columns:1fr}}

@media screen {
 #content .dashboard-scope{align-self:flex-start;margin:0}
 #content .dashboard-scope select{min-width:220px}
 #content .dashboard-stat{
  appearance:none;display:flex;flex-direction:column;align-items:flex-start;
  text-align:left;font:inherit;color:var(--text);cursor:pointer;
 }
 #content .dashboard-stat:hover{background:var(--surface-hover);border-color:var(--copper)}
 #content .dashboard-stat:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
 #content .dashboard-stat-link{margin-top:auto;padding-top:8px;font-size:var(--ui-text-sm);color:var(--accent);font-weight:650}
}
@media screen and (max-width:600px) {
 #content .dashboard-scope{width:100%}
 #content .dashboard-scope select{min-width:0}
}
