/* Settings layout uses Shelter's existing colors, typography and controls. */
.settings-sections{display:flex;gap:.5rem;flex-wrap:wrap;margin:0 0 1rem}
.settings-sections button{font:inherit;color:inherit;background:#fff;border:1px solid #ddddde;border-radius:.65rem;min-height:44px;padding:.55rem 1rem;cursor:pointer}
.settings-sections button[aria-current="page"]{background:#1d1e1f;color:#fff;border-color:#1d1e1f}
.settings-sections button:focus-visible{outline:3px solid #78797b;outline-offset:2px}
.settings-content{display:grid;gap:1rem}
.settings-panel,.settings-general{min-width:0}
.settings-section-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}
.settings-section-head h2{margin:0}
.settings-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.settings-search{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}
.settings-search label{margin:0;font-weight:700}
.settings-search input{width:min(100%,24rem);min-height:44px}
.settings-table-wrap{width:100%;overflow-x:auto}
.settings-table{width:100%;border-collapse:collapse;text-align:start}
.settings-table th,.settings-table td{text-align:start;padding:.7rem .75rem;border-bottom:1px solid #ddddde;vertical-align:middle}
.settings-table thead th{background:#f4f4f5;font-weight:700}
.settings-table tr:last-child td{border-bottom:0}
.settings-table .settings-number{font-variant-numeric:tabular-nums;white-space:nowrap}
.settings-products-table .settings-product-code{white-space:nowrap;direction:ltr;text-align:start}
.settings-products-table td:first-child{overflow-wrap:anywhere}
.settings-code{display:block;color:#58595b;font-weight:400;margin-top:.2rem;direction:ltr;text-align:start;unicode-bidi:plaintext}
.settings-general dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:1rem;margin:0}
.settings-general dl div{min-width:0}
.settings-general dt{color:#58595b}
.settings-general dd{margin:0;overflow-wrap:anywhere}
@media(max-width:680px){
 .settings-sections{flex-wrap:nowrap;overflow-x:auto;padding:.2rem .2rem .5rem;scrollbar-width:thin}
 .settings-sections button{flex:none}
 .settings-table-wrap{overflow:visible}
 .settings-table,.settings-table tbody,.settings-table tr,.settings-table td{display:block;width:100%}
 .settings-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 .settings-table tr{border-bottom:1px solid #ddddde;padding:.65rem 0}
 .settings-table tr:last-child{border-bottom:0}
 .settings-table td{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:0;padding:.3rem 0;white-space:normal}
 .settings-table td:before{content:attr(data-label);color:#58595b;flex:none}
 .settings-table td:first-child{display:block}
 .settings-table td:first-child:before{display:none}
 .settings-table td .btn{margin-inline-start:auto}
 .settings-code{display:inline-block;margin:0 .5rem 0 0}
 .settings-search{align-items:flex-start;flex-direction:column;gap:.35rem}
 .settings-search input{width:100%}
}
/* Keep every settings section discoverable on narrow screens. */
@media(max-width:680px){.settings-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;padding:0}.settings-sections button{white-space:normal}}
.settings-products-table th,.settings-products-table td{vertical-align:middle}
@media(max-width:680px){
 .settings-products-wrap{overflow-x:auto}
 .settings-products-table{display:table;width:100%;min-width:0}
 .settings-products-table.settings-products-table-wide{min-width:39rem}
 .settings-products-table thead{position:static;display:table-header-group;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}
 .settings-products-table tbody{display:table-row-group;width:auto}
 .settings-products-table tr{display:table-row;width:auto;border:0;padding:0}
 .settings-products-table td,.settings-products-table td:first-child{display:table-cell;width:auto;padding:.65rem .5rem;border-bottom:1px solid #ddddde;white-space:normal}
 .settings-products-table td:before{content:none}
 .settings-products-table .settings-product-code,.settings-products-table .settings-number{white-space:nowrap}
 .settings-products-table td:first-child{min-width:9rem;overflow-wrap:normal;word-break:normal}
 .settings-products-wrap::before{content:'اسحب الجدول لعرض بقية الأعمدة';display:block;color:#58595b;font-size:13px;margin-bottom:.4rem}
}
.navigation-branch{display:grid;gap:.4rem;margin:.5rem 1rem;color:inherit;font-weight:700}
.navigation-branch select{width:100%;min-height:44px;min-width:0}
