:root{color-scheme:dark;--bg:#0b1017;--surface:#111620;--border:#2b3548;--text:#eef1f6;--muted:#a1aec3;--red:#fd2126}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 'Segoe UI',Arial,sans-serif}button,input,select,textarea{font:inherit}button{border:1px solid var(--border);border-radius:8px;color:var(--text);background:#1b2230;padding:9px 13px;cursor:pointer}button:hover{border-color:#69788e;background:#252f40}button:disabled{opacity:.5;cursor:default}button.primary{background:var(--red);border-color:var(--red);font-weight:600}button.primary:hover{background:#e41e25}button[aria-pressed=true]{border-color:#fc5458;background:#352028}a{color:inherit;text-decoration:none}input,select,textarea{display:block;width:100%;padding:11px;border:1px solid #3a455b;border-radius:8px;background:#0c111a;color:var(--text);margin:5px 0 16px}input:focus,textarea:focus,select:focus,button:focus-visible{outline:2px solid #ff767b;outline-offset:3px}label{font-weight:600;font-size:13px}input[type=checkbox]{display:inline-block;width:auto;margin:0;accent-color:var(--red)}.check{display:flex;align-items:center;gap:9px;margin:12px 0 20px;font-weight:400}.portal-header{height:70px;border-bottom:1px solid var(--border);padding:12px 30px;display:flex;align-items:center;justify-content:space-between;background:#171d27;gap:16px}.brand{display:flex;align-items:center;gap:9px}.brand img{width:43px;height:43px;object-fit:contain}.brand img.wordmark{width:97px;height:40px}.account{display:flex;gap:9px;align-items:center}.account button{font-size:12px;padding:6px 9px}main{max-width:1280px;margin:auto;padding:36px 30px}.login-layout{min-height:calc(100dvh - 145px);display:grid;grid-template-columns:1fr 420px;gap:80px;align-items:center}.identity>img{width:120px;height:120px;object-fit:contain}.identity h1{font-size:42px;line-height:1.16;letter-spacing:-1px;margin:20px 0}.identity p{max-width:400px;color:var(--muted)}.card{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:24px;min-width:0}.login-card h2{font-size:23px;margin:12px 0 24px}.login-card .primary{width:100%}.eyebrow{color:#ff777c;font-size:11px;font-weight:600;letter-spacing:1px}.muted{color:var(--muted);font-size:13px}.notice{border:1px solid #a9434b;background:#311a23;color:#ffbdc3;padding:12px 15px;border-radius:9px;white-space:pre-wrap}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:10px 0 25px}h1{font-size:28px;margin:7px 0}h2{font-size:18px;margin:0 0 18px}.company-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.company-choice{border:1px solid var(--border);border-radius:12px;padding:20px;display:flex;gap:13px;align-items:flex-start;background:var(--surface);cursor:pointer}.company-choice:has(input:checked){border-color:var(--red);background:#221822}.company-choice strong,.company-choice small{display:block}.company-choice small{font-weight:400;color:var(--muted);margin-top:6px}.online{color:#7cdaa0}.offline{color:#f7ac78}.selection-actions{display:flex;justify-content:space-between;align-items:center;margin-top:24px;gap:16px}.erp-layout{display:grid;grid-template-columns:1fr 420px;gap:65px;max-width:1040px;margin:50px auto}.erp-progress{padding-left:22px;margin:25px 0;color:var(--muted)}.erp-progress li{padding:7px 0}.erp-progress li.done{color:#7cdaa0}.admin-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px}.admin-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:20px;align-items:start}.admin-row{padding:14px 0;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px}.admin-row strong,.admin-row small{display:block}.admin-row small{color:var(--muted);margin-top:3px}.row-buttons{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.row-buttons button{font-size:12px;padding:6px 9px}.grants{padding:12px;border:1px solid var(--border);border-radius:8px;max-height:280px;overflow:auto;margin:10px 0}.grants .check{margin:8px 0}.key-result{margin-top:20px;border-color:#8b434c}.key-result textarea{font:13px ui-monospace,Consolas,monospace;overflow-wrap:anywhere}.form-actions{display:flex;gap:9px;margin-top:20px}[hidden]{display:none!important}@media(max-width:800px){.login-layout,.erp-layout{grid-template-columns:1fr;gap:25px;margin:10px 0;min-height:0}.identity{display:none}.login-card{max-width:480px;width:100%;margin:auto}.company-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-layout{grid-template-columns:1fr}.portal-header{height:auto;min-height:64px;padding:12px 16px;flex-wrap:wrap}main{padding:25px 16px}.account{flex-wrap:wrap}.account span{max-width:180px;overflow-wrap:anywhere}}@media(max-width:480px){.company-grid{grid-template-columns:1fr}.section-heading{align-items:flex-start;flex-direction:column}.selection-actions{align-items:stretch;flex-direction:column}.admin-row{align-items:flex-start;flex-direction:column}.identity h1{font-size:30px}.card{padding:20px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

/* Management: one clear directory, one focused editor. */
:root{--surface:#121923;--border:#2b3646;--muted:#9eacc0}
.portal-header{height:60px;padding:8px 28px;background:#202833}.brand img{width:36px;height:36px}.brand img.wordmark{height:32px;width:82px}
main{max-width:1400px;padding:28px}.admin-heading{margin:4px 0 26px}.admin-heading h1{font-size:28px;letter-spacing:-.7px}.admin-heading p{margin:5px 0 0}
.admin-shell{display:grid;grid-template-columns:218px minmax(0,1fr);gap:28px;align-items:start}.admin-tabs{display:grid;gap:5px;margin:0;position:sticky;top:24px}.admin-tabs>button{text-align:left;background:transparent;border-color:transparent;padding:13px 14px;border-radius:9px}.admin-tabs>button span{display:block;font-size:14px;font-weight:600}.admin-tabs>button small{display:block;font-size:11px;color:var(--muted);margin-top:3px}.admin-tabs>button[aria-pressed=true]{background:#fd212611;border-color:#fd212635;box-shadow:inset 3px 0 var(--red)}.admin-tabs>button[aria-pressed=true] span{color:#ff999d}.admin-help{border-top:1px solid var(--border);padding:20px 14px;margin-top:18px;font-size:12px;color:var(--muted)}.admin-help strong{color:#d7dfeb;font-weight:600}.admin-help p{margin:8px 0;line-height:1.7}
.admin-content{min-width:0}.admin-directory{padding:0;overflow:hidden}.directory-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 24px 18px}.directory-heading h2{font-size:20px;margin:0}.directory-heading p{margin:4px 0 0}.directory-heading button{white-space:nowrap}.directory-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:0 24px 18px;border-bottom:1px solid var(--border)}.directory-toolbar input{max-width:340px;padding:9px 12px;margin:0}.directory-toolbar span{font-size:12px;white-space:nowrap}.admin-row{padding:18px 24px;margin:0;gap:20px;min-height:86px}.admin-row:last-child{border-bottom:0}.admin-row:hover{background:#ffffff03}.admin-row>div:first-child{min-width:0;flex:1}.admin-row strong{font-weight:600;font-size:14px;overflow-wrap:anywhere}.admin-row small{font-size:12px;overflow-wrap:anywhere}.status-badge{position:static;flex:none;border-radius:5px;font-size:10px;padding:2px 7px;line-height:1.7;background:#ffffff08;color:var(--muted)}.status-badge.active{background:#55bc8314;color:#8bd5a8}.row-buttons button{background:transparent;border-color:#344154;white-space:nowrap}.row-buttons button:hover{background:#263242}.row-buttons{flex-shrink:0;max-width:310px}.directory-empty{padding:56px 24px;text-align:center}.search-empty{padding:20px 24px}.key-result{padding:24px;margin-top:18px}.key-result h2{margin:8px 0}.key-result input,.key-result textarea{background:#0c121c}.key-result .form-actions{margin-bottom:0}
.admin-editor{width:min(520px,calc(100% - 24px));max-height:calc(100dvh - 32px);overflow:auto;margin:auto;padding:26px;color:var(--text);background:#141c28;border:1px solid #405068;border-radius:14px;box-shadow:0 24px 100px #0008}.admin-editor::backdrop{background:#030810b8;backdrop-filter:blur(4px)}.editor-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:24px}.editor-heading h2{margin:5px 0 0;font-size:22px}.editor-heading>button{display:grid;place-items:center;flex:none;width:34px;height:34px;padding:0;line-height:1;background:transparent;color:var(--muted)}.editor-heading>button svg{display:block;width:18px;height:18px}.admin-editor .notice{margin-bottom:18px}.admin-editor .form-actions{padding-top:18px;border-top:1px solid var(--border)}.admin-editor .form-actions .primary{margin-left:auto;order:1}.admin-editor .grants{background:#0e1520}.admin-editor .grants>strong{font-size:12px}.admin-editor input{padding:10px 12px}.admin-editor .check{margin:14px 0}
@media(max-width:800px){.portal-header{height:auto;min-height:60px;padding:10px 16px}main{padding:22px 16px}.admin-shell{grid-template-columns:1fr;gap:18px}.admin-tabs{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.admin-tabs>button{padding:10px}.admin-tabs>button small{display:none}.admin-help{display:none}.directory-heading{padding:18px;align-items:flex-start}.directory-heading p{font-size:12px}.directory-toolbar{padding:0 18px 16px}.admin-row{padding:16px 18px}.admin-heading{margin-bottom:20px}.admin-heading h1{font-size:25px}}
@media(max-width:540px){.directory-heading{flex-wrap:wrap;gap:12px}.directory-heading button{width:100%}.directory-toolbar{align-items:stretch;flex-direction:column;gap:8px}.directory-toolbar input{max-width:none}.admin-row{align-items:stretch}.admin-row>div:first-child{width:100%}.row-buttons{max-width:none;justify-content:flex-start}.account{gap:6px}.account button{padding:5px 7px}.account span{font-size:12px}.admin-tabs>button span{font-size:13px}.admin-editor{padding:20px}}

/* Align actions in normal flow, including when names wrap. */
.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:20px;flex-shrink:0;min-height:34px}.row-buttons{align-items:center}.row-buttons button{min-height:34px;line-height:1.2;padding:8px 12px}.status-badge{line-height:20px;padding:1px 8px;font-size:11px;white-space:nowrap}.admin-row{min-height:88px;align-items:center}.admin-row>div:first-child{padding-right:0}.directory-heading{align-items:center}.editor-heading{align-items:center}.admin-editor{padding:24px}.editor-heading>button:hover{background:#263242}.editor-heading>button:focus-visible{outline-offset:2px}
/* The sign-in screen is one balanced composition, not two viewport edges. */
.login-layout{min-height:calc(100dvh - 116px);max-width:960px;margin:0 auto;grid-template-columns:minmax(0,1fr) 400px;gap:72px;align-items:center;padding:32px 0}.identity{max-width:360px}.identity>img{width:116px;height:116px;display:block;margin:0 0 22px}.identity h1{font-size:34px;line-height:1.2;letter-spacing:-.8px;margin:0 0 16px}.identity p{font-size:14px;line-height:1.7;margin:0;max-width:320px}.login-layout .login-card{padding:30px;border-radius:12px}.login-card h2{margin:10px 0 24px;line-height:1.3}.login-card input:not([type=checkbox]){height:44px;margin:6px 0 18px;padding:10px 12px}.login-card .check{align-items:center;line-height:1.4;margin:0 0 22px;gap:9px}.login-card .check input{flex:none;width:14px;height:14px;margin:0}.login-card button.primary{height:42px;line-height:1;padding:0 16px}.login-card>p:last-child{margin:16px 0 0;font-size:12px;line-height:1.6}.erp-layout{max-width:960px;gap:72px;align-items:center;margin:40px auto}
@media(max-width:1000px){.row-actions{gap:12px}.admin-row{gap:14px}.row-buttons{max-width:240px}.login-layout{gap:40px;max-width:860px;grid-template-columns:minmax(0,1fr) 380px}.identity h1{font-size:30px}}
@media(max-width:800px){.login-layout{grid-template-columns:minmax(0,1fr);max-width:420px;min-height:calc(100dvh - 120px);padding:24px 0;margin:auto;gap:0}.login-layout .identity{display:none}.login-layout .login-card{width:100%;padding:26px}.erp-layout{grid-template-columns:1fr;gap:24px;margin:20px auto;max-width:480px}.row-actions{gap:12px}.admin-row{align-items:center}.row-buttons{max-width:220px}.admin-editor{padding:22px}}
@media(max-width:540px){.admin-row{display:grid;grid-template-columns:minmax(0,1fr);gap:12px}.row-actions{width:100%;justify-content:space-between;gap:12px}.row-buttons{justify-content:flex-end;max-width:none;flex:1}.row-buttons button{padding:7px 9px;font-size:11px}.status-badge{font-size:10px}.login-layout{min-height:calc(100dvh - 140px);padding:16px 0}.login-layout .login-card{padding:24px}.portal-header .brand{gap:7px}.admin-editor{padding:20px}.editor-heading{margin-bottom:20px}.editor-heading h2{font-size:20px}}

@media(min-width:1001px){.company-row .row-actions{display:grid;grid-template-columns:44px 272px;gap:18px;width:334px}.company-row .row-buttons{display:grid;grid-template-columns:56px 114px 90px;gap:6px;max-width:none}.company-row .row-buttons button{padding:8px 6px;width:100%}}

/* Company selection: logo-led, maximum two choices per row. */
#company-step{max-width:760px;margin:32px auto}#company-step .section-heading{align-items:center;margin-bottom:24px}#company-step h1{font-size:27px;letter-spacing:-.5px}#company-step .section-heading p{margin:6px 0 0;max-width:490px}.company-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.company-choice{position:relative;display:flex;justify-content:center;align-items:center;padding:26px 22px 22px;min-height:220px;border:1px solid #354154;border-radius:14px;background:#121923;transition:border-color .16s,background .16s,box-shadow .16s}.company-choice:hover{border-color:#6a778a;background:#18212e}.company-choice:has(input:checked){border:1px solid #FD2126;background:#fd21260b;box-shadow:inset 0 0 0 1px #FD2126}.company-choice:has(input:focus-visible){outline:2px solid #ff8c90;outline-offset:4px}.company-choice input[type=checkbox]{position:absolute;opacity:0;width:1px;height:1px;left:20px;top:20px}.company-card-content{display:flex;align-items:center;flex-direction:column;gap:0;min-width:0;width:100%;text-align:center}.company-choice-logo{display:block;object-fit:contain;width:160px;height:112px;margin:0 0 16px}.company-choice strong{font-size:15px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.company-choice small{font-size:11px;margin-top:7px;line-height:1.4}.company-choice small.online{color:#8bd5a8}.company-choice small.offline{color:#9eacc0}.company-selection-mark{position:absolute;top:14px;right:14px;width:23px;height:23px;display:grid;place-items:center;border:1px solid #465367;border-radius:50%;font-size:13px;line-height:1;color:transparent;background:#0c121c}.company-choice:has(input:checked) .company-selection-mark{border-color:#FD2126;background:#FD2126;color:#fff}.selection-actions{border-top:1px solid #293546;padding-top:20px;margin-top:24px}.selection-actions .primary{min-width:160px}
@media(max-width:600px){#company-step{margin:12px auto}#company-step .section-heading{align-items:flex-start;gap:14px}#company-step h1{font-size:23px}.company-grid{gap:12px}.company-choice{min-height:205px;padding:25px 14px 18px}.company-choice-logo{width:130px;height:100px}.selection-actions{gap:12px}}
@media(max-width:400px){.company-grid{grid-template-columns:minmax(0,1fr)}.company-choice{min-height:200px}.company-choice-logo{width:155px;height:105px}}@media(prefers-reduced-motion:reduce){.company-choice{transition:none}}

.directory-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.download-connector{display:inline-flex;align-items:center;justify-content:center;min-height:41px;padding:8px 12px;border:1px solid var(--border);border-radius:8px;color:var(--text);font-size:12px;white-space:nowrap}.download-connector:hover{background:#263242}.download-connector:focus-visible{outline:2px solid #ff777c;outline-offset:2px}@media(max-width:540px){.directory-actions{width:100%}.directory-actions>*{flex:1}.directory-heading .directory-actions button{width:auto}}
