:root{font-family:Inter,system-ui,sans-serif;color:#163131;background:#f4f7f6;font-size:15px}*{box-sizing:border-box}body{margin:0}header{background:#fff;border-bottom:1px solid #e0e9e5;padding:20px max(24px,calc((100vw - 1240px)/2));display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{font-size:32px;font-weight:850;color:#147859;text-decoration:none;letter-spacing:-1.5px}.brand span{display:block;font-size:11px;letter-spacing:1.6px;text-transform:uppercase;color:#607873;margin-top:2px}main{max-width:1240px;margin:34px auto;padding:0 24px}h1{font-size:29px;margin:0 0 8px}h2{font-size:19px;margin:0 0 20px}p{line-height:1.5;color:#59716c}button,input,select,textarea{font:inherit}button{border:1px solid #d1ded8;border-radius:8px;background:#fff;padding:10px 15px;color:#23493c;cursor:pointer}button:hover{background:#eaf4ef}button.primary{background:#127956;color:#fff;border-color:#127956}button.danger{color:#a72e32}button:disabled{opacity:.5;cursor:wait}input:not([type=checkbox]),select,textarea{border:1px solid #cbdad3;border-radius:7px;padding:11px;width:100%;background:#fff;color:#193a2d}label{display:block;font-weight:600;font-size:13px}label input,label select{margin-top:7px}input[type=checkbox]{accent-color:#127956;width:17px;height:17px;vertical-align:middle}small{color:#637970}fieldset{border:1px solid #d9e4df;border-radius:9px;padding:16px;margin:20px 0}legend{font-weight:700;font-size:13px}.card{background:#fff;border:1px solid #e0e8e4;border-radius:13px;padding:25px;box-shadow:0 5px 20px #193e2710}.login{max-width:440px;margin:50px auto}.login label{margin:20px 0}.login button{width:100%}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0;flex-wrap:wrap}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:26px 0}.tabs .selected{background:#143b30;color:white}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:25px 0}.stat{font-size:28px;font-weight:800}.stat span{display:block;font-size:12px;color:#677b71;font-weight:500;margin-top:6px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;white-space:nowrap}th,td{text-align:left;padding:13px 12px;border-bottom:1px solid #e6ede8;font-size:13px}th{color:#647971;text-transform:uppercase;letter-spacing:.6px;font-size:10px}tbody tr:nth-child(even){background:#f7faf8}.badge{border-radius:20px;background:#e6f5ed;color:#12623c;font-size:11px;font-weight:700;padding:5px 9px;display:inline-block}.badge.off{background:#fbe9e9;color:#923939}.actions{display:flex;gap:7px}.actions button{padding:6px 10px;font-size:12px}.hint{background:#edf5f0;border-radius:8px;padding:13px;font-size:13px}.checklist{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.checklist label{font-weight:400}.permission-table th:not(:first-child),.permission-table td:not(:first-child){text-align:center}#notice:not(:empty){padding:13px 16px;border-radius:8px;background:#ffece7;color:#9c3329;margin-bottom:20px}#notice.success{background:#e0f3e7;color:#185735}.empty{text-align:center;padding:40px;color:#6b8075}.module-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.module-grid h2{margin-bottom:8px}footer{max-width:1240px;margin:45px auto;padding:0 24px;color:#84948d;font-size:11px}.identity{display:flex;gap:16px;align-items:center;font-size:13px}.identity small{display:block}.stack{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.search{max-width:320px}.audit-detail{max-width:500px;white-space:normal;word-break:break-word;font-size:11px}details summary{cursor:pointer}dialog{border:0;border-radius:14px;width:min(840px,94vw);max-height:90vh;padding:25px;box-shadow:0 10px 80px #0003}dialog::backdrop{background:#12322875}@media(max-width:720px){main{padding:0 14px;margin:24px auto}.grid,.module-grid,.checklist{grid-template-columns:1fr}.stats{gap:8px}.card{padding:18px}header{padding:15px}.identity{gap:8px}.identity small{display:none}.brand{font-size:26px}h1{font-size:24px}}

textarea{margin-top:7px;resize:vertical}.source-record{white-space:pre-wrap;word-break:break-word;font-size:12px;max-height:250px;overflow:auto}

.portal-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.tabs{overflow-x:auto;flex-wrap:nowrap}.tabs button{white-space:nowrap}.filter-bar{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin:20px 0}.filter-bar label{min-width:160px;flex:1}.grow{flex:1;min-width:220px}.short-input{width:110px;min-width:80px}.total{font-size:1.15rem;font-weight:700;text-align:right}.text-danger{color:#9a2222}.pre-wrap{white-space:pre-wrap}.visit-detail{border:1px solid #dbe4e1;border-radius:12px;padding:18px;margin:16px 0}.media-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin:16px 0}.media-grid figure{margin:0}.media-grid img,.media-grid video{max-width:100%;max-height:220px;border-radius:8px}.media-grid figcaption{font-size:.75rem;overflow-wrap:anywhere}#print-area{display:none}dialog{width:min(1050px,95vw)}small{overflow-wrap:anywhere}
.module-heading h2{margin-bottom:4px}.module-heading p{margin:0}.subtabs{display:flex;gap:8px;overflow-x:auto;padding:2px 0 12px;margin:18px 0 22px;border-bottom:1px solid #d9e4df;scrollbar-width:thin}.subtabs button{flex:none;white-space:nowrap;border-radius:8px}.subtabs button.selected{background:#143b30;color:#fff;border-color:#143b30}.module-pending{margin-top:18px}.module-link{display:inline-block;margin-top:8px;color:#116347;font-weight:700}.module-link:focus-visible,.subtabs button:focus-visible{outline:3px solid #4aac83;outline-offset:2px}
@media(max-width:640px){.portal-heading{align-items:flex-start}.portal-heading h1{font-size:1.55rem}.filter-bar{display:grid;grid-template-columns:1fr 1fr}.filter-bar label{min-width:0}.toolbar{align-items:stretch}.grow{min-width:180px}.stack{flex-wrap:wrap}.short-input{width:85px}dialog{padding:16px}}
@media print{body>header,body>main,body>footer,dialog{display:none!important}#print-area{display:block!important;margin:0;padding:0;color:#000;font-size:10pt}#print-area table{width:100%;border-collapse:collapse}#print-area td,#print-area th{padding:4px 6px;border-bottom:1px solid #ddd}#print-area tr:nth-child(even){background:#f5f5f5!important;print-color-adjust:exact}#print-area input,#print-area button,#print-area label,#print-area [data-upload-status]{display:none}#print-area .visit-detail{break-inside:avoid}#print-area h1{font-size:16pt}}

/* Keep item editors inside their cells and scroll wide tables within the form. */
dialog fieldset{min-inline-size:0}
#order-items,#receipt-items{min-width:0;max-width:100%}
#order-items .table-wrap,#receipt-items .table-wrap{width:100%;max-width:100%}
.item-editor-table{table-layout:fixed;white-space:normal}
.item-editor-table th,.item-editor-table td{vertical-align:top;overflow-wrap:anywhere}
.item-editor-table input,.item-editor-table .short-input{display:block;width:100%;min-width:0;max-width:100%}
.item-editor-table input+input,.item-editor-table input+button{margin-top:8px}
.item-editor-table button{max-width:100%;white-space:normal;overflow-wrap:anywhere;padding:8px 10px;font-size:12px}
.item-editor-table small{display:block;white-space:normal;margin-top:6px}
.order-item-table{min-width:860px}
.order-item-table .product-col{width:32%}
.order-item-table .unit-col{width:9%}
.order-item-table .quantity-col{width:13%}
.order-item-table .price-col{width:16%}
.order-item-table .total-col{width:19%}
.order-item-table .action-col{width:11%}
.receipt-item-table{min-width:980px}
.receipt-item-table .product-col{width:30%}
.receipt-item-table .unit-col{width:8%}
.receipt-item-table .planned-col{width:14%}
.receipt-item-table .quantity-col{width:14%}
.receipt-item-table .price-col{width:13%}
.receipt-item-table .total-col{width:10%}
.receipt-item-table .action-col{width:11%}
.inventory-units{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:16px 0}.inventory-unit{text-align:left;display:flex;flex-direction:column;gap:8px;width:100%;white-space:normal}.report-conference{padding:16px;border:1px solid var(--border,#d5dbe5);border-radius:10px;margin:12px 0}.report-conference input{min-width:85px;max-width:160px}

/* The report document is shared by the screen, detailed PDF and summary PDF. */
.report-document{font-family:Arial,sans-serif;background:#fff;color:#111;border:1px solid #ddd;border-radius:8px;padding:18px;margin:16px 0}
.report-heading{padding:0 0 10px;margin:0 0 14px;background:transparent;border:0;border-bottom:2px solid #f97316;align-items:end;gap:12px}
.report-heading strong{color:#ea580c;font-size:22px;letter-spacing:-.5px}.report-heading h1{font-size:19px;margin:3px 0 0;color:#111}.report-heading small{text-align:right;font-size:11px;color:#666}
.report-summary{display:grid;grid-template-columns:1.6fr repeat(4,1fr) 1.1fr;border:1px solid #ddd;margin:10px 0 16px;background:#fafafa}
.report-summary>div{padding:9px 10px;border-right:1px solid #ddd;min-width:0}.report-summary>div:last-child{border:0}.report-summary span{display:block;color:#666;font-size:9px;text-transform:uppercase;line-height:1.3;margin-bottom:5px}.report-summary b{display:block;font-size:13px;overflow-wrap:anywhere}.report-summary .report-total{background:#fff7ed;color:#c2410c}
.report-document h2{font-size:16px;margin:18px 0 8px;color:#111}.report-document h3{font-size:12px;margin:12px 0 6px;color:#111}.report-document table{white-space:normal;table-layout:fixed;min-width:600px;color:#111}.report-document .report-visits{min-width:800px}.report-document th,.report-document td{padding:5px 6px;border:1px solid #ddd;font-size:11px;vertical-align:top;overflow-wrap:anywhere;letter-spacing:0;text-transform:none;color:#111}.report-document th{background:#fafafa;font-size:10px}.report-document small{display:block;font-size:9px;line-height:1.35;color:#666;margin-top:3px}.report-document td a{color:#c2410c;overflow-wrap:anywhere}.report-document tr:nth-child(even){background:#fff}.report-document tr.report-observation{background:#fcfcfc}.report-document .report-units th:first-child{width:28%}.report-detail>h3{padding:5px;background:#f5f5f4;border:1px solid #ddd}.report-notes{border:1px solid #ddd;padding:6px}.report-document p{color:#333;font-size:11px;line-height:1.4}.report-subtotal{font-size:12px;background:#fff7ed;padding:8px;color:#9a3412}.report-footnote{font-size:10px!important;margin:14px 0 0}.report-extras{margin:16px 0}.report-travel-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:16px 0}#report-visits label>button{margin-top:6px;padding:7px 10px;font-size:12px}#report-edit-totals .report-summary{margin-bottom:10px}
@media(max-width:700px){.report-document{padding:12px}.report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.report-summary>div{border-bottom:1px solid #ddd}.report-heading{align-items:start;flex-direction:column}.report-heading small{text-align:left}.report-travel-fields{grid-template-columns:1fr}}
@page reportpage{size:A4 portrait;margin:6mm}
@media print{
 body.printing-report{background:#fff}.printing-report #print-area{page:reportpage;font-family:Arial,sans-serif;font-size:8pt}
 #print-area .report-document{border:0;border-radius:0;padding:0;margin:0;font-size:8pt}
 #print-area .report-heading{display:flex;padding:0 0 3mm;margin:0 0 2mm;flex-direction:row;align-items:end}
 #print-area .report-heading strong{font-size:12pt}#print-area .report-heading h1{font-size:12pt}#print-area .report-heading small{font-size:7pt;text-align:right}
 #print-area .report-summary{grid-template-columns:1.6fr repeat(4,1fr) 1.1fr;margin:2mm 0 3mm;break-inside:avoid}
 #print-area .report-summary>div{padding:4px 5px}#print-area .report-summary span{font-size:6pt}#print-area .report-summary b{font-size:8pt}#print-area .report-summary .report-total{background:#fff7ed!important;print-color-adjust:exact}
 #print-area .report-employee+.report-employee{break-before:page}#print-area .report-document h2{font-size:10pt;margin:3mm 0 1mm}#print-area .report-document h3{font-size:8pt;margin:2mm 0 1mm;break-after:avoid}
 #print-area .report-document .table-wrap{overflow:visible}#print-area .report-document table{min-width:0;width:100%;table-layout:fixed;white-space:normal;margin:0}
 #print-area .report-document td,#print-area .report-document th{padding:3px 4px;border:1px solid #ddd;font-size:7pt;overflow-wrap:anywhere}
 #print-area .report-document th{font-size:6.5pt;background:#fafafa!important;print-color-adjust:exact}#print-area .report-document thead{display:table-header-group}#print-area .report-document tfoot{display:table-row-group}#print-area .report-document tr{break-inside:avoid}#print-area .report-observation{break-before:avoid;background:#fcfcfc!important}
 #print-area .report-document small{font-size:6pt}#print-area .report-document p{font-size:7pt}#print-area .report-document .report-subtotal{background:#fff7ed!important;print-color-adjust:exact;break-before:avoid;padding:4px;margin:4px 0 6px}#print-area .report-footnote{font-size:6.5pt!important}
}

.report-col-index{width:4%}.report-col-unit{width:20%}.report-col-clock{width:8%}.report-col-activity{width:9%}.report-col-travel{width:10%}.report-col-service{width:15%}.report-col-media{width:26%}

.order-report-suppliers{display:flex;flex-wrap:wrap;gap:10px 18px;max-height:150px;overflow:auto}
.order-report-suppliers label{font-weight:400;white-space:nowrap}
.order-report-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}
.order-report-summary>div{border:1px solid #dce5df;border-radius:8px;padding:10px;background:#f5faf6}
.order-report-summary span{display:block;font-size:11px;color:#637970}.order-report-summary strong{display:block;margin-top:4px}
.order-report-group{border-top:1px solid #dce5df;margin:14px 0;padding-top:10px}
.order-report-group h3{margin:3px 0 8px}.order-report-group h3 small{font-weight:400;margin-left:8px}
.order-report-entry{border:1px solid #dce5df;padding:8px 10px;margin:8px 0;border-radius:6px}
.order-report-entry p{margin:5px 0;overflow-wrap:anywhere}
.order-report table{white-space:normal}
@media(max-width:640px){.order-report-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{#print-area .order-report-group{break-inside:auto}#print-area .order-report-entry{break-inside:avoid}#print-area .order-report-summary{grid-template-columns:repeat(4,minmax(0,1fr));break-inside:avoid}}

.crm-quote-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(240px,1fr);gap:16px}.crm-quote-layout .card{min-width:0}.crm-quote-layout label{margin:14px 0}.crm-quote-button{display:block;text-align:left;width:100%;white-space:normal;margin:8px 0}.crm-quote-button small{display:block;margin-top:5px}.stats .card{min-width:0;overflow-wrap:anywhere}@media(max-width:720px){.crm-quote-layout,.stats{grid-template-columns:1fr}}
