.sidebar .nav-icon{width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sidebar nav button{display:flex;align-items:center;gap:12px}
.sidebar .sidebar-trigger{border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;box-shadow:none}
.sidebar .sidebar-trigger:disabled{opacity:1;cursor:default}
.entity-actions-grid{display:contents}
.entity-list-filters{display:grid;grid-template-columns:minmax(160px,210px) minmax(0,1fr);gap:16px;align-items:end;margin:0 0 8px}
.entity-list-filters>.dashboard-toolbar{margin:0!important;min-width:0;gap:8px}
.entity-list-filters .dashboard-toolbar select{width:100%;min-width:0}
.entity-list-filters .dashboard-toolbar label{width:100%;min-width:0}
.entity-list-filters #clearListSearch{white-space:nowrap;font-size:var(--ui-button-font,13px)}
#content:has(.entity-list-table)>.title{align-items:center;margin-bottom:16px;gap:14px}
#content:has(.entity-list-table)>.title p{font-size:var(--ui-font,14px);max-width:430px}
#content:has(.entity-list-table)>.title .primary{font-size:var(--ui-button-font,13px);padding:9px 12px;min-height:var(--ui-control-height,38px)}
#content:has(.entity-list-table)>#listSearchCount{margin:8px 0 12px;font-size:var(--ui-text-sm,12px)}
@media(min-width:821px){
 body{grid-template-columns:72px minmax(0,1fr)}
 .sidebar{display:flex;flex-direction:column;width:72px;padding:12px;position:sticky;top:0;z-index:20;overflow-x:hidden;overflow-y:auto;transition:width .16s ease;scrollbar-width:none}
 .sidebar.sidebar-open{width:250px;box-shadow:12px 0 24px #0002}
 .sidebar .brand{width:48px;height:62px;margin:0 0 18px;padding:0;display:flex;gap:12px;white-space:nowrap}
 .sidebar .brand img{width:44px;height:44px;flex:0 0 44px}
 .sidebar .brand>div,.sidebar .nav-label{opacity:0;width:0;overflow:hidden;white-space:nowrap}
 .sidebar.sidebar-open .brand{width:226px}
 .sidebar.sidebar-open .brand>div,.sidebar.sidebar-open .nav-label{opacity:1;width:auto;overflow:visible}
 .sidebar nav{gap:4px;min-height:0;overflow-y:auto;scrollbar-width:none;margin-bottom:12px}
 .sidebar .brand,.sidebar .theme-toggle{flex-shrink:0}
 .sidebar > #themeToggle{margin-top:auto}
 .sidebar nav button{width:48px;min-height:44px;padding:10px 13px;white-space:nowrap}
 .sidebar.sidebar-open nav button{width:226px}
 .sidebar .nav-title{font-size:0;letter-spacing:0;height:10px;margin:3px 0}
 .sidebar.sidebar-open .nav-title{font-size:var(--ui-caption,11px);height:18px;margin:10px 12px 3px;letter-spacing:.1em}
 header{padding:0 24px}#content{padding:22px 24px}
}
@media(min-width:601px){
 #content .entity-list-table table{width:100%;min-width:0;table-layout:fixed}
 #content .entity-list-table th,#content .entity-list-table td{min-width:0;max-width:none;padding:7px 6px;font-size:var(--ui-text-sm,12px);white-space:normal;overflow-wrap:anywhere;vertical-align:middle}
 #content .entity-list-table th{font-size:var(--ui-caption,11px);letter-spacing:.02em}
 #content .entity-list-table :is(th,td):nth-child(2){min-width:0;max-width:none}
 #content .entity-list-table th:last-child,#content .entity-list-table td:last-child{position:static;min-width:0;box-shadow:none;width:13.5%}
 #content .entity-list-table .entity-photo{width:44px;height:44px;border-radius:7px}
 #content .entity-list-table .photo-upload-action{display:flex;width:44px;min-height:24px;margin-top:4px;padding:2px;font-size:var(--ui-caption,11px);border-radius:6px}
 #content .entity-list-table .entity-name{font-size:var(--ui-text-sm,12px);line-height:1.3;min-width:0;white-space:normal;overflow-wrap:anywhere;width:100%}
 #content .entity-list-table .entity-actions-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 6px}
 #content .entity-list-table .entity-actions .link{width:100%;min-width:0;min-height:22px;margin:0;padding:2px 0;font-size:var(--ui-dense-font,12px);line-height:1.2;white-space:normal;text-align:left;overflow-wrap:normal}
 #content .recipe-list :is(th,td):nth-child(1){width:5.5%}
 #content .recipe-list :is(th,td):nth-child(2){width:7%}
 #content .recipe-list :is(th,td):nth-child(3){width:26%}
 #content .recipe-list :is(th,td):nth-child(4){width:11%}
 #content .recipe-list :is(th,td):nth-child(5){width:10%}
 #content .recipe-list :is(th,td):nth-child(6){width:9%}
 #content .recipe-list :is(th,td):nth-child(7){width:8%}
 #content .recipe-list :is(th,td):nth-child(8){width:9.5%}
 #content .recipe-list :is(th,td):last-child{width:14%}
 #content .preparation-list :is(th,td):nth-child(1){width:6%}#content .preparation-list :is(th,td):nth-child(2){width:10%}#content .preparation-list :is(th,td):nth-child(3){width:24%}#content .preparation-list :is(th,td):nth-child(4){width:12%}#content .preparation-list :is(th,td):nth-child(5){width:8%}#content .preparation-list :is(th,td):nth-child(6){width:10%}#content .preparation-list :is(th,td):nth-child(7){width:14%}#content .preparation-list :is(th,td):last-child{width:16%}
 #content .entity-list-table .photo-upload-action .photo-short{display:inline}#content .entity-list-table .photo-upload-action .photo-full{display:none}
 .entity-list-table+.muted{margin-top:8px}
}
@media(max-width:600px){.photo-short{display:none}.photo-full{display:inline}}
@media(max-width:820px){.entity-list-filters{grid-template-columns:1fr}#content:has(.entity-list-table)>.title{align-items:stretch}#content:has(.entity-list-table)>.title .primary{min-height:44px}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}

/* Fixed creation action stays available while scrolling; dialogs render above it. */
#content .title .floating-create{position:fixed;right:24px;bottom:24px;z-index:12;min-height:56px;padding:14px 20px;border-radius:28px;font-size:14px;box-shadow:0 5px 18px #0003}
#content:has(.floating-create){padding-bottom:100px}
#manageEntityStates{font-size:var(--ui-button-font,13px);white-space:nowrap;align-self:end;min-height:40px}
.entity-state-list{max-height:55vh;overflow:auto;margin-top:16px}
.entity-status-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid var(--line,#ddd)}
.entity-status-row>div{min-width:0;overflow-wrap:anywhere}.entity-status-row small{display:block;margin-top:4px}.entity-status-row button{flex:0 0 auto;min-height:44px}
@media(max-width:820px){#content .title .floating-create{right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));max-width:calc(100vw - 32px)}#content:has(.floating-create){padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}#manageEntityStates{white-space:normal}}

/* One right-aligned toolbar for recipes and preparations. */
#content:has(.entity-list-table)>.title{flex-wrap:wrap}
#content .title .entity-toolbar{margin-left:auto;display:flex;width:auto;justify-content:flex-end;align-items:center;gap:10px;flex-wrap:wrap}
#content .entity-toolbar #manageEntityStates{align-self:center;min-height:var(--ui-control-height,38px)}
.pdf-dropdown{position:relative;flex:0 0 auto}
.pdf-options{position:absolute;right:0;top:100%;min-width:160px;padding:6px;margin:0;background:var(--surface,#fff);border:1px solid var(--border,#ddd);border-radius:10px;box-shadow:0 8px 24px #0002;z-index:25;display:grid}
.pdf-options[hidden]{display:none!important}
#content .pdf-options .pdf-option{display:block;width:100%;min-height:40px;padding:10px 14px;text-align:left;white-space:nowrap;border-radius:6px}
#content .pdf-options .pdf-option:hover,#content .pdf-options .pdf-option:focus-visible{background:var(--surface-hover,#f2eee6)}
@media(max-width:820px){#content .title .entity-toolbar{width:100%;gap:8px}#content .entity-toolbar #manageEntityStates{flex-basis:100%;min-height:44px;text-align:right}#content .entity-toolbar .primary{min-height:44px}#content .pdf-options .pdf-option{min-height:44px}}


/* Match the compact entity header in price and ingredient catalogs. */
#content>.catalog-title{align-items:center;flex-wrap:wrap;gap:14px;margin-bottom:16px}
#content>.catalog-title p{font-size:var(--ui-font,14px);max-width:430px}
#content>.catalog-title .primary{font-size:var(--ui-button-font,13px);min-height:var(--ui-control-height,38px);padding:9px 12px}
#content:has(#ingredientPriceSearch) .ingredient-catalog-toolbar{margin-top:0}
@media(max-width:820px){#content>.catalog-title{align-items:stretch}#content>.catalog-title .primary{min-height:44px}}


.sidebar nav button.active{box-shadow:inset 3px 0 var(--copper)}
#content .record-detail-trigger{white-space:normal}
#content .record-detail-edit{margin-block:2px 12px}
.record-component-list{list-style:none;padding:0;margin:0}
.record-component-list li{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-top:1px solid var(--border)}
.record-component-list strong{white-space:nowrap}
#dashboardPriceChanges{margin-bottom:var(--ui-space-4,16px)}
.price-change-badge{display:inline-block;padding:3px 8px;border-radius:6px;background:var(--surface-soft);white-space:nowrap}
.price-change-badge.increase{background:var(--increase-bg);color:var(--increase)}
.price-change-badge.decrease{background:var(--decrease-bg);color:var(--decrease)}


#dashboardResults{container:dashboard / inline-size}
#dashboardResults > .cards{grid-template-columns:minmax(0,1fr);margin-bottom:var(--ui-space-4,16px)}
@container dashboard (460px <= width < 1050px){
 #dashboardResults > .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@container dashboard (min-width:1050px){
 #dashboardResults > .cards{grid-template-columns:repeat(4,minmax(0,1fr))}
}

:is(.table,.cost-alert-table) table [data-column-align]{vertical-align:middle}
:is(.table,.cost-alert-table) table th[data-column-align="start"]{text-align:start}
:is(.table,.cost-alert-table) table th[data-column-align="end"]{text-align:end}
:is(.table,.cost-alert-table) table th[data-column-align="center"]{text-align:center}
:is(.table,.cost-alert-table) table td[data-column-align="end"]{font-variant-numeric:tabular-nums}
:is(.table,.cost-alert-table):not(.mobile-card-table) table td[data-column-align="start"]{text-align:start}
:is(.table,.cost-alert-table):not(.mobile-card-table) table td[data-column-align="end"]{text-align:end}
:is(.table,.cost-alert-table):not(.mobile-card-table) table td[data-column-align="center"]{text-align:center}
@media(min-width:601px){
 #content table td[data-column-align="start"]{text-align:start}
 #content table td[data-column-align="end"]{text-align:end}
 #content .price-list-pane table td[data-column-align="end"]{white-space:nowrap}
 #content table td[data-column-align="center"]{text-align:center}
 #content table td[data-column-align="start"] > .price-history{padding-inline:0;text-align:start}
 #content table td[data-column-align="center"] > .link,
 #content table td[data-column-align="center"] .entity-actions-grid > .link{text-align:center}
 #content table td[data-column-align="end"] .restaurant-target{justify-content:flex-end}
}

.sidebar .theme-toggle{
 min-height:44px;width:48px;justify-content:center;gap:8px;padding:0;
 margin-top:12px;border-color:var(--sidebar-muted);border-radius:9px;
 background:transparent;color:var(--sidebar-text);white-space:nowrap
}
.sidebar .theme-toggle:hover,.sidebar .theme-toggle:focus-visible{background:var(--sidebar-hover)}
.sidebar .theme-toggle span:first-child{color:var(--sidebar-text)}
.sidebar .theme-toggle span:last-child{display:none}
.sidebar.sidebar-open .theme-toggle{width:226px;justify-content:flex-start;padding-inline:13px}
.sidebar.sidebar-open .theme-toggle span:last-child{display:inline}
@media(max-width:820px){
 .sidebar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px}
 .sidebar .brand{margin-bottom:0}
 .sidebar nav{min-width:0;grid-column:1/-1;grid-row:2}
 .sidebar .theme-toggle{grid-column:2;grid-row:3;justify-self:end;width:auto;padding-inline:9px;margin:6px 0 0;font-size:12px}
 .sidebar .theme-toggle span:last-child{display:inline}
 .header-actions .cost-alerts-button{min-height:44px;padding-inline:4px;font-size:12px;white-space:nowrap}
}

.restaurant-wizard,.restaurant-starter-row,.restaurant-settings-fields{display:grid;gap:12px}
.restaurant-wizard label,.restaurant-settings-fields label{display:grid;gap:4px}
.restaurant-wizard fieldset label{display:flex;align-items:center;gap:8px}
.restaurant-wizard fieldset{border:1px solid var(--border);border-radius:9px;padding:10px}
.restaurant-wizard :is(form,fieldset)[hidden],#modal .restaurant-wizard[hidden]{display:none}
.restaurant-wizard :is([type=radio],[type=checkbox]){width:auto}
.restaurant-starter-row{grid-template-columns:minmax(0,1fr) auto;margin-bottom:6px}
.restaurant-wizard-actions{display:flex;justify-content:flex-end;gap:12px}
.restaurant-settings-fields{width:min(100%,440px)}
#newLocalCategory{margin-top:12px}
#backRestaurants{margin-bottom:8px}
[aria-label="Configuración del restaurante"]{flex-wrap:wrap}

.restaurant-logo-section{width:min(100%,440px);margin-block:18px 12px}
.restaurant-logo-section label{display:grid;gap:4px;margin-top:8px}

.ranking-heading{display:flex;align-items:baseline;justify-content:space-between;gap:8px;background:var(--surface)}
@media(min-width:601px){
 .ranking-heading{position:sticky;top:82px;z-index:1}
}
.ranking-heading h3{margin:0}
.ranking-count,.ranking-toggle{white-space:nowrap}
.ranking-toggle[aria-expanded="true"] span{display:inline-block;transform:rotate(180deg)}
.dashboard-rankings .ranking-list[tabindex="0"]{
 overflow-y:auto;overscroll-behavior-y:contain;scrollbar-gutter:stable;padding-inline-end:8px;
}
.dashboard-rankings .ranking-list:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

.dashboard-stat-heading{display:flex;width:100%;align-items:baseline;justify-content:space-between;gap:4px 12px;flex-wrap:wrap}
.dashboard-stat-target{margin-inline-start:auto;white-space:nowrap;font-size:var(--ui-text-sm,12px);color:var(--text)}

.entity-state-filters{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:12px}
.entity-state-filters label:first-child{flex:1 1 200px}
.entity-state-filters :is(input,select){width:100%}

.entity-list-filters:has(#recipeListStatus)>.dashboard-toolbar:has(#recipeListStatus){
 display:grid;grid-template-columns:minmax(80px,1fr) minmax(0,1.5fr)
}
@media(min-width:821px){
 .entity-list-filters:has(#recipeListStatus){grid-template-columns:minmax(280px,315px) minmax(0,1fr)}
}
