/* Keep the executive portal theme isolated from the ERP workspace. */
#enterprise-gateway { min-height:100vh;background:radial-gradient(ellipse at 80% 0%,#ffffffc0,transparent 55%),linear-gradient(145deg,#f1f5f9,#e2e8f0);color:#0f172a; }
#enterprise-gateway.hidden, #app-shell.hidden, #login-screen.hidden { display:none !important; }
#enterprise-gateway .gateway-wrap { max-width:1560px;margin:auto;padding:32px 28px 48px; }
#enterprise-gateway .gateway-top { display:flex;align-items:center;gap:24px;flex-wrap:wrap;border-bottom:1px solid #cbd5e1;padding-bottom:24px; }
#enterprise-gateway .gateway-logo { background:#fff;padding:8px 20px;border-radius:16px;border:1px solid #e2e8f0;box-shadow:0 4px 12px #02061740; }
#enterprise-gateway .gateway-top img { width:180px;height:65px;object-fit:contain; }
#enterprise-gateway .gateway-profile { margin-left:auto;display:flex;align-items:center;gap:12px;max-width:100%;background:#1e293b;border:1px solid #b49a5c70;border-radius:32px;padding:10px 20px;box-shadow:inset 0 1px #ffffff0c; }
#enterprise-gateway .gateway-profile svg { color:#fbbf24;flex-shrink:0; }
#enterprise-gateway .gateway-profile strong { display:block;color:#f1f5f9;overflow-wrap:anywhere; }
#enterprise-gateway .gateway-profile span { display:block;font-size:11px;color:#fcd34d;letter-spacing:.08em; }
#enterprise-gateway .gateway-logout { color:#334155;padding:10px;border-radius:8px; }
#enterprise-gateway .gateway-intro { padding:54px 0 36px;max-width:740px; }
#enterprise-gateway .gateway-eyebrow { font-size:12px;font-weight:600;letter-spacing:.2em;color:#526378;text-transform:uppercase; }
#enterprise-gateway h1 { font-size:36px;font-weight:800;line-height:1.2;margin:16px 0;color:#0f172a; }
#enterprise-gateway .gateway-intro > p:last-child { color:#475569;font-size:14px;line-height:1.8; }
#enterprise-gateway .gateway-grid { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px; }
#enterprise-gateway .gateway-card { --accent:16,185,129;--shade:2,44,34;--cta:#059669;--hover:#10b981;--ink:#fff;--badge:16,185,129;--badge-border:52,211,153;--badge-text:#6ee7b7;display:flex;flex-direction:column;justify-content:space-between;text-align:left;padding:24px;background:linear-gradient(to bottom,rgba(var(--shade),.4),#0f172ae6);border:1px solid rgba(var(--accent),.4);border-radius:24px;box-shadow:inset 0 1px #ffffff12,0 6px 0 #02061780,0 15px 28px rgba(var(--shade),.5);transition:transform .3s,box-shadow .3s; }
#enterprise-gateway [data-gateway-domain="accounts"] { --accent:244,63,94;--shade:76,5,25;--cta:#e11d48;--hover:#f43f5e;--badge:244,63,94;--badge-border:251,113,133;--badge-text:#fda4af; }
#enterprise-gateway [data-gateway-domain="trading"] { --accent:245,158,11;--shade:69,26,3;--cta:#f59e0b;--hover:#fbbf24;--ink:#020617;--badge:245,158,11;--badge-border:251,191,36;--badge-text:#fcd34d;border-color:#f59e0b80; }
#enterprise-gateway [data-gateway-domain="refinery"] { --accent:234,179,8;--shade:66,32,6;--cta:#ca8a04;--hover:#eab308;--ink:#020617; }
#enterprise-gateway .gateway-card:hover { transform:translateY(-8px);box-shadow:inset 0 1px #ffffff20,0 8px 0 #02061780,0 25px 50px rgba(var(--shade),.5); }
#enterprise-gateway .gateway-card:active { transform:translateY(-2px); }
#enterprise-gateway .gateway-card-top, #enterprise-gateway .gateway-card-bottom { display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap; }
#enterprise-gateway .gateway-card-top { color:rgb(var(--accent));font-size:10px;font-weight:700;letter-spacing:.06em; }
#enterprise-gateway .gateway-card-top > svg { width:48px;height:48px;padding:12px;border-radius:16px;background:rgba(var(--accent),.12);border:1px solid rgba(var(--accent),.3); }
#enterprise-gateway .gateway-card-top > span { background:rgba(var(--badge),.2);border:1px solid rgba(var(--badge-border),.4);color:var(--badge-text);font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;border-radius:24px;padding:7px 10px; }
#enterprise-gateway .gateway-card h2 { font-size:23px;font-weight:800;margin:24px 0 10px;color:#f1f5f9; }
#enterprise-gateway .gateway-card p { color:#e2e8f0;font-size:12px;font-weight:400;line-height:1.625;margin-bottom:auto; }
#enterprise-gateway .gateway-card-bottom { background:var(--cta);color:var(--ink);border-radius:999px;margin-top:28px;padding:12px 16px;font-size:13px;font-weight:700;box-shadow:inset 0 1px #ffffff30,0 3px 0 #02061750; }
#enterprise-gateway .gateway-card:hover .gateway-card-bottom { background:var(--hover); }
#enterprise-gateway :is([data-gateway-domain="trading"], [data-gateway-domain="refinery"]) .gateway-card-bottom { color:#020617;font-weight:800; }
#enterprise-gateway [data-gateway-domain="trading"] .gateway-card-bottom { background:linear-gradient(to right,#f59e0b,#eab308);font-weight:800; }
#enterprise-gateway [data-gateway-domain="trading"]:hover .gateway-card-bottom { background:linear-gradient(to right,#fbbf24,#facc15); }
#enterprise-gateway .gateway-locked { opacity:.6; }
#enterprise-gateway .gateway-locked [data-gateway-status]::before { content:'🔒 '; }
#enterprise-gateway .gateway-footnote { color:#475569;font-size:12px;margin-top:28px; }
#enterprise-gateway button:focus-visible { outline:2px solid #fcd34d;outline-offset:5px; }
#app-shell { min-height:100vh; }
@media(max-width:640px) {
 #enterprise-gateway .gateway-wrap { padding:22px 18px; }
 #enterprise-gateway .gateway-grid { grid-template-columns:1fr; }
 #enterprise-gateway h1 { font-size:30px; }
 #enterprise-gateway .gateway-intro { padding-top:38px; }
 #enterprise-gateway .gateway-profile { margin-left:0;order:3;width:100%; }
 #enterprise-gateway .gateway-logout { margin-left:auto; }
}
@media(prefers-reduced-motion:reduce) { #enterprise-gateway .gateway-card { transition:none; } #enterprise-gateway .gateway-card:hover { transform:none; } }
@media print { #enterprise-gateway { display:none !important; } }

#enterprise-gateway [data-gateway-domain="refinery"] { --accent:217,119,6;--shade:67,30,9;--cta:#d99039;--hover:#efad59;--badge:249,115,22;--badge-border:251,146,60;--badge-text:#fdba74; }
#enterprise-gateway [data-gateway-domain="auditor"] { --accent:34,211,238;--shade:8,51,68;--cta:#0e7490;--hover:#0891b2;--badge:6,182,212;--badge-border:34,211,238;--badge-text:#67e8f9; }
#enterprise-gateway .gateway-language { margin-left:auto;display:grid;gap:5px;font-size:11px;font-weight:600;color:#475569; }
#enterprise-gateway .gateway-language select { background:#fff;color:#0f172a;border:1px solid #cbd5e1;border-radius:12px;padding:10px 12px;max-width:100%;font:inherit;font-size:13px; }
#enterprise-gateway .gateway-profile { margin-left:0; }
#enterprise-gateway select:focus-visible { outline:2px solid #0e7490;outline-offset:3px; }
#enterprise-gateway .gateway-card-top { min-height:94px;align-content:start; }
#enterprise-gateway .gateway-card-top > span { line-height:1.5; }
#enterprise-gateway .gateway-card p { min-height:112px; }
@media(max-width:1199px) and (min-width:641px) { #enterprise-gateway .gateway-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:640px) { #enterprise-gateway .gateway-card p { min-height:0; } #enterprise-gateway .gateway-card-top { min-height:0; } }
