*{box-sizing:border-box}body{margin:0;min-height:100vh;color:#172033;background:#f4f7f8;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.62}.login-shell{min-height:100vh;padding:28px}.app-layout{min-height:calc(100vh - 86px);display:grid;grid-template-columns:236px minmax(0,1fr)}.app-shell{min-height:calc(100vh - 86px);padding:22px 28px 28px}.login-shell{display:grid;place-items:center;background:linear-gradient(135deg,rgba(15,127,118,.1),transparent 42%),#f4f7f8}.login-panel{width:min(430px,100%);padding:28px;border:1px solid #d7e0e1;border-radius:8px;background:#fff;box-shadow:0 18px 60px #1720331f}.login-panel.compact{display:flex;align-items:center;justify-content:center;gap:12px;min-height:120px}.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:24px}.etg-logo{display:block;flex:0 0 auto;object-fit:contain;background:#fff}.etg-logo--login{width:156px;height:auto}.etg-logo--header{width:126px;height:auto}.login-brand p{margin:0 0 3px;color:#54716b;font-size:13px;font-weight:700;text-transform:uppercase}h2,p{margin-top:0}.login-brand h1{margin-bottom:0;font-size:30px;line-height:1.15}.auth-message{display:flex;align-items:flex-start;gap:10px;margin-bottom:14px;padding:12px;border:1px solid #f0c8c5;border-radius:8px;color:#7c241f;background:#fff4f2;font-weight:650}.auth-message svg{flex:0 0 auto;margin-top:2px}.login-form,.login-actions{display:grid;gap:14px}.login-fallback{display:grid;gap:12px}.login-fallback-button{width:100%}.login-fallback summary{color:#52666e;font-size:13px;font-weight:750}.login-form label{display:grid;gap:7px;color:#40515b;font-size:13px;font-weight:700}.login-form input{width:100%;min-height:44px;padding:0 12px;border:1px solid #cad6d9;border-radius:8px;color:#172033;background:#fff}.login-form input:focus{border-color:#0f7f76;outline:3px solid rgba(15,127,118,.15)}.primary-button{display:inline-flex;align-items:center;justify-content:center;border:0;font-weight:800}.primary-button{gap:9px;width:100%;min-height:46px;margin-top:4px;border-radius:8px;color:#fff;background:#0f7f76}.primary-button:not(:disabled):hover{background:#0b6b63}.spin{animation:spin .8s linear infinite}.app-header{display:grid;grid-template-columns:240px 92px minmax(280px,1fr) minmax(260px,auto);align-items:center;min-height:86px;border-top:6px solid #030303;border-bottom:1px solid #e6ebed;background:#fff}.brand-mark{display:flex;align-items:center;justify-content:flex-start;height:100%;padding-left:22px;border-right:1px solid #eef2f3}.menu-button,.logout-button{display:inline-flex;align-items:center;justify-content:center;border:0;color:#090909;background:transparent}.menu-button{width:100%;height:100%}.menu-button:hover,.logout-button:hover{color:#0f7f76}.app-header h1{margin:0;overflow:hidden;color:#040404;font-size:20px;font-weight:800;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}.header-user{display:grid;grid-template-columns:minmax(0,auto) 64px 38px;align-items:center;gap:12px;min-height:52px;margin-right:10px;padding-left:16px;border-left:2px solid #eef2f3}.header-user span{overflow:hidden;max-width:260px;color:#0b1220;font-size:14px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.avatar{display:grid;place-items:center;width:58px;height:58px;border-radius:999px;color:#fff;background:#aaa;font-size:24px;font-weight:900}.logout-button{width:36px;height:36px;border-radius:8px}.side-menu{min-height:calc(100vh - 86px);padding:0 8px 24px 0;border-right:1px solid #edf1f2;background:#fff}.side-menu button{display:flex;align-items:center;width:100%;min-height:38px;border:0;text-align:left;letter-spacing:0}.side-menu-active{gap:7px;min-height:50px;padding:0 10px 0 6px;border-radius:0 4px 4px 0;color:#fff;background:#ed302b;font-size:14px;font-weight:800}.side-menu-active svg{flex:0 0 auto}.side-menu-link{padding:0 16px 0 32px;color:#6c7178;background:#fff;font-size:14px;font-weight:500}.side-menu-link:hover{color:#111827;background:#f8fafb}.side-menu-link.selected{color:#ed302b;background:#fff3f2;font-weight:800}.customer-workspace{display:grid;gap:14px;width:min(1320px,100%);margin:0 auto}.customer-tabs{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:7px;align-items:end}.customer-tab{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:0 12px;border:1px solid #9da4aa;border-radius:4px 4px 0 0;color:#5f6873;background:#fff;font-size:13px;font-weight:750}.customer-tab.active{border-color:#ed302b;color:#fff;background:#ed302b}.customer-panel,.saved-master-panel,.placeholder-page{border:1px solid #e5ebef;border-radius:6px;background:#fff}.customer-panel{min-height:470px;padding:22px 24px 26px}.customer-panel-header,.saved-master-header,.repeat-row-header{display:flex;align-items:center;justify-content:space-between;gap:16px}.customer-panel-header{margin-bottom:18px}.customer-panel h2,.saved-master-panel h2,.placeholder-page h2{margin:0;color:#07112a;font-size:18px;line-height:1.25}.customer-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.save-action,.secondary-action,.icon-action{display:inline-flex;align-items:center;justify-content:center;border-radius:5px;font-weight:800}.save-action,.secondary-action{gap:7px;min-height:36px;padding:0 13px}.save-action{border:1px solid #0f7f76;color:#fff;background:#0f7f76}.save-action:not(:disabled):hover{background:#0b6b63}.secondary-action{border:1px solid #c9d3d8;color:#273444;background:#fff}.secondary-action:hover{border-color:#9eb0b7;background:#f8fbfb}.icon-action{width:30px;height:30px;border:1px solid #d7e0e4;color:#596774;background:#fff}.icon-action.danger:hover{border-color:#f0b9b6;color:#bf211b;background:#fff4f2}.form-status{display:flex;align-items:center;gap:8px;margin-bottom:16px;padding:10px 12px;border-radius:6px;font-size:13px;font-weight:750}.form-status.success{border:1px solid #b8ded7;color:#0b6b63;background:#f0fbf8}.form-status.error{border:1px solid #efc5c2;color:#8f241f;background:#fff4f2}.form-status.warning{border:1px solid #f5d89a;color:#7a4f00;background:#fffbf0}.d365-badge{display:inline-flex;align-items:center;padding:2px 10px;border-radius:20px;font-size:11px;font-weight:700;letter-spacing:.02em;background:#e8f4f2;color:#0b6b63;border:1px solid #b8ded7;white-space:nowrap}@media (prefers-color-scheme: dark){.d365-badge{background:#0e2e2b;color:#5fd4c8;border-color:#1a4e49}}.customer-form-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:18px 26px;align-items:end}.form-field{display:grid;gap:7px;color:#1f2b3a;font-size:12px;font-weight:750}.form-field b{margin-right:8px;color:#ed302b}.form-field input,.form-field select,.form-field textarea{width:100%;border:1px solid transparent;border-radius:2px;color:#111827;background:#f0f0f0}.form-field input,.form-field select{min-height:42px;padding:0 11px}.form-field textarea{min-height:88px;padding:11px;resize:vertical}.form-field input:focus,.form-field select:focus,.form-field textarea:focus{border-color:#0f7f76;outline:3px solid rgba(15,127,118,.16)}.form-field-wide{grid-column:span 3}.check-field{display:inline-flex;align-items:center;gap:9px;min-height:42px;color:#273444;font-size:13px;font-weight:750}.check-field input{width:17px;height:17px;accent-color:#0f7f76}.repeat-section{display:grid;gap:14px}.repeat-row{padding:16px;border:1px solid #e2e9ed;border-radius:6px;background:#fbfcfc}.repeat-row-header{margin-bottom:14px;color:#0b1220}.empty-table{margin:0;padding:12px;border:1px solid #e3eaee;border-radius:6px;color:#687782;background:#f8fbfb;font-size:13px;font-weight:700}.saved-master-panel{padding:16px}.saved-master-header{margin-bottom:10px}.saved-master-table-wrap{overflow:auto;border:1px solid #e4ebef;border-radius:6px}.saved-master-table{width:100%;min-width:920px;border-collapse:collapse;font-size:13px}.saved-master-table th,.saved-master-table td{padding:11px 12px;border-bottom:1px solid #e9eef1;text-align:left}.saved-master-table th{color:#40515b;background:#f7fafb;font-size:12px}.saved-master-table tbody tr{background:#fff}.saved-master-table tbody tr:hover,.saved-master-table tbody tr.selected{background:#f5fbfa}.saved-master-table tbody tr[role=button]{cursor:pointer}.saved-master-table td{color:#273444}.saved-master-table td,.saved-master-table th{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.saved-master-details{display:grid;gap:14px;margin-top:16px;padding:14px;border:1px solid #e4ebef;border-radius:6px;background:#fbfcfc}.saved-master-details.empty p{margin:0;color:#687782;font-size:13px;font-weight:700}.saved-master-details-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.saved-master-details-header h3{margin:0 0 4px;color:#07112a;font-size:16px}.saved-master-details-header p{margin:0;color:#687782;font-size:13px;font-weight:700}.saved-master-summary{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr));gap:10px 14px}.saved-master-summary div{padding:10px 12px;border:1px solid #e6ecef;border-radius:5px;background:#fff}.saved-master-summary span{display:block;margin-bottom:5px;color:#667581;font-size:11px;font-weight:800;text-transform:uppercase}.saved-master-summary strong{color:#07112a;font-size:13px}.status-chip{display:inline-flex;align-items:center;min-height:30px;padding:0 10px;border:1px solid #d5e7e3;border-radius:999px;color:#0b6b63;background:#eefaf7;font-size:12px;font-weight:800}.status-chip.muted{border-color:#d6dde2;color:#51606d;background:#f3f6f8}.app-registration-page{display:grid;gap:14px;width:min(1320px,100%);margin:0 auto}.app-registration-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.app-registration-header h2{margin:0 0 4px;color:#07112a;font-size:18px;line-height:1.25}.app-registration-header p{margin:0;color:#667581;font-size:13px;font-weight:650}.detail-block{display:grid;gap:8px}.detail-block-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.detail-block-header h3{margin:0;color:#07112a;font-size:14px}.detail-block-header span{display:inline-flex;align-items:center;min-height:24px;padding:0 8px;border-radius:999px;color:#40515b;background:#edf3f5;font-size:12px;font-weight:800}.detail-table-wrap{overflow:auto;border:1px solid #e6ecef;border-radius:5px;background:#fff}.detail-table{width:100%;min-width:780px;border-collapse:collapse;font-size:12px}.detail-table th,.detail-table td{padding:9px 10px;border-bottom:1px solid #edf1f2;text-align:left}.detail-table th{color:#54626d;background:#f8fbfb;font-size:11px;text-transform:uppercase}.placeholder-page{min-height:220px;padding:24px}.masters-page{display:grid;grid-template-columns:minmax(220px,260px) minmax(0,1fr);gap:18px;align-items:start;width:min(1320px,100%);margin:0 auto}.masters-list-panel{width:min(260px,100%);min-height:calc(100vh - 132px);padding:14px 0 16px;background:#fff}.masters-list-panel h2{margin:0 0 16px;padding:0 12px;color:#07112a;font-size:18px;line-height:1.25}.master-name-label{display:block;margin-bottom:10px;padding:0 12px;color:#0b1220;font-size:12px;font-weight:650}.master-name-list{display:grid;align-content:start;max-height:calc(100vh - 196px);overflow-y:auto;background:#f1f1f1}.master-name-row{display:flex;align-items:center;width:100%;min-height:48px;padding:0 12px;border:0;border-bottom:1px solid transparent;color:#000;background:#eee;font-size:14px;font-weight:500;text-align:left}.master-name-row:hover,.master-name-row.selected{background:#d9d9d9}.master-detail-panel{min-height:220px;padding:18px;border:1px solid #e5ebef;border-radius:6px;background:#fff}.master-detail-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.master-detail-panel h2{margin:0;color:#07112a;font-size:18px;line-height:1.25}.reference-form{display:grid;grid-template-columns:repeat(3,minmax(160px,1fr)) 120px 110px;gap:12px;align-items:end;margin-bottom:18px}.reference-table-wrap{overflow-x:auto;border:1px solid #e3eaee;border-radius:6px}.reference-table{width:100%;min-width:520px;border-collapse:collapse;font-size:13px}.reference-table th,.reference-table td{padding:11px 12px;border-bottom:1px solid #e9eef1;text-align:left}.reference-table th{color:#40515b;background:#f7fafb;font-size:12px}.reference-table tbody tr.selected{background:#f2fbf9}.reference-table tbody tr[role=button]{cursor:pointer}.reference-table tr:last-child td{border-bottom:0}.table-delete-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:30px;padding:0 10px;border:1px solid #efc5c2;border-radius:5px;color:#8f241f;background:#fff4f2;font-size:12px;font-weight:800}.table-delete-button:not(:disabled):hover{border-color:#db8e89;background:#ffe8e5}.table-action-group{display:flex;flex-wrap:wrap;gap:8px}.table-edit-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:30px;padding:0 10px;border:1px solid #bfd7d2;border-radius:5px;color:#0b6b63;background:#eefaf7;font-size:12px;font-weight:800}.table-edit-button:not(:disabled):hover{border-color:#95c7bc;background:#e2f7f2}@keyframes spin{to{transform:rotate(360deg)}}@media (max-width: 900px){.login-shell,.app-shell{padding:18px}.app-layout{min-height:calc(100vh - 74px);grid-template-columns:1fr}.app-shell{min-height:calc(100vh - 74px)}.app-header{grid-template-columns:104px 58px minmax(0,1fr) auto;min-height:74px}.brand-mark{padding-left:12px}.etg-logo--header{width:106px}.app-header h1{font-size:16px}.header-user{grid-template-columns:44px 34px;gap:6px;margin-right:6px;padding-left:8px}.header-user span{display:none}.avatar{width:42px;height:42px;font-size:18px}.side-menu{min-height:auto;display:grid;grid-template-columns:1fr;padding:0 12px 12px;border-right:0;border-bottom:1px solid #edf1f2}.side-menu-active{border-radius:4px}.side-menu-link{padding-left:12px}.customer-tabs,.customer-form-grid{grid-template-columns:1fr}.customer-panel{padding:18px}.customer-panel-header{align-items:flex-start;flex-direction:column}.customer-actions{width:100%;justify-content:stretch}.customer-actions button,.secondary-action,.save-action{flex:1 1 auto}.form-field-wide{grid-column:auto}.saved-master-row{grid-template-columns:minmax(0,1fr) 28px}.saved-master-row strong,.saved-master-row small{display:none}.masters-list-panel{width:100%;min-height:auto}.masters-page,.reference-form{grid-template-columns:1fr}.master-name-list{max-height:none}}
