:root{font:16px/1.5 Arial,sans-serif;color:#182b49;background:#f2f5fa;--blue:#174b86;--line:#dce4ee;--muted:#61728a}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.55}button,input,select,textarea{border-radius:8px;border:1px solid var(--line);padding:10px 13px}button{background:white;color:var(--blue)}input,select,textarea{width:100%;background:white;color:#182b49}textarea{min-height:100px;resize:vertical}button.primary{background:var(--blue);color:white;border-color:var(--blue)}button.danger{color:#b32136}a{color:var(--blue)}h1,h2,h3,p{margin:0 0 12px}h1{font-size:28px}h2{font-size:23px}small,.muted{color:var(--muted);font-size:14px}.login{max-width:470px;margin:8vh auto;padding:30px}.box{background:white;border:1px solid var(--line);border-radius:12px;padding:24px}.brand{font-size:28px;letter-spacing:3px;font-weight:700;color:var(--blue)}.brand span{color:#c3293c}.brand small{display:block;font-size:12px;letter-spacing:4px}.shell{display:grid;grid-template-columns:215px minmax(0,1fr);min-height:100vh}aside{background:#fff;border-right:1px solid var(--line);padding:26px 18px;display:flex;flex-direction:column;gap:30px}nav{display:grid;gap:9px}nav button{text-align:left;border:0}nav button.selected{background:#e9f1fb;font-weight:600}main{padding:28px;min-width:0}.top,.heading,.actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.top{margin-bottom:30px}.heading{margin-bottom:22px}.toolbar{display:grid;grid-template-columns:2fr 1.3fr 1fr;gap:12px;margin-bottom:18px}.tablewrap{overflow:auto;background:white;border:1px solid var(--line);border-radius:10px}table{width:100%;border-collapse:collapse;text-align:left}td,th{padding:17px 16px;border-bottom:1px solid var(--line);vertical-align:middle}th{font-size:14px;font-weight:500;color:var(--muted);background:#f8fafd}td small{display:block;margin-top:4px}.link{border:0;background:transparent;padding:0;font-weight:600;text-align:left}.badge{display:inline-block;padding:5px 9px;background:#e9f1fb;color:#174b86;border-radius:6px;font-size:14px}.s2{background:#fff1d5;color:#855c0a}.s3{background:#e5f3ec;color:#256447}.s4{background:#edf0f4;color:#5e6a7b}.footer{margin-top:14px}.tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:12px;margin:20px 0}.tabs button{border:0}.tabs .selected{background:#e9f1fb}.grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:grid;gap:6px;margin-bottom:14px;font-size:14px}.full{grid-column:1/-1}.item{padding:17px 0;border-bottom:1px solid var(--line)}.item p{white-space:pre-wrap}.error{color:#af2237;background:#fff0f2;border-radius:8px;padding:12px;margin:12px 0}.banner{background:#fff0d3;color:#77530c;padding:12px 18px;font-size:14px}dialog{max-width:760px;width:calc(100% - 30px);max-height:90vh;border:1px solid var(--line);border-radius:13px;padding:24px;color:#182b49}dialog::backdrop{background:#14263b80}.close{float:right}#toast:not(:empty){position:fixed;bottom:24px;right:24px;max-width:calc(100% - 48px);background:#183c65;color:#fff;padding:15px 20px;border-radius:9px;z-index:20}.adminnav{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:22px}.filepreview{max-width:180px;max-height:120px;object-fit:contain}label.check{display:flex;align-items:center;gap:8px;font-size:14px;margin:12px 0}.check input{width:auto}.footnote{margin-top:20px;font-size:14px;color:var(--muted)}[hidden]{display:none!important}@media(max-width:1024px), (hover:none) and (pointer:coarse){.shell{grid-template-columns:1fr}aside{padding:15px;gap:14px;border-bottom:1px solid var(--line)}nav{display:flex}.brand{font-size:23px}main{padding:16px}.toolbar,.grid{grid-template-columns:1fr}.full{grid-column:auto}.top{margin-bottom:20px}.login{margin:20px auto;padding:15px}td,th{padding:12px}table{min-width:650px}}@media(prefers-reduced-motion:no-preference){dialog[open]{animation:appear .15s ease-out}@keyframes appear{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}}

.manual-view{position:relative}.watermark{pointer-events:none;position:absolute;top:45%;left:5%;right:5%;text-align:center;z-index:2;opacity:.3;font-weight:bold;font-size:22px;transform:rotate(-25deg)}#archive-results{overflow:auto}#manual-search{width:min(100%,600px);margin:12px 0}

.status-filter{position:relative;min-width:0;background:white;border:1px solid var(--line);border-radius:8px}.status-filter summary{padding:10px 13px;cursor:pointer;overflow-wrap:anywhere}.status-filter summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px;border-radius:8px}.status-options{position:absolute;top:calc(100% + 6px);left:0;z-index:5;width:max(100%,300px);max-width:calc(100vw - 32px);padding:10px 14px;background:white;border:1px solid var(--line);border-radius:10px;box-shadow:0 8px 24px #182b4920}.status-options .check{margin:0;padding:9px 0;align-items:flex-start;cursor:pointer}.status-options input{flex:none;margin:5px 0 0;width:18px;height:18px;accent-color:var(--blue)}.status-divider{border-top:1px solid var(--line);margin:4px 0}

/* Pagina sesizării și lista adaptată pentru mobil. */
.ticket-heading{margin-bottom:20px}.ticket-heading .heading{margin:20px 0 14px;align-items:flex-start}.ticket-heading h1{margin:4px 0 8px;overflow-wrap:anywhere}.ticket-heading p{overflow-wrap:anywhere}.ticket-actions,.activity-actions{display:flex;gap:10px;flex-wrap:wrap}.ticket-actions button,.activity-actions button{min-height:44px}.ticket-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(280px,340px);align-items:start;gap:24px}.ticket-main{min-width:0}.ticket-tabs{margin:0 0 14px;gap:5px}.ticket-tabs button{min-height:44px;padding:10px}.ticket-facts{padding:18px;min-width:0}.ticket-facts summary{font-size:18px;font-weight:700;cursor:pointer;min-height:44px}.ticket-facts dl{margin:12px 0 0}.ticket-facts dl>div{padding:10px 0;border-top:1px solid var(--line)}dt{font-size:13px;color:var(--muted)}dd{margin:3px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.reported-defect{padding:0 0 20px;border-bottom:1px solid var(--line);margin-bottom:22px}.reported-defect h2{font-size:18px}.reported-defect p{white-space:pre-wrap;overflow-wrap:anywhere}.activity-heading h2{font-size:20px}.activity-actions{margin-bottom:20px}.activity-actions button{font-size:14px}.activity-feed{display:grid;gap:16px}.activity-card{border:1px solid var(--line);border-left:3px solid var(--blue);border-radius:10px;padding:18px;min-width:0;background:#fbfcfe}.activity-card header{display:flex;gap:8px;justify-content:space-between;flex-wrap:wrap;margin-bottom:4px}.activity-card time{font-size:13px;color:var(--muted)}.activity-card>small{display:block;margin-bottom:12px}.activity-card p{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:10px}.activity-fields{margin:14px 0 0;display:grid;gap:12px}.activity-card .file-link{display:block;overflow-wrap:anywhere;max-width:100%;min-height:44px}.activity-card button[data-approve]{margin:8px 0;max-width:100%;min-height:44px}.ticket-main .item{overflow-wrap:anywhere}.ticket-main .item small{display:block}.ticket-main .box>button{min-height:44px}.field{min-width:0}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(max-width:1100px), (hover:none) and (pointer:coarse){.ticket-layout{grid-template-columns:minmax(0,1fr)}.ticket-facts{grid-row:1}.ticket-facts summary{display:flex;align-items:center;gap:8px}.ticket-facts summary::after{content:'＋';margin-left:auto;color:var(--blue)}.ticket-facts[open] summary::after{content:'−'}.ticket-facts dl{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}}
@media(max-width:1024px), (hover:none) and (pointer:coarse){nav{overflow-x:auto;max-width:100%;padding-bottom:4px}nav button{flex:none;white-space:nowrap;min-height:44px}.top{gap:10px}.top>div{max-width:100%;overflow-wrap:anywhere}.ticket-heading .heading{gap:10px}.ticket-heading h1{font-size:24px}.ticket-heading .badge{max-width:100%;white-space:normal}.ticket-actions button{flex:1 1 180px}.ticket-tabs{flex-wrap:nowrap;overflow-x:auto;padding:3px 2px 10px}.ticket-tabs button{flex:none;white-space:nowrap}.ticket-main .box{padding:16px}.ticket-facts{padding:14px}.ticket-facts dl{grid-template-columns:1fr}.activity-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.activity-actions button{padding:10px 8px}.activity-card{padding:14px}.ticket-table{display:block;min-width:0;width:100%}.ticket-table thead{display:none}.ticket-table tbody{display:grid;gap:12px;padding:12px}.ticket-table tr{display:block;border:1px solid var(--line);border-radius:10px;padding:6px 12px}.ticket-table td{display:grid;grid-template-columns:120px minmax(0,1fr);gap:4px 10px;padding:10px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.ticket-table td::before{content:attr(data-label);font-size:13px;color:var(--muted);grid-column:1;grid-row:1/10}.ticket-table td>*{grid-column:2}.ticket-table td small{margin:0}.ticket-table td:last-child{border:0}.ticket-table td[colspan]{display:block}.ticket-table td[colspan]::before{display:none}.ticket-table .link{min-height:44px}.ticket-table .badge{justify-self:start}.tablewrap:has(.ticket-table){border:0;background:transparent}dialog{padding:16px;max-height:calc(100dvh - 32px)}dialog .grid{gap:10px}dialog button{min-height:44px}input[type=file]{padding:10px 6px;max-width:100%}.manual-view iframe{height:65dvh!important}}
@media(max-width:380px){.activity-actions{grid-template-columns:1fr}.ticket-table td{grid-template-columns:96px minmax(0,1fr)}}
@media(max-width:1024px), (hover:none) and (pointer:coarse){.shell{grid-template-columns:minmax(0,1fr)}aside{min-width:0}.tablewrap:has(.ticket-table){overflow:visible}.ticket-table td[data-label="Client / magazin"],.ticket-table td[data-label="Echipament"],.ticket-table td[data-label="Zonă / agent"]{line-height:1.45}}

.inline-add{text-align:left;font-size:14px;padding:7px 10px;min-height:44px}.inline-catalogue{background:#f4f8fe;border:1px solid var(--line);border-radius:10px;padding:16px}.inline-catalogue h3{font-size:18px}.inline-actions{display:flex;gap:10px;flex-wrap:wrap}.inline-actions button{min-height:44px}@media(max-width:1024px), (hover:none) and (pointer:coarse){.inline-actions{display:grid;grid-template-columns:1fr}.inline-catalogue{padding:12px}}
.responsible-picker{margin:0 0 14px;border:1px solid var(--line);border-radius:10px;padding:14px;min-width:0}.responsible-picker legend{padding:0 6px;font-weight:600}.responsible-picker .check{padding:6px 0;min-height:44px;flex-wrap:wrap}.responsible-picker input{width:18px;height:18px;flex:none;accent-color:var(--blue)}.responsible-picker small{font-size:12px}@media(max-width:1024px), (hover:none) and (pointer:coarse){.item.actions>div{min-width:0;width:100%}.item.actions>button{min-height:44px}}
.city-creator{padding:12px;margin-top:8px;border:1px solid var(--line);border-radius:8px;background:#f4f8fe;min-width:0}.city-creator .field{margin-bottom:10px}.city-creator .error{font-size:14px}.city-creator button{min-height:44px}.city-creator input{width:100%}

#evidence-video{display:block;width:100%;max-height:65dvh;border-radius:8px;background:#101820}.video-download{display:inline-block;padding:12px 0;min-height:44px;overflow-wrap:anywhere}

.item.actions>div>strong,.item.actions>div>small{display:block;overflow-wrap:anywhere}.item.actions>div>small{margin-top:4px}.item.actions>div{min-width:0}

.mobile-ticket-list{display:none}
@media(max-width:1024px), (hover:none) and (pointer:coarse){.tablewrap:has(.ticket-table){display:none}.mobile-ticket-list{display:block;background:white;border:1px solid var(--line);border-radius:10px;overflow:hidden}.mobile-ticket-row,.mobile-ticket-labels{display:grid;grid-template-columns:100px 84px minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:center;padding:12px 8px;text-align:left}.mobile-ticket-row{width:100%;min-height:48px;border:0;border-bottom:1px solid var(--line);border-radius:0;color:#182b49;font-size:12px}.mobile-ticket-row:last-child{border-bottom:0}.mobile-ticket-row:hover,.mobile-ticket-row:focus-visible{background:#e9f1fb}.mobile-ticket-row:focus-visible{outline-offset:-3px}.mobile-ticket-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.mobile-ticket-cell-0{font-size:11px;font-weight:600;color:var(--blue)}.mobile-ticket-cell-1{font-size:11px;font-variant-numeric:tabular-nums}.mobile-ticket-labels{background:#f8fafd;font-size:11px;color:var(--muted);border-bottom:1px solid var(--line)}.mobile-ticket-list>.footnote{margin:0;padding:16px}}
@media(max-width:350px){.mobile-ticket-row,.mobile-ticket-labels{grid-template-columns:92px 78px minmax(0,1fr) minmax(0,1fr);gap:4px;padding-left:6px;padding-right:6px}.mobile-ticket-cell-0,.mobile-ticket-cell-1{font-size:10px}}

.quote-summary{border-top:1px solid var(--line);margin-top:16px;padding-top:16px}.quote-summary h3{font-size:17px}.quote-summary small{display:block;margin-bottom:6px}.quote-part-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:end;border-bottom:1px solid var(--line);padding:12px 0}.quote-part-row .field{margin:0}.quote-part-row button{min-height:44px}@media(max-width:1024px), (hover:none) and (pointer:coarse){.quote-part-row{grid-template-columns:1fr 1fr}.quote-part-row>.field:first-child{grid-column:1/-1}.quote-part-row button{align-self:end}}

.table-sort{border:0;background:transparent;color:inherit;font:inherit;font-weight:700;padding:6px 2px;text-align:left;cursor:pointer;width:100%}.table-sort:hover{color:#157a66}th[aria-sort="ascending"] .table-sort::after{content:" ▲"}th[aria-sort="descending"] .table-sort::after{content:" ▼"}.table-sort:focus-visible{outline:2px solid #157a66;outline-offset:2px}

body{padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}#pwa-install{display:block;margin:18px auto;padding:10px 18px;max-width:calc(100% - 32px)}#pwa-help{max-width:540px}#pwa-help p{margin-top:16px}#pwa-connection{padding:12px 16px;background:#fff0d3;color:#77530c}#pwa-install[hidden],#pwa-connection[hidden]{display:none}

/* v0.21: fit mobile controls without triggering iOS focus zoom. */
@media(max-width:1024px), (hover:none) and (pointer:coarse){
 input,select,textarea{font-size:16px;min-width:0;max-width:100%}
 aside nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;width:100%;gap:6px}
 aside nav button{white-space:normal;overflow-wrap:anywhere;min-width:0;padding:10px;font-size:14px}
 .heading>div,.top>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
 .heading>button{max-width:100%}
 .adminnav button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
 .login{width:100%;max-width:470px}
 .mobile-ticket-labels .table-sort{min-width:0;padding:4px 0;overflow-wrap:anywhere}
}

/* v0.22: scroll the list, keep full names and aligned columns. */
@media(max-width:1024px), (hover:none) and (pointer:coarse){
 .mobile-ticket-list{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .mobile-ticket-row,.mobile-ticket-labels{grid-template-columns:110px 100px var(--client-width,16ch) var(--store-width,16ch);width:max-content;min-width:100%;gap:12px;padding:12px 10px}
 .mobile-ticket-cell{overflow:visible;text-overflow:clip;white-space:nowrap}
 .mobile-ticket-labels .table-sort{white-space:nowrap;overflow-wrap:normal}
}

@media(max-width:1024px), (hover:none) and (pointer:coarse){.mobile-ticket-row,.mobile-ticket-labels{grid-template-columns:110px 100px 100px var(--client-width,16ch) var(--store-width,16ch)}.mobile-ticket-cell-2{font-size:11px;font-variant-numeric:tabular-nums}}

body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}

.document-icons{display:inline-flex;gap:4px;align-items:center;min-height:44px}.document-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:9px;color:var(--blue);border-color:var(--line)}.document-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.danger{color:#a62626;margin:6px}.mobile-ticket-cell-0.link{padding:0;text-align:left;white-space:nowrap}
@media(max-width:1024px), (hover:none) and (pointer:coarse){.mobile-ticket-row,.mobile-ticket-labels{grid-template-columns:110px 100px 100px var(--client-width,16ch) var(--store-width,16ch) 96px}}


.manual-modal{width:min(960px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto}.manual-modal h2{padding-right:100px;font-size:clamp(20px,4vw,28px);overflow-wrap:anywhere}.manual-controls{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin:16px 0}.manual-controls button{min-width:44px;min-height:44px}.manual-pages{overflow:auto;max-height:65dvh;padding:8px;background:#eef2f7;-webkit-overflow-scrolling:touch}.manual-sheet{position:relative;margin:auto;background:white}.manual-sheet canvas{display:block;max-width:none}.manual-sheet .watermark{font-size:clamp(14px,3vw,22px);overflow-wrap:anywhere;user-select:none}.manual-sheet canvas{user-select:none;-webkit-touch-callout:none}

.manual-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding:8px 0}.manual-breadcrumb button{white-space:normal;overflow-wrap:anywhere;min-height:44px}.manual-folder>.link{font-weight:bold}.manual-folder .actions{flex-wrap:wrap}

.manual-dropzone{border:2px dashed #a6bbd3;border-radius:12px;padding:20px;margin-top:16px;text-align:center;background:#f8fafd}.manual-dropzone.dragging{border-color:var(--blue);background:#e9f1fb}.manual-file-pick{display:block;max-width:420px;margin:14px auto 0;font-weight:bold}.manual-file-pick input{display:block;width:100%;margin-top:8px}.manual-dropzone p{margin-top:0}

.manual-pages{position:relative;overscroll-behavior:contain}.manual-sheet{margin:0 auto 16px;flex-shrink:0}.manual-page-status{position:absolute;top:12px;left:12px;right:12px;text-align:center;color:var(--muted)}.manual-modal[open]{display:flex;flex-direction:column;overflow:hidden;max-height:calc(100dvh - 24px)}#manual-renderer{min-height:0;display:flex;flex-direction:column;overflow:hidden}.manual-modal .manual-pages{height:70dvh;max-height:none;min-height:100px;flex:1}.manual-modal h2{margin-top:0;margin-bottom:8px}.manual-controls{margin:8px 0;flex-shrink:0}@media(max-width:600px){.manual-modal{width:calc(100vw - 16px);padding:12px}.manual-modal[open]{max-height:calc(100dvh - 16px)}.manual-modal .manual-pages{height:72dvh}}

/* Desktop and landscape share the full, compact table. Portrait keeps its list. */
.ticket-table{width:max-content;min-width:100%}.ticket-table th,.ticket-table td{white-space:nowrap;padding:10px 12px}.ticket-table td small{display:inline;margin-left:8px}.ticket-table .badge{white-space:nowrap}
@media (orientation:landscape) and (max-width:1024px), (orientation:landscape) and (hover:none) and (pointer:coarse){
 .tablewrap:has(.ticket-table){display:block;border:1px solid var(--line);background:white;overflow-x:auto;-webkit-overflow-scrolling:touch}
 .mobile-ticket-list{display:none}
 .ticket-table{display:table;width:max-content;min-width:100%}.ticket-table thead{display:table-header-group}.ticket-table tbody{display:table-row-group;padding:0}.ticket-table tr{display:table-row;border:0;padding:0}.ticket-table th,.ticket-table td{display:table-cell;padding:10px 12px;white-space:nowrap;border-bottom:1px solid var(--line);overflow-wrap:normal}.ticket-table td::before{display:none}.ticket-table td small{display:inline;margin-left:8px}.ticket-table .badge{max-width:none;white-space:nowrap}
 .shell>aside nav{display:flex;flex-wrap:wrap}.shell>aside .footnote{margin-top:4px}
}

.ticket-table th{position:relative}.column-drag{touch-action:none;cursor:grab;padding:4px 6px;border:0;background:transparent;color:var(--muted);font-size:18px}.column-drag:active{cursor:grabbing}

.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:8px 20px}.permission-form [role=status]{margin-left:12px}.permission-form .check{align-items:flex-start}

@media(max-width:1024px),(hover:none) and (pointer:coarse){.mobile-ticket-row,.mobile-ticket-labels{grid-template-columns:110px 100px 100px var(--client-width,16ch) var(--store-width,16ch) 96px 70px}.mobile-document-cell{display:block}}

.ticket-table [hidden],.mobile-ticket-list [hidden]{display:none!important}.ticket-table td{overflow:hidden;text-overflow:ellipsis}.ticket-table th{padding-right:20px;overflow:hidden}.ticket-table .table-sort{max-width:calc(100% - 32px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}.column-resize{position:absolute;right:0;top:0;bottom:0;width:12px;cursor:col-resize;touch-action:none;z-index:2;border-right:2px solid #c9d5e5}.column-resize:hover,.column-resize:focus-visible{background:#dbe7f6;outline:2px solid var(--blue)}.column-setting{display:grid;grid-template-columns:minmax(140px,1fr) 105px 100px;gap:12px;align-items:center;padding:8px 0;border-bottom:1px solid var(--line)}.column-setting input[type=number]{width:100%;min-width:0}.column-setting label{font-size:14px}.column-setting .check{margin:0}.column-setting button{padding:6px 12px}.column-settings{max-height:55vh;overflow:auto}.mobile-ticket-cell:not(button){font-size:12px}@media(max-width:450px){.column-setting{grid-template-columns:minmax(100px,1fr) 80px 80px;gap:6px}.column-setting button{padding:6px 8px}}

.offer-state-draft{color:#64748b;background:#f1f5f9;border-color:#cbd5e1}.offer-state-sent{color:#9a5800;background:#fff3d6;border-color:#e0b257}.offer-state-accepted{color:#166534;background:#dcfce7;border-color:#86cf9b}.offer-state-invoiced{color:#6b21a8;background:#f3e8ff;border-color:#c8a4e8}.offer-status{display:inline-block;border:1px solid;border-radius:6px;padding:5px 8px;font-weight:600}.offer-progress{margin-top:12px}.offer-progress button{margin:6px 6px 6px 0}

.ticket-table tbody tr[data-open-ticket]{cursor:pointer}.ticket-table tbody tr:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}

/* v0.39: headings wrap within the saved column width. */
.ticket-table th{padding:4px 14px 4px 4px;white-space:normal;line-height:1.2}
.ticket-table th .column-drag{position:absolute;left:2px;top:50%;transform:translateY(-50%);width:18px;min-height:28px;padding:0;font-size:16px;line-height:1}
.ticket-table th .table-sort{display:block;width:calc(100% - 18px);max-width:none;margin-left:18px;min-height:28px;padding:2px 0;white-space:normal;word-break:normal;overflow-wrap:anywhere;overflow:visible;text-overflow:clip;line-height:1.2}
.ticket-table td{padding-top:6px;padding-bottom:6px}
.mobile-ticket-labels .table-sort{white-space:normal;word-break:normal;overflow-wrap:anywhere;line-height:1.2}
@media(hover:none) and (pointer:coarse){.ticket-table th .column-drag,.ticket-table th .table-sort{min-height:44px}}

/* v0.41: service reports stay in the app with a persistent return button. */
.report-viewer-header{display:flex;gap:12px;align-items:center;flex-shrink:0;margin-bottom:8px}
.report-viewer-header button{flex-shrink:0;min-height:44px}
.report-viewer-header h2{padding:0;margin:0;font-size:20px;min-width:0;overflow-wrap:anywhere}
.service-report-renderer{min-height:0;display:flex;flex-direction:column;overflow:hidden}
.service-report-renderer .watermark:empty{display:none}
.report-image-scroll{overflow:auto;max-height:70dvh;overscroll-behavior:contain}
.report-image-scroll img{display:block;max-width:100%;height:auto;margin:auto}
@media(orientation:landscape) and (pointer:coarse){.service-report-modal .manual-pages,.report-image-scroll{max-height:calc(100dvh - 160px)}}

/* v0.42: compact portrait rows without reducing touch targets. */
@media(max-width:1024px) and (orientation:portrait),(hover:none) and (pointer:coarse) and (orientation:portrait){
 .mobile-ticket-row{padding:2px 10px;min-height:48px;line-height:1.25}
 .mobile-ticket-labels{padding:2px 10px;line-height:1.2}
 .mobile-ticket-row .mobile-ticket-cell-0.link{min-height:44px;padding:0;line-height:1.25}
 .mobile-ticket-row .document-icons{min-height:44px}
 .mobile-ticket-labels .table-sort{min-height:44px;padding:2px 0;line-height:1.2}
}

/* v0.45: a quieter mobile interface, with readable inputs and touch controls. */
.account-bar{justify-content:flex-end;gap:10px}
.account-name{font-size:12px;font-weight:400;color:var(--muted);overflow-wrap:anywhere}
@media(max-width:1024px),(hover:none) and (pointer:coarse){
 :root{font-size:14px;line-height:1.4}
 .shell>aside{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px 12px;padding:10px 12px}
 .shell>aside .brand{font-size:20px;letter-spacing:2px;line-height:1.15}
 .shell>aside .brand small{font-size:9px;letter-spacing:3px;margin-top:3px}
 .shell>aside>.footnote{grid-column:2;grid-row:1;align-self:center;justify-self:end;margin:0;font-size:9px;line-height:1.3;text-align:right;max-width:150px}
 .shell>aside nav{grid-column:1/-1;display:flex;flex-wrap:nowrap;gap:4px;overflow-x:auto;overflow-y:hidden;padding:0;max-width:100%;-webkit-overflow-scrolling:touch}
 .shell>aside nav button{flex:0 0 auto;min-height:44px;padding:6px 9px;font-size:12px;line-height:1.2;white-space:nowrap;border-radius:6px}
 .shell>main{padding:10px 12px}
 .account-bar{margin-bottom:10px;gap:8px;flex-wrap:nowrap}
 .account-name{font-size:11px;line-height:1.3;min-width:0}
 .account-bar #logout{font-size:12px;min-height:44px;padding:4px 8px;border:0;background:transparent}
 h1,.ticket-heading h1{font-size:22px;line-height:1.2;margin-bottom:5px}
 h2{font-size:18px;line-height:1.3;margin-bottom:8px}
 h3{font-size:16px;line-height:1.3}
 small,.muted{font-size:12px}
 .heading{gap:8px;margin-bottom:12px}
 button{font-size:13px;padding:6px 10px;min-height:44px;line-height:1.25}
 input,select,textarea{font-size:16px;line-height:1.3;padding:8px 10px;border-radius:7px}
 .toolbar{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;margin-bottom:12px}
 .toolbar #search{grid-column:1/-1}
 .toolbar #zone{font-size:16px;min-width:0}
 .toolbar .status-filter summary{padding:8px 9px;min-height:44px;display:flex;align-items:center;font-size:13px;line-height:1.25}
 .toolbar #configure-columns{grid-column:1/-1;justify-self:end;width:auto;font-size:12px;padding:6px 10px;background:transparent}
 .box{padding:14px;border-radius:9px}
 .grid{gap:12px}
 .field{gap:5px;margin-bottom:10px;font-size:13px}
 .tabs{gap:5px;margin:12px 0;padding-bottom:8px}
 .adminnav{gap:6px;margin-bottom:12px}
 .item{padding:10px 0}
 .actions{gap:8px}
 .badge{font-size:12px;padding:4px 7px}
 .ticket-main .box,.ticket-facts,.activity-card{padding:12px}
 .ticket-tabs{padding-bottom:6px}
 .manual-dropzone{padding:12px;margin-top:10px}
 .footer,.footnote{font-size:11px;margin-top:10px}
 dialog{padding:14px}
 .report-viewer-header{gap:8px}
 .report-viewer-header h2{font-size:17px}
}

/* v0.46: compact, readable activity cards on mobile. */
@media(max-width:1024px),(hover:none) and (pointer:coarse){
 .ticket-heading{margin-bottom:12px}
 .ticket-heading .heading{margin:10px 0;gap:8px}
 .ticket-heading p{margin-bottom:6px;font-size:13px;line-height:1.4}
 .ticket-heading>.heading strong{font-size:13px}
 .ticket-actions{gap:6px}
 .ticket-actions button{flex:1 1 calc(50% - 6px);font-size:12px;padding:6px 8px;white-space:normal}
 .ticket-layout{gap:12px}
 .ticket-facts summary{font-size:14px;font-weight:600}
 .ticket-facts dl{margin-top:6px}
 .ticket-facts dl>div{padding:7px 0}
 .reported-defect{padding-bottom:12px;margin-bottom:12px}
 .reported-defect h2,.activity-heading h2{font-size:16px}
 .reported-defect p{font-size:13px;line-height:1.45;margin-bottom:6px}
 .activity-actions{gap:6px;margin-bottom:12px}
 .activity-actions button{font-size:12px;padding:6px 8px}
 .activity-feed{gap:10px}
 .activity-card{padding:10px 12px;border-left-width:2px;border-radius:8px;background:#fff;font-size:13px;line-height:1.45}
 .activity-card header{gap:4px 8px;margin-bottom:2px;align-items:baseline}
 .activity-card header strong{font-size:13px;font-weight:600}
 .activity-card time{font-size:10px;line-height:1.4}
 .activity-card>.activity-author{font-size:11px;margin-bottom:6px;line-height:1.4}
 .activity-card>p{margin:6px 0 0;font-size:13px;line-height:1.45}
 .activity-fields{margin:8px 0 0;gap:10px}
 .activity-fields dt{font-size:11px;line-height:1.4}
 .activity-fields dd{margin:3px 0 0;font-size:13px;line-height:1.45}
 .activity-field-short{display:grid;grid-template-columns:minmax(90px,38%) minmax(0,1fr);gap:8px;align-items:baseline}
 .activity-field-short dd{margin:0}
 .activity-field-text dd{margin-top:4px}
}

/* v0.47: content-sized mobile header and consistent compact spacing. */
.attachment-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.activity-card .attachment-actions button[data-approve]{margin:0}
@media(max-width:1024px),(hover:none) and (pointer:coarse){
 .shell{grid-template-rows:auto minmax(0,1fr);align-content:start}
 .shell>aside{align-content:start;align-items:center;grid-template-rows:auto auto;height:auto;min-height:0}
 .shell>aside nav{align-items:center;height:44px;min-height:44px}
 .shell>aside nav button{height:44px;align-self:center}
 .shell>main{align-self:start}
 .account-bar{margin-bottom:6px}
 #content>h1+p{font-size:13px;line-height:1.35;margin-bottom:10px}
 .grid{gap:8px}
 .grid>.field{margin-bottom:0;gap:3px}
 #archive-filter{padding:10px;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
 #archive-filter>.field:first-child{grid-column:1/-1}
 #archive-filter>.field{font-size:12px}
 #archive-filter>button{justify-self:start;grid-column:1/-1}
 #archive-results,#manual-list{margin-top:10px!important;padding:10px}
 .manual-breadcrumb{padding:0;gap:3px;margin:0 0 4px;overflow:visible;flex-wrap:wrap}
 #manual-search{margin:4px 0 8px;width:100%;max-width:none}
 #content>.actions,.manual-folder .actions,#manual-list .item .actions{justify-content:flex-start;gap:4px}
 #manual-list .item .actions{margin-top:4px}
 .manual-dropzone{padding:8px 10px;margin-top:8px;text-align:left}
 .manual-dropzone p{font-size:12px;margin-bottom:2px}
 .manual-dropzone small{font-size:10px;line-height:1.3}
 .manual-file-pick{max-width:none;margin:6px 0 0;font-size:12px}
 .manual-file-pick input{margin-top:3px;padding:5px;font-size:13px}
 .activity-actions{gap:4px;margin-bottom:8px}
 .activity-feed{gap:6px}
 .activity-card{padding:8px 10px}
 .activity-card>.activity-author{margin-bottom:3px}
 .activity-card>p{margin-top:3px}
 .activity-card .file-link{min-height:0;padding:3px 0;line-height:1.35}
 .attachment-details{margin-top:3px;display:grid;gap:3px}
 .attachment-details small{font-size:11px}
 .attachment-details p{margin:0;font-size:13px}
 .attachment-actions{gap:4px;margin-top:5px;justify-content:flex-start}
 .attachment-actions button{font-size:11px;padding:5px 7px}
 .activity-fields{gap:6px;margin-top:5px}
 .item p{margin:4px 0}
}
@media(max-width:350px){#archive-filter{grid-template-columns:minmax(0,1fr)}}

/* v0.48: matching compact spacing for desktop web. */
@media(min-width:1025px) and (hover:hover) and (pointer:fine){
 aside{gap:18px;padding:20px 16px}
 main{padding:20px}
 .account-bar{margin-bottom:12px}
 .heading{margin-bottom:14px;gap:10px}
 #content>h1+p{margin-bottom:12px;font-size:14px}
 button{padding:7px 10px;line-height:1.3}
 .box{padding:16px}
 .grid{gap:10px 14px}
 .grid>.field{margin-bottom:0;gap:4px}
 .actions{justify-content:flex-start;gap:6px}
 .item.actions{justify-content:space-between}
 .item{padding:10px 0}
 .item p{margin:5px 0}
 #archive-filter{grid-template-columns:repeat(3,minmax(0,1fr));padding:14px}
 #archive-filter>button{justify-self:start;align-self:end}
 #archive-results,#manual-list{margin-top:12px!important}
 .manual-breadcrumb{padding:0;gap:4px;margin-bottom:4px}
 #manual-search{margin:4px 0 10px}
 .manual-dropzone{padding:12px;margin-top:10px}
 .manual-dropzone p{margin-bottom:4px}
 .manual-file-pick{margin-top:8px;font-size:13px}
 .manual-file-pick input{margin-top:4px;padding:6px}
 #manual-list .actions{margin-top:5px}
 .ticket-heading{margin-bottom:14px}
 .ticket-heading .heading{margin:12px 0 10px}
 .ticket-layout{gap:16px}
 .ticket-main .box,.ticket-facts{padding:14px}
 .ticket-actions,.activity-actions{gap:6px}
 .activity-actions{margin-bottom:10px}
 .activity-feed{gap:8px}
 .activity-card{padding:10px 12px;border-left-width:2px}
 .activity-card header{margin-bottom:2px;align-items:baseline}
 .activity-card>.activity-author{margin-bottom:4px;font-size:12px}
 .activity-card>p{margin:4px 0 0;font-size:14px}
 .activity-card .file-link{min-height:0;padding:3px 0}
 .attachment-details{display:grid;gap:3px;margin-top:3px}
 .attachment-details p{margin:0}
 .attachment-actions{margin-top:6px}
 .activity-card .attachment-actions button{min-height:34px;margin:0;font-size:13px}
 .activity-fields{margin-top:6px;gap:7px}
 .activity-fields dd{font-size:14px}
 .reported-defect{padding-bottom:12px;margin-bottom:14px}
 .tabs{margin:12px 0;padding-bottom:8px}
}

/* v0.49: compact main-table rows; icon controls no longer enlarge every row. */
@media(min-width:1025px) and (hover:hover) and (pointer:fine){
 .toolbar{grid-template-columns:minmax(160px,2fr) minmax(140px,1.3fr) minmax(110px,1fr) minmax(140px,1.3fr) auto;gap:8px;margin-bottom:10px;align-items:center}
 .toolbar input,.toolbar select{padding:6px 9px;font-size:14px}
 .toolbar .status-filter summary{padding:6px 9px;font-size:14px}
 .toolbar #configure-columns{padding:6px 9px;font-size:12px;white-space:nowrap}
 .ticket-table{font-size:14px;line-height:1.3}
 .ticket-table tbody tr{height:auto}
 .ticket-table td{padding:4px 10px;height:auto;line-height:1.3}
 .ticket-table td .link{min-height:0;padding:3px 0;line-height:1.3}
 .ticket-table .document-icons{min-height:28px;gap:3px;vertical-align:middle}
 .ticket-table .document-icon{width:28px;height:28px;min-height:28px;padding:5px}
 .ticket-table .document-icon svg{width:18px;height:18px}
 .ticket-table .badge{padding:3px 6px;font-size:12px;line-height:1.3}
 .ticket-table th{font-size:12px;padding-top:3px;padding-bottom:3px}
 .ticket-table th .table-sort{min-height:24px}
}

/* v0.50: mobile density applies to portrait and landscape, including nested controls. */
@media(max-width:1024px),(hover:none) and (pointer:coarse){
 .shell>aside{padding:7px 10px;gap:3px 10px}
 .shell>aside nav{height:36px;min-height:36px;gap:3px}
 .shell>aside nav button{height:36px;min-height:36px;padding:4px 8px;font-size:11px}
 .shell>main{padding:6px 10px 10px}
 button,dialog button{min-height:36px;padding:5px 8px}
 input,select{min-height:36px;padding:6px 8px}
 .account-bar{margin-bottom:4px;gap:5px;min-height:28px}
 .account-bar #logout{min-height:28px;padding:3px 6px;font-size:11px}
 .heading{margin-bottom:8px;gap:6px}
 .heading h1{font-size:20px;margin-bottom:3px}
 .heading>.primary{min-height:36px;font-size:12px;padding:5px 8px}
 .toolbar{gap:5px;margin-bottom:7px;align-items:center}
 .toolbar .status-filter summary{min-height:36px;padding:6px 8px;font-size:12px}
 .toolbar #configure-columns{min-height:28px;padding:3px 6px;font-size:11px;border:0}
 .mobile-ticket-row{min-height:38px;padding:1px 8px;line-height:1.25}
 .mobile-ticket-row .mobile-ticket-cell-0.link{min-height:34px;padding:0;line-height:1.25}
 .mobile-ticket-labels{padding:1px 8px;min-height:34px;line-height:1.2}
 .mobile-ticket-labels .table-sort{min-height:32px;padding:2px 0;font-size:11px}
 .mobile-ticket-row .document-icons{min-height:32px}
 .mobile-ticket-row .document-icon{height:32px;width:32px;min-height:32px;padding:6px}
 .mobile-ticket-row .document-icon svg{width:18px;height:18px}
 .ticket-table th,.ticket-table td{padding:3px 9px;line-height:1.3}
 .ticket-table td{height:auto;font-size:12px}
 .ticket-table td .link{min-height:32px;padding:2px 0;line-height:1.3}
 .ticket-table .document-icons{min-height:32px;vertical-align:middle}
 .ticket-table .document-icon{height:32px;width:32px;min-height:32px;padding:6px}
 .ticket-table .document-icon svg{width:18px;height:18px}
 .ticket-table .badge{padding:3px 6px;font-size:11px}
 .ticket-table th .column-drag,.ticket-table th .table-sort{min-height:32px;font-size:11px}
 .ticket-tabs button,.ticket-actions button,.activity-actions button,.ticket-main .box>button,.activity-card button[data-approve]{min-height:36px}
 .ticket-tabs{margin-bottom:8px;padding-bottom:4px}
 .activity-actions{gap:4px;margin-bottom:6px}
 .activity-card{padding:7px 9px}
 .attachment-actions button{min-height:36px}
 .manual-breadcrumb button{min-height:32px}
 .manual-dropzone{padding:7px 9px}
 .field{margin-bottom:6px}
 .footer{margin-top:7px}
}
/* Search in every single-choice list by any fragment, with or without accents. */
.searchable-select{position:relative;min-width:0;width:100%}
.searchable-source{position:absolute!important;width:1px!important;height:1px!important;opacity:0;padding:0!important;pointer-events:none}
.searchable-options{position:absolute;top:calc(100% + 3px);left:0;right:0;max-height:240px;overflow:auto;background:white;border:1px solid var(--line);border-radius:7px;box-shadow:0 6px 18px #182b4926;z-index:30;padding:3px}
.searchable-options button{display:block;width:100%;text-align:left;border:0;border-radius:4px;padding:7px 8px;white-space:normal;overflow-wrap:anywhere;font-size:13px;min-height:34px}
.searchable-options button:hover,.searchable-options button:focus{background:#e9f1fb}
.searchable-options span{display:block;padding:8px;font-size:12px;color:var(--muted)}
.date-display{display:flex;gap:4px;position:relative;min-width:0}
.date-display>input[type=text]{min-width:0;flex:1}
.date-display>button{flex:none;padding:4px 9px}
.date-source{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none;padding:0!important}
.shared-table{table-layout:fixed;min-width:0;font-size:14px;line-height:1.3}
.shared-table th{position:relative;padding:4px 16px 4px 22px;white-space:normal;overflow-wrap:anywhere}
.shared-table td{padding:5px 9px;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;vertical-align:middle}
.shared-table [hidden]{display:none!important}
.shared-table button{font-size:12px;padding:5px 7px}
.shared-table .actions{gap:4px;justify-content:flex-start}
.shared-table small{display:block;margin:2px 0}
.shared-drag{position:absolute;left:2px;top:50%;transform:translateY(-50%);border:0;background:transparent;padding:2px!important;cursor:grab}
.shared-table-controls{display:flex;justify-content:flex-end;margin:6px 0}
.shared-table-controls button{font-size:12px;padding:4px 8px}
@media(max-width:1024px),(hover:none) and (pointer:coarse){.shared-table{font-size:12px}.shared-table th,.shared-table td{padding-top:3px;padding-bottom:3px}.shared-table .shared-drag{min-height:32px}.shared-table th .table-sort{min-height:32px;padding:2px;font-size:11px;white-space:normal}.shared-table-controls button{min-height:30px}.shared-table .actions button{min-height:32px}}
/* v0.56: uniform density for every configured list. */
.shared-table td{white-space:nowrap;line-height:1.25}
.shared-table td>small,.shared-table td>div>small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.shared-table .actions{flex-wrap:nowrap;align-items:center}
.shared-table th .table-sort{padding:2px 0;min-height:24px;font-size:12px;line-height:1.2;white-space:normal}
.shared-table input[type=checkbox]{width:18px;height:18px;margin:2px;accent-color:var(--blue)}
.shared-list-wrap{margin-top:6px}
@media(max-width:1024px),(hover:none) and (pointer:coarse){.shared-table th .table-sort{min-height:32px}.shared-table td{font-size:12px}.shared-table .link{min-height:32px}}

.scan-pages{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}.scan-pages>div{display:flex;align-items:center;gap:6px;border:1px solid #dce4ef;border-radius:6px;padding:4px 6px}.scan-pages button{min-height:28px;padding:2px 6px}

.scan-crop-dialog{width:min(94vw,640px);max-height:94dvh;padding:12px;overflow:auto}.scan-crop-dialog h2{margin:0 0 6px;font-size:18px}.scan-crop-dialog p{font-size:13px;margin:6px 0}.scan-crop-stage{position:relative;width:fit-content;max-width:100%;margin:12px auto;overflow:hidden;line-height:0}.scan-crop-stage img{display:block;max-width:100%;max-height:54dvh;width:auto;height:auto}.scan-crop-frame{position:absolute;border:2px solid #1d77d2;box-shadow:0 0 0 100vmax #0007;box-sizing:border-box;pointer-events:none}.scan-crop-handle{position:absolute;width:32px;height:32px;min-height:32px;padding:0;border:3px solid white;background:#1d77d2;border-radius:50%;pointer-events:auto;touch-action:none}.scan-crop-handle.tl{left:-12px;top:-12px}.scan-crop-handle.tr{right:-12px;top:-12px}.scan-crop-handle.bl{left:-12px;bottom:-12px}.scan-crop-handle.br{right:-12px;bottom:-12px}.scan-crop-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}.scan-crop-actions button{min-height:36px;padding:6px 10px}.scan-crop-sliders label{display:flex;align-items:center;gap:8px;font-size:13px;margin:4px 0}.scan-crop-sliders input{flex:1;min-width:0;padding:0}.scan-crop-sliders summary{font-size:13px;cursor:pointer}@media(orientation:landscape) and (max-height:500px){.scan-crop-stage img{max-height:48dvh}}

.shared-table td.shared-actions-cell{white-space:normal;overflow:visible;text-overflow:clip}.shared-cell-actions{display:flex;flex-wrap:wrap;align-items:center;gap:3px}.shared-table .shared-cell-actions button{max-width:100%;white-space:normal;overflow-wrap:anywhere;margin:0;min-height:28px}.shared-cell-actions>.actions{flex-wrap:wrap!important}

#modal.movable-columns{position:fixed;max-width:calc(100vw - 12px);animation:none}#modal.movable-columns::backdrop{background:rgba(20,40,60,.08)}#modal.movable-columns>h2{cursor:grab;touch-action:none;user-select:none;padding-right:90px}#modal.movable-columns>h2:active{cursor:grabbing}

.shared-table th .shared-resize{display:flex;align-items:center;justify-content:center;position:absolute;right:2px;top:0;bottom:0;width:18px;min-width:18px;min-height:0;padding:0;border:0;border-left:1px solid #c9d5e5;border-radius:0;background:#edf3fb;color:#45658c;font-size:13px;z-index:5;cursor:col-resize;touch-action:none}.shared-table th{padding-right:24px}.shared-table th .shared-resize:hover{background:#dbe7f6}

#modal.movable-columns[open]{display:flex;flex-direction:column;overflow:hidden;min-width:0;min-height:0;padding:14px 14px 24px}#modal.movable-columns>.close{position:absolute;right:14px;top:14px}#modal.movable-columns>h2{flex:none;margin:0 0 10px;font-size:18px}#modal.movable-columns>form{flex:1;min-height:0;overflow:auto;padding-right:4px}#modal.movable-columns .column-settings{max-height:none;overflow:visible}#modal.movable-columns .column-setting{grid-template-columns:minmax(90px,1fr) 76px 74px;gap:6px;padding:5px 0}#modal.movable-columns .column-setting button{padding:4px 7px}#modal.movable-columns .column-dialog-resize{position:absolute;right:2px;bottom:2px;min-height:22px;width:26px;height:22px;padding:0;border:0;border-radius:3px;background:#edf3fb;color:#45658c;cursor:nwse-resize;touch-action:none;z-index:5}

.width-controls{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px}.width-controls button{min-height:32px;padding:4px 8px;font-size:12px}.width-controls [data-width-fit]{flex-basis:100%;font-size:11px}
@media(max-width:600px){.movable-columns .column-setting{grid-template-columns:minmax(85px,1fr) minmax(120px,1.2fr) 64px;gap:5px}.width-controls button{min-width:36px;min-height:36px}}

.shell aside .brand{cursor:pointer}.ticket-split{display:grid;grid-template-rows:minmax(160px,var(--ticket-list-height,300px)) 14px minmax(180px,1fr);height:calc(100dvh - 88px);min-height:440px;overflow:hidden}#ticket-list-pane,#ticket-detail-pane{min-height:0;min-width:0}.ticket-split #ticket-list-pane,.ticket-split #ticket-detail-pane{overflow:auto}.ticket-split #ticket-detail-pane{padding-top:8px}#ticket-pane-divider{width:100%;height:14px;min-height:14px;padding:0;border:0;border-top:1px solid #b7c6dc;border-bottom:1px solid #b7c6dc;background:#e2eaf5;cursor:row-resize;touch-action:none;line-height:10px}#ticket-pane-divider[hidden],#ticket-detail-pane[hidden]{display:none}.ticket-selected{background:#e8f0fb}.ticket-split .ticket-heading #back{margin-bottom:6px}
@media(max-width:600px){.ticket-split{height:calc(100dvh - 60px);min-height:440px}#ticket-pane-divider{height:20px;min-height:20px}.ticket-split{grid-template-rows:minmax(160px,var(--ticket-list-height,240px)) 20px minmax(180px,1fr)}}

.ticket-layout.ticket-facts-above{display:flex;flex-direction:column;gap:8px}.ticket-facts-above>.ticket-facts{width:100%;position:static}.ticket-facts-above>.ticket-main{width:100%;min-width:0}

.ticket-layout.ticket-facts-right{display:grid;grid-template-columns:minmax(0,1fr) 12px minmax(200px,var(--ticket-facts-width,30%));gap:6px;align-items:start}.ticket-facts-right>.ticket-facts{position:static;align-self:start;margin:0}.ticket-facts-right>.ticket-main{min-width:0}.ticket-facts-right #ticket-width-divider{padding:0;width:12px;min-height:150px;height:100%;align-self:stretch;border:0;border-left:1px solid #bdcce0;border-right:1px solid #bdcce0;background:#e2eaf5;cursor:col-resize;touch-action:none}.ticket-facts-right .ticket-facts{grid-column:3;grid-row:1}
@media(max-width:600px){.ticket-layout.ticket-facts-right{grid-template-columns:minmax(0,1fr);gap:8px}.ticket-facts-right .ticket-facts{grid-column:1;grid-row:auto}.ticket-facts-right #ticket-width-divider{display:none}}
/* Each split pane owns its scroll; prevent wheel chaining to neighbours. */
.ticket-split #ticket-list-pane{overscroll-behavior:contain}
.ticket-split #ticket-detail-pane{overflow:hidden;display:flex;flex-direction:column}
.ticket-split #ticket-detail-pane[hidden]{display:none}
.ticket-split #ticket-detail-pane>.ticket-facts-right{height:100%;min-height:0;overflow:hidden;align-items:stretch}
.ticket-split .ticket-facts-right>.ticket-main,.ticket-split .ticket-facts-right>.ticket-facts{height:100%;max-height:100%;min-height:0;overflow:auto;overscroll-behavior:contain;align-self:stretch}
.ticket-split .ticket-facts-right>.ticket-main{padding-right:3px}
@media(max-width:600px){.ticket-split #ticket-detail-pane{overflow:auto;overscroll-behavior:contain;display:block}.ticket-split #ticket-detail-pane>.ticket-facts-right{height:auto;overflow:visible}.ticket-split .ticket-facts-right>.ticket-main,.ticket-split .ticket-facts-right>.ticket-facts{height:auto;max-height:none;overflow:visible}}
/* Compact spacing within the two detail panes. */
#ticket-detail-pane .ticket-heading{margin:0 0 6px}
#ticket-detail-pane .ticket-heading #back{margin:0 0 4px;min-height:28px;padding:4px 8px;font-size:12px}
#ticket-detail-pane .ticket-heading .heading{margin:4px 0 6px;gap:6px;align-items:start}
#ticket-detail-pane .ticket-heading h1{font-size:22px;line-height:1.2;margin:3px 0}
#ticket-detail-pane .ticket-heading p{margin:4px 0;line-height:1.35}
#ticket-detail-pane .ticket-heading small{font-size:11px;line-height:1.3}
#ticket-detail-pane .ticket-heading strong{font-size:13px}
#ticket-detail-pane .ticket-actions,#ticket-detail-pane .activity-actions{gap:4px;margin:4px 0}
#ticket-detail-pane .ticket-actions button,#ticket-detail-pane .ticket-tabs button,#ticket-detail-pane .activity-actions button{min-height:30px;padding:4px 8px;font-size:12px;line-height:1.3}
#ticket-detail-pane .ticket-tabs{gap:4px;padding:0 0 4px;margin:0 0 6px}
#ticket-detail-pane .ticket-main .box,#ticket-detail-pane .ticket-facts{padding:9px}
#ticket-detail-pane .ticket-facts summary{font-size:13px;line-height:1.3;margin:0;padding:0 0 5px}
#ticket-detail-pane .ticket-facts dl{margin:4px 0 0}
#ticket-detail-pane .ticket-facts dl>div{display:grid;grid-template-columns:minmax(85px,35%) minmax(0,1fr);gap:8px;padding:6px 0;align-items:start}
#ticket-detail-pane .ticket-facts dt{font-size:11px;line-height:1.35;margin:0}
#ticket-detail-pane .ticket-facts dd{font-size:12px;line-height:1.35;margin:0;overflow-wrap:anywhere}
#ticket-detail-pane .activity-card{padding:8px 10px;margin:6px 0}
#ticket-detail-pane .activity-card p,#ticket-detail-pane .box p{margin:5px 0;line-height:1.4}
#ticket-detail-pane .box h2,#ticket-detail-pane .box h3{margin:6px 0;font-size:15px}
@media(hover:none) and (pointer:coarse){#ticket-detail-pane .ticket-actions button,#ticket-detail-pane .ticket-tabs button,#ticket-detail-pane .activity-actions button,#ticket-detail-pane .ticket-heading #back{min-height:36px}}
/* Compact top list pane, scoped so other menus keep their layout. */
#ticket-list-pane>.heading{margin:0 0 6px;gap:8px;align-items:center}
#ticket-list-pane>.heading h1{font-size:22px;line-height:1.2;margin:0 0 3px}
#ticket-list-pane>.heading .muted{font-size:11px;line-height:1.3}
#ticket-list-pane>.heading button{min-height:30px;padding:4px 9px;font-size:12px}
#ticket-list-pane .toolbar{margin:0 0 6px;gap:5px}
#ticket-list-pane .toolbar>input,#ticket-list-pane .toolbar>button,#ticket-list-pane .status-filter>summary{min-height:30px;padding:5px 8px;font-size:12px;line-height:1.3}
#ticket-list-pane .ticket-table th{padding:4px 6px;font-size:11px;line-height:1.15}
#ticket-list-pane .ticket-table td{padding:3px 7px;line-height:1.25;font-size:12px}
#ticket-list-pane .ticket-table .document-icon{width:24px;height:24px;min-height:24px;padding:3px}
#ticket-list-pane .ticket-table .document-icon svg{width:16px;height:16px}
#ticket-list-pane .ticket-table .badge{font-size:10px;padding:3px 5px}
#ticket-list-pane .footer{margin:5px 0;font-size:11px}
@media(hover:none) and (pointer:coarse){#ticket-list-pane>.heading button,#ticket-list-pane .toolbar>input,#ticket-list-pane .toolbar>button,#ticket-list-pane .status-filter>summary{min-height:36px}#ticket-list-pane .ticket-table .document-icon{width:32px;height:32px;min-height:32px}}

.ticket-table td[data-label="Validare ofertă"],.mobile-ticket-cell[data-column-key="offer_validation"]{white-space:pre-line!important;line-height:1.35}.offer-highlight{outline:2px solid #315b90;outline-offset:2px}

/* Keep ticket headers inside the same scroll surface as their rows. */
#ticket-list-pane{display:flex;flex-direction:column;max-height:calc(100dvh - 120px);min-height:180px;overflow:hidden}
.ticket-split #ticket-list-pane{height:100%;max-height:none;min-height:0;overflow:hidden}
#ticket-list-pane>.heading,#ticket-list-pane>.toolbar,#ticket-list-pane>.footnote{flex:none}
#ticket-list-pane>.tablewrap,#ticket-list-pane>.mobile-ticket-list{flex:1 1 auto;min-height:70px;overflow:auto;overscroll-behavior:contain}
#ticket-list-pane .ticket-table thead th{position:sticky;top:0;z-index:5;background:#f8fafd;box-shadow:0 1px 0 var(--line)}
#ticket-list-pane .mobile-ticket-labels{position:sticky;top:0;z-index:5;background:#f8fafd}

#ticket-list-pane .status-options{position:fixed;z-index:1000;overflow-y:auto;overscroll-behavior:contain;box-sizing:border-box;margin:0}
#ticket-list-pane>.toolbar{position:relative;z-index:10}

/* Compact detail commands with reference and offer summary on the right. */
#ticket-detail-pane .ticket-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,280px);grid-template-rows:auto auto auto;gap:4px 10px;align-items:start}
#ticket-detail-pane .ticket-heading>#back{grid-column:1;grid-row:1;justify-self:start;margin:0}
#ticket-detail-pane .ticket-heading>.heading{grid-column:2;grid-row:1/4;display:flex;flex-direction:column;align-items:flex-end;justify-content:space-between;align-self:stretch;gap:4px;margin:0;text-align:right;min-width:0}
#ticket-detail-pane .ticket-heading h1{font-size:20px;line-height:1.2;margin:0;overflow-wrap:anywhere}
#ticket-detail-pane .ticket-heading .ticket-offer-summary{white-space:pre-line;line-height:1.3;font-size:11px;overflow-wrap:anywhere}
#ticket-detail-pane .ticket-heading>.ticket-actions{grid-column:1;grid-row:2;margin:0}
#ticket-detail-pane .ticket-heading>.ticket-tabs{grid-column:1;grid-row:3;margin:0;padding:0;gap:4px;min-width:0}
@media(max-width:600px){#ticket-detail-pane .ticket-heading{grid-template-columns:minmax(0,1fr) minmax(120px,40%)}#ticket-detail-pane .ticket-heading h1{font-size:16px}#ticket-detail-pane .ticket-heading>.ticket-actions{grid-column:1/-1;grid-row:2}#ticket-detail-pane .ticket-heading>.ticket-tabs{grid-column:1/-1;grid-row:3}#ticket-detail-pane .ticket-heading>.heading{grid-row:1;gap:4px}#ticket-detail-pane .ticket-heading .ticket-offer-summary{font-size:10px}}

/* Wide touch screens use the available horizontal space, not phone-sized rows. */
@media(min-width:700px) and (max-width:1400px){
 #ticket-list-pane>.toolbar{display:grid;grid-template-columns:minmax(180px,1.7fr) repeat(3,minmax(110px,1fr)) auto;gap:5px;align-items:start;margin-bottom:6px}
 #ticket-list-pane>.toolbar>#search,#ticket-list-pane>.toolbar>.status-filter,#ticket-list-pane>.toolbar>#configure-columns{grid-column:auto;grid-row:auto;width:100%;min-width:0;margin:0}
 #ticket-list-pane>.toolbar>#configure-columns{justify-self:stretch;white-space:nowrap}
 #ticket-list-pane .toolbar>input,#ticket-list-pane .toolbar>button,#ticket-list-pane .status-filter>summary{min-height:36px;padding:5px 8px;font-size:12px}
 #ticket-detail-pane .ticket-heading>.ticket-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px}
 #ticket-detail-pane .ticket-actions button{flex:0 0 auto;width:auto;min-width:0;min-height:36px;padding:5px 8px;white-space:nowrap}
 #ticket-detail-pane .ticket-heading>.ticket-tabs{display:flex;flex-wrap:wrap;gap:4px;overflow:visible}
 #ticket-detail-pane .ticket-tabs button{flex:0 0 auto;width:auto;min-height:36px;padding:5px 8px;white-space:nowrap}
 #ticket-detail-pane .ticket-heading{grid-template-columns:minmax(0,1fr) minmax(150px,25%)}
 #ticket-detail-pane .ticket-heading h1{font-size:18px}
 .account-bar{margin-bottom:6px}.shell main{padding:8px 10px}
}
@media(min-width:700px) and (max-width:850px){#ticket-list-pane>.toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}#ticket-list-pane>.toolbar>#search{grid-column:1/3}#ticket-list-pane>.toolbar>#configure-columns{grid-column:3;grid-row:1}}

/* Tablet commands stay compact in both orientations, also with a mouse. */
@media(min-width:601px) and (max-width:1400px){
 #ticket-detail-pane .ticket-heading>.ticket-actions{display:flex;flex-wrap:wrap;gap:4px}
 #ticket-detail-pane .ticket-actions button{width:auto;flex:0 0 auto;min-width:0;padding:5px 8px;min-height:34px}
 #ticket-detail-pane .ticket-heading>.ticket-tabs{display:flex;flex-wrap:wrap;overflow:visible;gap:4px}
 #ticket-detail-pane .ticket-tabs button{width:auto;flex:0 0 auto;min-height:34px;padding:5px 8px}
 #ticket-detail-pane .ticket-heading{grid-template-columns:minmax(0,1fr) minmax(140px,25%)}
 #ticket-detail-pane .ticket-heading>.heading{justify-content:flex-start;gap:6px}
 #ticket-detail-pane .ticket-heading .ticket-offer-summary:empty{display:none}
 #ticket-list-pane>.heading h1{font-size:20px}
 .shell aside nav{gap:3px}.shell aside nav button{min-height:34px;padding:5px 8px}
}

/* Keep drag tracking independent of the moving column edge. */
body.resizing-column,body.resizing-column *{cursor:col-resize!important;user-select:none!important}
.ticket-table th .column-resize{width:18px;right:0;touch-action:none;z-index:8}
.shared-table th .shared-resize{right:0;z-index:8}
.ticket-table,.shared-table{max-width:none!important;flex-shrink:0}

.searchable-options .catalogue-list-add{position:sticky;bottom:0;background:#edf3fb;border-top:1px solid var(--line);font-weight:600;color:var(--blue)}
.reference-creator{margin-top:6px;padding:8px}.reference-creator h3{font-size:14px;margin:0 0 5px}

/* Shared movable windows; dimensions never exceed the current viewport. */
dialog.movable-dialog{max-width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;min-width:0!important;min-height:0!important;overflow:auto!important;resize:none;animation:none!important;padding-bottom:32px}
dialog.movable-dialog .window-drag-title{cursor:move;touch-action:none;user-select:none;padding-right:28px}
dialog.movable-dialog .window-resize-handle{position:fixed;width:30px;height:30px;min-height:30px;padding:0;line-height:28px;z-index:30;cursor:nwse-resize;touch-action:none;user-select:none;background:#e8eff9;border:1px solid #b7c9e1;border-radius:5px}
body.window-dragging,body.window-dragging *{user-select:none!important}
dialog.movable-dialog form,dialog.movable-dialog .grid{min-width:0}
@media(max-width:600px){dialog.movable-dialog{padding:12px 12px 32px}dialog.movable-dialog .grid{grid-template-columns:minmax(0,1fr)}}

.activity-history-toggle{font-size:12px!important;min-height:28px!important;padding:3px 7px!important;background:transparent;color:var(--muted);border:1px solid var(--line);margin:0 0 4px}

/* Compact user access lists: fill available width before adding rows. */
.user-access-lists{container-type:inline-size;min-width:0}
.user-access-lists>strong{display:block;font-size:13px;margin:6px 0 4px}
.user-access-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:2px 12px;margin-bottom:8px;align-items:start}
.user-access-grid.user-store-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))}
.user-access-lists .check{font-size:12px!important;line-height:1.3!important;margin:0!important;padding:4px 0!important;gap:6px;min-height:26px;align-items:center;overflow-wrap:anywhere}
.user-access-lists .check input{width:14px!important;height:14px!important;min-height:0!important;margin:0!important;padding:0!important;flex:0 0 14px}
.user-account-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:2px 12px;border-top:1px solid var(--line);padding-top:6px}
@media(pointer:coarse){.user-access-lists .check{min-height:32px;padding:6px 0!important}}

.selection-tools{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0;font-size:12px}
.selection-tools button{font-size:12px!important;padding:3px 7px!important;min-height:28px!important;background:transparent;color:var(--blue)}
.selection-width-handle{touch-action:none;cursor:ew-resize}
.adjustable-check-grid{display:grid;gap:2px 12px;min-width:0;align-items:start}
.adjustable-check-grid>label.check{font-size:12px!important;line-height:1.3;margin:0!important;padding:4px 0!important;min-height:28px;overflow-wrap:anywhere}
@media(pointer:coarse){.selection-tools button,.adjustable-check-grid>label.check{min-height:32px!important}}

/* Consistent compact administration pages and forms. */
.compact-admin-dialog{font-size:12px!important;padding:12px!important}
.compact-admin-dialog h2{font-size:18px!important;margin:0 0 8px!important}
.compact-admin-dialog .grid{gap:8px 12px!important}
.compact-admin-dialog .field{font-size:12px!important;gap:3px!important;margin:0!important}
.compact-admin-dialog input:not([type=checkbox]),.compact-admin-dialog select,.compact-admin-dialog textarea,.compact-admin-dialog .searchable-input{font-size:12px!important;padding:5px 7px!important;min-height:30px!important}
.compact-admin-dialog button{font-size:12px!important;padding:4px 7px!important;min-height:28px!important}
.compact-admin-dialog .check{font-size:12px!important;margin:2px 0!important;line-height:1.3}
#adminbody{font-size:12px;line-height:1.3}
#adminbody .shared-table{font-size:12px}
#adminbody .permission-form{padding:8px;margin:6px 0}
#adminbody .permission-form h3{font-size:14px;margin:0 0 4px}
#adminbody .permission-grid{margin:4px 0 6px;gap:2px 10px}
#adminbody .shared-table td{padding:3px 6px}
@media(pointer:coarse){.compact-admin-dialog button,.compact-admin-dialog .check{min-height:32px!important}}

.ticket-table .marker-first-cell{position:relative;padding-left:29px!important}
.mobile-ticket-row.marker-first-cell{position:relative;padding-left:28px}
.ticket-marker{position:absolute;left:4px;top:50%;transform:translateY(-50%);width:20px!important;min-width:20px!important;height:24px!important;min-height:24px!important;padding:0!important;margin:0!important;font-size:14px!important;font-weight:700;line-height:22px;border:1px solid #cbd5e1;border-radius:4px;background:transparent;color:#64748b;z-index:2}
.ticket-table tr[data-marker="1"]>td,.ticket-table tr[data-marker="2"]>td,.mobile-ticket-row[data-marker="1"],.mobile-ticket-row[data-marker="2"]{color:#c01818!important}
.ticket-table tr[data-marker="1"] .link,.ticket-table tr[data-marker="2"] .link,.mobile-ticket-row[data-marker="1"] .mobile-ticket-cell,.mobile-ticket-row[data-marker="2"] .mobile-ticket-cell{color:#c01818!important}
.ticket-table tr[data-marker="2"]>td,.ticket-table tr[data-marker="3"]>td,.mobile-ticket-row[data-marker="2"],.mobile-ticket-row[data-marker="3"]{background:#fff2a8!important}
.ticket-marker:focus-visible{outline:2px solid var(--blue);outline-offset:2px}

/* v1.05: adapt each detail pane to its own available width. */
#ticket-detail-pane .ticket-facts dl{display:block;grid-template-columns:none;gap:0}
#ticket-detail-pane .ticket-facts dl>div{min-width:0;grid-template-columns:minmax(90px,35%) minmax(0,1fr);gap:8px}
#ticket-detail-pane .ticket-facts dd{word-break:normal;overflow-wrap:break-word}
#ticket-detail-pane .ticket-main{container-type:inline-size;container-name:ticket-main}
#ticket-detail-pane .ticket-actions{justify-content:flex-start;align-items:center}
#ticket-detail-pane .ticket-actions button,#ticket-detail-pane .ticket-tabs button{flex:0 0 auto;white-space:nowrap}
@container ticket-main (max-width:760px){
 #ticket-detail-pane .ticket-heading{grid-template-columns:minmax(0,1fr) minmax(130px,40%);gap:4px 8px}
 #ticket-detail-pane .ticket-heading>.heading{grid-column:2;grid-row:1;gap:4px;justify-content:flex-start}
 #ticket-detail-pane .ticket-heading>.ticket-actions{grid-column:1/-1;grid-row:2;flex-wrap:wrap}
 #ticket-detail-pane .ticket-heading>.ticket-tabs{grid-column:1/-1;grid-row:3;display:flex;flex-wrap:wrap;overflow:visible}
 #ticket-detail-pane .ticket-heading h1{font-size:17px}
 #ticket-detail-pane .ticket-actions button,#ticket-detail-pane .ticket-tabs button{min-height:30px;padding:4px 7px;font-size:12px}
}
@media(min-width:601px){
 .ticket-layout.ticket-facts-right{grid-template-columns:minmax(0,1fr) 12px clamp(240px,var(--ticket-facts-width,30%),60%)}
 .ticket-split{grid-template-rows:clamp(160px,var(--ticket-list-height,300px),calc(100% - 220px)) 14px minmax(180px,1fr)}
}
@media(min-width:601px) and (max-width:900px){
 .ticket-layout.ticket-facts-right{grid-template-columns:minmax(0,1fr) 12px clamp(210px,var(--ticket-facts-width,35%),50%)}
 #ticket-detail-pane .ticket-facts dl>div{grid-template-columns:minmax(75px,35%) minmax(0,1fr);gap:5px}
}

/* Fine visible separators; keep a generous invisible drag target. */
.ticket-table th .column-resize,.shared-table th .shared-resize{width:12px!important;right:-5px!important;border:0!important;border-radius:0;background:transparent!important;padding:0!important;color:transparent;font-size:0;outline:none!important;overflow:visible}
.ticket-table th .column-resize::after,.shared-table th .shared-resize::after{content:'';position:absolute;left:5px;top:0;bottom:0;width:1px;background:#ccd7e5}
.ticket-table th .column-resize:hover::after,.ticket-table th .column-resize:focus-visible::after,.shared-table th .shared-resize:hover::after,.shared-table th .shared-resize:focus-visible::after{background:#174b86}
.ticket-table th,.shared-table th{overflow:visible!important;padding-right:9px!important}
.ticket-table .table-sort,.shared-table .table-sort{max-width:calc(100% - 19px)!important;white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;line-height:1.2;overflow:hidden}
.shared-drag,.column-drag{font-size:12px!important;min-width:12px!important;width:12px!important;padding:0!important}
.grid-context-menu{position:fixed;z-index:3000;display:grid;background:#fff;border:1px solid #c5cedb;border-radius:6px;box-shadow:0 4px 14px #182b4930;padding:4px;max-width:calc(100vw - 8px);max-height:calc(100dvh - 8px);overflow:auto}
.grid-context-menu button{border:0;border-radius:3px;text-align:left;padding:5px 10px;min-height:28px;font-size:12px;color:#182b49}
.grid-context-menu button:hover,.grid-context-menu button:focus-visible{background:#e9f1fb}
.grid-auto-filter td{padding:3px!important;background:#fff;position:sticky;top:var(--grid-header-height,34px);z-index:4}
.grid-auto-filter input{min-width:0;width:100%;font-size:11px;padding:3px 5px;border-radius:3px;min-height:24px}
.grid-find{display:flex;gap:4px;align-items:center;margin:4px 0;flex:none}
.grid-find input{font-size:12px;padding:4px 7px;min-height:28px}
.grid-find button{padding:3px 8px;min-height:28px}
.grid-filter-rule{display:grid;grid-template-columns:minmax(100px,1fr) minmax(100px,1fr) minmax(100px,1fr) 30px;gap:5px;margin:5px 0}
.grid-filter-rule>*{min-width:0;font-size:12px;padding:5px}
@media(max-width:600px){.grid-filter-rule{grid-template-columns:1fr 1fr 30px}.grid-filter-rule input{grid-column:1/3}.grid-filter-rule button{grid-column:3;grid-row:1/3}}
/* v1.07: quiet centered headers and compact configuration everywhere. */
.ticket-table th,.shared-table th{vertical-align:middle!important;text-align:center!important;padding:5px 9px!important;touch-action:pan-y;user-select:none}
.ticket-table th .column-drag,.shared-table th .shared-drag{display:none!important}
.ticket-table th .table-sort,.shared-table th .table-sort{display:block!important;width:100%!important;max-width:100%!important;text-align:center!important;margin:0!important;padding:2px 4px!important;min-height:24px!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important}
.column-moving{background:#dce8f8!important;cursor:grabbing!important}.column-drop-target{box-shadow:inset 2px 0 #28629a}
dialog.column-config-dialog[open]{display:flex!important;flex-direction:column;overflow:hidden!important;padding:12px 12px 32px!important}
dialog.column-config-dialog>h2{font-size:17px;margin:0 90px 8px 0;flex:none}
dialog.column-config-dialog>form{flex:1;min-height:0;overflow:auto;display:block!important}
dialog.column-config-dialog form>p{font-size:12px;margin:4px 0 8px}
dialog.column-config-dialog .column-settings{max-height:none!important;overflow:visible!important;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,370px),1fr));gap:0 14px}
dialog.column-config-dialog .column-setting{grid-template-columns:minmax(90px,1fr) 125px 56px!important;gap:5px!important;padding:5px 0!important;min-height:0!important}
dialog.column-config-dialog label{font-size:12px!important;margin:0}
dialog.column-config-dialog input[type=number]{height:27px;min-height:27px;font-size:12px;padding:3px 6px}
dialog.column-config-dialog button{min-height:27px;font-size:12px;padding:4px 7px}
dialog.column-config-dialog .width-controls{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px}
dialog.column-config-dialog .width-controls [data-width-fit]{flex:1;font-size:10px;padding:3px;min-height:24px}
dialog.column-config-dialog .column-setting>div:last-child{display:flex;gap:2px}
dialog.column-config-dialog .selection-tools{margin:4px 0;gap:4px}
dialog.column-config-dialog form>.check,dialog.column-config-dialog form>#reset-column-settings{margin:8px 0;display:flex}
#manual-list .shared-table td{vertical-align:middle;overflow:hidden;white-space:normal;overflow-wrap:break-word;padding:5px 7px}
#manual-list .shared-cell-actions{display:flex;flex-wrap:wrap;gap:4px;min-width:0}
#manual-list .shared-cell-actions button{font-size:12px;min-height:28px;padding:4px 7px;max-width:100%;white-space:normal}
#manual-list .shared-table td strong,#manual-list .shared-table td small{display:block;line-height:1.25}
dialog.manual-modal.movable-dialog[open]{display:flex!important;flex-direction:column;overflow:hidden!important;min-height:min(240px,calc(100dvh - 12px))!important;padding:12px 12px 36px!important}
dialog.manual-modal #manual-renderer,dialog.manual-modal .service-report-renderer{flex:1;min-height:0;overflow:hidden}
dialog.manual-modal .manual-pages{flex:1;min-height:0;height:auto!important;max-height:none!important}
dialog.manual-modal .report-viewer-header{gap:8px;flex-wrap:wrap;margin:0 0 5px}
dialog.manual-modal .report-viewer-header h2{flex:1;min-width:120px;font-size:15px}
dialog.manual-modal .report-viewer-header button,dialog.manual-modal .manual-controls button{font-size:12px;min-height:29px;padding:4px 8px}
dialog.manual-modal .manual-controls{gap:4px;margin:4px 0;font-size:12px}
dialog.manual-modal .report-image-scroll{flex:1;min-height:0;overflow:auto;max-height:none!important}
@media(max-width:600px){dialog.column-config-dialog .column-settings{grid-template-columns:1fr}dialog.column-config-dialog .column-setting{grid-template-columns:minmax(80px,1fr) 125px 56px!important}}
dialog.manual-modal .file-viewer-video{display:block;flex:1;min-height:0;width:100%;height:100%;object-fit:contain;background:#101820}
dialog.manual-modal .report-image-scroll{display:flex;align-items:center;justify-content:center}
dialog.manual-modal .report-image-scroll img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain}
#content table th{vertical-align:middle!important;text-align:center!important}
#content table th .table-sort{text-align:center!important}
/* v1.08: dialog commands size themselves to their labels. */
dialog button:not(.window-resize-handle):not(.scan-crop-handle){width:auto;max-width:100%;min-height:28px;padding:4px 9px;font-size:12px;line-height:1.3;border-radius:5px;justify-self:start;align-self:flex-start;flex:0 0 auto}
dialog>.close{position:absolute!important;top:10px;right:12px;width:auto!important;min-width:0;float:none;margin:0;z-index:4}
dialog>h2{padding-right:80px}
dialog form>button.full,dialog.column-config-dialog form>#reset-column-settings{display:inline-flex!important;width:fit-content!important;max-width:100%;justify-self:start;align-self:flex-start;margin:6px 6px 6px 0}
dialog.column-config-dialog .width-controls [data-width-fit]{flex:1 1 auto;align-self:auto;min-height:24px;padding:3px;font-size:10px}
dialog.column-config-dialog .column-setting>div:last-child button{padding:3px 6px;min-width:24px}
@media(pointer:coarse){dialog button:not(.window-resize-handle):not(.scan-crop-handle){min-height:32px}}
/* v1.09: visible drag preview and exact insertion marker. */
.column-drag-preview{position:fixed;z-index:5000;pointer-events:none;padding:8px 12px;border:1px solid #6992c0;border-radius:5px;background:#edf4ff;color:#174b86;font-size:12px;font-weight:600;text-align:center;box-shadow:0 5px 16px #182b4933;opacity:.95}
.column-insertion-line{position:fixed;width:3px;background:#1e68b5;z-index:4999;pointer-events:none;box-shadow:0 0 0 1px white}
.column-insertion-line:before,.column-insertion-line:after{content:'';position:absolute;left:-3px;width:9px;height:4px;background:#1e68b5}.column-insertion-line:before{top:-3px}.column-insertion-line:after{bottom:-3px}
body.column-reordering,body.column-reordering *{cursor:grabbing!important;user-select:none!important}
.column-moving{opacity:.45}
/* v1.10: columns make room during dragging. */
body.column-reordering .ticket-table th,body.column-reordering .ticket-table td,body.column-reordering .shared-table th,body.column-reordering .shared-table td{transition:transform .16s cubic-bezier(.2,.7,.2,1);position:relative;background:#fff}
body.column-reordering th.column-moving{opacity:.15;background:#e8eef6}
.column-drag-preview{display:flex;align-items:center;justify-content:center;background:#f8fafd;border-color:#bccce0;box-shadow:0 8px 20px #182b4926;opacity:.98;transform:scale(1.025);border-radius:4px;font-weight:500;overflow:hidden}
.column-insertion-line{width:2px;background:#4a7cab;opacity:.7}.column-insertion-line:before,.column-insertion-line:after{display:none}
@media(prefers-reduced-motion:reduce){body.column-reordering th,body.column-reordering td{transition:none!important}}
/* v1.14: resizable filters/results in every main menu. */
.workspace-sections{display:grid;grid-template-rows:var(--upper-height,200px) 12px minmax(120px,1fr);min-width:0;overflow:hidden}
.workspace-upper,.workspace-lower{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain}
.workspace-lower>.box{margin-top:0!important;padding:10px}
.workspace-divider{cursor:row-resize;touch-action:none;position:relative;border:0;background:transparent}
.workspace-divider:after{content:'';position:absolute;left:0;right:0;top:5px;height:1px;background:#c6d3e3}
.workspace-divider:before{content:'';position:absolute;width:36px;height:3px;left:calc(50% - 18px);top:4px;background:#819ab7;border-radius:2px;z-index:1}
.workspace-divider:hover:before,.workspace-divider:focus-visible:before{background:#174b86}
.grid-find input{max-width:480px}
/* v1.15: independent, unnamed narrow marker column. */
.ticket-table [data-column-key=marker],.mobile-ticket-list [data-column-key=marker]{padding:2px!important;text-align:center!important;min-width:0!important;overflow:visible}
.ticket-table [data-column-key=marker] .ticket-marker,.mobile-ticket-list [data-column-key=marker] .ticket-marker{position:static!important;transform:none!important;margin:0!important;width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;padding:0!important;font-size:12px!important;line-height:22px}
.ticket-table th[data-column-key=marker] .table-sort{font-size:0!important}
/* v1.16: compact filters and selectors throughout the application. */
#content .field,dialog .field{gap:3px;margin-bottom:5px;font-size:12px;line-height:1.3;min-width:0}
#content .field input:not([type=checkbox]):not([type=radio]),#content .field select,#content .searchable-input,dialog .field input:not([type=checkbox]):not([type=radio]),dialog .field select,dialog .searchable-input{min-height:28px;height:28px;padding:3px 7px;font-size:12px;line-height:1.3;border-radius:4px;border:1px solid #d7e1ed}
#archive-filter{padding:10px!important;gap:6px 10px!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr))!important;align-items:end}
#archive-filter .field{margin:0!important;gap:3px!important}
#archive-filter>button{justify-self:start;align-self:end;width:auto;min-height:28px;padding:4px 10px;font-size:12px;border-radius:4px}
#content .date-display,dialog .date-display{gap:4px;min-height:0}
#content .date-display>input,dialog .date-display>input{min-height:28px!important;height:28px!important;padding:3px 7px!important;font-size:12px;border-radius:4px}
#content .date-display>button,dialog .date-display>button{width:28px;min-width:28px;min-height:28px;height:28px;padding:2px!important;border-radius:4px}
#content .status-filter>summary,dialog .status-filter>summary{min-height:28px!important;padding:4px 7px!important;font-size:12px!important;line-height:1.3;border-radius:4px}
#content .status-filter label.check,dialog .status-filter label.check{margin:2px 0;padding:3px 5px;font-size:12px;min-height:24px;gap:5px}
.searchable-options{padding:2px;border-radius:4px;max-height:220px}
.searchable-options button,dialog .searchable-options button{width:100%!important;align-self:stretch;min-height:26px!important;padding:4px 7px!important;font-size:12px!important;line-height:1.25!important;border-radius:3px}
#content .grid,dialog .grid{gap:7px 10px}
#content input[type=search],#content .toolbar>input{min-height:28px;padding:4px 7px;font-size:12px;border-radius:4px}
#content .workspace-upper>p{font-size:12px;margin-bottom:7px}
@media(pointer:coarse){
 #content .field input:not([type=checkbox]):not([type=radio]),#content .field select,#content .searchable-input,dialog .field input:not([type=checkbox]):not([type=radio]),dialog .field select,dialog .searchable-input,#content .date-display>input,dialog .date-display>input{height:32px!important;min-height:32px!important;font-size:16px!important;padding:4px 7px!important}
 #content .status-filter>summary,dialog .status-filter>summary,.searchable-options button,dialog .searchable-options button{min-height:32px!important}
 #content .date-display>button,dialog .date-display>button{height:32px;min-height:32px;width:32px}
 #archive-filter{grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr))!important;gap:6px!important;padding:8px!important}
}

/* v1.17: personal ticket button visibility */
.ticket-actions button[hidden],.ticket-tabs button[hidden]{display:none!important}
.ticket-tabs #configure-ticket-buttons{margin-left:auto;width:auto!important;min-height:24px!important;padding:2px 5px!important;font-size:11px!important;font-weight:400;background:transparent;border:0;color:#64748b;box-shadow:none;white-space:nowrap}
.ticket-button-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:5px 12px}
.ticket-button-options label{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1.4}
.ticket-button-options input[type=checkbox]{width:14px!important;height:14px!important;min-height:0!important;margin:0;flex:none}
/* v1.18: compact configurable command bars */
.button-layout-bar>.button-layout-config{width:auto!important;min-height:22px!important;padding:2px 5px!important;font-size:10px!important;line-height:1.3;font-weight:400;background:transparent!important;border:0!important;color:#64748b;box-shadow:none;white-space:nowrap;flex:none}
.button-layout-bar>button[hidden]{display:none!important}
.button-layout-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:5px 10px}
.button-layout-options label{display:flex;align-items:center;gap:6px;font-size:12px}
.button-layout-options input[type=checkbox]{width:14px!important;height:14px!important;min-height:0!important;margin:0;flex:none}
.button-layout-dragging{opacity:.3!important}
.button-layout-ghost{position:fixed!important;z-index:100000!important;pointer-events:none!important;background:#edf3fa!important;border:1px solid #cbd5e1!important;border-radius:5px;box-shadow:0 5px 16px #163e7030;font-size:12px;color:#163e70;transform:rotate(-2deg)}
.button-layout-marker{position:fixed;z-index:100001;width:2px;background:#2563eb;pointer-events:none;border-radius:2px}

.participant-selected,.participant-available{display:flex;flex-wrap:wrap;gap:4px 12px;margin:5px 0}.participant-picker .check{font-size:12px;gap:5px;margin:0}.participant-picker #add-participant{width:auto!important;font-size:11px;padding:3px 7px;min-height:26px}.participant-choices{padding:6px;border:1px solid #e2e8f0;border-radius:5px;margin-top:5px}.participant-picker [hidden]{display:none!important}
/* v1.20: content-sized command buttons across pages and dialogs. */
:is(.shell,dialog) button:not(.table-sort):not(.column-resize):not(.shared-resize):not(.window-resize-handle):not(.window-control-resize):not(.scan-crop-handle):not(.document-icon):not(.ticket-marker):not(.shared-drag):not(.column-drag):not(.date-display button):not(.searchable-options button):not(.button-layout-ghost):not(#ticket-pane-divider):not(#ticket-width-divider):not(.workspace-divider):not(.column-dialog-resize){width:fit-content!important;min-width:0!important;max-width:100%;flex:0 0 auto!important;justify-self:start;align-self:start;min-height:28px;padding:4px 8px;font-size:12px;line-height:1.3;border-radius:4px;}
:is(.shell,dialog) .actions,:is(.shell,dialog) .inline-actions,:is(.shell,dialog) .activity-actions,:is(.shell,dialog) .attachment-actions{display:flex;flex-wrap:wrap;align-items:center;gap:5px;}
:is(.shell,dialog) .width-controls [data-width-fit]{flex-basis:auto!important;}
:is(#content,dialog) .field:has(>input[type=date]),:is(#content,dialog) .field:has(>.date-display){width:190px!important;max-width:100%;min-width:0;justify-self:start;align-self:start;}
:is(#content,dialog) .date-display{width:190px;max-width:100%;min-width:0;grid-template-columns:minmax(0,1fr) 28px;}
:is(#content,dialog) .field:has(>input[type=datetime-local]){width:245px!important;max-width:100%;justify-self:start;}
@media(pointer:coarse){:is(.shell,dialog) button:not(.table-sort):not(.column-resize):not(.shared-resize):not(.window-resize-handle):not(.scan-crop-handle):not(.document-icon):not(.ticket-marker):not(#ticket-pane-divider):not(#ticket-width-divider):not(.workspace-divider):not(.column-dialog-resize):not(.button-layout-config){min-height:32px;} :is(#content,dialog) .date-display{grid-template-columns:minmax(0,1fr) 32px;}}

.status-flags{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;margin:4px 0 8px}.status-flags .check{margin:0;width:auto}

/* v1.29: button configuration belongs only to command bars, never ticket cells. */
.mobile-ticket-list .button-layout-config{display:none!important}
@media(max-width:1024px),(hover:none) and (pointer:coarse){
 .button-layout-bar>.button-layout-config{width:26px!important;height:26px!important;min-height:26px!important;padding:3px!important;align-self:center!important;font-size:15px!important;line-height:20px!important;margin:0 2px!important}
 .button-layout-config .button-config-label{display:none}
 .shell aside nav{max-width:100%;overflow-x:auto;overflow-y:hidden;align-items:center;flex-wrap:nowrap}
 .mobile-ticket-row{min-height:36px!important;padding-top:2px!important;padding-bottom:2px!important;align-items:center}
 .mobile-ticket-labels{min-height:32px!important;align-items:center}
}

/* Mobile: use the vacant filter cell for column configuration. */
@media(max-width:699px){
 #content .toolbar>#search{grid-column:1/-1;grid-row:1}
 #content .toolbar>#status-filter{grid-column:1;grid-row:2}
 #content .toolbar>#zone-filter{grid-column:2;grid-row:2}
 #content .toolbar>#agent-filter{grid-column:1;grid-row:3}
 #content .toolbar>#configure-columns{grid-column:2;grid-row:3;justify-self:start;align-self:center!important;white-space:normal;max-width:100%;margin:0}
}

/* v131: contain the status badge within its resizable mobile column. */
.mobile-ticket-cell[data-column-key="status"]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-status-cell .badge{display:inline-block;box-sizing:border-box;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;font-size:11px;line-height:1.3;padding:3px 6px}

.account-bar .refresh-view{width:28px;min-width:28px;min-height:28px;height:28px;padding:0!important;font-size:20px;line-height:1;border:0;background:transparent;color:var(--blue)}.refresh-view[aria-busy=true]{opacity:.5}

/* v136: consistent header alignment across desktop, mobile and dialogs. */
table thead th{vertical-align:middle!important;text-align:center!important}
table thead th .table-sort,.mobile-ticket-labels .table-sort{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;width:100%!important;max-width:100%!important;box-sizing:border-box;margin:0!important;line-height:1.25}
.mobile-ticket-labels{align-items:stretch!important}
.mobile-ticket-labels .table-sort{align-self:stretch!important;white-space:normal!important;min-width:0}

/* Header controls are full-width, independent of compact action buttons. */
:is(.shell,dialog) table thead th .table-sort,:is(.shell,dialog) .mobile-ticket-labels .table-sort{width:100%!important;align-self:center!important;justify-self:stretch!important;display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;flex:1 1 auto!important}
table thead th{vertical-align:middle!important;text-align:center!important}
table thead th .table-sort{touch-action:none}
/* Values have their own alignment; headers always remain centered. */
:is(.shell,dialog) td[data-value-align],.mobile-ticket-row [data-value-align]{vertical-align:middle!important}
:is(.shell,dialog) td[data-value-align=left],.mobile-ticket-row [data-value-align=left]{text-align:left!important}
:is(.shell,dialog) td[data-value-align=center],.mobile-ticket-row [data-value-align=center]{text-align:center!important;font-variant-numeric:tabular-nums}
:is(.shell,dialog) td[data-value-align=right],.mobile-ticket-row [data-value-align=right]{text-align:right!important;font-variant-numeric:tabular-nums}
:is(.shell,dialog) td[data-value-align] .link{text-align:inherit!important}
:is(.shell,dialog) td[data-value-align=center] .document-icons,.mobile-ticket-row [data-value-align=center] .document-icons{justify-content:center!important}

/* Only status values wrap to their available column width. */
:is(.shell,dialog) table td[data-value-kind=status],:is(.shell,dialog) table td[data-column-key=status],:is(.shell,dialog) table td:has(>.badge),.mobile-ticket-row .mobile-status-cell{white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;text-overflow:clip!important;line-height:1.3}
:is(.shell,dialog) table td .badge,.mobile-ticket-row .mobile-status-cell .badge{max-width:100%!important;white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;overflow:visible!important;text-overflow:clip!important;box-sizing:border-box;line-height:1.3}
/* Maintenance keeps compact controls and readable results on every viewport. */
.maintenance-result{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.4;margin:6px 0;max-width:100%}
#maintenance-list td,#maintenance-history td{padding:5px 8px;vertical-align:middle}
#maintenance-list small{display:block;font-size:11px;line-height:1.35;margin-top:3px}
.quote-line{display:grid;grid-template-columns:minmax(160px,2fr) minmax(75px,1fr) minmax(90px,1fr) 28px;gap:6px;align-items:end;margin:6px 0}
.quote-line .field{margin:0;min-width:0;font-size:12px}.quote-line input,.quote-line select{min-width:0;width:100%}
#quote-create-item{padding:8px;border:1px solid #dbe3ed;border-radius:5px}
@media(max-width:600px){.quote-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 28px}.quote-line>.field:first-child{grid-column:1 / -1}.quote-line .field{font-size:11px}}

/* Currency is a short choice, never a full-width form field. */
dialog .field.quote-currency{grid-column:1 / -1;width:130px;max-width:100%;justify-self:start;flex:0 0 130px}
dialog .field.quote-currency select{width:130px;max-width:100%;min-width:0}
/* One compact row per column; no stacked width toolbars. */
dialog.column-config-dialog .column-settings{display:block!important}
dialog.column-config-dialog .column-setting{display:grid!important;grid-template-columns:minmax(90px,1fr) 146px 52px!important;align-items:center!important;gap:6px!important;padding:4px 0!important;border-bottom:1px solid #edf0f5;min-height:34px!important}
dialog.column-config-dialog .column-setting>.check{display:flex!important;align-items:center;gap:6px;min-width:0;font-size:12px!important;line-height:1.25}
dialog.column-config-dialog .column-width-editor{display:flex!important;align-items:center;gap:3px;width:146px;max-width:146px}
dialog.column-config-dialog .column-width-editor input{width:62px!important;max-width:62px!important;flex:0 0 62px;min-height:26px!important;height:26px!important;padding:2px 4px!important;font-size:12px!important}
dialog.column-config-dialog .width-controls{display:contents!important}
dialog.column-config-dialog .width-controls button,dialog.column-config-dialog .column-setting>div:last-child button{width:24px!important;min-width:24px!important;max-width:24px!important;min-height:26px!important;height:26px!important;padding:0!important;font-size:13px!important;line-height:1!important;border-color:#e3e9f1;background:#f9fbfe;align-self:center!important}
dialog.column-config-dialog .column-setting>div:last-child{align-items:center!important;gap:3px!important}
dialog.column-config-dialog .selection-tools{display:flex!important;gap:5px!important;margin:5px 0!important}
dialog.column-config-dialog form>.check{font-size:11px!important;line-height:1.3;margin:6px 0!important}
dialog.column-config-dialog .button-layout-config{display:none!important}
@media(max-width:380px){dialog.column-config-dialog .column-setting{grid-template-columns:minmax(64px,1fr) 130px 46px!important;gap:3px!important}dialog.column-config-dialog .column-width-editor{width:130px;max-width:130px;gap:2px}dialog.column-config-dialog .column-width-editor input{width:54px!important;max-width:54px!important;flex-basis:54px}dialog.column-config-dialog .width-controls button,dialog.column-config-dialog .column-setting>div:last-child button{width:22px!important;min-width:22px!important;max-width:22px!important}}

/* v1.51: compact business dates, contacts and independent reporting settings. */
#modal .field.quote-date{width:240px;max-width:100%;justify-self:start}
#modal .field.quote-date input{width:100%;min-width:0}
.report-options{display:flex;flex-wrap:wrap;gap:8px 20px}
.store-contacts-editor h3,.store-contact-details h3{font-size:12px;margin:6px 0}
.store-contact-row{display:grid;grid-template-columns:minmax(110px,1fr) minmax(90px,.8fr) minmax(130px,1.2fr) auto 24px;gap:6px;align-items:end;margin:6px 0}
.store-contact-row .field{min-width:0;margin:0}.store-contact-row input:not([type=checkbox]){width:100%;min-width:0}.store-contact-row button{padding:2px;width:24px;height:28px}
.store-contact-details{border-top:1px solid #dde4ef;margin-top:8px;padding-top:6px;font-size:12px}.store-contact-details p{margin:3px 0}.store-contact{display:flex;flex-wrap:wrap;gap:3px 8px;margin:7px 0}.store-contact strong{flex-basis:100%}.store-contact a{overflow-wrap:anywhere}
@media(max-width:600px){.store-contact-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 24px}.store-contact-row .field:first-child{grid-column:1/3}.store-contact-row .check{grid-column:1/3}.store-contact-row button{grid-column:3;grid-row:3}.store-contacts-editor{min-width:0}}

/* v1.52: separate offer values without increasing ticket row height. */
.ticket-table td[data-label="Validare ofertă"],.mobile-ticket-cell[data-column-key="offer_validation"]{white-space:normal!important}
.offer-value-stack{display:grid;grid-template-rows:repeat(var(--offer-count),minmax(10px,1fr));height:32px;max-height:32px;overflow-y:auto;overflow-x:hidden;width:100%;font-size:10px;line-height:1.1;text-align:center;scrollbar-width:thin}
.offer-value-stack .offer-value-entry{display:block;align-content:center;min-width:0;padding:0 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box}
.offer-value-stack .offer-value-entry+.offer-value-entry{border-top:.5px solid rgba(107,128,156,.23)}

/* Compact per-offer command days; no extra row height. */
.command-day-stack{display:grid!important;grid-template-rows:repeat(var(--day-count),minmax(0,1fr));height:24px!important;max-height:24px!important;min-height:0!important;width:100%;font-size:var(--day-font)!important;line-height:1!important;overflow:hidden;text-align:center}
.command-day-stack .command-day-entry{display:flex!important;align-items:center;justify-content:center;min-height:0!important;margin:0!important;padding:0!important;font-size:inherit!important;line-height:1!important;white-space:nowrap}
.command-day-entry+.command-day-entry{border-top:.5px solid rgba(107,128,156,.23)}
.ticket-table td[data-label="Validare ofertă"],.mobile-ticket-cell[data-column-key="offer_validation"]{white-space:pre-line!important}

/* Ticket dossiers: controls stay inside the existing number column. */
.ticket-selection-controls{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}.ticket-selection-controls button{font-size:11px;padding:4px 7px;min-height:28px;width:auto}.ticket-tree-controls{display:inline-flex;align-items:center;gap:4px;vertical-align:middle;margin-right:4px}.ticket-tree-controls input{width:14px;height:14px;margin:0}.ticket-tree-toggle{width:22px!important;min-width:22px;min-height:24px!important;padding:0!important;font-size:15px!important;line-height:22px}.ticket-group-row{background:#f5f8fc}.ticket-group-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:6px 0;border-bottom:1px solid #e4e9ef;margin-bottom:8px}.ticket-group-summary small{width:100%;font-size:11px}.split-ticket-card{border:1px solid #dce3ec;border-radius:7px;padding:10px;margin:0}.split-ticket-card legend{font-size:12px;font-weight:600}.mobile-ticket-number-wrap{display:flex;align-items:center;overflow:hidden}.mobile-ticket-number-wrap>button{min-width:0;overflow:hidden;text-overflow:ellipsis}.ticket-tree-controls button{flex-shrink:0}

[data-open-ticket][hidden]{display:none!important}

.split-mode select{width:auto!important;max-width:260px;min-width:190px}.split-mode{align-items:start}

/* v1.59: status appearance and five-step personal emphasis override. */
:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true],.ticket-table tr[data-custom-appearance=true]>td{color:var(--row-color)!important;background:var(--row-background)!important;font-weight:var(--row-weight)!important;font-style:var(--row-style)!important}
:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true] :is(.link,.mobile-ticket-cell,small,strong){color:var(--row-color)!important;font-weight:var(--row-weight)!important;font-style:var(--row-style)!important}
:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true] [data-column-key=status],:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true] [data-column-key=status] *{color:var(--status-color)!important;font-weight:var(--status-weight)!important;font-style:var(--status-style)!important}
:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true] [data-column-key=status] .badge{background:transparent!important}
.status-appearance-editor{display:grid;gap:10px}.status-appearance-editor fieldset{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:10px;border:1px solid #dde3ec;border-radius:6px}.status-appearance-editor label{display:flex;align-items:center;gap:6px;font-size:12px}.status-appearance-editor select{width:85px!important;min-width:0!important}.status-appearance-editor input[type=color]{width:34px!important;height:26px!important;min-height:0!important;padding:2px!important}.status-appearance-editor legend{font-size:12px}.status-appearance-editor small{font-size:11px;color:#64748b}

/* v1.60: compact theme palette, shades, standard/custom colors. */
.appearance-color{display:flex;align-items:center;gap:6px;font-size:12px}.status-color-picker{position:relative}.status-color-picker summary{display:flex;align-items:center;gap:5px;cursor:pointer;border:1px solid #d6dde7;border-radius:4px;padding:3px 5px;list-style:none}.status-color-picker summary::-webkit-details-marker{display:none}.status-color-current{display:block;width:20px;height:18px;background:var(--swatch);border:1px solid #c9cfd8;border-radius:2px}.status-color-panel{position:absolute;z-index:10020;top:100%;left:0;margin-top:4px;width:230px;max-width:calc(100vw - 40px);padding:10px;background:#fff;box-shadow:0 4px 18px #152b4933;border:1px solid #d6dde7;border-radius:6px;display:grid;gap:8px}.status-color-panel strong{font-size:11px;font-weight:600}.status-color-grid{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));gap:3px}.status-color-shades{row-gap:0}#modal .status-color-picker .status-color-swatch{width:100%!important;min-width:0!important;max-width:none!important;height:18px!important;min-height:18px!important;padding:0!important;border:1px solid #d4d8dd!important;border-radius:0!important;background:var(--swatch)!important;box-shadow:none!important;cursor:pointer}#modal .status-color-swatch[aria-pressed=true]{outline:2px solid #2563eb;outline-offset:-2px}#modal .status-color-swatch:hover{outline:1px solid #163e70;outline-offset:1px}.status-color-code input{width:75px!important;min-width:0!important;font-size:11px!important}.status-native-color{position:absolute!important;width:1px!important;height:1px!important;opacity:0;pointer-events:none}.status-color-panel :is([data-more-colors],[data-palette-color].status-color-automatic){font-size:11px!important;padding:3px 5px!important;min-height:24px!important}@media(max-width:600px){.status-color-picker .status-color-panel{width:210px}.status-appearance-editor fieldset{gap:9px}}

/* v1.62: separate status cell background; native compact style selector. */
:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true] [data-column-key=status]{background:var(--status-background)!important}
#modal .status-appearance-editor label[data-no-search]{flex:0 0 auto!important;width:auto!important;min-width:0!important}
#modal .status-appearance-editor label[data-no-search] select{width:85px!important;min-width:0!important;max-width:85px!important}

/* Compact reunion conflicts */
.merge-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.merge-fields .field{min-width:0;gap:3px}.merge-fields select{width:100%;max-width:100%;font-size:12px}.merge-conflict{border-left:2px solid #cc8430;padding-left:7px}.merge-conflict small{font-size:10px;color:#895515}.merge-fields fieldset{display:flex;flex-wrap:wrap;gap:8px}.merge-fields .full{grid-column:1/-1}@media(max-width:480px){.merge-fields{gap:6px}}

/* Compact per-column report summaries */
.report-aggregate-footer td{padding:3px 4px!important;border-top:1px solid #cdd8e6;background:#f4f7fb;vertical-align:middle;text-align:center}.report-aggregate-control{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px}.report-aggregate-control output{font-size:11px;font-weight:600}.report-aggregate-control select{width:76px!important;max-width:100%!important;min-width:0!important;height:23px!important;min-height:0!important;padding:1px 2px!important;font-size:10px!important;border:1px solid #d8e0ea!important;border-radius:3px!important;background:white!important}.report-aggregate-control output:empty{display:none}@media print{.report-aggregate-control select{display:none}}

.report-aggregate-footer td{height:24px!important;border-left:0!important;border-right:0!important;border-bottom:0!important}.report-aggregate-footer select[hidden]{display:none!important}.report-aggregate-control{min-height:16px}.report-aggregate-menu{position:fixed;z-index:2147483647;min-width:130px;padding:3px;background:#fff;border:1px solid #cdd8e6;border-radius:5px;box-shadow:0 3px 12px #15243a26}.report-aggregate-menu button{display:block!important;width:100%!important;min-height:0!important;height:25px!important;padding:3px 9px!important;margin:0!important;border:0!important;border-radius:2px!important;background:transparent!important;color:#263851!important;font-size:12px!important;text-align:left!important}.report-aggregate-menu button:hover,.report-aggregate-menu button:focus{background:#eaf1fa!important}.report-aggregate-menu button:disabled{opacity:.4}@media print{.report-aggregate-menu{display:none}}

:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true]:is([data-status-background-target=text],[data-status-background-target=badge]) [data-column-key=status]{background:var(--row-background)!important}
:is(.ticket-table tr,.mobile-ticket-row)[data-custom-appearance=true][data-status-background-target=badge] [data-column-key=status] .badge{display:inline-block;background:var(--status-background)!important;border-radius:7px;padding:3px 7px;max-width:100%;box-sizing:border-box;white-space:normal}

/* Touch landscape: native panning; only resize handles reserve a drag gesture. */
@media (hover:none) and (pointer:coarse){
 .ticket-table th,.shared-table th,table thead th .table-sort{touch-action:pan-x pan-y!important}
 .tablewrap,.mobile-ticket-list,.workspace-upper,.workspace-lower,#ticket-list-pane,#ticket-detail-pane,.ticket-main,.ticket-facts{touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
}
@media (orientation:landscape) and (hover:none) and (pointer:coarse){
 #ticket-list-pane,.ticket-split #ticket-list-pane{overflow:auto!important;overscroll-behavior:auto;min-height:0}
 #ticket-list-pane>.tablewrap,#ticket-list-pane>.mobile-ticket-list{flex:0 0 auto;max-height:55dvh;min-height:110px;overflow:auto!important;overscroll-behavior-x:contain;overscroll-behavior-y:auto}
 .ticket-split{min-height:320px;grid-template-rows:minmax(110px,var(--ticket-list-height,180px)) 14px minmax(150px,1fr)}
 .shell aside nav{touch-action:pan-x pan-y}
}

/* Keep PDF crop handles fully inside the photo, including its original edges. */
.scan-crop-dialog .scan-crop-stage{flex:none;margin:16px auto;max-width:100%;box-sizing:border-box}
.scan-crop-dialog .scan-crop-stage img{width:100%;height:100%;max-width:none;max-height:none;object-fit:contain}
.scan-crop-dialog .scan-crop-handle{width:28px!important;height:28px!important;min-height:28px!important;min-width:28px!important;padding:0!important;z-index:2}
.scan-crop-dialog .scan-crop-handle.tl{left:0;top:0}.scan-crop-dialog .scan-crop-handle.tr{right:0;top:0}.scan-crop-dialog .scan-crop-handle.bl{left:0;bottom:0}.scan-crop-dialog .scan-crop-handle.br{right:0;bottom:0}
.scan-crop-dialog .scan-crop-actions{gap:5px;margin-top:6px}.scan-crop-dialog .scan-crop-actions button{width:auto!important;min-height:28px!important;padding:4px 7px!important;font-size:11px!important}

/* v1.70: both touch orientations use the actual split height and one scroll owner per detail pane. */
@media (pointer:coarse){
 .ticket-split{height:var(--touch-split-height,calc(100dvh - 24px))!important;min-height:260px!important;grid-template-rows:minmax(0,var(--ticket-list-height,140px)) 22px minmax(0,1fr)!important;overflow:hidden}
 #ticket-pane-divider{height:22px!important;min-height:22px!important;width:100%!important;touch-action:none!important;align-self:stretch;position:relative;z-index:10}
 #ticket-width-divider{width:22px!important;min-width:22px!important;touch-action:none!important;position:relative;z-index:10}
 .ticket-split #ticket-list-pane{overflow:auto!important;display:block!important;height:100%;min-height:0;max-height:none}
 .ticket-split #ticket-list-pane>.tablewrap,.ticket-split #ticket-list-pane>.mobile-ticket-list{height:auto!important;max-height:none!important;min-height:0;overflow-x:auto!important;overflow-y:visible!important;overscroll-behavior:auto}
 .ticket-split #ticket-detail-pane{display:flex;overflow:hidden;min-height:0;padding-top:4px}
 .ticket-split #ticket-detail-pane>.ticket-facts-right{height:100%;min-height:0;overflow:hidden}
 .ticket-split .ticket-facts-right>.ticket-main,.ticket-split .ticket-facts-right>.ticket-facts{height:100%;max-height:100%;min-height:0;overflow:auto!important;overscroll-behavior:auto}
 .ticket-layout.ticket-facts-right{grid-template-columns:minmax(0,1fr) 22px minmax(160px,var(--ticket-facts-width,30%))}
 .tablewrap,.workspace-upper,.workspace-lower{overscroll-behavior-y:auto}
}
@media (pointer:coarse) and (orientation:portrait){
 .ticket-split #ticket-detail-pane{display:block;overflow:auto!important}
 .ticket-split #ticket-detail-pane>.ticket-facts-right{display:block;height:auto;overflow:visible}
 .ticket-split .ticket-facts-right>.ticket-main,.ticket-split .ticket-facts-right>.ticket-facts{height:auto;max-height:none;overflow:visible!important}
 #ticket-width-divider{display:none!important}
}

@media (pointer:coarse){.workspace-sections{grid-template-rows:var(--upper-height,120px) 22px minmax(0,1fr)}.workspace-divider{min-height:22px;height:22px;touch-action:none!important}.workspace-divider:after{top:10px}.workspace-divider:before{top:9px}}
