/*
 هوية بنيوية مستقلة لكل تصميم. تستخدم هذه الطبقة عناصر النماذج نفسها؛
 لا تنسخ حقول الإدخال ولا تغيّر ترتيب إرسالها أو ارتباطات JavaScript.
 Classic خارج جميع المحددات التالية.
*/
.hx-mobile-workspace { display:none; }

/* MODERN TECHNICAL — split workspace, strong navigation, framed modules. */
html[data-design=technical] body.hx-shell .app-container > .container { max-width:1600px; padding:36px clamp(20px,3vw,48px); gap:28px; }
html[data-design=technical] body.hx-shell .hx-page-heading h1 { font-size:clamp(30px,3vw,44px); font-weight:750; }
html[data-design=technical] body.hx-shell .hx-page-heading p { font-size:16px; }
html[data-design=technical] body.hx-shell .hx-sidebar { padding:32px 16px 20px; }
html[data-design=technical] body.hx-shell .hx-side-links a { min-height:48px; padding:12px 16px; margin-bottom:4px; border-radius:9px; font-size:14px; }
html[data-design=technical] body.hx-shell .hx-side-links a[aria-current=page] { color:var(--hx-on-accent); background:var(--hx-accent); box-shadow:0 5px 18px #0002; }
html[data-design=technical] body.hx-shell .hx-upload-panel { grid-template-columns:1fr; border:0; background:transparent; box-shadow:none; overflow:visible; }
html[data-design=technical] body.hx-shell .hx-upload-panel > .card-header { display:flex; }
html[data-design=technical] body.hx-shell .hx-upload-panel > :is(#selection-form,.hx-selection-form) {
 display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); grid-template-rows:auto auto;
 column-gap:28px; grid-column:1; grid-row:1; padding:0; align-items:start;
}
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-drop { grid-column:1; grid-row:1/3; margin:0; padding:14px; background:var(--hx-surface); border:1px solid var(--hx-border); border-radius:14px; }
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-drop > label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .file-upload-label { min-height:286px; flex-direction:column; border-radius:8px; border:1px dashed var(--hx-border); }
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .file-upload-label i { font-size:36px; }
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-fields { grid-column:2; grid-row:1; grid-template-columns:1fr; gap:8px; }
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-submit { grid-column:2; grid-row:2; margin-top:4px; }
html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .btn-upload { width:100%; min-height:48px; font-size:14px; }
html[data-design=technical] body.hx-shell .hx-upload-panel #daily-upload-quota { grid-column:1; grid-row:2; padding:16px 0 0; background:transparent; border:0; }
html[data-design=technical] body.hx-shell .hx-quota .hx-section-label { display:none; }
html[data-design=technical] body.hx-shell .hx-quota-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
html[data-design=technical] body.hx-shell .hx-quota-grid > div { display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--hx-surface); }
html[data-design=technical] body.hx-shell .hx-quota-grid strong { order:-1; font-size:24px; }
html[data-design=technical] body.hx-shell .hx-quota-grid small { display:none; }
html[data-design=technical] body.hx-shell .hx-quota-reset { margin:8px 0 0; text-align:right; }
html[data-design=technical] body.hx-shell :is(.card,.card-fit-screen) { border-radius:14px; box-shadow:0 4px 18px #00000005; }
html[data-design=technical] body.hx-shell .card-header { padding:22px 24px; }
html[data-design=technical] body.hx-shell :is(table,.table) tbody td { padding:14px 16px; }
html[data-design=technical] body.hx-shell :is(.grid-cols-4,.stats-grid) > .card { border-top:3px solid var(--hx-accent); }
html[data-design=technical] body.hx-shell #completed_box > .card-header { background:var(--hx-raised); }
html[data-design=technical] body.hx-shell #completed_box .dt-toolbar { padding:14px; background:var(--hx-bg); border:1px solid var(--hx-border); border-radius:10px; }

/* PREMIUM MINIMAL — quiet canvas, narrow reading width, horizontal controls. */
html[data-design=minimal] body.hx-shell .app-container > .container { max-width:1180px; padding:48px clamp(24px,4vw,64px); gap:36px; }
html[data-design=minimal] body.hx-shell .main-header { background:var(--hx-bg); border-bottom:0; }
html[data-design=minimal] body.hx-shell .hx-header-context { opacity:.65; }
html[data-design=minimal] body.hx-shell .hx-page-heading h1 { font-size:clamp(30px,2.8vw,40px); font-weight:650; max-width:650px; line-height:1.15; }
html[data-design=minimal] body.hx-shell .hx-page-heading p { font-size:15px; max-width:620px; }
html[data-design=minimal] body.hx-shell .hx-sidebar { border:0; padding:40px 22px 24px; }
html[data-design=minimal] body.hx-shell .hx-brand-mark { display:none; }
html[data-design=minimal] body.hx-shell .hx-brand { font-size:28px; letter-spacing:-1px; }
html[data-design=minimal] body.hx-shell .hx-brand small { display:none; }
html[data-design=minimal] body.hx-shell .hx-nav-caption { letter-spacing:.1em; font-size:9px; margin-top:34px; }
html[data-design=minimal] body.hx-shell .hx-side-links a { min-height:46px; padding:12px 14px; margin-bottom:7px; border-radius:9px; font-size:14px; font-weight:450; }
html[data-design=minimal] body.hx-shell .hx-side-links a[aria-current=page] { background:color-mix(in srgb,var(--hx-accent) 12%,transparent); color:var(--hx-accent); box-shadow:none; }
html[data-design=minimal] body.hx-shell :is(.card,.card-fit-screen) { box-shadow:none; border-radius:10px; }
html[data-design=minimal] body.hx-shell .app-container > .container > .card,
html[data-design=minimal] body.hx-shell .app-container > .container > .card-fit-screen { background:transparent; border:0; }
html[data-design=minimal] body.hx-shell .card-header { background:transparent; border:0; padding:0 0 20px; }
html[data-design=minimal] body.hx-shell .card-header .card-title { font-size:20px; font-weight:600; }
html[data-design=minimal] body.hx-shell .card-fit-screen > .card-body { padding:0; gap:20px; }
html[data-design=minimal] body.hx-shell .hx-upload-panel { grid-template-columns:1fr; border:0; background:transparent; overflow:visible; }
html[data-design=minimal] body.hx-shell .hx-upload-panel > .card-header { display:flex; }
html[data-design=minimal] body.hx-shell .hx-upload-panel #daily-upload-quota { grid-column:1; grid-row:1; background:var(--hx-raised); border:1px solid var(--hx-border); padding:12px 18px; border-radius:8px; margin:0 0 22px; }
html[data-design=minimal] body.hx-shell .hx-quota .hx-section-label,
html[data-design=minimal] body.hx-shell .hx-quota-reset,
html[data-design=minimal] body.hx-shell .hx-quota-grid small { display:none; }
html[data-design=minimal] body.hx-shell .hx-quota-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
html[data-design=minimal] body.hx-shell .hx-quota-grid > div { display:flex; align-items:center; justify-content:center; gap:9px; padding:0; border:0; background:transparent; }
html[data-design=minimal] body.hx-shell .hx-quota-grid strong { font-size:16px; order:-1; letter-spacing:0; }
html[data-design=minimal] body.hx-shell .hx-quota-grid span { font-size:11px; }
html[data-design=minimal] body.hx-shell .hx-upload-panel > :is(#selection-form,.hx-selection-form) { grid-row:2; grid-column:1; padding:0; display:grid; grid-template-columns:minmax(0,2fr) minmax(160px,1fr); column-gap:24px; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-drop { grid-row:1; grid-column:1/-1; margin-bottom:24px; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-drop > label { display:none; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .file-upload-label { min-height:220px; border:1px dashed color-mix(in srgb,var(--hx-accent) 35%,var(--hx-border)); background:transparent; flex-direction:column; border-radius:10px; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .file-upload-label i { font-size:40px; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-fields { grid-row:2; grid-column:1; gap:20px; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-submit { grid-row:2; grid-column:2; margin-top:25px; align-self:start; }
html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .btn-upload { width:100%; min-width:0; min-height:44px; }
html[data-design=minimal] body.hx-shell .btn { font-weight:550; border-radius:8px; }
html[data-design=minimal] body.hx-shell :is(.btn-edit,.btn-download-org,.btn-outline) { border-color:transparent; background:transparent; color:var(--hx-accent); }
html[data-design=minimal] body.hx-shell :is(table,.table) thead th { background:transparent; text-transform:none; letter-spacing:0; font-weight:500; }
html[data-design=minimal] body.hx-shell :is(table,.table) tbody td { padding:16px 12px; }
html[data-design=minimal] body.hx-shell .table-wrapper { background:transparent; border:1px solid var(--hx-border); border-radius:8px; }
html[data-design=minimal] body.hx-shell .hx-recent-file { padding:12px 0; }
html[data-design=minimal] body.hx-shell .hx-recent-file > .card-header { padding-bottom:18px; }
html[data-design=minimal] body.hx-shell .identity-layout { display:flex; flex-direction:column; gap:24px; }
html[data-design=minimal] body.hx-shell .identity-sidebar { width:100%; }
html[data-design=minimal] body.hx-shell .identity-sidebar .manage-nav-list { display:flex; flex-wrap:wrap; gap:8px; padding:0; }
html[data-design=minimal] body.hx-shell .identity-sidebar .card { background:transparent; border:0; }
html[data-design=minimal] body.hx-shell .manage-nav-link { padding:10px 14px; }
html[data-design=minimal] body.hx-shell #completed_box > .custom-hr { display:none; }
html[data-design=minimal] body.hx-shell #completed_box .dt-toolbar { padding:12px 0; border:0; background:transparent; }
html[data-design=minimal] body.hx-shell :is(.grid-cols-4,.stats-grid) > .card { background:transparent; border:0; border-left:1px solid var(--hx-border); border-radius:0; }
html[data-design=minimal] body.hx-shell .confirm-modal-box { border-radius:18px; }
html[data-design=minimal] body.hx-shell .confirm-modal-header { border-bottom:0; padding-bottom:0; }
html[data-design=minimal] body.hx-shell .confirm-modal-footer { border-top:0; padding-top:0; }

/* PERFORMANCE CONSOLE — bounded panels, denser metrics and editor tools. */
html[data-design=console] body.hx-shell .app-container > .container { max-width:none; padding:24px; gap:20px; }
html[data-design=console] body.hx-shell .hx-page-heading h1 { font-size:32px; letter-spacing:-.035em; }
html[data-design=console] body.hx-shell .hx-side-links a { min-height:42px; border-radius:0; margin-inline:-16px; padding-inline:24px; }
html[data-design=console] body.hx-shell .hx-side-links a[aria-current=page] { border-left:3px solid var(--hx-accent); background:color-mix(in srgb,var(--hx-accent) 12%,transparent); box-shadow:none; }
html[data-design=console] body.hx-shell .main-header { border-bottom:1px solid var(--hx-border); }
html[data-design=console] body.hx-shell .card-header { padding:18px 20px; background:linear-gradient(100deg,var(--hx-raised),var(--hx-surface)); }
html[data-design=console] body.hx-shell :is(.card,.card-fit-screen) { border-radius:6px; box-shadow:none; }
html[data-design=console] body.hx-shell .hx-quota-grid > div { border-radius:3px; border:0; border-bottom:1px solid var(--hx-border); background:transparent; }
html[data-design=console] body.hx-shell .hx-quota-grid strong { font-family:ui-monospace,Consolas,monospace; }
html[data-design=console] body.hx-shell .hx-quota .hx-section-label { text-transform:uppercase; letter-spacing:.12em; font-size:10px; }
html[data-design=console] body.hx-shell :is(.grid-cols-4,.stats-grid) { gap:1px; background:var(--hx-border); border:1px solid var(--hx-border); border-radius:6px; overflow:hidden; }
html[data-design=console] body.hx-shell :is(.grid-cols-4,.stats-grid) > .card { border:0; border-radius:0; margin:0; background:var(--hx-surface); }
html[data-design=console] body.hx-shell :is(.grid-cols-4,.stats-grid) .h3 { font-family:ui-monospace,Consolas,monospace; font-size:24px; letter-spacing:-1px; }
html[data-design=console] body.hx-shell #completed_box { border-top:2px solid var(--hx-accent); }
html[data-design=console] body.hx-shell #completed_box .ecu-brand { font-size:20px; font-weight:650; }
html[data-design=console] body.hx-shell #completed_box .dt-toolbar { background:var(--hx-raised); padding:12px; border:1px solid var(--hx-border); border-radius:4px; gap:12px; }
html[data-design=console] body.hx-shell #completed_box .ecu-meta { margin:16px 20px 0; padding:16px; border:1px solid var(--hx-border); border-radius:4px; background:var(--hx-bg); }
html[data-design=console] body.hx-shell #completed_box .ecu-meta-item { padding-right:24px; }
html[data-design=console] body.hx-shell :is(table,.table) thead th { font-family:ui-monospace,Consolas,monospace; font-size:11px; letter-spacing:.05em; }
html[data-design=console] body.hx-shell :is(table,.table) tbody td { padding:9px 12px; }
html[data-design=console] body.hx-shell .dtc-code { background:transparent; padding-left:0; font-weight:500; }
html[data-design=console] body.hx-shell .confirm-modal-box { border-top:2px solid var(--hx-accent); border-radius:5px; }

/* Settings pages keep their handlers and fields; only the visual sections change. */
html[data-design=minimal] body.hx-shell[data-page$=Settings] .card { padding:24px 0; border:0; border-top:1px solid var(--hx-border); background:transparent; }
html[data-design=technical] body.hx-shell[data-page$=Settings] .card { border:1px solid var(--hx-border); border-radius:14px; }
html[data-design=console] body.hx-shell[data-page$=Settings] .card { border-left:3px solid var(--hx-border); }
@media(min-width:1200px) {
 html[data-design=minimal] body.hx-shell:not(.hx-standalone) { padding-left:244px; }
 html[data-design=minimal] body.hx-shell .hx-sidebar { width:244px; }
 html[data-design=technical] body.hx-shell:not(.hx-standalone) { padding-left:240px; }
 html[data-design=technical] body.hx-shell .hx-sidebar { width:240px; }
}
/* Tablet: keep the split only while both columns have a usable width. */
@media(max-width:1050px) {
 html[data-design=minimal] body.hx-shell .app-container > .container { padding:30px 24px; }
 html[data-design=technical] body.hx-shell .app-container > .container { padding:28px 24px; }
 html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-submit { grid-column:1/-1; grid-row:3; margin:0; }
 html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-fields { grid-column:1/-1; }
}
@media(max-width:767px) {
 html[data-design]:not([data-design=classic]) body.hx-shell .app-container > .container { padding:24px 16px; gap:24px; }
 html[data-design]:not([data-design=classic]) body.hx-shell .hx-page-heading h1 { font-size:28px; line-height:1.15; }
 html[data-design]:not([data-design=classic]) body.hx-shell .hx-page-heading p { font-size:14px; }
 html[data-design=technical] body.hx-shell .hx-upload-panel > :is(#selection-form,.hx-selection-form),
 html[data-design=minimal] body.hx-shell .hx-upload-panel > :is(#selection-form,.hx-selection-form) { display:flex; flex-direction:column; gap:18px; }
 html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-drop,
 html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-drop { order:0; width:100%; margin:0; padding:0; border:0; }
 html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-fields,
 html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-fields { order:1; width:100%; grid-template-columns:1fr; gap:0; }
 html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-submit,
 html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .hx-upload-submit { order:2; width:100%; margin:0; }
 html[data-design=technical] body.hx-shell :is(#selection-form,.hx-selection-form) .file-upload-label,
 html[data-design=minimal] body.hx-shell :is(#selection-form,.hx-selection-form) .file-upload-label { min-height:190px; }
 html[data-design=technical] body.hx-shell .hx-quota-grid { gap:6px; }
 html[data-design=technical] body.hx-shell .hx-quota-grid > div { flex-direction:column; gap:0; padding:8px; }
 html[data-design=minimal] body.hx-shell .hx-quota-grid > div { flex-direction:column; gap:0; }
 html[data-design=minimal] body.hx-shell .hx-quota-grid span { min-height:0; font-size:10px; text-align:center; }
 html[data-design=minimal] body.hx-shell .hx-upload-panel #daily-upload-quota { padding:12px; }
 html[data-design=console] body.hx-shell .hx-upload-panel #daily-upload-quota { padding:14px; }
 html[data-design=console] body.hx-shell .hx-quota-grid > div { border-right:1px solid var(--hx-border); border-bottom:0; }
 html[data-design=console] body.hx-shell #completed_box .ecu-meta { margin:12px; padding:12px; }
 html[data-design=console] body.hx-shell #completed_box .dt-toolbar { flex-wrap:wrap; }
 html:is([data-design=minimal],[data-design=console]) body.hx-shell .hx-mobile-workspace {
  display:flex; position:fixed; inset:auto 0 0; z-index:90; align-items:stretch; justify-content:space-around;
  padding:8px 8px max(8px,env(safe-area-inset-bottom)); background:var(--hx-surface); border-top:1px solid var(--hx-border);
 }
 .hx-mobile-workspace a { flex:1; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:5px; padding:7px 4px; min-height:48px; text-decoration:none; color:var(--hx-muted); font-size:10px; }
 .hx-mobile-workspace a i { font-size:20px; }
 .hx-mobile-workspace a[aria-current=page] { color:var(--hx-accent); }
 html[data-design=minimal] .hx-mobile-workspace a[aria-current=page] { background:var(--hx-raised); border-radius:12px; }
 html[data-design=console] .hx-mobile-workspace a[aria-current=page] { border-top:2px solid var(--hx-accent); background:color-mix(in srgb,var(--hx-accent) 8%,transparent); }
 html:is([data-design=minimal],[data-design=console]) body.hx-shell { padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
 html:is([data-design=minimal],[data-design=console]) body.hx-shell .dtc-toast { bottom:calc(94px + env(safe-area-inset-bottom)); }
 html[data-design=minimal] body.hx-shell .hx-recent-file .hx-file-actions form { flex:0 1 auto; }
}
@media(prefers-reduced-motion:reduce) { .hx-mobile-workspace * { transition:none; } }
.hx-copy-technical,.hx-copy-minimal { display:none; }
html[data-design=technical] .hx-copy-console,html[data-design=minimal] .hx-copy-console { display:none; }
html[data-design=technical] .hx-copy-technical,html[data-design=minimal] .hx-copy-minimal { display:inline; }
html[data-design=technical] .hx-brand-accent { color:var(--hx-accent); }
html[data-design=technical] .hx-brand-mark { display:none; }
.hx-file-name { display:block; width:0; min-width:100%; margin-top:3px; font-size:12px; font-weight:400; color:var(--hx-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.hx-file-vehicle { display:block; font-size:14px; font-weight:600; }
html[data-design=minimal] body.hx-shell[data-page="/FileHistory"] .card-fit-screen { border:0; background:transparent; }
@media(max-width:767px) {
 html body.hx-site[data-page="/FileHistory"] .dataTables_scrollHead { display:none; }
 html body.hx-site[data-page="/FileHistory"] .table-wrapper { background:transparent; border:0; }
 html body.hx-site[data-page="/FileHistory"] table { display:block; width:100%!important; }
 html body.hx-site[data-page="/FileHistory"] table thead { display:none; }
 html body.hx-site[data-page="/FileHistory"] table tbody { display:grid; gap:12px; width:100%; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row {
  display:grid; grid-template-columns:minmax(0,1fr); padding:16px; border:1px solid var(--hx-border); border-radius:12px; background:var(--hx-surface);
 }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row > td { display:block; width:auto!important; padding:0 0 12px; border:0; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row > td:last-child { padding:8px 0 0; border-top:1px solid var(--hx-border); }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .flex { flex-wrap:wrap; }
 html body.hx-site[data-page="/FileHistory"] .btn-text { display:inline; }
 html[data-design=console] body.hx-shell[data-page="/FileHistory"] .hx-file-row { border-radius:5px; border-left:2px solid var(--hx-accent); }
}
.hx-selection-form { min-width:0; }
.hx-shell .hx-upload-panel > .hx-selection-form { padding:24px; grid-column:1; grid-row:2; }
.hx-shell .hx-selection-form .file-upload-label { display:flex; flex-direction:column; justify-content:center; align-items:center; min-height:180px; padding:24px; gap:16px; }
.hx-classic .hx-upload-panel > .hx-selection-form { padding:24px; }
.hx-mini[data-style=technical] main { display:grid; grid-template-columns:1.1fr 1fr; grid-template-rows:12px 1fr; gap:8px; }
.hx-mini[data-style=technical] .hx-mini-title { grid-column:1/-1; width:85%; }
.hx-mini[data-style=technical] .hx-mini-upload { grid-column:1; grid-row:2; height:100%; }
.hx-mini[data-style=technical] .hx-mini-row { grid-column:2; grid-row:2; flex-direction:column; gap:8px; }
.hx-mini[data-style=minimal] .hx-mini-row { height:7px; margin-bottom:14px; }
.hx-mini[data-style=minimal] .hx-mini-row span { height:7px; background:var(--mini-accent); opacity:.3; }
.hx-mini[data-style=minimal] .hx-mini-upload { height:65px; background:transparent; border:1px dashed var(--mini-accent); }
.hx-mini[data-style=console] .hx-mini-upload { height:72px; border-radius:2px; background:var(--mini-surface); border:1px solid var(--mini-accent); }
.hx-editor-title,.hx-editor-section-title { display:none; }
body.hx-shell .hx-editor-title { display:block; font-size:28px; line-height:1.2; letter-spacing:-.04em; margin:0 0 14px; }
html[data-design=console] body.hx-shell #completed_box .ecu-header { width:100%; }
html[data-design=console] body.hx-shell #completed_box .dt-toolbar { display:grid; grid-template-columns:minmax(0,1fr) auto; }
html[data-design=console] body.hx-shell #completed_box .hx-editor-section-title { display:block; grid-column:1; grid-row:1; font-size:18px; font-weight:600; margin:0; }
html[data-design=console] body.hx-shell #completed_box .dt-toolbar-left { grid-column:2; grid-row:1; }
html[data-design=console] body.hx-shell #completed_box .dt-toolbar-center { grid-column:1; grid-row:2; justify-content:flex-start; }
html[data-design=console] body.hx-shell #completed_box .dt-toolbar-right { grid-column:2; grid-row:2; justify-content:flex-end; }
html[data-design=minimal] body.hx-shell #completed_box .hx-editor-title { font-size:32px; font-weight:600; }
html[data-design=minimal] body.hx-shell #completed_box .dt-toolbar { border-bottom:1px solid var(--hx-border); padding-bottom:20px; }
@media(max-width:767px) {
 body.hx-shell .hx-editor-title { font-size:25px; }
 html[data-design=console] body.hx-shell #completed_box .dt-toolbar { grid-template-columns:minmax(0,1fr); }
 html[data-design=console] body.hx-shell #completed_box .dt-toolbar > * { grid-column:1; grid-row:auto; width:100%; justify-content:flex-start; }
 html[data-design=console] body.hx-shell #completed_box .dt-toolbar input { width:100%; }
}
/* النوافذ القصيرة تحتاج تمرير الصفحة بدل سحق مساحة جدول المحرر. */
@media(min-width:768px) and (max-height:760px) {
 html[data-design]:not([data-design=classic]) body.hx-shell[data-page="/EcuEditor"].overflowscreen { height:auto; overflow:auto; }
 html[data-design]:not([data-design=classic]) body.hx-shell[data-page="/EcuEditor"] .app-container { overflow:visible; }
 html[data-design]:not([data-design=classic]) body.hx-shell[data-page="/EcuEditor"] .app-container > .container { height:auto; }
 html[data-design]:not([data-design=classic]) body.hx-shell[data-page="/EcuEditor"] #completed_box { min-height:680px; flex:none; }
 html[data-design]:not([data-design=classic]) body.hx-shell[data-page="/EcuEditor"] #table-wrapper-box { min-height:260px; }
}
html[data-design=technical] body.hx-shell .hx-home-heading { padding:0; border:0; background:transparent; border-radius:0; }
html[data-design=console] body.hx-shell #completed_box .ecu-meta { width:auto; max-width:calc(100% - 40px); gap:24px; }
html[data-design=console] body.hx-shell #completed_box .ecu-meta-item { display:flex; flex-direction:column; align-items:flex-start; background:transparent; border-radius:0; gap:4px; border-right:1px solid var(--hx-border); }
html[data-design=console] body.hx-shell #completed_box .ecu-meta-key { font-size:10px; text-transform:uppercase; letter-spacing:.08em; color:var(--hx-muted); }
html[data-design=console] body.hx-shell #completed_box .ecu-meta-value { font-size:13px; color:var(--hx-text); overflow-wrap:anywhere; }
@media(max-width:767px) {
 html[data-design=console] body.hx-shell #completed_box .ecu-meta { max-width:calc(100% - 24px); gap:14px; }
}


/* File history: give two-line identities room without wrapping filenames. */
@media(min-width:768px) {
 html body.hx-site[data-page="/FileHistory"] .table-wrapper table { table-layout:fixed; width:100%!important; }
 html body.hx-site[data-page="/FileHistory"] .table-wrapper th:nth-child(1) { width:44%!important; }
 html body.hx-site[data-page="/FileHistory"] .table-wrapper th:nth-child(2) { width:24%!important; }
 html body.hx-site[data-page="/FileHistory"] .table-wrapper th:nth-child(3) { width:32%!important; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row > td { padding:5px 16px!important; vertical-align:middle; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-vehicle { line-height:1.25; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-name { margin-top:2px; line-height:1.25; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row > td:last-child .flex { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row form { margin:0; }
 html body.hx-site[data-page="/FileHistory"] .hx-file-row .badge { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
}
/* Compact administrative file identities and bounded desktop columns. */
#filesTable .hx-managed-identity { min-width:0; }
#filesTable .hx-file-vehicle { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#filesTable .hx-file-name { margin-top:2px; line-height:1.25; }
#filesTable td:last-child .flex { flex-wrap:wrap; gap:6px; align-items:center; }
#filesTable td:last-child form { margin:0; }
@media(min-width:768px) {
 html body.hx-site #filesTable { width:100%!important; table-layout:fixed; }
 html body.hx-site #filesTable th:nth-child(1) { width:4%!important; }
 html body.hx-site #filesTable th:nth-child(2) { width:31%!important; }
 html body.hx-site #filesTable th:nth-child(3) { width:10%!important; }
 html body.hx-site #filesTable th:nth-child(4) { width:9%!important; }
 html body.hx-site #filesTable th:nth-child(5), html body.hx-site #filesTable th:nth-child(6) { width:11%!important; }
 html body.hx-site #filesTable th:nth-child(7) { width:8%!important; }
 html body.hx-site #filesTable th:nth-child(8) { width:16%!important; }
 html body.hx-site #filesTable td { padding:5px 10px!important; overflow-wrap:anywhere; vertical-align:middle; }
 html body.hx-site #filesTable th { padding-left:10px; padding-right:10px; overflow-wrap:anywhere; }
}

/* General settings: separate audit options without changing theme colors. */
body.hx-site label[for="Input_EnableSecurityLogging"],
body.hx-site label[for="Input_LogSuccessfulSecurityEvents"],
body.hx-site label[for="Input_LogFailedSecurityEvents"] {
    display: block;
    margin-bottom: 6px;
}
body.hx-site label[for="Input_LogSuccessfulSecurityEvents"],
body.hx-site label[for="Input_LogFailedSecurityEvents"] {
    margin-top: 20px;
}
@media (max-width: 767px) {
    body.hx-site label[for="Input_LogSuccessfulSecurityEvents"],
    body.hx-site label[for="Input_LogFailedSecurityEvents"] {
        margin-top: 16px;
    }
}


/* Separate security logging from the general settings above it. */
body.hx-site .form-group:has(> #Input_EnableSecurityLogging) {
    border-top: 1px solid var(--hx-border, var(--border-color, #64748b));
    padding-top: 24px;
    margin-top: 24px;
}
body.hx-site .form-group:has(> #Input_EnableSecurityLogging) > h4 {
    margin: 0 0 20px;
}
@media (max-width: 767px) {
    body.hx-site .form-group:has(> #Input_EnableSecurityLogging) {
        padding-top: 16px;
        margin-top: 16px;
    }
    body.hx-site .form-group:has(> #Input_EnableSecurityLogging) > h4 {
        margin-bottom: 16px;
    }
}

/* Keep general settings actions available while the form scrolls. */
body.hx-site .general-settings-card { overflow: visible; }
html body.hx-site .card.general-settings-card > .card-header.general-settings-header {
    position: sticky;
    top: max(var(--header-height, 60px), 71px);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--hx-surface, var(--bg-secondary, #fff)) !important;
    padding: 16px 0 !important;
    margin: -16px 0 20px !important;
    border-bottom: 1px solid var(--hx-border, var(--border-color));
}
body.hx-site .general-settings-header .card-title { margin: 0; min-width: 0; }
body.hx-site .general-settings-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }
@media (max-width: 767px) {
    html body.hx-site .card.general-settings-card > .card-header.general-settings-header { top: max(var(--header-height, 60px), 66px); gap: 8px; padding: 12px 0 !important; margin-top: -12px !important; }
    body.hx-site .general-settings-header .card-title { font-size: 15px; }
    body.hx-site .general-settings-header .card-title > i { display: none; }
    body.hx-site .general-settings-actions { gap: 6px; }
    body.hx-site .general-settings-actions .btn { padding: 6px 10px; min-height: 34px; }
}

@media (max-width: 767px) {
    html body.hx-site .card.general-settings-card > .card-header.general-settings-header {
        top: max(var(--header-height, 60px), 69px);
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }
    html body.hx-site .general-settings-header .card-title {
        font-size: 15px !important;
        gap: 0;
    }
    html body.hx-site .general-settings-header .card-title > i { display: none !important; }
}
