
:root{font-family:Arial,sans-serif;color:#213247;background:#eef2f6}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}.top{height:58px;background:#fff;border-bottom:1px solid #ccd6e1;display:flex;align-items:center;gap:26px;padding:0 22px;position:sticky;top:0;z-index:5}.logo{font-weight:800;font-size:22px;color:#00749c}.nav{display:flex;gap:4px}.nav button{border:0;background:transparent;color:#33485e;padding:13px 12px}.nav button:hover,.nav button.active{background:#eaf4f8;color:#006887}.company{margin-left:auto;font-size:13px}.shell{display:grid;grid-template-columns:196px minmax(0,1fr);min-height:calc(100vh - 58px)}aside{background:#e2e9f1;border-right:1px solid #c7d2de;padding:19px 10px}aside h4{margin:11px 11px 7px;font-size:11px;text-transform:uppercase;letter-spacing:.1em;color:#6a7c8b}aside button{display:block;width:100%;text-align:left;padding:11px 13px;margin:3px 0;border:0;background:transparent;border-radius:5px;color:#33475d}aside button.active{background:#fff;color:#00698b;font-weight:700;border-left:3px solid #007fa7}main{padding:22px 26px;min-width:0}.heading{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap}.heading h1{font-size:23px;margin:0}.hint{color:#657789;font-size:13px;margin:7px 0 18px}.actions{display:flex;gap:9px;flex-wrap:wrap}.btn{border:1px solid #abc3d0;background:#fff;color:#00698b;border-radius:4px;padding:9px 12px}.btn.primary{background:#007fa7;border-color:#007fa7;color:#fff}.btn:disabled{opacity:.45;cursor:not-allowed}.panel{background:white;border:1px solid #cbd5df;margin-top:14px}.toolbar{padding:12px 14px;border-bottom:1px solid #d6e0e9;display:flex;gap:9px;align-items:center;flex-wrap:wrap}.toolbar input,.toolbar select{border:1px solid #bccbd9;border-radius:3px;padding:8px;background:#fff}.toolbar input{width:300px;max-width:100%}.toolbar .right{margin-left:auto}.scroll{overflow:auto}.table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px}.table th{text-align:left;background:#e7edf3;font-size:12px;padding:10px;border-right:1px solid #d3dde6}.table td{padding:10px;border-top:1px solid #e1e7ed;border-right:1px solid #eef1f4}.table tbody tr{cursor:pointer}.table tbody tr:hover{background:#f3f9fc}.table tbody tr.selected{background:#d9f1fa}.num{text-align:right}.badge{border-radius:20px;padding:4px 8px;background:#fff3d9;color:#815300;font-size:11px}.badge.paid{background:#e5f5ec;color:#177646}.badge.partial{background:#e8efff;color:#245baf}.detail-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px}.detail-head strong{font-size:15px}.detail-actions{display:flex;gap:7px;flex-wrap:wrap}.total{padding:13px 17px;border-top:1px solid #d8e0e8;text-align:right;font-weight:700}.empty{padding:30px;color:#60758a}.notice{padding:10px 12px;background:#fff8e6;border:1px solid #e6d79e;border-radius:4px;margin-top:15px;font-size:13px}.menu{display:none;position:absolute;top:52px;left:170px;background:#fff;border:1px solid #cbd5df;box-shadow:0 8px 22px #22334424;min-width:230px;padding:7px;z-index:9}.menu.show{display:block}.menu button{display:block;width:100%;text-align:left;background:none;border:0;padding:10px;color:#33485e}.menu button:hover{background:#edf6fa}@media(max-width:760px){.shell{grid-template-columns:1fr}aside{display:flex;overflow:auto;padding:5px}aside h4{display:none}aside button{white-space:nowrap;width:auto}main{padding:16px}.company{display:none}.nav{display:none}}
.menu{max-height:calc(100vh - 70px);overflow-y:auto;min-width:270px}.menu button{font-size:14px}.menu button small{display:block;font-size:11px;color:#738394}.menu button[aria-current="page"]{background:#e7f4fa}.top .nav{flex-wrap:nowrap}.top{height:auto;min-height:58px;flex-wrap:wrap;gap:12px}.nav{overflow-x:auto}.table{font-size:14px}.table th{font-size:13px}.detail-head{flex-wrap:wrap}.workspace-placeholder{background:white;border:1px solid #cbd5df;padding:28px;margin-top:14px}dialog{border:1px solid #bbcbd6;border-radius:7px;width:min(1060px,94vw);padding:22px}dialog::backdrop{background:#15283d70}.fields{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.fields label{display:flex;flex-direction:column;gap:6px}.fields input,.editor-table input{border:1px solid #b8c9d6;padding:8px;width:100%;min-width:70px}.editor-table{margin:20px 0}.editor-table td:nth-child(2){min-width:220px}.dialog-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:15px}.menu button:hover{background:#edf6fa}.print-hint{color:#667b8e;font-size:13px}@media(max-width:760px){.top .nav{display:flex;width:100%}.fields{grid-template-columns:1fr}.company{display:none}}  .config-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}.config-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.config-grid label{display:flex;flex-direction:column;gap:7px;font-size:13px}.config-grid input,.config-grid select{padding:9px;border:1px solid #b8c9d6;width:100%;background:white}.config-section{margin:22px 0}.config-feedback{color:#177646;margin-left:15px}.config-summary{background:#edf4f8;padding:12px;margin:15px 0}.config-search{padding:9px;width:320px;max-width:100%;margin-bottom:12px} 
[hidden]{display:none!important}body{font-family:Arial,sans-serif}button{border:1px solid #acc1cf;background:white;padding:9px 12px;border-radius:4px;color:#075b7b;cursor:pointer}button.primary{background:#007fa7;color:white;border-color:#007fa7}button:disabled{opacity:.5;cursor:wait}input,select,textarea{font:inherit;padding:8px;border:1px solid #b7c7d4;border-radius:3px}label{display:flex;flex-direction:column;gap:6px;font-size:13px}textarea{width:100%;min-height:65px}.top #identity{margin-left:auto;font-size:12px}.top nav{display:flex;gap:4px}.top nav button{border:0;background:transparent}.top{z-index:8}.top #menu{position:absolute;top:100%;background:white;box-shadow:0 10px 25px #15283d30;max-height:70vh;overflow:auto;width:280px;padding:7px}.top #menu button{display:block;width:100%;text-align:left;border:0}.login{max-width:420px;background:white;margin:8vh auto;padding:30px;border:1px solid #ccd7e0}.login form{display:grid;gap:15px}.login h1{font-size:22px}.login p{font-size:13px;color:#62788b}#feedback{position:fixed;top:65px;right:20px;z-index:100;background:#fff3cf;border:1px solid #cbb16a;padding:14px;max-width:550px;box-shadow:0 3px 18px #15283d30}aside small{display:block;padding:10px;color:#607687;font-size:11px}dialog{max-height:92vh;overflow:auto;width:min(950px,96vw)}dialog.wide{width:min(1500px,98vw)}dialog footer{display:flex;gap:10px;align-items:center;justify-content:flex-end;margin-top:20px}.test-banner{font-size:12px;padding:9px 12px;background:#fff5db;border:1px solid #e8d8a6;margin-bottom:18px}.fields{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));align-items:end}.fields button{height:36px}.line-editor{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap;margin:14px 0}.line-editor th{background:#e7edf3;text-align:left;padding:9px}.line-editor td{padding:5px;border-bottom:1px solid #d7e1e9}.line-editor input{width:95px;font-size:13px}.line-editor input[data-key=sku]{width:135px}.line-editor input[data-key=name]{width:260px}.line-editor input[data-key=um]{width:60px}.line-editor button{padding:7px}.lookup{border:1px solid #a9cad9;background:#eff7fb;padding:15px;margin:20px 0}.search-grid{display:grid;grid-template-columns:180px minmax(250px,1fr) 90px;gap:10px;align-items:end;margin-top:12px}.lookup .table{white-space:normal}.lookup .table td:nth-child(2){min-width:240px}.lookup input[type=number]{width:95px}.pagination{display:flex;align-items:center;gap:12px;padding:12px}.empty{padding:22px}.settings form{display:grid;gap:20px}.status-cancelled{color:#a33}.status-issued{color:#177646}.status-draft{color:#805000}.panel-title{padding:16px}.client-actions{display:flex;gap:5px}.heading{margin-bottom:15px}.total{font-size:14px}.detail-actions{padding:12px}.toolbar .grow{flex:1}.hint{margin:10px 0}.line-editor .row-total{min-width:90px;text-align:right}.account{max-width:500px;padding:22px}.account form{display:grid;gap:15px}.print-page{background:white;color:#111;padding:24px}.print-page .paper{max-width:1100px;margin:auto}.print-page table{width:100%;border-collapse:collapse;font-size:12px}.print-page th,.print-page td{border:1px solid #ccc;padding:7px}.print-page .parties{display:grid;grid-template-columns:1fr 1fr;gap:30px}.print-page .sums{text-align:right;line-height:1.7}.print-page h1{font-size:24px}.print-page .print-actions{margin:0 auto 25px;max-width:1100px}.print-page .paper-note{border:1px solid #dcbd67;padding:10px;margin:18px 0;font-size:12px}.print-page address{font-style:normal;line-height:1.6}@media print{.print-actions{display:none}.print-page{padding:0}.print-page th{background:#eee}tr{break-inside:avoid}thead{display:table-header-group}.paper-note{color:#111}}@media(max-width:760px){.top nav{overflow:auto;width:100%}.top #identity{display:none}.fields{grid-template-columns:1fr 1fr}.search-grid{grid-template-columns:1fr}.line-editor input[data-key=name]{width:200px}.print-page .parties{grid-template-columns:1fr}.shell{display:block}aside{display:flex;overflow:auto}aside small{display:none}aside button{width:auto;white-space:nowrap}.toolbar input{width:100%}}
#client-dialog{width:min(1200px,94vw);max-width:1200px;max-height:92vh;overflow:auto}#client-form h3{border-bottom:1px solid #d9e3ea;padding-bottom:8px;margin:20px 0 12px}#client-dialog .client-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}#client-dialog .client-wide{grid-column:span 2}#client-dialog input{width:100%;box-sizing:border-box;min-height:40px}#client-dialog footer{position:sticky;bottom:0;background:white;padding-top:12px}@media(max-width:700px){#client-dialog .client-fields{grid-template-columns:1fr}#client-dialog .client-wide{grid-column:auto}}

/* Editor comanda WEB: toate actiunile vizibile pe desktop. */
#web-order-editor{width:98vw;max-width:1900px;max-height:94vh;padding:18px}
#web-order-editor #web-edit-lines{font-size:13px}
#web-order-editor .scroll:has(#web-edit-lines) .table{table-layout:fixed;min-width:1100px;white-space:normal}
#web-order-editor .scroll:has(#web-edit-lines) th,#web-order-editor #web-edit-lines td{padding:7px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(1){width:120px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(3){width:45px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(4){width:85px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(5),#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(6){width:110px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(7){width:90px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(8){width:60px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(9){width:115px}
#web-order-editor .scroll:has(#web-edit-lines) th:nth-child(10){width:85px}
#web-order-editor #web-edit-lines td:nth-child(1),#web-order-editor #web-edit-lines td:nth-child(2){overflow-wrap:anywhere}
#web-order-editor #web-edit-lines input{width:100%;min-width:0;padding:7px 5px;font-size:13px}
#web-order-editor [data-remove-web]{padding:7px 8px}
#web-order-editor footer{position:sticky;bottom:-18px;background:white;padding:12px 0;margin-top:10px}

.rights-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin:16px 0}.check{display:flex;align-items:center;gap:8px}.check input{width:auto}.settings .toolbar{margin-bottom:20px}#user-edit{margin-top:24px;border-top:1px solid #ddd;padding-top:16px}

#shell aside{display:block;overflow:auto;max-height:calc(100vh - 70px);position:sticky;top:70px;align-self:start}.nav-branch{padding:4px 0;border-bottom:1px solid #cad5df}.nav-branch summary{padding:10px 8px;font-weight:600;cursor:pointer;line-height:1.35}.nav-branch .nav-branch{margin-left:10px;border:0}.nav-branch button{white-space:normal;line-height:1.35;font-size:13px}.nav-caption{font-size:11px;color:#587389;padding:10px}.nav-state{display:block;font-size:10px;color:#7c8491;margin-top:3px}#menu{width:330px;max-height:calc(100vh - 85px);overflow:auto}#menu button{text-align:left;display:block;width:100%;white-space:normal}#menu .nav-branch{padding:3px 6px}.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.module-card{text-align:left;padding:18px;display:flex;flex-direction:column;gap:10px;min-height:100px}.module-card small{line-height:1.6;color:#60758a}.module-notice{padding:18px;background:#fff5df;border:1px solid #e3d2a2;margin:15px 0}#nom-edit{margin-top:20px}@media(max-width:760px){#shell aside{position:static;max-height:320px}.module-grid{grid-template-columns:1fr}#menu{max-width:92vw}}

/* Actiuni comune, independente de tema aleasa. */
html body button[data-etd-tone][data-etd-tone][data-etd-tone="green"],html body a[data-etd-tone][data-etd-tone][data-etd-tone="green"],html body .print-actions button{background:#18864b!important;color:#fff!important;border-color:#126c3b!important;background-image:none!important}
html body button[data-etd-tone][data-etd-tone][data-etd-tone="red"],html body a[data-etd-tone][data-etd-tone][data-etd-tone="red"]{background:#c03938!important;color:#fff!important;border-color:#a72e2d!important;background-image:none!important}
html body [data-etd-tone]:hover{filter:brightness(.93)}

html body button[data-etd-tone][data-etd-tone][data-etd-tone="whatsapp"],html body a[data-etd-tone][data-etd-tone][data-etd-tone="whatsapp"]{background:#25d366!important;color:#073d24!important;border-color:#1cb957!important;background-image:none!important}
html body [data-etd-tone][data-etd-tone][data-etd-tone] .sg-ico{stroke:currentColor!important;color:inherit!important}

/* Direct selectors keep primary actions coloured even before observer classification. */
html body :is(#sg-print,#op-print,#pd-print,#pd-nir-sku,#pd-nir-no){background:#18864b!important;color:#fff!important;border-color:#126c3b!important}
html body :is(#sg-mail,#pd-mail){background:#c03938!important;color:#fff!important;border-color:#a72e2d!important}
html body :is(#sg-wa,#pd-wa){background:#25d366!important;color:#073d24!important;border-color:#1cb957!important}
html body :is(#sg-print,#op-print,#pd-print,#pd-nir-sku,#pd-nir-no,#sg-mail,#pd-mail,#sg-wa,#pd-wa) .sg-ico{stroke:currentColor!important;color:inherit!important}
html body #sg-bottom #op-pay{background:#1565c0!important;color:#fff!important;border-color:#0d4f9c!important}
html body #sg-bottom #op-fiscal{background:#6a1b9a!important;color:#fff!important;border-color:#561580!important}
html body #sg-bottom #op-dp{background:#e65100!important;color:#fff!important;border-color:#bf4300!important}
html body #sg-bottom :is(#op-pay,#op-fiscal,#op-dp) :is(span,u,b){color:#fff!important}
html body #sg-bottom :is(#op-pay,#op-fiscal,#op-dp) .sg-ico{stroke:currentColor!important;color:inherit!important;background:transparent!important;border-color:transparent!important}

/* Informational messages stay below the workspace and never capture clicks. */
@media screen{html body #feedback{position:fixed;top:auto!important;bottom:52px;right:16px;left:auto;max-width:min(550px,calc(100vw - 32px));max-height:25vh;overflow:hidden;pointer-events:none!important;overflow-wrap:anywhere;z-index:100}}
@media print{#feedback{display:none!important}}

/* Denumiri complete in selectorul de produse din documente. */
.sg-picker.sg-product-picker .opt:not(.head):not(.msg){align-items:start;white-space:normal;line-height:1.4;min-height:34px}
.sg-picker.sg-product-picker .opt:not(.head) span.c1{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
.sg-picker.sg-product-picker .opt span{min-width:0}
.sg-picker.sg-product-picker .opt span.n{white-space:nowrap}
.sg-picker.sg-product-picker .opt:not(.head) span.c0{white-space:normal;overflow-wrap:anywhere}

/* Mesaj complet sub lista e-Facturi, in afara derularii orizontale. */
#ef-screen .ef-body>.ef-genwrap{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
#ef-screen .ef-genwrap>.ef-grid{flex:1;min-height:120px;height:auto}
#ef-screen .ef-selected-errors{flex:none;min-height:66px;max-height:180px;overflow:auto;padding:9px 12px;border-top:1px solid #bbb;background:#fff;color:#111;font-size:13px;line-height:1.45;white-space:normal;overflow-wrap:anywhere}
#ef-screen .ef-selected-errors.has-error{border-top:2px solid #ad4036;background:#fff5f3}
#ef-screen .ef-selected-errors p{margin:4px 0}
#ef-screen .ef-selected-errors ul{margin:6px 0;padding-left:20px}
#ef-screen .ef-error-text{white-space:pre-wrap;margin-top:5px}
#ef-screen .ef-genwrap>.ef-grid{flex:none;height:max(260px,min(650px,calc(100vh - 330px)))}
#ef-screen .ef-grid.half{height:max(260px,min(650px,calc(100vh - 330px)))}
