:root{--navy:#173653;--navy2:#214b70;--green:#1d8959;--green2:#147247;--bg:#edf2f6;--surface:#fff;--line:#dce4ea;--muted:#647383;--text:#233241;--input:#eaf7f0;--danger:#b63c35;--shadow:0 18px 50px rgba(24,50,76,.12)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:"Segoe UI",Arial,sans-serif;color:var(--text);background:var(--bg)}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}.hidden{display:none!important}
.topbar{height:112px;background:linear-gradient(120deg,var(--navy),#1a4268);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:14px 34px;box-shadow:0 3px 16px rgba(19,43,66,.18)}
.brand{display:flex;align-items:center;gap:22px}.brand img{width:102px;height:78px;object-fit:contain;filter:brightness(0) invert(1)}.brand h1{font-size:27px;margin:0 0 7px;letter-spacing:.2px}.brand p{margin:0;color:#d9e8f4;font-size:15px}.user-area{display:flex;align-items:center;gap:18px;font-weight:600}.live{display:inline-flex;align-items:center;gap:7px;background:rgba(255,255,255,.1);padding:8px 12px;border-radius:999px;font-size:13px}.live i{width:9px;height:9px;background:#4ce295;border-radius:50%;box-shadow:0 0 0 4px rgba(76,226,149,.13)}.live.offline i{background:#ef8b83}
.workspace{padding:24px 30px 34px;max-width:1750px;margin:auto}.panel{background:var(--surface);border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.toolbar{min-height:74px;display:flex;align-items:center;gap:16px;padding:13px 20px;border-bottom:1px solid var(--line);background:#f8fafc}.toolbar label,.production-controls label{display:flex;align-items:center;gap:10px;font-weight:650}.toolbar input,.production-controls input,.production-controls select{height:42px;border:1px solid #bfcbd5;border-radius:7px;padding:0 12px;background:#fff}.toolbar input{width:175px}.tabs{display:flex;border:1px solid #b8c7d3;border-radius:8px;overflow:hidden;margin-left:12px}.tabs button{border:0;background:#fff;padding:10px 20px}.tabs button.active{background:var(--navy2);color:#fff}.sync-notice{margin-left:auto;color:#9d6416;font-weight:600}
.production-controls{display:grid;grid-template-columns:minmax(250px,1.15fr) minmax(205px,.85fr) minmax(295px,1.3fr) minmax(180px,.75fr) minmax(180px,.75fr);align-items:center;gap:14px;padding:15px 20px;background:#f4f9f6;border-bottom:1px solid #d8e9df}.production-controls label{justify-content:space-between;white-space:nowrap}.production-controls select{min-width:150px}.production-controls input{width:105px}.production-controls p{margin:0;color:#54705e}
.table-wrap{overflow:auto;max-height:calc(100vh - 310px)}table{width:100%;border-collapse:separate;border-spacing:0}th{position:sticky;top:0;z-index:2;background:#e8eef3;color:#19344e;text-align:left;padding:14px 13px;border-bottom:1px solid #aab9c5;font-size:14px}td{padding:8px 13px;border-bottom:1px solid var(--line);height:48px}tbody tr:hover td{background:#f7fafc}td.name{font-weight:650;min-width:230px}td.readonly{background:#f7f9fb;text-align:center}td.editable{padding:5px 8px;background:var(--input)}td.editable input{width:100%;height:37px;border:1px solid #a8cbbb;border-radius:6px;padding:0 10px;text-align:center;font-weight:700;background:#fff;color:#144a33}td.weight{color:#50677a}.muted{color:#9ca7af}.panel-footer{display:flex;align-items:center;justify-content:flex-end;gap:20px;min-height:74px;padding:12px 20px;border-top:1px solid var(--line)}.panel-footer .message{margin-right:auto}
button.primary,button.secondary,.owner-links a{border-radius:7px;padding:10px 20px;font-weight:700;text-decoration:none}button.primary{background:var(--green);color:#fff;border:1px solid var(--green)}button.primary:hover{background:var(--green2)}button.secondary,.owner-links a{background:#fff;color:var(--navy);border:1px solid #99adbd}button.secondary:hover,.owner-links a:hover{background:#edf3f7}.wide{width:100%;height:46px}.message{padding:9px 13px;border-radius:7px;background:#e9f7ef;color:#126641;font-weight:600}.message.error{background:#fff0ee;color:var(--danger)}
.login-page{display:grid;place-items:center;min-height:100vh;background:radial-gradient(circle at 20% 20%,#2e628e 0,#173653 43%,#10283d 100%);padding:24px}.login-card{width:min(520px,100%);background:#fff;border-radius:18px;box-shadow:0 30px 80px rgba(0,0,0,.3);padding:34px}.brand-login{margin-bottom:28px}.brand-login img{filter:none;width:95px;height:70px}.brand-login h1{color:var(--navy);font-size:23px}.brand-login p{color:var(--muted);font-size:14px}.login-card form>label:not(.remember){display:block;font-weight:650;margin:15px 0}.login-card input[type=text],.login-card input[type=password],.login-card input:not([type]){width:100%;height:46px;border:1px solid #b7c4ce;border-radius:8px;padding:0 13px;margin-top:7px}.remember{display:flex;align-items:center;gap:8px;margin:18px 0}.remember input{width:18px;height:18px}.login-note{text-align:center;color:var(--muted);font-size:13px;margin:22px 0 0}
.pwa-install{margin-top:12px}.user-area .pwa-install{margin-top:0}.offline-card{text-align:center}.offline-card>img{width:150px;height:95px;object-fit:contain}.offline-card h1{color:var(--navy);margin:22px 0 10px}.offline-card p{color:var(--muted);line-height:1.5;margin:0 0 24px}
.owner-links{display:flex;gap:12px;padding:16px 20px;background:#f8fafc;border-bottom:1px solid var(--line)}.admin-heading{display:flex;justify-content:space-between;align-items:center;padding:18px 20px}.admin-heading h2{margin:0 0 5px}.admin-heading p{margin:0;color:var(--muted)}.export-box{display:flex;align-items:center;gap:14px}.users-table input{height:38px;border:1px solid #b8c6d0;border-radius:6px;padding:0 10px;min-width:220px}.status{border:0;border-radius:999px;padding:7px 14px;font-weight:700}.status.enabled{background:#dcf4e7;color:#126641}.status.disabled{background:#f5e3e1;color:#9d3630}#ownerMessage{margin:16px 20px}
.production-report{border-top:10px solid var(--bg);background:#fff}.report-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 20px;border-bottom:1px solid var(--line)}.report-heading h2{margin:0 0 5px;font-size:20px}.report-heading p{margin:0;color:var(--muted)}.report-table-wrap{max-height:none}.production-report-table{min-width:1500px}.production-report-table th:first-child,.production-report-table td:first-child{position:sticky;left:0;z-index:1;min-width:275px}.production-report-table th:first-child{z-index:3}.production-report-table td:first-child{background:#e5edf7}.production-report-table th:not(:first-child),.production-report-table td:not(:first-child){min-width:118px;text-align:center}.report-expandable{cursor:pointer}.report-expandable td:first-child{font-weight:750}.report-arrow{border:0;background:transparent;color:var(--navy);padding:4px;font-weight:800}.report-detail td{font-size:13px;color:#50677a}.report-detail td:first-child{padding-left:38px;background:#f3f7fb}.cutting-table{table-layout:fixed}.cutting-table th:first-child,.cutting-table td.name{width:70%}.cutting-table th:last-child,.cutting-table td:last-child{width:30%;text-align:center}
@media(min-width:901px) and (max-width:1250px){.production-controls{grid-template-columns:minmax(260px,1.1fr) minmax(220px,.85fr) minmax(300px,1.2fr)}.production-controls label:nth-child(4),.production-controls label:nth-child(5){justify-content:flex-start}}
@media(max-width:900px){html,body{width:100%;max-width:100%;overflow-x:hidden}.topbar{height:auto;min-height:0;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:8px;padding:10px 12px}.brand{width:100%;min-width:0;gap:10px}.brand>*{margin-right:0}.brand img{width:70px;height:48px;flex:0 0 70px}.brand h1{min-width:0;margin:0;font-size:18px;line-height:1.2}.brand p{display:none}.user-area{width:100%;min-width:0;flex-wrap:nowrap;justify-content:flex-end;gap:6px;font-size:12px}.user-area>*{margin:0}.user-area #userName{display:none}.user-area .live{white-space:nowrap;padding:6px 9px;font-size:12px}.user-area button.secondary{padding:7px 10px;font-size:12px;white-space:nowrap}.workspace{width:100%;max-width:100%;padding:10px 8px;overflow:hidden}.panel{width:100%;max-width:100%;min-width:0;border-radius:10px}.toolbar{min-width:0;min-height:0;flex-wrap:wrap;align-items:center;gap:10px;padding:12px}.toolbar label{width:100%;min-width:0;justify-content:flex-start}.toolbar label input{min-width:0;flex:1}.toolbar input{width:auto}.toolbar button{padding:9px 14px}.mode-producere .toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto}.mode-producere .toolbar label{width:auto}.mode-producere .toolbar #syncNotice{grid-column:1/-1}.tabs{min-width:0;flex:1;margin-left:0}.tabs button{min-width:0;flex:1;padding:9px 12px}.sync-notice{width:100%;margin-left:0}.production-controls{min-width:0;grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}.production-controls>*{min-width:0;margin:0}.production-controls label{width:100%;min-width:0;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:6px}.production-controls select,.production-controls input{width:100%;min-width:0}.production-controls p{font-size:13px;line-height:1.35}.admin-heading,.export-box{align-items:flex-start;flex-direction:column;gap:12px}.table-wrap{width:100%;max-width:100%;max-height:none;overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}table{min-width:100%}th,td{padding-left:10px;padding-right:10px}td.name{min-width:150px}#inventoryTable.blocks-table{table-layout:fixed}#inventoryTable.blocks-table th:first-child,#inventoryTable.blocks-table td.name{width:36%;min-width:0}#inventoryTable.blocks-table th:not(:first-child),#inventoryTable.blocks-table td:not(.name){width:16%;padding-left:3px;padding-right:3px;text-align:center}#inventoryTable.blocks-table td.editable input{padding-left:4px;padding-right:4px}#inventoryTable.materials-table{min-width:520px}.panel-footer{padding:10px 12px}.owner-links{overflow-x:auto}.users-table input{min-width:180px}}
@media(max-width:900px){.topbar{min-height:58px;flex-direction:row;align-items:center;justify-content:space-between;gap:6px;padding:7px 10px}.brand{width:auto;flex:1 1 auto;gap:7px}.brand img{width:46px;height:40px;flex:0 0 46px}.brand h1{font-size:16px;line-height:1.15}.user-area{width:auto;flex:0 0 auto;gap:4px;font-size:11px}.user-area .live{padding:6px 7px;font-size:11px}.user-area .live i{width:8px;height:8px}.user-area button.secondary{padding:7px 9px;font-size:12px}.workspace{padding:8px}.toolbar{gap:8px;padding:10px 12px}.mode-manager .toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto}.mode-manager .toolbar label{width:auto}.mode-manager .toolbar #syncNotice{grid-column:1/-1}.mode-producere .operation-tabs{grid-column:1/-1;margin:0}.production-controls{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(100px,.85fr);gap:8px;padding:10px 12px}.production-controls label{gap:4px;font-size:13px}.production-controls label:nth-child(3){grid-column:1/-1}.production-controls select,.production-controls input{height:38px;padding-left:9px;padding-right:9px}.report-heading{align-items:stretch;flex-direction:column;padding:14px 12px}.report-tabs{margin:0}.production-report-table{min-width:1450px}.production-report-table th:first-child,.production-report-table td:first-child{min-width:220px}}
.production-controls{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:30px;padding:15px 20px}.production-input-group{display:flex;align-items:center;gap:20px;min-width:0}.production-input-group label{justify-content:flex-start;gap:9px;white-space:nowrap}.production-block-group{justify-content:flex-start}.production-material-group{justify-content:flex-end;border-left:1px solid #cbded3;padding-left:28px}
.material-stock-table{table-layout:fixed}.material-stock-table th:first-child,.material-stock-table td.name{width:55%}.material-stock-table th:not(:first-child),.material-stock-table td:not(.name){width:22.5%;text-align:center}.panel.view-only .panel-footer{display:none}
@media(min-width:901px) and (max-width:1250px){.production-controls{grid-template-columns:1fr;gap:12px}.production-input-group{justify-content:flex-start}.production-material-group{border-left:0;border-top:1px solid #cbded3;padding:12px 0 0}}
@media(max-width:900px){.production-controls{display:block;padding:10px 12px}.production-input-group{display:grid;gap:8px}.production-block-group{grid-template-columns:minmax(0,1.65fr) minmax(100px,.85fr)}.production-material-group{grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-left:0;border-top:1px solid #cbded3;padding:10px 0 0;margin-top:10px}.production-controls .production-input-group label{min-width:0;flex-direction:column;align-items:stretch;gap:4px;font-size:13px;white-space:nowrap}.production-controls .production-material-group label:first-child{grid-column:1/-1}.production-controls .production-material-group label:nth-child(3){grid-column:auto}.production-controls .production-input-group select,.production-controls .production-input-group input{width:100%;min-width:0;height:38px;padding-left:9px;padding-right:9px}}
@media(max-width:900px){.mode-producere .operation-tabs button{padding-left:6px;padding-right:6px;font-size:12px}.material-stock-table th:first-child,.material-stock-table td.name{width:50%}.material-stock-table th:not(:first-child),.material-stock-table td:not(.name){width:25%}}
.language-select{width:62px;height:36px;border:1px solid rgba(255,255,255,.45);border-radius:7px;padding:0 7px;background:#fff;color:#173653;font-weight:750;cursor:pointer}.login-language{display:flex;justify-content:flex-end;margin:-4px 0 4px}.login-language .language-select{border-color:#b8c7d3}
@media(max-width:900px){.user-area .language-select{width:50px;height:32px;padding:0 4px;font-size:11px}.user-area{gap:3px}}
