/* Non-destructive layout, accessibility and connection state corrections. */
html,body{max-width:100%;overflow-x:clip}.sidebar{overflow-y:auto}.shell,main,.card,.formgrid>.field{min-width:0}.brandcopy strong{font-size:15px;letter-spacing:1.1px}.sidebar .brand{gap:8px;padding:0 5px}.brandmark.crest{width:40px;height:40px}.login-theme{max-width:calc(100% - 28px)}.prewrap,td,.catalogrow>span{overflow-wrap:anywhere}td .summary{overflow-wrap:anywhere}.network-status{position:fixed;bottom:12px;left:12px;right:12px;z-index:2000;padding:12px 18px;background:#173637;color:#fff;border:1px solid #79cab8;border-radius:8px;box-shadow:0 5px 20px #0005;display:flex;gap:14px;align-items:center;justify-content:space-between}.network-status button{flex-shrink:0}.saving #root,.saving #modal,.saving #paletteModal{pointer-events:none}.saving body{cursor:progress}.toast{bottom:84px}.dialogbody .notice button{margin:10px 0 0;display:block}.tablewrap{overscroll-behavior-x:contain}.tablewrap tr[hidden]{display:none}input[type=password]{min-width:0}html[data-theme=light] .brandcopy small,html[data-theme=light] .eyebrow,html[data-theme=light] .palette-trigger,html[data-theme=light] .tabs .active,html[data-theme=light] .reportlist button.active{color:var(--ui-primary)!important}html[data-theme=light] .brandcopy small{color:#59696f!important}.theme-switch button:focus-visible,.nav button:focus-visible{outline:3px solid var(--ui-accent);outline-offset:3px}.loginflow{flex-wrap:wrap}details>summary{cursor:pointer}dialog::backdrop{overscroll-behavior:contain}
@media(max-width:760px){.sidebar{height:auto;overflow:visible}.topbar{gap:12px}.topbar>.flex{width:100%;gap:9px}.topbar .theme-switch{order:0}.network-status{font-size:13px;flex-wrap:wrap}.login-theme{top:14px}.loginbox{padding-top:20px}.formgrid .flex{flex-wrap:wrap}.dialogfooter{flex-wrap:wrap;padding:16px}.dialogheader{gap:12px}.detailgrid{gap:15px}.types{flex-wrap:wrap}.loginhero{padding-top:34px}.loginright{padding-top:74px}.reporttitle{align-items:flex-start;gap:10px}.reporttitle h2{font-size:20px!important}}
@media print{html,body{overflow:visible!important;background:#fff!important;color:#17252a!important}body:before,body:after,.network-status,.toast,.noprint{display:none!important}main{max-width:none!important}.card,.reportpaper{clip-path:none!important;box-shadow:none!important;background:#fff!important;color:#17252a!important}table,td,th,small,.pill{background:#fff!important;color:#17252a!important;text-shadow:none!important}.tablewrap{overflow:visible!important}.tablewrap table{min-width:0!important;table-layout:fixed}td,th{overflow-wrap:anywhere;white-space:normal!important}.tablewrap tr[hidden]{display:table-row!important}.reportpaper *{box-shadow:none!important;color:#17252a!important}@page{size:A4 landscape;margin:12mm}}
@media(max-width:760px){.nav button{flex:0 0 auto}.nav{scrollbar-width:thin}.rankrow{grid-template-columns:minmax(60px,100px) 1fr 24px}}
.network-status.in-dialog{position:sticky;inset:auto;bottom:0;transform:none;margin:10px 18px;max-width:calc(100% - 36px);font-size:13px;flex-wrap:wrap}.network-status.in-dialog button{font-size:13px}


/* v6.0.1: event correction history + complaint/problem-transaction table visibility */
.event-change-box{display:grid;gap:7px}.event-change-row{display:grid;grid-template-columns:minmax(90px,130px) minmax(0,1fr) auto minmax(0,1fr);gap:8px;align-items:start;font-size:12px}.event-change-row span{overflow-wrap:anywhere}.event-change-row b{color:var(--ui-accent);font-weight:700}.case-table-wrap{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable both-edges}.case-table{min-width:1550px}.case-table th:last-child,.case-table td:last-child{position:sticky;right:0;z-index:3;box-shadow:-12px 0 18px #0008}.case-table th:last-child{background:#0d1b22}.case-table td:last-child{background:#081219}.case-table tr:hover td:last-child{background:#0d1c23}.case-table td:last-child button{white-space:nowrap}.case-scroll-hint{margin-left:auto;text-align:right}
html[data-theme=light] .case-table th:last-child{background:#f7f9fa}html[data-theme=light] .case-table td:last-child{background:#fff}html[data-theme=light] .case-table tr:hover td:last-child{background:#fbfdfc}
@media(max-width:760px){.event-change-row{grid-template-columns:1fr}.event-change-row b{display:none}.case-scroll-hint{display:none}.case-table-wrap{overflow:visible;padding:0 10px 12px}.case-table{display:block;min-width:0!important;width:100%}.case-table thead{display:none}.case-table tbody{display:grid;gap:14px}.case-table tr{display:block;border:1px solid #203942;background:#07131a;border-radius:8px;overflow:hidden}.case-table td{display:grid;grid-template-columns:minmax(96px,34%) minmax(0,1fr);gap:10px;align-items:start;padding:10px 12px!important;border-top:1px solid #162b32;min-width:0}.case-table td:first-child{border-top:0}.case-table td:before{content:attr(data-label);font-size:11px;letter-spacing:.4px;text-transform:uppercase;color:#6f858c;font-weight:700}.case-table td:last-child{position:static;box-shadow:none;background:#0b171e}.case-table tr:hover td:last-child{background:#0b171e}.case-table td:last-child button{width:100%;margin:0}.case-table td small{margin-top:0}.case-table td .pill{justify-self:start}html[data-theme=light] .case-table tr{background:#fff;border-color:#dfe7e8}html[data-theme=light] .case-table td{border-color:#edf1f1}html[data-theme=light] .case-table td:last-child,html[data-theme=light] .case-table tr:hover td:last-child{background:#f8fbfb}}

@media print{.case-table th:last-child,.case-table td:last-child{position:static!important;box-shadow:none!important}}

/* v6.0.3: multi-image/file attachment picker, gallery and full-screen preview */
.attachment-field input[type=file]{width:100%;padding:8px;background:color-mix(in srgb,var(--panel2) 88%,transparent);border:1px dashed color-mix(in srgb,var(--ui-accent) 42%,var(--line));border-radius:7px}.attachment-picker-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px;margin-top:10px;min-width:0}.attachment-edit-card,.attachment-card{min-width:0;display:grid;grid-template-columns:86px minmax(0,1fr);gap:11px;align-items:center;padding:9px;border:1px solid var(--line);background:color-mix(in srgb,var(--panel2) 92%,transparent);border-radius:8px;overflow:hidden}.attachment-thumb{display:block;width:86px;height:72px;padding:0;border:1px solid color-mix(in srgb,var(--ui-accent) 30%,var(--line));border-radius:6px;overflow:hidden;background:#02070b;box-shadow:none;clip-path:none}.attachment-thumb:hover:not(:disabled){background:#02070b;border-color:var(--ui-accent)}.attachment-thumb img{display:block;width:100%;height:100%;object-fit:cover}.attachment-meta{display:grid;gap:4px;min-width:0}.attachment-meta strong{font-size:12px;line-height:1.35;overflow-wrap:anywhere}.attachment-meta small{font-size:11px}.attachment-actions{gap:6px;margin-top:3px}.attachment-actions button,.attachment-link{font-size:11px;padding:5px 8px;line-height:1.2}.attachment-link{display:inline-flex;align-items:center;justify-content:center;width:max-content;max-width:100%;border:1px solid var(--line);border-radius:5px;background:var(--panel2);color:var(--ink);text-decoration:none}.attachment-link:hover{border-color:var(--ui-accent);color:var(--ui-accent)}.attachment-file-icon{width:86px;height:72px;display:grid;place-items:center;border:1px dashed color-mix(in srgb,var(--ui-accent) 35%,var(--line));border-radius:6px;background:color-mix(in srgb,var(--panel3) 92%,transparent);font-size:11px;font-weight:800;letter-spacing:1.2px;color:var(--muted)}.attachment-empty{padding:13px;border:1px dashed var(--line);border-radius:7px;color:var(--muted);font-size:12px;text-align:center}.attachment-section{margin:18px 0;padding:15px;border:1px solid var(--line);background:color-mix(in srgb,var(--panel2) 88%,transparent);border-radius:8px}.attachment-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}.attachment-section-head h4{margin:0;font-size:14px}.attachment-section-head h4 small{font-weight:400}.attachment-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}.attachment-document{grid-template-columns:70px minmax(0,1fr)}.attachment-document .attachment-file-icon{width:70px;height:68px}.image-preview-dialog{padding:0;border:1px solid var(--line);border-radius:10px;width:min(1180px,calc(100vw - 28px));height:min(900px,calc(100vh - 28px));max-width:none;max-height:none;background:#02070b;color:#fff;box-shadow:0 28px 110px #000d;overflow:hidden}.image-preview-dialog::backdrop{background:#000d;backdrop-filter:blur(7px)}.image-preview-head{height:58px;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:10px 16px;border-bottom:1px solid #273740;background:#071219}.image-preview-head strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.image-preview-head button{flex:0 0 auto}.image-preview-body{height:calc(100% - 58px);display:grid;place-items:center;padding:14px;overflow:auto}.image-preview-body img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;box-shadow:0 10px 40px #000b}.entry .attachment-section{margin:12px 0 0}.entry .attachment-gallery{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
html[data-theme=light] .attachment-field input[type=file],html[data-theme=light] .attachment-edit-card,html[data-theme=light] .attachment-card,html[data-theme=light] .attachment-section{background:#f8fbfb}html[data-theme=light] .attachment-file-icon{background:#f1f5f6}html[data-theme=light] .attachment-link{background:#fff;color:#31454c}
@media(max-width:760px){.attachment-picker-list,.attachment-gallery,.entry .attachment-gallery{grid-template-columns:1fr}.attachment-edit-card,.attachment-card{grid-template-columns:76px minmax(0,1fr)}.attachment-thumb,.attachment-file-icon{width:76px;height:66px}.attachment-section{padding:12px}.image-preview-dialog{width:100vw;height:100vh;border:0;border-radius:0}.image-preview-body{padding:8px}.image-preview-body img{max-height:none}.attachment-actions{align-items:stretch}.attachment-actions button,.attachment-link{min-height:34px}}
@media print{.attachment-field,.attachment-actions,.attachment-section-head button,.image-preview-dialog{display:none!important}.attachment-section{background:#fff!important;clip-path:none!important}.attachment-gallery{grid-template-columns:repeat(3,1fr)}.attachment-card{background:#fff!important;break-inside:avoid}}
.attachment-empty-action{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:10px 0 0;padding:8px 10px;border:1px dashed var(--line);border-radius:7px;color:var(--muted);font-size:12px}.attachment-empty-action button{font-size:11px;padding:5px 8px}
