/* KRATH reading system: shared by public pages, operational panels and dialogs. */
:root{
 --krath-font:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;
 --krath-text-small:.9375rem;
 --krath-text-label:1rem;
 --krath-text-body:1.0625rem;
 --krath-text-title:1.375rem;
 --krath-leading:1.75;
}
body{font-family:var(--krath-font);font-size:var(--krath-text-body);line-height:var(--krath-leading);font-variant-numeric:tabular-nums}
button,input,select,textarea{font-family:var(--krath-font);font-size:var(--krath-text-label);line-height:1.5}
button,.btn,.chip,.add-item,.manage-btn{min-height:48px;min-width:0;max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:break-word;line-height:1.5;font-size:var(--krath-text-label);flex-shrink:0}
input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{min-height:48px;font-size:var(--krath-text-body);max-width:100%;box-sizing:border-box}
input[type=checkbox],input[type=radio]{min-height:0}
label,legend,summary{font-size:var(--krath-text-label);line-height:1.65}
h1,h2,h3,h4{line-height:1.45;overflow-wrap:anywhere}
h1,.admin-heading h1{font-size:clamp(1.75rem,1.4rem + 1vw,2.25rem)}
h2,.card h2,.pay-head h2,.ad-heading h2,.section-heading h2{font-size:1.5rem}
h3,.card-heading h3,.record-card>h2,.ticket-card h2{font-size:1.25rem}
h4{font-size:1.125rem}
html[lang=ar] h1,html[lang=ar] h2,html[lang=ar] h3,html[lang=ar] button{letter-spacing:normal}
p,li,dt,dd{line-height:var(--krath-leading)}
.meta,.muted,small,.eyebrow,.state-note,.pay-sync,.ad-meta,.page-intro,.admin-heading p,.stat span,.pay-stats span,.admin-technical{font-size:var(--krath-text-small);line-height:1.75}
.badge,.status,.status-badge,.ticket-status,.critical-status,.pay-badge,.ad-badge,.count-badge,.free,.permission-chips>span{font-size:var(--krath-text-small);line-height:1.6;white-space:normal;overflow-wrap:anywhere;max-width:100%}
.status-badge,.ticket-status,.pay-badge,.critical-status{padding-block:.4rem;padding-inline:.75rem}
.price,.money,.pay-stats strong,.stat b,.data-item dd,.ad-counts b{font-variant-numeric:tabular-nums;line-height:1.4;overflow-wrap:anywhere}
.stat b{font-size:1.875rem}.pay-stats strong,.data-item dd{font-size:1.5rem}
.pay-iban,.account-phone,a[href^="tel:"]{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.admin-sidebar a,nav button,.card-actions button{font-size:var(--krath-text-label);line-height:1.6}
.admin-sidebar a{white-space:normal}
.permission-chips{gap:.5rem}.permission-chips>span{padding:.4rem .65rem}
.service{font-size:var(--krath-text-label);line-height:1.65;align-items:flex-start}
dt,dd{font-size:var(--krath-text-label)}
table{font-size:var(--krath-text-small);font-variant-numeric:tabular-nums}
th,td{line-height:1.7;padding:.75rem;vertical-align:top;overflow-wrap:anywhere}
.data-line,.pay-line,.pay-bank p,.confirm-card>p{font-size:var(--krath-text-label)}
.card-actions,.actions,.pay-actions,.ad-actions,.dialog-actions,.section-heading,.pay-head,.pay-line,.menu-heading{gap:.75rem;flex-wrap:wrap}
.orders-panel>div:first-child{flex-wrap:wrap;gap:.75rem}
.orders-panel>div:first-child>div{flex:1 1 12rem}
#orderFilters{flex-wrap:wrap;overflow:visible!important}
#orderFilters button{flex:1 1 7rem}
.order-total-line{gap:1rem;flex-wrap:wrap;align-items:flex-start}
.order-total-line>span{flex:1 1 12rem}
.order-total-line>b{flex-shrink:0;white-space:nowrap;font-size:1.125rem}
.order-head{gap:.75rem;flex-wrap:wrap}
.card,.management-card,.supervisor-card,.record-card,.ticket-card,.pay-card{padding:clamp(1rem,2vw,1.5rem)}
.card h2,.card h3{margin-block-end:1rem}
.confirm-card{max-height:calc(100dvh - 2rem);overflow:auto}
.confirm-card .card-actions button{min-width:0;flex:1 1 9rem}
.krath-dialog .btn,.dialog-actions button{min-width:0}
.nav{z-index:30}.nav button{min-width:0;font-size:var(--krath-text-small);line-height:1.45}
.app{padding-bottom:calc(10rem + env(safe-area-inset-bottom))}
#cartBar{bottom:calc(5.75rem + env(safe-area-inset-bottom))!important}
#cartBar b{float:none!important}
.restaurant-copy>b,.menu-copy>b{font-size:1.1875rem;line-height:1.6}
.menu-copy strong{font-size:1.25rem;line-height:1.5}
.menu-heading span,.location,.cat{font-size:var(--krath-text-small)}
.location b{font-size:var(--krath-text-body)}
.menu-card{grid-template-columns:90px minmax(0,1fr);gap:1rem;padding:1rem}
.menu-card>.add-item{grid-column:1/-1;width:100%}
#restaurantIdentity>div:last-child{min-width:0}
#trackStatus{font-size:1.1875rem;line-height:1.65}
#homeScreen .hero p{font-size:var(--krath-text-small);line-height:1.8}
#homePaymentInfo{font-size:var(--krath-text-small)!important}
#restaurantMeta{font-size:var(--krath-text-label)!important}
@media(max-width:700px){
 .admin-sidebar nav{flex-wrap:wrap;overflow:visible}.admin-sidebar a{flex:1 1 8rem;min-width:0}
 .card-heading{flex-wrap:wrap}.card-heading>div{flex:1 1 10rem}
 .card-grid,#choices{grid-template-columns:minmax(0,1fr)}
 .pay-stats,.ad-counts{grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr))}
 .admin-top-actions,.management-toolbar{flex-wrap:wrap}
}
@media(max-width:420px){
 .menu-heading{align-items:flex-start}.menu-heading>*{max-width:100%}
 .card-actions button{flex:1 1 100%}
 .restaurant-card{flex-wrap:wrap;gap:.75rem}.restaurant-copy{flex-basis:calc(100% - 120px)}
 .nav button{padding-inline:2px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

