/* V323 switchable lists and cards; state colors are inherited unchanged. */
html body #appView .page .page-view-switch{display:flex;gap:6px;justify-content:flex-end;margin:8px 0 12px;flex-wrap:wrap;}
html body #appView .page .page-view-switch button{min-height:36px;padding:6px 14px;font-size:13px;border:1px solid var(--line);border-radius:7px;}
html body #appView .page .page-view-switch button.active{background:var(--brand);color:#fff;border-color:var(--brand);}
html body #appView .page[data-layout="cards"] :is(.role-order-grid,.live-car-tracking,.invoice-list,.finance-entry-list,.customer-db-list,.supplier-list,.account-tree,.staff-cards,.system-users,.demo-credentials){display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr))!important;gap:12px!important;align-items:stretch!important;padding:8px!important;}
html body #appView .page[data-layout="cards"] .live-car-tracking > .tracking-title{grid-column:1/-1!important;}
html body #appView .page[data-layout="cards"] :is(.role-order-card,.tracking-car,.invoice-row,.finance-entry-row,.customer-db-row,.supplier-row,.account-row){border:1px solid var(--line)!important;border-radius:10px!important;margin:0!important;padding:12px!important;min-width:0!important;box-shadow:0 2px 6px rgba(0,0,0,.05)!important;}
html body #appView .page[data-layout="cards"] .live-car-tracking > .tracking-car{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
html body #appView .page[data-layout="cards"] :is(.invoice-row,.finance-entry-row,.account-row,.supplier-row){display:flex!important;flex-wrap:wrap!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;}
html body #appView .page[data-layout="cards"] :is(.invoice-row,.finance-entry-row) > div:first-child{flex-basis:100%!important;}
html body #appView .page[data-layout="cards"] .invoice-actions{flex-basis:100%;display:flex;justify-content:center;gap:8px;}
html body #appView .page[data-layout="list"] :is(.role-order-grid,.invoice-list,.finance-entry-list,.customer-db-list,.supplier-list,.account-tree,.staff-cards,.system-users,.demo-credentials){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;}
html body #appView .page[data-layout="list"] :is(.role-order-card,.invoice-row,.finance-entry-row,.customer-db-row,.supplier-row,.account-row){border-radius:6px!important;margin:0!important;box-shadow:none!important;}
@media(min-width:1000px){
 html body #appView .page[data-layout="list"] .role-order-card{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,1.4fr) minmax(160px,.7fr)!important;gap:12px!important;align-items:center!important;}
 html body #appView .page[data-layout="list"] .role-order-card :is(.role-order-top,.role-order-body,.role-order-foot){margin:0!important;min-width:0!important;}
}
/* Dashboard cards retain table cells and labels for each value. */
html body #appView #dashboard[data-layout="cards"] table{display:block!important;}
html body #appView #dashboard[data-layout="cards"] table thead{display:none!important;}
html body #appView #dashboard[data-layout="cards"] #recent{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr))!important;gap:12px!important;}
html body #appView #dashboard[data-layout="cards"] #recent > tr{display:grid!important;grid-template-columns:minmax(0,1fr)!important;padding:12px!important;border-radius:10px!important;border:1px solid var(--line);}
html body #appView #dashboard[data-layout="cards"] #recent td{display:flex!important;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;border:0!important;}
html body #appView #dashboard[data-layout="cards"] #recent td::before{font-size:11px;color:var(--muted);}
html body #appView #dashboard[data-layout="cards"] #recent td:nth-child(1)::before{content:'الأمر';}
html body #appView #dashboard[data-layout="cards"] #recent td:nth-child(2)::before{content:'السيارة';}
html body #appView #dashboard[data-layout="cards"] #recent td:nth-child(3)::before{content:'العميل';}
html body #appView #dashboard[data-layout="cards"] #recent td:nth-child(4)::before{content:'الحالة';}
html body #appView .page[data-layout] .role-empty{grid-column:1/-1;}
html body #appView #dashboard[data-layout="cards"] table,html body #appView #dashboard[data-layout="cards"] #recent{min-width:0!important;width:100%!important;max-width:100%!important;} html body #appView #dashboard[data-layout="cards"] #recent td{min-width:0!important;width:auto!important;white-space:normal!important;overflow-wrap:anywhere!important;}
