:root{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#263b38;background:#f4f6f3;font-synthesis:none;--green:#176554;--ink:#17352e;--line:#dce3dc;--muted:#66766e}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;border-radius:7px;background:var(--green);color:white;padding:12px 18px;font-weight:600;transition:background .15s}button:hover{background:#104d40}button:disabled{opacity:.55;cursor:wait}input,select,textarea{width:100%;border:1px solid #c6d2cb;border-radius:6px;padding:11px 12px;background:white;color:var(--ink);margin:7px 0 18px}input:focus,textarea:focus,select:focus{outline:2px solid #70ad98;outline-offset:2px}label{font-size:13px;font-weight:600}textarea{min-height:78px;resize:vertical}h1,h2,h3,p{margin-top:0}h1{font-size:32px;letter-spacing:-1px;font-weight:550}h2{font-size:23px;letter-spacing:-.5px;font-weight:550}h3{font-size:16px;font-weight:600}p{line-height:1.6}.small{font-size:12px;color:var(--muted)}[hidden]{display:none!important}.wordmark{font-size:47px;letter-spacing:-4px;font-weight:600;line-height:1;display:flex;align-items:center;gap:18px}.wordmark span{font-size:11px;letter-spacing:2px;opacity:.6;border-left:1px solid #6c8980;padding-left:14px}.login-layout{min-height:100vh;display:grid;grid-template-columns:1.15fr 1fr}.login-story{background:var(--ink);color:#edf5ed;padding:65px 10%;display:flex;flex-direction:column;justify-content:center}.login-story .wordmark{margin-bottom:90px}.eyebrow{font-size:11px;letter-spacing:2px;color:#aac9b9}.login-story h1{font-size:clamp(40px,5vw,66px);line-height:1.08;letter-spacing:-2px;margin:20px 0 28px}.login-story>p:not(.eyebrow){max-width:400px;color:#c0d3c8;font-size:16px}.steps{font-size:12px;letter-spacing:.5px;margin-top:60px;color:#c0d3c8}.steps span{margin:0 15px;color:#769a87}.login-card{max-width:470px;width:100%;padding:40px;margin:auto}.environment{display:inline-block;font-size:10px;letter-spacing:1.3px;color:var(--green);background:#e4ece4;border:1px solid #d4e0d3;padding:7px 10px;border-radius:4px;margin-bottom:24px}.login-card h2{font-size:30px;margin-bottom:14px}.login-card>p{font-size:14px;color:var(--muted)}.login-card form{margin-top:30px}.login-card button{width:100%;display:flex;justify-content:space-between;margin:0 0 22px}.workspace{display:grid;grid-template-columns:220px 1fr;min-height:100vh}.sidebar{background:var(--ink);color:#e7f1e9;padding:33px 23px;position:fixed;width:220px;inset:0 auto 0 0;display:flex;flex-direction:column}.sidebar .wordmark{font-size:41px;margin-bottom:58px}.side-label{font-size:9px;letter-spacing:2px;color:#90afa0;margin-bottom:18px}.sidebar nav{display:grid;gap:6px}.nav-button{background:transparent;color:#bdcfc4;text-align:left;font-size:13px;padding:13px 14px;font-weight:500}.nav-button:hover,.nav-button.active{background:#2b4a3e;color:#fff}.sidebar-bottom{margin-top:auto;font-size:11px;color:#b3c8bd}.sidebar-bottom p{margin:18px 0 6px;color:#eef5ef}.online-dot{display:inline-block;width:6px;height:6px;background:#a6c48e;border-radius:50%;margin-right:6px}.text-button{background:transparent;padding:8px 0;color:#b3c8bd;font-weight:400;font-size:12px}.text-button:hover{background:transparent;color:#fff}main{grid-column:2;min-width:0}.topbar{height:75px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 42px;font-size:11px;letter-spacing:.8px;background:#fafbf8}.divider{padding:0 13px;color:#9ba9a0}.quiet{color:var(--muted);background:transparent;font-size:12px;padding:8px 10px}.quiet:hover{color:var(--ink);background:#e7eee6}.page{padding:42px;max-width:1500px;margin:auto}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:26px}.page-heading h1{margin:0 0 9px}.page-heading p{color:var(--muted);font-size:13px;margin:0}.stats{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);background:#fafbf8;border-radius:9px;margin-bottom:30px;overflow:hidden}.stat{padding:23px 25px;border-right:1px solid var(--line)}.stat:last-child{border:0}.stat-label{font-size:11px;color:var(--muted);margin-bottom:14px;display:block}.stat-value{font-size:29px;font-weight:500;letter-spacing:-.8px}.panel{border:1px solid var(--line);background:#fff;border-radius:9px;overflow:hidden;margin-bottom:22px}.panel-header{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:22px 24px;border-bottom:1px solid var(--line)}.panel-header h3{margin:0}.panel-header p{margin:0;color:var(--muted);font-size:12px}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th{font-size:10px;font-weight:500;letter-spacing:1px;color:var(--muted);background:#fbfcfa;padding:14px 24px;white-space:nowrap}td{padding:19px 24px;border-top:1px solid #eef1ec;vertical-align:middle}tr.clickable{cursor:pointer}tr.clickable:hover{background:#f6f9f3}.primary-text{font-weight:550;color:var(--ink)}.secondary-text{font-size:11px;color:var(--muted);display:block;margin-top:6px}.status{font-size:10px;border-radius:4px;padding:6px 8px;display:inline-block;white-space:nowrap;background:#eef1ed;color:#52645a}.status.in_review,.status.blocked{background:#fbf0d8;color:#8c6416}.status.approved,.status.invoice_prepared,.status.done{background:#e7f1e5;color:#326944}.numeric{text-align:right;font-variant-numeric:tabular-nums}.arrow-cell{color:#92a297}.empty{padding:45px 24px;text-align:center;color:var(--muted);font-size:14px}.order-top{display:flex;align-items:center;gap:12px;margin-bottom:20px}.order-top button{padding-left:0}.detail-grid{display:grid;grid-template-columns:2fr 1fr;gap:24px}.meta{padding:24px}.meta dl{margin:0;display:grid;gap:9px}.meta dt{font-size:10px;color:var(--muted);letter-spacing:.8px;margin-top:12px;text-transform:uppercase}.meta dd{margin:0;font-size:13px;overflow-wrap:anywhere}.actions{display:flex;gap:9px;flex-wrap:wrap}.secondary{background:#e8efe6;color:#305541}.secondary:hover{background:#dce8d9}.danger{background:#f5e9e4;color:#985333}.danger:hover{background:#eedacf}.row-action{padding:6px 9px;font-size:11px}.notice{padding:16px 22px;color:#4d6455;background:#edf3e9;border:1px solid #d8e4d0;border-radius:7px;font-size:13px;margin-bottom:24px}.error{color:#a03930;font-size:13px}.voided{opacity:.5;text-decoration:line-through}dialog{width:min(520px,calc(100vw - 32px));border:1px solid var(--line);border-radius:12px;padding:27px;color:var(--ink);box-shadow:0 30px 80px #132b2330;max-height:90vh}dialog::backdrop{background:#17352e66;backdrop-filter:blur(3px)}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:24px}.dialog-heading h2{margin:0}.dialog-heading button{font-size:23px}.dialog-actions{display:flex;justify-content:flex-end}.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.revision{font-size:11px;color:var(--muted)}.help{color:var(--muted);font-size:12px;margin:0 0 18px}.stack{display:grid;gap:12px}.stack button{width:100%}@media(max-width:1000px){.sidebar{width:180px;padding:28px 15px}.workspace{grid-template-columns:180px 1fr}.page{padding:27px}.topbar{padding:0 27px}.stat{padding:18px}.detail-grid{grid-template-columns:1fr}}@media(max-width:700px){.login-layout{grid-template-columns:1fr}.login-story{padding:35px;min-height:290px}.login-story .wordmark{margin-bottom:30px}.login-story h1{font-size:40px}.login-story>p:not(.eyebrow),.steps{display:none}.login-card{padding:35px 25px}.sidebar{position:relative;width:100%;padding:20px}.sidebar .wordmark{margin:0 0 20px;font-size:32px}.side-label,.sidebar-bottom{display:none}.sidebar nav{display:flex;overflow:auto;gap:3px}.nav-button{white-space:nowrap;font-size:12px;padding:10px}.workspace{display:block}.topbar{height:56px;padding:0 20px}.page{padding:24px 16px}.stats{grid-template-columns:repeat(2,1fr)}.stat{border-bottom:1px solid var(--line)}.stat:nth-child(2){border-right:0}.stat-value{font-size:25px}.page-heading{align-items:flex-start}.page-heading h1{font-size:27px}.page-heading button{font-size:12px;padding:11px}.panel-header,td,th{padding:16px}.detail-grid{gap:0}.field-grid{grid-template-columns:1fr;gap:0}}

#logout-mobile{display:none}.meta dd.stat-value{font-size:28px}.numeric{white-space:nowrap}@media(max-width:700px){#logout-mobile{display:inline-block}.topbar{font-size:9px}.topbar .quiet{font-size:10px;padding:8px 5px}}
.source-hash { overflow-wrap:anywhere; font-family:monospace; font-size:.8rem; }
#document-search-form input[type="checkbox"] { width:auto; margin-right:.5rem; }
#document-search-results article + article { border-top:1px solid var(--line); }
.task-text{white-space:pre-wrap;overflow-wrap:anywhere}.task-objective{font-size:20px;color:var(--ink)}.task-item + .task-item{border-top:1px solid var(--line)}.task-item h3{margin-top:16px}.task-item li{margin-bottom:8px}.task-item dl{margin-bottom:18px}.source-reference{border-left:3px solid #d8e4d0;padding-left:12px;margin:16px 0;font-size:12px}.source-reference p{margin:6px 0}.status.executed_verified{background:#e7f1e5;color:#326944}fieldset{border:1px solid var(--line);border-radius:6px;padding:16px;margin:12px 0 18px}legend{font-size:12px;color:var(--muted)}
.task-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}@media(max-width:1000px){.task-grid{grid-template-columns:minmax(0,1fr)}}

/* Work-order workspace, based on the user's September 21 visual references. */
:root{--green:#137fcd;--ink:#24394c;--line:#dce5ed;--muted:#74899d;color:#293c4e;background:#eaf0f4}
.sidebar{background:linear-gradient(165deg,#14255c,#104c6e)}
.nav-button:hover,.nav-button.active{background:#205d91}.topbar{background:#fff;height:58px}.page{max-width:none;padding:24px}.panel{border-color:#e2e9ef}.quiet:hover{background:#e6f4fc}.secondary{background:#e7f3fb;color:#167ac0}.secondary:hover{background:#d5ebf9}button:hover{background:#096aa9}input:focus,select:focus,textarea:focus{outline-color:#54ade8}
.order-register{background:#edf2f6;min-height:calc(100vh - 108px);border:1px solid var(--line);border-radius:9px;overflow:hidden}.register-title,.order-tabs{background:linear-gradient(110deg,#075186,#1b648e);color:#fff}.register-title{padding:18px 24px}.register-title h1{font-size:20px;letter-spacing:0;margin:0}.register-toolbar{display:flex;align-items:center;gap:28px;padding:16px;background:#fff;color:var(--muted);font-size:13px}.register-toolbar button{background:#fff;color:#1688d5;border:1px solid #1688d5}.order-register table{min-width:1020px}.order-register th{background:#edf2f6;padding:15px 12px 8px;font-size:10px;letter-spacing:.3px}.order-register td{padding:9px 12px;background:#fff;border:1px solid #edf2f6}.order-register tr:hover td{background:#e5f5fc}.column-filters th{padding:0 4px 10px}.column-filters input,.column-filters select{margin:0;padding:9px 8px;border-radius:0;border-color:#dae3eb;background:#f6f9fb;min-width:110px;font-size:12px}.order-number{font-weight:650;width:105px}.order-register td.order-number.draft{background:#fff1bd}.order-register td.order-number.in_review{background:#e0eaff}.order-register td.order-number.approved,.order-register td.order-number.invoice_prepared{background:#dcf2e6}.order-number button{color:#263e55;padding:3px}.order-register .status{font-size:12px;padding:2px;background:transparent;color:#334b60}
/* A coloured dot explains the status at a glance; underlag uses the same colours as the order number cell. */
.order-register .status::before{content:"";display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:7px;background:#9aa9b6;vertical-align:1px}
.order-register .status.in_progress::before{background:#1688d5}
.order-register .status.completed::before,.order-register .status.approved::before,.order-register .status.invoice_prepared::before{background:#3d9a62}
.order-register .status.draft::before{background:#e2b400}
.order-register .status.in_review::before{background:#5b84e6}.order-register .numeric{font-size:12px}.order-caption{margin-bottom:16px}.order-caption h1{font-size:24px}.order-tabs{display:flex;align-items:center;gap:8px;padding:12px 18px;border-radius:8px 8px 0 0;overflow:auto}.order-tabs button{background:transparent;white-space:nowrap;color:#d8e9f5;border-radius:5px;padding:11px 16px;font-size:13px}.order-tabs button.active,.order-tabs button:hover{background:#2b82b8;color:white}.order-ref{background:#ffe89b;color:#294359;font-size:14px;font-weight:700;min-width:100px;text-align:center;border-radius:5px;padding:12px 16px;margin-right:20px}.order-workspace{background:#eaf0f4;padding:22px;min-height:65vh;border:1px solid var(--line)}.order-home{display:grid;grid-template-columns:minmax(220px,30%) minmax(0,1fr);gap:24px;align-items:start}.order-customer{border-right:1px solid #d6e0e9;padding-right:24px}.order-customer h2{font-size:21px;overflow-wrap:anywhere}.order-customer dl{font-size:13px;line-height:1.6}.order-customer dt{color:var(--muted);margin-top:20px}.order-customer dd{margin:5px 0;overflow-wrap:anywhere}.order-customer .panel{margin-top:24px;background:transparent;border:0}.order-customer .meta{padding:0}.order-workspace td{padding:12px 18px}.order-workspace th{background:#f1f5f8}.order-workspace .panel{border-radius:8px}.order-workspace .empty{min-height:230px;padding-top:85px}
@media(max-width:1000px){.page{padding:18px}.order-home{grid-template-columns:1fr}.order-customer{border-right:0;border-bottom:1px solid var(--line);padding:0 0 18px}.order-workspace{padding:16px}}
@media(max-width:700px){.page{padding:14px 10px}.register-toolbar{gap:12px;flex-wrap:wrap}.order-tabs{padding:10px;gap:3px}.order-tabs button{padding:10px}.order-ref{min-width:70px;margin-right:4px}.order-workspace{padding:10px}.order-caption h1{font-size:21px}}
.order-neighbors{display:flex;margin-right:12px}.order-neighbors button{font-size:23px;border:1px solid #ffffff30;padding:5px 12px}.order-neighbors button:disabled{cursor:default;opacity:.35}.order-timeline{list-style:none;margin:0;padding:24px}.order-timeline li{border-left:2px solid #d6e7f3;padding:0 0 24px 20px;font-size:13px}.order-timeline span,.order-timeline time{display:block;color:var(--muted);font-size:12px;margin-top:7px}
.performer-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.performer-row strong{overflow-wrap:anywhere;font-size:13px}.performer-row+.small{margin-top:16px}.performer-row>div:last-child{display:flex;flex-wrap:wrap}
.entry-table{min-width:740px}.entry-table td{padding:10px 14px}.entry-voided td:not(:last-child){text-decoration:line-through;color:var(--muted)}.inline-entry{border-top:1px solid var(--line);padding:20px;background:#f3f9fd}.inline-entry h3{font-size:13px}.inline-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}.inline-fields input,.inline-fields select{margin-bottom:6px}.inline-entry .error:empty{display:none}.inline-entry .actions{margin-top:14px}.inline-fields label{font-size:11px}
.internal-panel .meta{background:#fffdf4}.internal-panel .meta dd{border:1px solid #f0dfaa;border-radius:5px;background:#fff;padding:12px;min-height:42px}.internal-panel .meta .small{margin:18px 0 0}.internal-panel .meta dt{color:#9a7b21}

.order-performer{display:inline-block;border:1px solid var(--line);border-radius:3px;padding:3px 6px;margin:2px;font-size:11px;white-space:nowrap}.order-performer.completed{color:#16724d;border-color:#8ac7ae;background:#effaf5}

/* Keep the register compact while preserving access to every column. */
.order-register table{table-layout:fixed;min-width:1440px;width:100%}
.order-register th:nth-child(1){width:160px}.order-register th:nth-child(2){width:150px}.order-register th:nth-child(3){width:160px}.order-register th:nth-child(4){width:200px}.order-register th:nth-child(5){width:170px}.order-register th:nth-child(6){width:260px}.order-register th:nth-child(7){width:180px}.order-register th:nth-child(8){width:90px}.order-register th:nth-child(9){width:190px}
.order-register td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:44px}.order-register td:nth-child(7){white-space:normal}.order-register .order-number{position:sticky;left:0;z-index:1}.order-register .table-scroll:focus-visible{outline:2px solid #1688d5;outline-offset:-2px}

.order-register th:first-child{position:sticky;left:0;z-index:2;background:#edf2f6}

.customer-orders{margin-top:28px}.customer-order-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:12px}.customer-order-link{color:#263e55;background:#e0eaff;border:1px solid transparent;padding:10px 6px;font-size:12px;overflow-wrap:anywhere}.customer-order-link span{display:block;font-size:10px;font-weight:400;margin-top:5px}.customer-order-link.draft{background:#fff1bd}.customer-order-link.approved,.customer-order-link.invoice_prepared{background:#dcf2e6}.customer-order-link[aria-current="page"]{border:2px solid #1688d5}.customer-order-link:hover{color:#075186;background:#d0eafa}

.project-contact{padding:12px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.project-contact:last-of-type{border-bottom:0}.project-contact dl{font-size:13px}.project-contact dt{color:var(--muted)}.project-contact dd{margin:4px 0 12px}

/* Order search and keyboard navigation */
.register-toolbar{flex-wrap:wrap;gap:16px;align-items:end}
.order-search{flex:1;min-width:230px;max-width:470px}
.order-search,.order-project{display:grid;gap:5px;font-size:12px;font-weight:600}
.order-search input,.order-project select{min-height:38px;margin:0}
.order-keyboard-help{margin:0;padding:8px 16px;color:var(--muted);font-size:12px;border-bottom:1px solid #dce4ec}
#order-rows tr:focus-within{background:#e4f4fc}
.order-register :focus-visible{outline:2px solid #1688d5;outline-offset:2px}

.registry-table td{vertical-align:middle;white-space:nowrap}.registry-table td:first-child{min-width:240px;max-width:320px;white-space:normal}.registry-table td:last-child{min-width:310px;white-space:normal}.registry-table td:last-child button{display:inline-block;width:auto;margin:3px;padding:7px 9px}
/* Order print output uses a dedicated, read-only snapshot rather than printing controls. */
.print-order-sheet{display:none}
@media print{
  @page{size:auto;margin:14mm}
  body{background:#fff;color:#172721;font:10pt/1.4 Arial,sans-serif}
  #workspace{display:block!important;min-height:0}
  #workspace>.sidebar,#workspace main>.topbar,#message,#content>.order-top,#content>.page-heading,#editor{display:none!important}
  #workspace main,.page{display:block!important;max-width:none;margin:0;padding:0}
  #content>.print-order-sheet{display:block!important;color:#172721}
  #content>:not(.print-order-sheet){display:none!important}
  .print-order-header{display:flex;justify-content:space-between;gap:16mm;border-bottom:2px solid #176554;padding-bottom:7mm;margin-bottom:8mm}
  .print-order-header .eyebrow{color:#176554;font-size:8pt;letter-spacing:1.5pt;margin:0 0 3mm}
  .print-order-header h1{font-size:22pt;margin:0 0 2mm;letter-spacing:0}
  .print-order-header p{margin:0;color:#52645a}
  .print-order-stamp{display:grid;align-content:start;gap:2mm;text-align:right;white-space:nowrap}
  .print-order-facts{display:grid;grid-template-columns:1fr 1fr;gap:8mm;border-bottom:1px solid #cad5ce;padding-bottom:6mm}
  .print-order-facts dl{display:grid;grid-template-columns:34mm 1fr;gap:2mm 4mm;margin:0}
  .print-order-facts dt{font-size:8pt;text-transform:uppercase;color:#52645a}
  .print-order-facts dd{margin:0;overflow-wrap:anywhere}
  .print-order-section{break-inside:avoid;margin-top:7mm}
  .print-order-section h2{font-size:12pt;letter-spacing:0;border-bottom:1px solid #cad5ce;padding-bottom:2mm;margin-bottom:3mm}
  .print-order-section p{white-space:pre-wrap;margin:0}
  .print-order-section table{font-size:9pt}
  .print-order-section th{background:#edf2ee;color:#344b40;font-size:8pt;padding:2mm;text-align:left}
  .print-order-section td{padding:2mm;border-top:1px solid #dde4df}
  .print-order-footer{border-top:1px solid #cad5ce;margin-top:9mm;padding-top:3mm;color:#52645a;font-size:8pt}
}
.order-image-preview{display:block;max-width:100%;max-height:70vh;object-fit:contain;margin:0 auto 18px;border:1px solid var(--line);border-radius:6px;background:#f4f6f3}
.order-image-gallery{max-width:900px}.order-image-gallery-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.order-image-tile{margin:0;min-width:0;border:1px solid var(--line);border-radius:8px;background:#f7f9f7;overflow:hidden}.order-image-tile img{display:block;width:100%;height:190px;object-fit:contain;background:#e9efeb}.order-image-tile figcaption{padding:8px 10px;font-size:12px;overflow-wrap:anywhere}.order-image-tile figcaption span{display:block;color:var(--muted);font-size:11px;margin-top:3px}.order-image-unavailable{min-height:100px;display:grid;place-items:center;padding:12px;color:var(--muted);text-align:center}.order-image-gallery-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}.order-image-gallery-nav span{font-size:12px;color:var(--muted)}@media(max-width:560px){.order-image-gallery-grid{grid-template-columns:1fr}.order-image-tile img{height:210px}.order-image-gallery-nav button{padding:9px 7px}}
/* Compact, related field groups for the work-order editor. */
dialog#editor{width:min(680px,calc(100vw - 32px));padding:24px}
#editor-fields{display:grid;gap:16px}
.editor-section{padding:16px 18px 4px;border:1px solid var(--line);border-radius:9px;background:#fbfcfa}
.editor-section h3{margin:0 0 12px;font-size:14px}
.editor-section .help{margin:-6px 0 12px}
.editor-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px;align-items:start}
.editor-field{min-width:0}
.editor-field-wide{grid-column:1/-1}
#editor-fields label{display:block;margin:0 0 3px;font-size:12px;color:#465b52}
#editor-fields input,#editor-fields select,#editor-fields textarea{margin:0 0 12px;padding:9px 10px}
#editor-fields textarea{min-height:76px}
#editor-fields .editor-field-grid .editor-field-grid{gap:0 10px}
.dialog-heading{margin-bottom:18px}
.dialog-actions{padding-top:10px;border-top:1px solid var(--line)}
.order-context-block{margin-top:18px;padding:14px 14px 6px;border:1px solid #d6e0e9;border-radius:8px;background:#f3f7fa}
.order-context-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.order-context-heading h3{margin:0;font-size:13px}
.order-context-heading button{flex:0 0 auto}
.order-context-block>p{margin:0 0 8px;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.order-customer-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.order-customer-heading h2{margin:0;min-width:0}
.order-customer-heading button{flex:0 0 auto;white-space:nowrap}
.order-customer .order-context-block{margin-top:10px;padding:10px 12px 2px}
.order-customer .order-context-heading{margin-bottom:4px}
.order-customer .order-context-block>p{margin-bottom:6px}
@media(max-width:480px){.order-customer-heading{align-items:flex-start;flex-direction:column}.order-customer-heading button{width:auto}}
@media(max-width:700px){dialog#editor{padding:18px}.editor-section{padding:14px 14px 2px}.editor-field-grid{grid-template-columns:1fr}.editor-field-wide{grid-column:auto}}

.commitment-actions summary{cursor:pointer;color:var(--blue,#087abf);white-space:nowrap}.commitment-actions>div{display:flex;flex-direction:column;align-items:stretch;gap:4px;padding-top:6px}

/* Keep entry blocks dense, with one shared action row and readable mobile flow. */
#editor-fields{gap:10px}
.editor-section{padding:12px 14px 2px}
.editor-section h3{margin-bottom:9px}
#editor-fields input,#editor-fields select,#editor-fields textarea{margin-bottom:9px;padding:8px 10px}
#editor-fields textarea{min-height:64px}
.dialog-heading{margin-bottom:12px}
.dialog-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:12px}
@media(max-width:700px){.editor-section{padding:10px 12px 2px}}

.address-search{margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid var(--line)}.address-search-row{display:flex;align-items:flex-start;gap:8px}.address-search-row input{min-width:0;flex:1}.address-candidate{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0}.address-candidate span{min-width:0;overflow-wrap:anywhere}.address-candidate button{flex:none}

.address-source{padding:8px 10px;border-left:2px solid var(--line);background:#f3f7fa;margin:6px 0}.address-source p{margin:4px 0;overflow-wrap:anywhere}

/* Compact work-order tools retain accessible names and visible keyboard focus. */
.order-register .register-toolbar{gap:10px;align-items:center;padding:12px 16px}
.order-register .register-toolbar .order-tool{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;min-height:40px;padding:0;border:1px solid transparent;border-radius:7px;color:#42647f;background:transparent}
.order-register .register-toolbar .order-tool:hover{background:#edf5fb;border-color:#d8e6f0;color:#075186}
.order-tool:focus-visible{outline:2px solid #1688d5;outline-offset:3px}
.order-tool .tool-tip{position:absolute;top:calc(100% + 6px);right:0;white-space:nowrap;background:#263e55;color:#fff;font-size:12px;padding:6px 9px;border-radius:5px;z-index:20;opacity:0;pointer-events:none}
.order-tool:hover .tool-tip,.order-tool:focus-visible .tool-tip{opacity:1}
.order-register #order-count{margin-left:auto;white-space:nowrap}
@media(max-width:700px){.order-register .register-toolbar .order-tool{width:44px;height:44px;flex-basis:44px}.order-register #order-count{margin-left:0}}

.order-top .order-tool{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;padding:0;border-radius:7px;background:transparent;color:#42647f;border:1px solid #d8e6f0}
.order-top .order-tool:hover{background:#edf5fb;color:#075186}
.order-top .revision{margin-right:auto}
@media(max-width:700px){.order-top .order-tool{width:44px;height:44px}}

/* Keep tools reachable while only the table scrolls horizontally. */
.order-register{overflow:visible}
.order-register .register-title{border-radius:8px 8px 0 0}
.order-register .register-toolbar .order-search{flex:1 1 260px;min-width:0}
.order-register .register-toolbar .order-project{flex:0 1 220px;min-width:0}
.order-register .register-toolbar .order-search input,.order-register .register-toolbar .order-project select{width:100%;box-sizing:border-box}
.order-register .register-toolbar .tool-tip{max-width:min(240px,calc(100vw - 32px));white-space:normal;width:max-content;text-align:left}
@media(max-width:700px){.order-register .register-toolbar .order-search{flex-basis:100%}.order-register .register-toolbar .order-project{flex:1 1 180px}.order-register .register-toolbar #new-order{min-height:44px}}

.password-login{width:min(420px,calc(100% - 32px));margin:clamp(24px,10vh,100px) auto;padding:28px;background:#fff;border:1px solid var(--line);border-radius:12px}.password-login label{display:block}.password-login button{width:100%}

.preview-notice{position:fixed;bottom:8px;right:8px;z-index:99;padding:8px 12px;background:#17352e;color:#fff;border-radius:7px;font-size:12px}@media print{.preview-notice{display:none}}

/* Work-order reading rhythm: bounded columns and compact related blocks. */
.order-home{grid-template-columns:minmax(280px,400px) minmax(0,1fr);gap:20px}
.order-customer .panel-header{flex-wrap:wrap;gap:8px;padding-inline:0}
.order-customer .panel-header .actions{flex-wrap:wrap}
.order-customer .panel-header button{white-space:nowrap}
.order-customer{padding-right:20px}
.order-customer h2{font-size:18px;line-height:1.35}
.order-customer dt{margin-top:12px}
.order-customer dd{margin:3px 0}
.order-workspace .panel-header{padding:14px 18px}
.order-workspace .meta{padding:16px 18px}
.order-workspace .meta dt{margin-top:6px}
.order-workspace .panel{margin-bottom:16px}
.order-workspace .empty{min-height:0;padding:24px 18px}
.customer-billing{margin-top:14px;border-top:1px solid var(--line);padding-top:12px}
.customer-billing summary{cursor:pointer;font-size:13px;font-weight:600;line-height:1.5}
.customer-billing summary:focus-visible{outline:2px solid #1688d5;outline-offset:4px;border-radius:3px}
.customer-billing[open] summary{margin-bottom:10px}
.customer-billing dl{margin-top:0}
@media(max-width:1000px){.order-home{grid-template-columns:1fr}.order-customer{padding-right:0}}

.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;max-width:1100px}.settings-grid .meta{line-height:1.5}.settings-grid select{max-width:320px}.lou-compact .table-scroll td{padding-block:9px}.lou-compact .table-scroll th{padding-block:9px}.lou-compact .order-register td{padding-block:6px}@media(max-width:700px){.settings-grid{grid-template-columns:1fr;gap:0}}

.organization-logo-preview{display:block;max-width:240px;max-height:120px;object-fit:contain;margin-bottom:16px}.organization-logo-upload{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;border-radius:6px;cursor:pointer;overflow:hidden}.organization-logo-upload input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.organization-logo-upload:focus-within{outline:2px solid var(--blue,#167ac6);outline-offset:3px}

.print-organization-logo{display:block;max-width:180px;max-height:60px;object-fit:contain;margin-bottom:12px}.print-organization{margin-bottom:20px}.print-organization p,.print-organization-footer{font-size:10px;white-space:pre-line}.print-organization-footer{margin-top:24px;border-top:1px solid #d8e2e8;padding-top:12px}
.template-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:16px}.template-toolbar input,.template-toolbar select{padding:9px;border:1px solid #d1dce4;border-radius:8px;max-width:100%}.template-layout{display:grid;grid-template-columns:minmax(290px,380px) minmax(0,1fr);gap:24px}.template-controls{padding:18px;align-self:start}.template-block{padding:12px;background:#f4f7fa;border:1px solid #dce4ec;border-radius:10px;margin-bottom:12px}.template-block-bar{display:flex;align-items:center;gap:6px;margin-bottom:8px}.template-block-bar strong{margin-right:auto}.template-block textarea{width:100%;min-height:90px;box-sizing:border-box;padding:10px;resize:vertical;border:1px solid #d1dce4;border-radius:6px}.template-block-style{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}.template-block-style label{font-size:12px}.template-block-style input[type=number]{width:60px}.template-fields{display:flex;gap:6px;flex-wrap:wrap}.template-fields button{font-size:12px}.template-preview{min-width:0;overflow:auto}.template-paper{box-sizing:border-box;width:210mm;min-height:297mm;background:white;color:#172b3e;padding:15mm;box-shadow:0 8px 30px #24344716;margin:16px 0;font-family:Arial,sans-serif}.template-paper.landscape{width:297mm;min-height:210mm}@media(max-width:950px){.template-layout{grid-template-columns:1fr}.template-preview{overflow-x:auto}.template-paper{max-width:none}}@media print{body.printing-template .sidebar,body.printing-template .topbar,body.printing-template .page-heading,body.printing-template .template-controls,body.printing-template .template-toolbar,body.printing-template #template-status,body.printing-template #message{display:none!important}body.printing-template #content,body.printing-template .template-layout,body.printing-template .template-preview{display:block!important;margin:0!important;padding:0!important;overflow:visible!important}body.printing-template .template-paper{display:block!important;width:auto!important;min-height:0!important;margin:0!important;padding:0!important;box-shadow:none!important}body.printing-template main{margin:0!important;padding:0!important}}

.template-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.4}.template-align-left{text-align:left}.template-align-center{text-align:center}.template-align-right{text-align:right}.template-bold-1{font-weight:700}.template-bold-0{font-weight:400}.template-toolbar input,.template-toolbar select{width:auto;margin:0;flex:1;min-width:120px}.template-toolbar button{padding:9px 14px}.template-block-bar button{padding:5px 10px}.template-block-style input,.template-block-style select{margin:4px 0;padding:6px;width:auto}.template-block-style input[type=checkbox]{width:auto}.template-controls h2{font-size:18px}
.template-size-8{font-size:8pt}.template-size-9{font-size:9pt}.template-size-10{font-size:10pt}.template-size-11{font-size:11pt}.template-size-12{font-size:12pt}.template-size-13{font-size:13pt}.template-size-14{font-size:14pt}.template-size-15{font-size:15pt}.template-size-16{font-size:16pt}.template-size-17{font-size:17pt}.template-size-18{font-size:18pt}.template-size-19{font-size:19pt}.template-size-20{font-size:20pt}.template-size-21{font-size:21pt}.template-size-22{font-size:22pt}.template-size-23{font-size:23pt}.template-size-24{font-size:24pt}.template-size-25{font-size:25pt}.template-size-26{font-size:26pt}.template-size-27{font-size:27pt}.template-size-28{font-size:28pt}.template-size-29{font-size:29pt}.template-size-30{font-size:30pt}.template-size-31{font-size:31pt}.template-size-32{font-size:32pt}.template-size-33{font-size:33pt}.template-size-34{font-size:34pt}.template-size-35{font-size:35pt}.template-size-36{font-size:36pt}.template-size-37{font-size:37pt}.template-size-38{font-size:38pt}.template-size-39{font-size:39pt}.template-size-40{font-size:40pt}.template-size-41{font-size:41pt}.template-size-42{font-size:42pt}.template-size-43{font-size:43pt}.template-size-44{font-size:44pt}.template-size-45{font-size:45pt}.template-size-46{font-size:46pt}.template-size-47{font-size:47pt}.template-size-48{font-size:48pt}.template-size-49{font-size:49pt}.template-size-50{font-size:50pt}.template-size-51{font-size:51pt}.template-size-52{font-size:52pt}.template-size-53{font-size:53pt}.template-size-54{font-size:54pt}.template-size-55{font-size:55pt}.template-size-56{font-size:56pt}.template-size-57{font-size:57pt}.template-size-58{font-size:58pt}.template-size-59{font-size:59pt}.template-size-60{font-size:60pt}.template-size-61{font-size:61pt}.template-size-62{font-size:62pt}.template-size-63{font-size:63pt}.template-size-64{font-size:64pt}
.template-spacing-0{margin-bottom:0mm}.template-spacing-1{margin-bottom:1mm}.template-spacing-2{margin-bottom:2mm}.template-spacing-3{margin-bottom:3mm}.template-spacing-4{margin-bottom:4mm}.template-spacing-5{margin-bottom:5mm}.template-spacing-6{margin-bottom:6mm}.template-spacing-7{margin-bottom:7mm}.template-spacing-8{margin-bottom:8mm}.template-spacing-9{margin-bottom:9mm}.template-spacing-10{margin-bottom:10mm}.template-spacing-11{margin-bottom:11mm}.template-spacing-12{margin-bottom:12mm}.template-spacing-13{margin-bottom:13mm}.template-spacing-14{margin-bottom:14mm}.template-spacing-15{margin-bottom:15mm}.template-spacing-16{margin-bottom:16mm}.template-spacing-17{margin-bottom:17mm}.template-spacing-18{margin-bottom:18mm}.template-spacing-19{margin-bottom:19mm}.template-spacing-20{margin-bottom:20mm}.template-spacing-21{margin-bottom:21mm}.template-spacing-22{margin-bottom:22mm}.template-spacing-23{margin-bottom:23mm}.template-spacing-24{margin-bottom:24mm}.template-spacing-25{margin-bottom:25mm}.template-spacing-26{margin-bottom:26mm}.template-spacing-27{margin-bottom:27mm}.template-spacing-28{margin-bottom:28mm}.template-spacing-29{margin-bottom:29mm}.template-spacing-30{margin-bottom:30mm}.template-spacing-31{margin-bottom:31mm}.template-spacing-32{margin-bottom:32mm}.template-spacing-33{margin-bottom:33mm}.template-spacing-34{margin-bottom:34mm}.template-spacing-35{margin-bottom:35mm}.template-spacing-36{margin-bottom:36mm}.template-spacing-37{margin-bottom:37mm}.template-spacing-38{margin-bottom:38mm}.template-spacing-39{margin-bottom:39mm}.template-spacing-40{margin-bottom:40mm}.template-spacing-41{margin-bottom:41mm}.template-spacing-42{margin-bottom:42mm}.template-spacing-43{margin-bottom:43mm}.template-spacing-44{margin-bottom:44mm}.template-spacing-45{margin-bottom:45mm}.template-spacing-46{margin-bottom:46mm}.template-spacing-47{margin-bottom:47mm}.template-spacing-48{margin-bottom:48mm}.template-spacing-49{margin-bottom:49mm}.template-spacing-50{margin-bottom:50mm}.template-spacing-51{margin-bottom:51mm}.template-spacing-52{margin-bottom:52mm}.template-spacing-53{margin-bottom:53mm}.template-spacing-54{margin-bottom:54mm}.template-spacing-55{margin-bottom:55mm}.template-spacing-56{margin-bottom:56mm}.template-spacing-57{margin-bottom:57mm}.template-spacing-58{margin-bottom:58mm}.template-spacing-59{margin-bottom:59mm}.template-spacing-60{margin-bottom:60mm}.template-spacing-61{margin-bottom:61mm}.template-spacing-62{margin-bottom:62mm}.template-spacing-63{margin-bottom:63mm}.template-spacing-64{margin-bottom:64mm}.template-spacing-65{margin-bottom:65mm}.template-spacing-66{margin-bottom:66mm}.template-spacing-67{margin-bottom:67mm}.template-spacing-68{margin-bottom:68mm}.template-spacing-69{margin-bottom:69mm}.template-spacing-70{margin-bottom:70mm}.template-spacing-71{margin-bottom:71mm}.template-spacing-72{margin-bottom:72mm}.template-spacing-73{margin-bottom:73mm}.template-spacing-74{margin-bottom:74mm}.template-spacing-75{margin-bottom:75mm}.template-spacing-76{margin-bottom:76mm}.template-spacing-77{margin-bottom:77mm}.template-spacing-78{margin-bottom:78mm}.template-spacing-79{margin-bottom:79mm}.template-spacing-80{margin-bottom:80mm}
@media print{@page lou-template-portrait{size:A4 portrait;margin:15mm}@page lou-template-landscape{size:A4 landscape;margin:15mm}body.printing-template #content>.template-layout{display:block!important}body.printing-template .template-paper.portrait{page:lou-template-portrait}body.printing-template .template-paper.landscape{page:lou-template-landscape}}

@media print{.template-order-print.portrait{page:lou-template-portrait}.template-order-print.landscape{page:lou-template-landscape}}

.template-block summary{cursor:pointer;font-size:13px;font-weight:600;padding:6px;overflow-wrap:anywhere}.template-block[open] summary{margin-bottom:10px}.template-canvas-block{cursor:pointer;outline:1px solid transparent;outline-offset:4px}.template-canvas-block:hover,.template-canvas-block.selected{outline-color:#93bfe1}.template-canvas-block:focus-visible{outline:2px solid #137fcd}@media print{.template-canvas-block{outline:none!important;cursor:default}}

.template-history-panel{padding:16px;margin-bottom:18px}.template-history-row{display:flex;gap:12px;justify-content:space-between;align-items:center;padding:8px;border-bottom:1px solid #e1e7ec}@media print{.template-history-panel{display:none!important}}

.template-layout-surface{position:relative;min-height:267mm}.template-layout-surface.landscape{min-height:180mm}.template-positioned{position:absolute;margin:0}.template-block input[data-positioned]{width:auto;margin-right:6px}
.template-x-0{left:0mm}.template-y-0{top:0mm}.template-width-0{width:0mm}.template-x-1{left:1mm}.template-y-1{top:1mm}.template-width-1{width:1mm}.template-x-2{left:2mm}.template-y-2{top:2mm}.template-width-2{width:2mm}.template-x-3{left:3mm}.template-y-3{top:3mm}.template-width-3{width:3mm}.template-x-4{left:4mm}.template-y-4{top:4mm}.template-width-4{width:4mm}.template-x-5{left:5mm}.template-y-5{top:5mm}.template-width-5{width:5mm}.template-x-6{left:6mm}.template-y-6{top:6mm}.template-width-6{width:6mm}.template-x-7{left:7mm}.template-y-7{top:7mm}.template-width-7{width:7mm}.template-x-8{left:8mm}.template-y-8{top:8mm}.template-width-8{width:8mm}.template-x-9{left:9mm}.template-y-9{top:9mm}.template-width-9{width:9mm}.template-x-10{left:10mm}.template-y-10{top:10mm}.template-width-10{width:10mm}.template-x-11{left:11mm}.template-y-11{top:11mm}.template-width-11{width:11mm}.template-x-12{left:12mm}.template-y-12{top:12mm}.template-width-12{width:12mm}.template-x-13{left:13mm}.template-y-13{top:13mm}.template-width-13{width:13mm}.template-x-14{left:14mm}.template-y-14{top:14mm}.template-width-14{width:14mm}.template-x-15{left:15mm}.template-y-15{top:15mm}.template-width-15{width:15mm}.template-x-16{left:16mm}.template-y-16{top:16mm}.template-width-16{width:16mm}.template-x-17{left:17mm}.template-y-17{top:17mm}.template-width-17{width:17mm}.template-x-18{left:18mm}.template-y-18{top:18mm}.template-width-18{width:18mm}.template-x-19{left:19mm}.template-y-19{top:19mm}.template-width-19{width:19mm}.template-x-20{left:20mm}.template-y-20{top:20mm}.template-width-20{width:20mm}.template-x-21{left:21mm}.template-y-21{top:21mm}.template-width-21{width:21mm}.template-x-22{left:22mm}.template-y-22{top:22mm}.template-width-22{width:22mm}.template-x-23{left:23mm}.template-y-23{top:23mm}.template-width-23{width:23mm}.template-x-24{left:24mm}.template-y-24{top:24mm}.template-width-24{width:24mm}.template-x-25{left:25mm}.template-y-25{top:25mm}.template-width-25{width:25mm}.template-x-26{left:26mm}.template-y-26{top:26mm}.template-width-26{width:26mm}.template-x-27{left:27mm}.template-y-27{top:27mm}.template-width-27{width:27mm}.template-x-28{left:28mm}.template-y-28{top:28mm}.template-width-28{width:28mm}.template-x-29{left:29mm}.template-y-29{top:29mm}.template-width-29{width:29mm}.template-x-30{left:30mm}.template-y-30{top:30mm}.template-width-30{width:30mm}.template-x-31{left:31mm}.template-y-31{top:31mm}.template-width-31{width:31mm}.template-x-32{left:32mm}.template-y-32{top:32mm}.template-width-32{width:32mm}.template-x-33{left:33mm}.template-y-33{top:33mm}.template-width-33{width:33mm}.template-x-34{left:34mm}.template-y-34{top:34mm}.template-width-34{width:34mm}.template-x-35{left:35mm}.template-y-35{top:35mm}.template-width-35{width:35mm}.template-x-36{left:36mm}.template-y-36{top:36mm}.template-width-36{width:36mm}.template-x-37{left:37mm}.template-y-37{top:37mm}.template-width-37{width:37mm}.template-x-38{left:38mm}.template-y-38{top:38mm}.template-width-38{width:38mm}.template-x-39{left:39mm}.template-y-39{top:39mm}.template-width-39{width:39mm}.template-x-40{left:40mm}.template-y-40{top:40mm}.template-width-40{width:40mm}.template-x-41{left:41mm}.template-y-41{top:41mm}.template-width-41{width:41mm}.template-x-42{left:42mm}.template-y-42{top:42mm}.template-width-42{width:42mm}.template-x-43{left:43mm}.template-y-43{top:43mm}.template-width-43{width:43mm}.template-x-44{left:44mm}.template-y-44{top:44mm}.template-width-44{width:44mm}.template-x-45{left:45mm}.template-y-45{top:45mm}.template-width-45{width:45mm}.template-x-46{left:46mm}.template-y-46{top:46mm}.template-width-46{width:46mm}.template-x-47{left:47mm}.template-y-47{top:47mm}.template-width-47{width:47mm}.template-x-48{left:48mm}.template-y-48{top:48mm}.template-width-48{width:48mm}.template-x-49{left:49mm}.template-y-49{top:49mm}.template-width-49{width:49mm}.template-x-50{left:50mm}.template-y-50{top:50mm}.template-width-50{width:50mm}.template-x-51{left:51mm}.template-y-51{top:51mm}.template-width-51{width:51mm}.template-x-52{left:52mm}.template-y-52{top:52mm}.template-width-52{width:52mm}.template-x-53{left:53mm}.template-y-53{top:53mm}.template-width-53{width:53mm}.template-x-54{left:54mm}.template-y-54{top:54mm}.template-width-54{width:54mm}.template-x-55{left:55mm}.template-y-55{top:55mm}.template-width-55{width:55mm}.template-x-56{left:56mm}.template-y-56{top:56mm}.template-width-56{width:56mm}.template-x-57{left:57mm}.template-y-57{top:57mm}.template-width-57{width:57mm}.template-x-58{left:58mm}.template-y-58{top:58mm}.template-width-58{width:58mm}.template-x-59{left:59mm}.template-y-59{top:59mm}.template-width-59{width:59mm}.template-x-60{left:60mm}.template-y-60{top:60mm}.template-width-60{width:60mm}.template-x-61{left:61mm}.template-y-61{top:61mm}.template-width-61{width:61mm}.template-x-62{left:62mm}.template-y-62{top:62mm}.template-width-62{width:62mm}.template-x-63{left:63mm}.template-y-63{top:63mm}.template-width-63{width:63mm}.template-x-64{left:64mm}.template-y-64{top:64mm}.template-width-64{width:64mm}.template-x-65{left:65mm}.template-y-65{top:65mm}.template-width-65{width:65mm}.template-x-66{left:66mm}.template-y-66{top:66mm}.template-width-66{width:66mm}.template-x-67{left:67mm}.template-y-67{top:67mm}.template-width-67{width:67mm}.template-x-68{left:68mm}.template-y-68{top:68mm}.template-width-68{width:68mm}.template-x-69{left:69mm}.template-y-69{top:69mm}.template-width-69{width:69mm}.template-x-70{left:70mm}.template-y-70{top:70mm}.template-width-70{width:70mm}.template-x-71{left:71mm}.template-y-71{top:71mm}.template-width-71{width:71mm}.template-x-72{left:72mm}.template-y-72{top:72mm}.template-width-72{width:72mm}.template-x-73{left:73mm}.template-y-73{top:73mm}.template-width-73{width:73mm}.template-x-74{left:74mm}.template-y-74{top:74mm}.template-width-74{width:74mm}.template-x-75{left:75mm}.template-y-75{top:75mm}.template-width-75{width:75mm}.template-x-76{left:76mm}.template-y-76{top:76mm}.template-width-76{width:76mm}.template-x-77{left:77mm}.template-y-77{top:77mm}.template-width-77{width:77mm}.template-x-78{left:78mm}.template-y-78{top:78mm}.template-width-78{width:78mm}.template-x-79{left:79mm}.template-y-79{top:79mm}.template-width-79{width:79mm}.template-x-80{left:80mm}.template-y-80{top:80mm}.template-width-80{width:80mm}.template-x-81{left:81mm}.template-y-81{top:81mm}.template-width-81{width:81mm}.template-x-82{left:82mm}.template-y-82{top:82mm}.template-width-82{width:82mm}.template-x-83{left:83mm}.template-y-83{top:83mm}.template-width-83{width:83mm}.template-x-84{left:84mm}.template-y-84{top:84mm}.template-width-84{width:84mm}.template-x-85{left:85mm}.template-y-85{top:85mm}.template-width-85{width:85mm}.template-x-86{left:86mm}.template-y-86{top:86mm}.template-width-86{width:86mm}.template-x-87{left:87mm}.template-y-87{top:87mm}.template-width-87{width:87mm}.template-x-88{left:88mm}.template-y-88{top:88mm}.template-width-88{width:88mm}.template-x-89{left:89mm}.template-y-89{top:89mm}.template-width-89{width:89mm}.template-x-90{left:90mm}.template-y-90{top:90mm}.template-width-90{width:90mm}.template-x-91{left:91mm}.template-y-91{top:91mm}.template-width-91{width:91mm}.template-x-92{left:92mm}.template-y-92{top:92mm}.template-width-92{width:92mm}.template-x-93{left:93mm}.template-y-93{top:93mm}.template-width-93{width:93mm}.template-x-94{left:94mm}.template-y-94{top:94mm}.template-width-94{width:94mm}.template-x-95{left:95mm}.template-y-95{top:95mm}.template-width-95{width:95mm}.template-x-96{left:96mm}.template-y-96{top:96mm}.template-width-96{width:96mm}.template-x-97{left:97mm}.template-y-97{top:97mm}.template-width-97{width:97mm}.template-x-98{left:98mm}.template-y-98{top:98mm}.template-width-98{width:98mm}.template-x-99{left:99mm}.template-y-99{top:99mm}.template-width-99{width:99mm}.template-x-100{left:100mm}.template-y-100{top:100mm}.template-width-100{width:100mm}.template-x-101{left:101mm}.template-y-101{top:101mm}.template-width-101{width:101mm}.template-x-102{left:102mm}.template-y-102{top:102mm}.template-width-102{width:102mm}.template-x-103{left:103mm}.template-y-103{top:103mm}.template-width-103{width:103mm}.template-x-104{left:104mm}.template-y-104{top:104mm}.template-width-104{width:104mm}.template-x-105{left:105mm}.template-y-105{top:105mm}.template-width-105{width:105mm}.template-x-106{left:106mm}.template-y-106{top:106mm}.template-width-106{width:106mm}.template-x-107{left:107mm}.template-y-107{top:107mm}.template-width-107{width:107mm}.template-x-108{left:108mm}.template-y-108{top:108mm}.template-width-108{width:108mm}.template-x-109{left:109mm}.template-y-109{top:109mm}.template-width-109{width:109mm}.template-x-110{left:110mm}.template-y-110{top:110mm}.template-width-110{width:110mm}.template-x-111{left:111mm}.template-y-111{top:111mm}.template-width-111{width:111mm}.template-x-112{left:112mm}.template-y-112{top:112mm}.template-width-112{width:112mm}.template-x-113{left:113mm}.template-y-113{top:113mm}.template-width-113{width:113mm}.template-x-114{left:114mm}.template-y-114{top:114mm}.template-width-114{width:114mm}.template-x-115{left:115mm}.template-y-115{top:115mm}.template-width-115{width:115mm}.template-x-116{left:116mm}.template-y-116{top:116mm}.template-width-116{width:116mm}.template-x-117{left:117mm}.template-y-117{top:117mm}.template-width-117{width:117mm}.template-x-118{left:118mm}.template-y-118{top:118mm}.template-width-118{width:118mm}.template-x-119{left:119mm}.template-y-119{top:119mm}.template-width-119{width:119mm}.template-x-120{left:120mm}.template-y-120{top:120mm}.template-width-120{width:120mm}.template-x-121{left:121mm}.template-y-121{top:121mm}.template-width-121{width:121mm}.template-x-122{left:122mm}.template-y-122{top:122mm}.template-width-122{width:122mm}.template-x-123{left:123mm}.template-y-123{top:123mm}.template-width-123{width:123mm}.template-x-124{left:124mm}.template-y-124{top:124mm}.template-width-124{width:124mm}.template-x-125{left:125mm}.template-y-125{top:125mm}.template-width-125{width:125mm}.template-x-126{left:126mm}.template-y-126{top:126mm}.template-width-126{width:126mm}.template-x-127{left:127mm}.template-y-127{top:127mm}.template-width-127{width:127mm}.template-x-128{left:128mm}.template-y-128{top:128mm}.template-width-128{width:128mm}.template-x-129{left:129mm}.template-y-129{top:129mm}.template-width-129{width:129mm}.template-x-130{left:130mm}.template-y-130{top:130mm}.template-width-130{width:130mm}.template-x-131{left:131mm}.template-y-131{top:131mm}.template-width-131{width:131mm}.template-x-132{left:132mm}.template-y-132{top:132mm}.template-width-132{width:132mm}.template-x-133{left:133mm}.template-y-133{top:133mm}.template-width-133{width:133mm}.template-x-134{left:134mm}.template-y-134{top:134mm}.template-width-134{width:134mm}.template-x-135{left:135mm}.template-y-135{top:135mm}.template-width-135{width:135mm}.template-x-136{left:136mm}.template-y-136{top:136mm}.template-width-136{width:136mm}.template-x-137{left:137mm}.template-y-137{top:137mm}.template-width-137{width:137mm}.template-x-138{left:138mm}.template-y-138{top:138mm}.template-width-138{width:138mm}.template-x-139{left:139mm}.template-y-139{top:139mm}.template-width-139{width:139mm}.template-x-140{left:140mm}.template-y-140{top:140mm}.template-width-140{width:140mm}.template-x-141{left:141mm}.template-y-141{top:141mm}.template-width-141{width:141mm}.template-x-142{left:142mm}.template-y-142{top:142mm}.template-width-142{width:142mm}.template-x-143{left:143mm}.template-y-143{top:143mm}.template-width-143{width:143mm}.template-x-144{left:144mm}.template-y-144{top:144mm}.template-width-144{width:144mm}.template-x-145{left:145mm}.template-y-145{top:145mm}.template-width-145{width:145mm}.template-x-146{left:146mm}.template-y-146{top:146mm}.template-width-146{width:146mm}.template-x-147{left:147mm}.template-y-147{top:147mm}.template-width-147{width:147mm}.template-x-148{left:148mm}.template-y-148{top:148mm}.template-width-148{width:148mm}.template-x-149{left:149mm}.template-y-149{top:149mm}.template-width-149{width:149mm}.template-x-150{left:150mm}.template-y-150{top:150mm}.template-width-150{width:150mm}.template-x-151{left:151mm}.template-y-151{top:151mm}.template-width-151{width:151mm}.template-x-152{left:152mm}.template-y-152{top:152mm}.template-width-152{width:152mm}.template-x-153{left:153mm}.template-y-153{top:153mm}.template-width-153{width:153mm}.template-x-154{left:154mm}.template-y-154{top:154mm}.template-width-154{width:154mm}.template-x-155{left:155mm}.template-y-155{top:155mm}.template-width-155{width:155mm}.template-x-156{left:156mm}.template-y-156{top:156mm}.template-width-156{width:156mm}.template-x-157{left:157mm}.template-y-157{top:157mm}.template-width-157{width:157mm}.template-x-158{left:158mm}.template-y-158{top:158mm}.template-width-158{width:158mm}.template-x-159{left:159mm}.template-y-159{top:159mm}.template-width-159{width:159mm}.template-x-160{left:160mm}.template-y-160{top:160mm}.template-width-160{width:160mm}.template-x-161{left:161mm}.template-y-161{top:161mm}.template-width-161{width:161mm}.template-x-162{left:162mm}.template-y-162{top:162mm}.template-width-162{width:162mm}.template-x-163{left:163mm}.template-y-163{top:163mm}.template-width-163{width:163mm}.template-x-164{left:164mm}.template-y-164{top:164mm}.template-width-164{width:164mm}.template-x-165{left:165mm}.template-y-165{top:165mm}.template-width-165{width:165mm}.template-x-166{left:166mm}.template-y-166{top:166mm}.template-width-166{width:166mm}.template-x-167{left:167mm}.template-y-167{top:167mm}.template-width-167{width:167mm}.template-x-168{left:168mm}.template-y-168{top:168mm}.template-width-168{width:168mm}.template-x-169{left:169mm}.template-y-169{top:169mm}.template-width-169{width:169mm}.template-x-170{left:170mm}.template-y-170{top:170mm}.template-width-170{width:170mm}.template-x-171{left:171mm}.template-y-171{top:171mm}.template-width-171{width:171mm}.template-x-172{left:172mm}.template-y-172{top:172mm}.template-width-172{width:172mm}.template-x-173{left:173mm}.template-y-173{top:173mm}.template-width-173{width:173mm}.template-x-174{left:174mm}.template-y-174{top:174mm}.template-width-174{width:174mm}.template-x-175{left:175mm}.template-y-175{top:175mm}.template-width-175{width:175mm}.template-x-176{left:176mm}.template-y-176{top:176mm}.template-width-176{width:176mm}.template-x-177{left:177mm}.template-y-177{top:177mm}.template-width-177{width:177mm}.template-x-178{left:178mm}.template-y-178{top:178mm}.template-width-178{width:178mm}.template-x-179{left:179mm}.template-y-179{top:179mm}.template-width-179{width:179mm}.template-x-180{left:180mm}.template-y-180{top:180mm}.template-width-180{width:180mm}.template-x-181{left:181mm}.template-y-181{top:181mm}.template-width-181{width:181mm}.template-x-182{left:182mm}.template-y-182{top:182mm}.template-width-182{width:182mm}.template-x-183{left:183mm}.template-y-183{top:183mm}.template-width-183{width:183mm}.template-x-184{left:184mm}.template-y-184{top:184mm}.template-width-184{width:184mm}.template-x-185{left:185mm}.template-y-185{top:185mm}.template-width-185{width:185mm}.template-x-186{left:186mm}.template-y-186{top:186mm}.template-width-186{width:186mm}.template-x-187{left:187mm}.template-y-187{top:187mm}.template-width-187{width:187mm}.template-x-188{left:188mm}.template-y-188{top:188mm}.template-width-188{width:188mm}.template-x-189{left:189mm}.template-y-189{top:189mm}.template-width-189{width:189mm}.template-x-190{left:190mm}.template-y-190{top:190mm}.template-width-190{width:190mm}.template-x-191{left:191mm}.template-y-191{top:191mm}.template-width-191{width:191mm}.template-x-192{left:192mm}.template-y-192{top:192mm}.template-width-192{width:192mm}.template-x-193{left:193mm}.template-y-193{top:193mm}.template-width-193{width:193mm}.template-x-194{left:194mm}.template-y-194{top:194mm}.template-width-194{width:194mm}.template-x-195{left:195mm}.template-y-195{top:195mm}.template-width-195{width:195mm}.template-x-196{left:196mm}.template-y-196{top:196mm}.template-width-196{width:196mm}.template-x-197{left:197mm}.template-y-197{top:197mm}.template-width-197{width:197mm}.template-x-198{left:198mm}.template-y-198{top:198mm}.template-width-198{width:198mm}.template-x-199{left:199mm}.template-y-199{top:199mm}.template-width-199{width:199mm}.template-x-200{left:200mm}.template-y-200{top:200mm}.template-width-200{width:200mm}.template-x-201{left:201mm}.template-y-201{top:201mm}.template-width-201{width:201mm}.template-x-202{left:202mm}.template-y-202{top:202mm}.template-width-202{width:202mm}.template-x-203{left:203mm}.template-y-203{top:203mm}.template-width-203{width:203mm}.template-x-204{left:204mm}.template-y-204{top:204mm}.template-width-204{width:204mm}.template-x-205{left:205mm}.template-y-205{top:205mm}.template-width-205{width:205mm}.template-x-206{left:206mm}.template-y-206{top:206mm}.template-width-206{width:206mm}.template-x-207{left:207mm}.template-y-207{top:207mm}.template-width-207{width:207mm}.template-x-208{left:208mm}.template-y-208{top:208mm}.template-width-208{width:208mm}.template-x-209{left:209mm}.template-y-209{top:209mm}.template-width-209{width:209mm}.template-x-210{left:210mm}.template-y-210{top:210mm}.template-width-210{width:210mm}.template-x-211{left:211mm}.template-y-211{top:211mm}.template-width-211{width:211mm}.template-x-212{left:212mm}.template-y-212{top:212mm}.template-width-212{width:212mm}.template-x-213{left:213mm}.template-y-213{top:213mm}.template-width-213{width:213mm}.template-x-214{left:214mm}.template-y-214{top:214mm}.template-width-214{width:214mm}.template-x-215{left:215mm}.template-y-215{top:215mm}.template-width-215{width:215mm}.template-x-216{left:216mm}.template-y-216{top:216mm}.template-width-216{width:216mm}.template-x-217{left:217mm}.template-y-217{top:217mm}.template-width-217{width:217mm}.template-x-218{left:218mm}.template-y-218{top:218mm}.template-width-218{width:218mm}.template-x-219{left:219mm}.template-y-219{top:219mm}.template-width-219{width:219mm}.template-x-220{left:220mm}.template-y-220{top:220mm}.template-width-220{width:220mm}.template-x-221{left:221mm}.template-y-221{top:221mm}.template-width-221{width:221mm}.template-x-222{left:222mm}.template-y-222{top:222mm}.template-width-222{width:222mm}.template-x-223{left:223mm}.template-y-223{top:223mm}.template-width-223{width:223mm}.template-x-224{left:224mm}.template-y-224{top:224mm}.template-width-224{width:224mm}.template-x-225{left:225mm}.template-y-225{top:225mm}.template-width-225{width:225mm}.template-x-226{left:226mm}.template-y-226{top:226mm}.template-width-226{width:226mm}.template-x-227{left:227mm}.template-y-227{top:227mm}.template-width-227{width:227mm}.template-x-228{left:228mm}.template-y-228{top:228mm}.template-width-228{width:228mm}.template-x-229{left:229mm}.template-y-229{top:229mm}.template-width-229{width:229mm}.template-x-230{left:230mm}.template-y-230{top:230mm}.template-width-230{width:230mm}.template-x-231{left:231mm}.template-y-231{top:231mm}.template-width-231{width:231mm}.template-x-232{left:232mm}.template-y-232{top:232mm}.template-width-232{width:232mm}.template-x-233{left:233mm}.template-y-233{top:233mm}.template-width-233{width:233mm}.template-x-234{left:234mm}.template-y-234{top:234mm}.template-width-234{width:234mm}.template-x-235{left:235mm}.template-y-235{top:235mm}.template-width-235{width:235mm}.template-x-236{left:236mm}.template-y-236{top:236mm}.template-width-236{width:236mm}.template-x-237{left:237mm}.template-y-237{top:237mm}.template-width-237{width:237mm}.template-x-238{left:238mm}.template-y-238{top:238mm}.template-width-238{width:238mm}.template-x-239{left:239mm}.template-y-239{top:239mm}.template-width-239{width:239mm}.template-x-240{left:240mm}.template-y-240{top:240mm}.template-width-240{width:240mm}.template-x-241{left:241mm}.template-y-241{top:241mm}.template-width-241{width:241mm}.template-x-242{left:242mm}.template-y-242{top:242mm}.template-width-242{width:242mm}.template-x-243{left:243mm}.template-y-243{top:243mm}.template-width-243{width:243mm}.template-x-244{left:244mm}.template-y-244{top:244mm}.template-width-244{width:244mm}.template-x-245{left:245mm}.template-y-245{top:245mm}.template-width-245{width:245mm}.template-x-246{left:246mm}.template-y-246{top:246mm}.template-width-246{width:246mm}.template-x-247{left:247mm}.template-y-247{top:247mm}.template-width-247{width:247mm}.template-x-248{left:248mm}.template-y-248{top:248mm}.template-width-248{width:248mm}.template-x-249{left:249mm}.template-y-249{top:249mm}.template-width-249{width:249mm}.template-x-250{left:250mm}.template-y-250{top:250mm}.template-width-250{width:250mm}.template-x-251{left:251mm}.template-y-251{top:251mm}.template-width-251{width:251mm}.template-x-252{left:252mm}.template-y-252{top:252mm}.template-width-252{width:252mm}.template-x-253{left:253mm}.template-y-253{top:253mm}.template-width-253{width:253mm}.template-x-254{left:254mm}.template-y-254{top:254mm}.template-width-254{width:254mm}.template-x-255{left:255mm}.template-y-255{top:255mm}.template-width-255{width:255mm}.template-x-256{left:256mm}.template-y-256{top:256mm}.template-width-256{width:256mm}.template-x-257{left:257mm}.template-y-257{top:257mm}.template-width-257{width:257mm}.template-x-258{left:258mm}.template-y-258{top:258mm}.template-width-258{width:258mm}.template-x-259{left:259mm}.template-y-259{top:259mm}.template-width-259{width:259mm}.template-x-260{left:260mm}.template-y-260{top:260mm}.template-width-260{width:260mm}.template-x-261{left:261mm}.template-y-261{top:261mm}.template-width-261{width:261mm}.template-x-262{left:262mm}.template-y-262{top:262mm}.template-width-262{width:262mm}.template-x-263{left:263mm}.template-y-263{top:263mm}.template-width-263{width:263mm}.template-x-264{left:264mm}.template-y-264{top:264mm}.template-width-264{width:264mm}.template-x-265{left:265mm}.template-y-265{top:265mm}.template-width-265{width:265mm}.template-x-266{left:266mm}.template-y-266{top:266mm}.template-width-266{width:266mm}.template-x-267{left:267mm}.template-y-267{top:267mm}.template-width-267{width:267mm}
.order-registration-links{display:flex;gap:8px;padding:8px 16px 16px;flex-wrap:wrap}.order-registration-links button{display:flex;flex:1;min-width:130px;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid var(--line);text-align:left}.order-registration-links span{font-size:13px}.order-registration-links strong{white-space:nowrap}

.order-tab-buttons{display:flex;align-items:center;gap:4px}.order-tabs [role="tab"]:focus-visible{outline:2px solid #fff;outline-offset:-3px}

/* Keep order identity and navigation readable on narrow screens. */
.order-ref,.order-neighbors{flex-shrink:0}
@media(max-width:700px){
  .order-tabs{flex-wrap:wrap;overflow:visible}
  .order-ref{white-space:nowrap;max-width:calc(100% - 90px);overflow:hidden;text-overflow:ellipsis}
  .order-tab-buttons{flex:0 0 100%;min-width:0;overflow-x:auto;padding-bottom:4px}
  .order-tab-buttons [role="tab"]{flex-shrink:0}
}

/* Work-order entries keep amounts and correction actions visible on phones. */
@media(max-width:600px){
.entry-table{display:block;width:100%;min-width:0!important}
.entry-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.entry-table tbody{display:grid;gap:12px;padding:12px}
.entry-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;border:1px solid var(--line);border-radius:10px;padding:14px;background:white}
.entry-table tbody td{display:block;padding:0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere;min-width:0;text-align:left!important}
.entry-table tbody td::before{content:attr(data-label);display:block;font-size:10px;font-weight:600;letter-spacing:.05em;color:var(--muted);margin-bottom:4px}
.entry-table tbody td[data-label="Beskrivning"],.entry-table tbody td.entry-actions{grid-column:1/-1}
.entry-table .entry-actions{display:flex;gap:8px;flex-wrap:wrap;padding-top:8px!important;border-top:1px solid var(--line)!important}
.entry-table .entry-actions::before{width:100%}
.entry-table .entry-actions button{min-height:44px;padding:10px 16px}
}

/* Let mobile utility controls determine their height instead of overflowing a fixed bar. */
@media(max-width:700px){
 .topbar{height:auto;min-height:58px;align-items:flex-start;flex-direction:column;gap:8px;padding:12px 16px;}
 .topbar>span{min-width:0;overflow-wrap:anywhere;}
 .topbar>div{display:flex;flex-wrap:wrap;align-items:center;gap:4px;width:100%;min-width:0;}
 .topbar .quiet{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;font-size:11px;padding:8px;overflow-wrap:anywhere;}
}

.travel-scroll-hint{display:none}.table-scroll[tabindex]:focus-visible{outline:2px solid #1688d5;outline-offset:-2px}@media(max-width:700px){.travel-scroll-hint{display:block;margin:12px 16px}}
/* Phone shell (iPhone feel): compact top bar, bottom tab bar, sheet for the remaining areas. Wide screens are unchanged. */
#mobile-shell{display:none}
@media(max-width:700px){
#workspace .sidebar{display:none}
#workspace .topbar{position:sticky;top:0;z-index:30;height:calc(44px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0;justify-content:center;background:rgba(249,249,251,.82);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-bottom:.5px solid rgba(60,60,67,.18);font-size:16px;font-weight:600;letter-spacing:0;color:#1c1c1e}
#workspace .topbar>span{font-size:0}#workspace .topbar #breadcrumb{font-size:16px}#workspace .topbar .divider{display:none}
#workspace .topbar>div{display:none}
#workspace .page{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
#mobile-shell{display:block}
.mobile-tabs{position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;padding:6px 4px calc(6px + env(safe-area-inset-bottom));background:rgba(249,249,251,.86);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);border-top:.5px solid rgba(60,60,67,.18)}
.mobile-tab{display:flex;flex-direction:column;align-items:center;gap:2px;min-height:48px;padding:4px 2px;background:transparent;color:rgba(60,60,67,.62);font-size:10px;font-weight:500;border-radius:10px}
.mobile-tab:hover{background:transparent}.mobile-tab[aria-current="page"]{color:#007aff}
.mobile-tab span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mobile-sheet-backdrop{position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.32)}
.mobile-sheet{position:fixed;left:0;right:0;bottom:0;z-index:51;background:#f2f2f7;border-radius:14px 14px 0 0;padding:8px 16px calc(20px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(0,0,0,.2);max-height:80dvh;overflow:auto}
.mobile-sheet[hidden],.mobile-sheet-backdrop[hidden]{display:none}
.mobile-sheet-grabber{width:36px;height:5px;border-radius:3px;background:rgba(120,120,128,.3);margin:0 auto 12px}
.mobile-sheet-group{background:#fff;border-radius:12px;overflow:hidden;margin-bottom:14px}
.mobile-sheet-group button{display:flex;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 16px;background:transparent;color:#1c1c1e;font-size:17px;font-weight:400;border-radius:0;border-bottom:.5px solid rgba(60,60,67,.18);text-align:left}
.mobile-sheet-group button:hover{background:rgba(120,120,128,.12)}.mobile-sheet-group button:last-child{border-bottom:0}
.mobile-sheet-group button::after{content:"›";color:rgba(60,60,67,.45);font-size:20px;line-height:1}
.preview-notice{bottom:calc(72px + env(safe-area-inset-bottom))}
}
@media print{#mobile-shell{display:none!important}}

/* Touch: a double tap never zooms the page; taps respond at once. */
html{touch-action:manipulation;-webkit-text-size-adjust:100%;text-size-adjust:100%}
button,a,summary,[role="tab"],.mobile-tab,.clickable{touch-action:manipulation;-webkit-tap-highlight-color:transparent}

/* Phone layout: lists become cards, one column, large touch targets. Wide screens keep the tables. */
@media(max-width:700px){
#workspace input,#workspace select,#workspace textarea,dialog input,dialog select,dialog textarea{font-size:16px}
.order-keyboard-help,.keyboard-help,.table-scroll-hint{display:none!important}
#content>.page-heading:first-child h1,#content .register-heading h1{font-size:22px;letter-spacing:-.01em}
.order-register>.page-heading,.order-register>header{padding:14px 16px}
.table-scroll{overflow:visible!important}
table.card-table{display:block;width:100%!important;min-width:0!important;border:0;background:transparent}
table.card-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
table.card-table tbody{display:grid;gap:10px;padding:10px 0}
table.card-table tbody tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px 14px;padding:14px 16px;background:#fff;border:.5px solid rgba(60,60,67,.18);border-radius:14px;box-shadow:0 1px 2px rgba(0,0,0,.04);position:relative}
table.card-table tbody tr[hidden]{display:none}
table.card-table tbody tr.clickable{padding-right:34px}
table.card-table tbody tr.clickable::after{content:"›";position:absolute;right:14px;top:50%;transform:translateY(-50%);color:rgba(60,60,67,.4);font-size:22px;line-height:1}
table.card-table tbody tr.clickable:active{background:#f2f2f7}
table.card-table tbody td{display:block;padding:0!important;border:0!important;min-width:0;width:auto!important;white-space:normal!important;overflow-wrap:anywhere;text-align:left!important;font-size:15px;background:transparent!important;position:static!important}
table.card-table tbody td::before{content:attr(data-label);display:block;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:rgba(60,60,67,.6);margin-bottom:2px}
table.card-table tbody td[data-label=""]::before,table.card-table tbody td:not([data-label])::before{display:none}
table.card-table tbody td.card-title{grid-column:1/-1;font-size:17px;font-weight:600;color:#1c1c1e}
table.card-table tbody td.card-title::before{display:none}
table.card-table tbody td.card-empty{display:none}
table.card-table tbody td.card-wide{grid-column:1/-1}
table.card-table tbody td button{min-height:44px}
.register-toolbar{align-items:stretch}
.register-toolbar>button,.register-toolbar>label{min-height:44px}
.panel-header{flex-wrap:wrap;gap:8px}
.panel-header button,.actions button,.row-action{min-height:44px}
dialog#editor,dialog#account-dialog{width:100vw;max-width:100vw;max-height:92dvh;margin:auto 0 0;border-radius:16px 16px 0 0;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
.dialog-actions{position:sticky;bottom:0;background:inherit;padding-top:10px}
.dialog-actions button{width:100%;min-height:48px;font-size:17px}
#message{position:sticky;top:calc(48px + env(safe-area-inset-top));z-index:20;border-radius:12px}
}
@media(max-width:700px){
.register-title{display:none}
.order-register{border-radius:14px;overflow:visible;background:transparent;border:0;box-shadow:none}
.order-register .register-toolbar{background:#fff;border-radius:14px;padding:14px;border:.5px solid rgba(60,60,67,.18)}
table.card-table tbody td{height:auto!important;max-height:none!important;overflow:visible!important;max-width:none!important;text-overflow:clip!important}
table.card-table tbody td.card-title{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
table.card-table tbody tr{gap:10px 14px}
}

/* Reading pane for documents: beside the list on wide screens, a full sheet on phones. */
.preview-pane{position:fixed;top:0;right:0;bottom:0;width:min(46vw,860px);z-index:45;display:flex;flex-direction:column;background:#fff;border-left:1px solid var(--line);box-shadow:-12px 0 32px rgba(15,35,30,.12)}
.preview-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);background:#f8faf9}
.preview-head strong{display:block;font-size:15px;overflow-wrap:anywhere}.preview-actions{display:flex;gap:6px;flex-shrink:0}
.preview-body{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;background:#eef1f0}
.preview-frame{flex:1;width:100%;min-height:60vh;border:0;background:#fff}
.preview-image{max-width:100%;height:auto;margin:16px auto;display:block;box-shadow:0 2px 12px rgba(0,0,0,.15)}
.preview-text{margin:0;padding:18px;white-space:pre-wrap;overflow-wrap:anywhere;font:13px/1.55 ui-monospace,SFMono-Regular,Menlo,monospace;background:#fff;flex:1}
.preview-note{padding:8px 16px;margin:0;background:#fff;border-top:1px solid var(--line)}
.preview-body .empty,.preview-body .error{margin:24px}
@media(min-width:701px){body.preview-open #workspace main{margin-right:min(46vw,860px)}}
@media(max-width:700px){.preview-pane{left:0;width:100vw;top:auto;height:92dvh;border-left:0;border-radius:16px 16px 0 0;z-index:60;padding-bottom:env(safe-area-inset-bottom)}.preview-head{border-radius:16px 16px 0 0}.preview-actions button{min-height:44px}}
@media print{.preview-pane{display:none!important}}

/* Outlou: three panes on wide screens (groups, list, reading), one pane at a time on phones. */
.outlou-notice{margin:0 0 14px;padding:10px 14px;border-radius:10px;background:#fff8e6;border:1px solid #f1dfa8;color:#5c4a12;font-size:13px}
.outlou-bar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.outlou-tabs{display:inline-flex;padding:3px;border-radius:10px;background:rgba(118,118,128,.14)}
.outlou-tabs button{background:transparent;color:#1c1c1e;padding:7px 18px;border-radius:8px;font-weight:500;min-height:36px}
.outlou-tabs button[aria-selected="true"]{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.14);font-weight:600}
.outlou-mail{display:grid;grid-template-columns:230px minmax(260px,340px) minmax(0,1fr);background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden;min-height:560px}
.outlou-mail.no-reading{grid-template-columns:230px minmax(0,1fr)}.outlou-mail.no-reading .outlou-reading{display:none}
.outlou-mail.no-reading.has-selection .outlou-list{display:none}.outlou-mail.no-reading.has-selection .outlou-reading{display:block}
.outlou-groups{display:flex;flex-direction:column;gap:2px;padding:10px;background:#f6f8f7;border-right:1px solid var(--line)}
.outlou-groups button{display:flex;justify-content:space-between;align-items:center;gap:8px;background:transparent;color:#1c1c1e;text-align:left;padding:9px 10px;border-radius:8px;font-weight:500;min-height:40px}
.outlou-groups button:hover{background:rgba(118,118,128,.12)}.outlou-groups button[aria-current="true"]{background:#e3effa;color:#0a5fb4;font-weight:600}
.outlou-groups b{font-weight:600;font-size:12px;color:rgba(60,60,67,.6)}
.outlou-list{border-right:1px solid var(--line);overflow:auto;max-height:76vh}
.outlou-item{display:flex;flex-direction:column;gap:3px;width:100%;text-align:left;background:#fff;color:#1c1c1e;padding:12px 14px;border-radius:0;border-bottom:1px solid var(--line);font-weight:400}
.outlou-item:hover{background:#f6f8f7}.outlou-item[aria-current="true"]{background:#e9f2fc}
.outlou-item-top{display:flex;justify-content:space-between;gap:8px}.outlou-item time{font-size:12px;color:rgba(60,60,67,.6);flex-shrink:0}
.outlou-item strong{font-weight:500}.outlou-item.unread strong,.outlou-item.unread .outlou-subject{font-weight:700}
.outlou-item.unread .outlou-item-top::before{content:"";width:8px;height:8px;border-radius:50%;background:#007aff;align-self:center;margin-right:-2px;flex-shrink:0}
.outlou-subject{font-size:14px}.outlou-item .secondary-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.outlou-reading{overflow:auto;max-height:76vh}.outlou-read{padding:22px 26px}.outlou-read h2{margin:0 0 6px;font-size:21px}
.outlou-from{margin:0 0 12px;color:rgba(60,60,67,.75);font-size:13px}.outlou-back{display:none}
.outlou-links{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.outlou-chip{display:inline-flex;gap:6px;align-items:center;padding:4px 10px;border-radius:999px;background:#eef3f1;font-size:12px;font-weight:600}
.outlou-chip em{font-style:normal;font-weight:500;color:rgba(60,60,67,.65)}
.outlou-body{line-height:1.6;font-size:15px;padding-bottom:16px;border-bottom:1px solid var(--line)}
.outlou-attachments{display:flex;flex-wrap:wrap;gap:8px;padding:12px 0}
.outlou-lou{margin-top:16px;padding:16px 18px;border-radius:12px;background:#f2f7fd;border:1px solid #d5e5f7}
.outlou-lou ol{margin:8px 0 14px;padding-left:20px;line-height:1.6}.outlou-lou p{margin:0 0 6px}
.outlou-actions{display:flex;flex-wrap:wrap;gap:8px}.outlou-empty{margin:60px 24px}
@media(max-width:1000px){.outlou-mail{grid-template-columns:200px minmax(0,1fr)}.outlou-mail .outlou-reading{display:none}.outlou-mail.has-selection .outlou-list{display:none}.outlou-mail.has-selection .outlou-reading{display:block}.outlou-back{display:inline-flex;margin-bottom:10px}}
@media(max-width:700px){
.outlou-mail,.outlou-mail.no-reading{display:block;border:0;background:transparent;min-height:0;overflow:visible}
.outlou-groups{flex-direction:row;overflow-x:auto;padding:0 0 10px;background:transparent;border:0;gap:8px;scrollbar-width:none}
.outlou-groups button{flex:0 0 auto;background:#fff;border:.5px solid rgba(60,60,67,.18);border-radius:999px;padding:8px 14px;min-height:40px;white-space:nowrap}
.outlou-groups button[aria-current="true"]{background:#007aff;color:#fff;border-color:#007aff}.outlou-groups button[aria-current="true"] b{color:#fff}
.outlou-list{border:.5px solid rgba(60,60,67,.18);border-radius:14px;overflow:hidden;max-height:none;background:#fff}
.outlou-item{padding:14px 16px;min-height:64px}.outlou-item:last-child{border-bottom:0}
.outlou-reading{max-height:none;background:#fff;border:.5px solid rgba(60,60,67,.18);border-radius:14px}
.outlou-mail.has-selection .outlou-groups{display:none}
.outlou-read{padding:16px}.outlou-back{min-height:44px}.outlou-actions button{flex:1 1 140px;min-height:46px}
.outlou-tabs{display:flex;width:100%}.outlou-tabs button{flex:1}
}
.outlou-item{position:relative}.outlou-item.unread{padding-left:26px}.outlou-item.unread .outlou-item-top::before{position:absolute;left:10px;top:18px;margin:0}
@media(max-width:700px){#content>.page-heading .eyebrow,#content>.page-heading p{display:none}#content>.page-heading{margin-bottom:10px}.outlou-item.unread{padding-left:30px}}
