/* Nakoda Energy Services visual system. Keep operational states semantic; gold is navigation/action. */
:root,:root[data-theme="light"]{
 --bg:#f5f5f5;--surface-1:#fff;--surface-2:#f2f4f1;--surface-3:#e9ede8;--border:#e0e5df;
 --text-primary:#111111;--text-secondary:#626c65;--text-muted:#6b756e;--text:#111111;
 --accent:#51b848;--brand-accent:#51b848;--brand-accent-strong:#2f7a28;--brand-teal:#2f7a28;--brand-blue:#2f7a28;--brand-navy:#111111;
 --good:#238452;--bad:#ba4242;--card-shadow:0 3px 16px #26332a05;
 --palette-191918:#f2f4f1;--palette-20201d:#fff;--palette-151513:#f2f4f1;--palette-171815:#f7f8f6;--palette-353530:#e0e5df;
 --palette-245a94:#51b848;--palette-007b79:#2f7a28;--palette-005e5d:#24601f;
 --palette-172d38:#111111;--palette-102027:#111111;--palette-617882:#69746b;
 --palette-597781:#69746b;--palette-e0e9ed:#eef1ed;
 color-scheme:light;
}
:root[data-theme="dark"]{
 --bg:#111111;--surface-1:#1d231f;--surface-2:#252d27;--surface-3:#303a32;--border:#364037;
 --text-primary:#edf1e9;--text-secondary:#b4beb5;--text-muted:#a1ada4;--text:#edf1e9;
 --accent:#51b848;--brand-accent:#51b848;--brand-accent-strong:#8ed984;--brand-teal:#8ed984;--brand-blue:#8ed984;--brand-navy:#edf1e9;
 --good:#72d59e;--bad:#ef9797;--card-shadow:0 3px 18px #00000010;
 --palette-191918:#252d27;--palette-20201d:#1d231f;--palette-151513:#111111;--palette-171815:#1d231f;--palette-353530:#364037;
 --palette-245a94:#51b848;--palette-007b79:#8ed984;--palette-005e5d:#8ed984;
 --palette-172d38:#edf1e9;--palette-102027:#edf1e9;--palette-617882:#a1ada4;
 --palette-597781:#a1ada4;--palette-e0e9ed:#252d27;
 color-scheme:dark;
}
/* Brand colours only: original geometry, typography and page structure are retained. */
body{background:var(--bg);color:var(--text-primary)}
body>main>header{display:none}
html[data-theme="dark"] .page-sidebar,html[data-theme="dark"] .admin-mode .page-sidebar{
 background:#111111;color:#e8eee9;
 --surface-1:#111111;--surface-2:#29322c;--surface-3:#354038;--border:#3b453e;
 --text-primary:#f3f5f1;--text-secondary:#b9c4bc;--text-muted:#a3afa7;--brand-accent:#51b848;--brand-accent-strong:#6dce5e;
}
html[data-theme="light"] .page-sidebar,html[data-theme="light"] .admin-mode .page-sidebar{
 background:#ffffff;color:#111111;border-right:1px solid #e4e4e4;
 --surface-1:#ffffff;--surface-2:#f5f5f5;--surface-3:#eef6ec;--border:#e4e4e4;
 --text-primary:#111111;--text-secondary:#3d4459;--text-muted:#626c65;--brand-accent:#51b848;--brand-accent-strong:#2f7a28;
}
:root[data-theme] .page-sidebar a[data-page].active{background:color-mix(in oklab,#51b848 18%,#ffffff);color:#24601f;border:1px solid color-mix(in oklab,#51b848 30%,transparent);font-weight:600;box-shadow:0 1px 2px rgba(16,24,18,.05)}
:root[data-theme] .page-sidebar a[data-page].active .nav-icon{color:#24601f}
html[data-theme="light"] .page-sidebar a[data-page]{color:#3d4459}
html[data-theme="light"] .page-sidebar a[data-page]:hover{background:#eef6ec;color:#111111}
html[data-theme="light"] #portal-nav .nav-group{background:#f7f8f6;border:1px solid #e4e7e2;border-radius:16px;box-shadow:0 1px 0 0 rgba(255,255,255,.06) inset}
html[data-theme="light"] .page-sidebar a[data-page]{border:1px solid transparent;font-weight:500}
html[data-theme="light"] .page-sidebar a[data-page]:hover{box-shadow:0 1px 2px rgba(16,24,18,.05)}
html[data-theme="light"] .page-sidebar #scope-open,
html[data-theme="light"] .sidebar-account #signin{
 background:#ffffff;color:#111111;border:1px solid #d9ddd6;
}
html[data-theme="light"] .page-sidebar #scope-open:hover,
html[data-theme="light"] .sidebar-account #signin:hover{
 background:#eef6ec;color:#111111;border-color:#51b848;
}
html[data-theme="light"] .page-sidebar .portal-brand{
 background:transparent;border:0;box-shadow:none;min-height:0;margin-bottom:2px;padding:2px 2px 12px;
}
html[data-theme="light"] .page-sidebar .nakoda-logo-frame{
 background:transparent;border:0;box-shadow:none;border-radius:0;padding:0;max-width:none;width:100%;
}
html[data-theme="light"] .page-sidebar .sidebar-profile-shell:not(:has(.sidebar-profile-identity:not([hidden]))){display:none}
html[data-theme] .page-sidebar .portal-switch{background:#51b848;color:#111111;border-color:#51b848}
html[data-theme] .page-sidebar .portal-switch:hover{background:#6dce5e;color:#111111}
html[data-theme] .sidebar-prefs .language-toggle button[aria-pressed="true"],.sidebar-profile-avatar{color:#111111}
html[data-theme] button:not(:where(.report-expand,.admin-button,.danger)){color:#111111}
html[data-theme] .sidebar-account #signout,html[data-theme] .sidebar-account #admin-exit,html[data-theme] .sidebar-account #signin,html[data-theme] .page-sidebar #scope-open,html[data-theme] .sidebar-prefs #theme-toggle{color:var(--text-primary)}
html[data-theme] .page-sidebar #scope-open{background:var(--surface-2)}
html[data-theme] .sidebar-prefs .language-toggle button{color:var(--text-secondary)}
html[data-theme] .sidebar-prefs .language-toggle button[aria-pressed="true"]{color:#111111}
.project-bar-fill{background:#51b848}
/* Nakoda Energy Services wordmark, shown on a white plate so the black logo stays readable. */
.portal-brand{display:flex;align-items:center;justify-content:center;background:transparent;border-color:transparent;box-shadow:none;min-height:0;padding:8px}
.landing-lockup{background:transparent;padding:0;border:0;border-radius:0;justify-content:center}
.nakoda-logo-frame{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;max-width:240px;height:auto;margin-inline:auto;padding:10px 12px;overflow:visible;background:#ffffff;border:1px solid #e6e6e6;border-radius:12px;aspect-ratio:auto;flex-shrink:0}
.landing-lockup .nakoda-logo-frame{width:260px;max-width:100%}
.nakoda-logo-frame .nakoda-logo,.nakoda-logo-frame img{position:static;display:block;width:100%;max-width:100%;height:auto;left:auto;top:auto;aspect-ratio:352/94;object-fit:contain;object-view-box:none;image-rendering:auto}
:root{--landing-bg:#f5f5f5;--landing-fg:#111111;--landing-navy:#111111;--landing-accent:#51b848;--landing-accent-strong:#2f7a28;--landing-accent-soft:#8ed984;--landing-panel:#fff;--landing-panel-soft:#f2f4f1;--landing-border:#e0e5df;--landing-muted:#626c65;--landing-input:#bfc3b9;--landing-mark-shadow:#51b84830}
:root[data-theme="dark"]{--landing-bg:#111111;--landing-fg:#edf1e9;--landing-navy:#edf1e9;--landing-accent:#51b848;--landing-accent-strong:#8ed984;--landing-accent-soft:#8ed984;--landing-panel:#1d231f;--landing-panel-soft:#252d27;--landing-border:#364037;--landing-muted:#b4beb5;--landing-input:#626c5c;--landing-mark-shadow:#51b84830}
html:has(body.landing),html[data-theme] body.landing{background:var(--landing-bg);color:var(--landing-fg)}

.landing-form button[type="submit"],.landing-prefs .language-toggle button[aria-pressed="true"]{background:#51b848;color:#111111}
.landing-form button[type="submit"]:hover{background:#6dce5e}

html[data-theme] .language-toggle button[aria-pressed="false"]{color:var(--text-primary)}

html[data-theme] .page-sidebar #admin-nav h2{color:var(--text-primary)}

.language-menu{display:grid;gap:4px;min-width:0;font-size:11px;color:var(--text-secondary)}
.language-menu select{width:100%;min-height:32px;padding:5px 8px;border:1px solid var(--border);border-radius:6px;background:var(--surface-2);color:var(--text-primary);font:inherit;font-size:12px}

html[data-theme="dark"] .sidebar-prefs .language-menu select{background:#29322c;color:#f3f5f1;border-color:#4a554d;color-scheme:dark}

/* Picker colours follow Nakoda Energy Services' theme, independent of sidebar/button defaults. */
html[data-theme] #scope-dialog{background:var(--surface-1);color:var(--text-primary);border-color:var(--border);box-shadow:0 24px 64px -20px #0006}
#scope-dialog .connection-dialog-head,#scope-dialog .scope-customers{background:var(--surface-2)}
#scope-dialog .scope-pane>label,#scope-dialog .scope-pane>small{color:var(--text-secondary)}
#scope-dialog input,#scope-dialog .scope-list{background:var(--surface-1);color:var(--text-primary);border-color:var(--border)}
html[data-theme] #scope-dialog .scope-row{background:transparent;color:var(--text-primary)}
html[data-theme] #scope-dialog .scope-row:hover{background:var(--surface-3)}
html[data-theme] #scope-dialog .scope-row.is-selected{background:#51b848;color:#111111}

#portal-switcher{position:relative;padding:0 6px 6px}
#portal-switcher[hidden]{display:none!important}
#portal-switcher-toggle{
  display:flex;align-items:center;gap:8px;width:100%;min-height:34px;margin:0;padding:6px 10px;
  border:1px solid #cfe3cb;border-radius:8px;background:#ffffff;color:#1b1b1b;
  font:600 12px/1.2 "Segoe UI",Arial,sans-serif;box-shadow:0 1px 2px rgba(47,122,40,.08);cursor:pointer;
}
#portal-switcher-toggle:hover,#portal-switcher-toggle[aria-expanded="true"]{background:#f3faf2;border-color:#51b848;color:#1b1b1b}
#portal-switcher-toggle[aria-expanded="true"]{border-color:#2f7a28;box-shadow:0 0 0 3px rgba(81,184,72,.2)}
.portal-switcher-mark{width:8px;height:8px;border-radius:999px;background:#51b848;box-shadow:0 0 0 3px rgba(81,184,72,.22);flex:0 0 auto}
#portal-switcher-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
#portal-switcher .portal-switcher-chevron{width:16px;height:16px;min-height:0;flex:0 0 auto;color:#2f7a28}
#portal-switcher-toggle[aria-expanded="true"] .portal-switcher-chevron{transform:rotate(180deg)}
#portal-switcher-menu{
  position:absolute;z-index:40;left:6px;right:6px;top:calc(100% - 2px);
  display:flex;flex-direction:column;gap:2px;margin:0;padding:4px;
  border:1px solid #d7e6d4;border-radius:10px;background:#ffffff;
  box-shadow:0 10px 24px rgba(37,37,37,.1);
}
#portal-switcher-menu[hidden]{display:none!important}
#portal-switcher-menu button{
  display:flex;align-items:center;width:100%;min-height:34px;margin:0;padding:8px 10px;
  border:0;border-radius:8px;background:transparent;color:#252525;
  font:600 12.5px/1.2 "Segoe UI",Arial,sans-serif;text-align:left;box-shadow:none;cursor:pointer;
}
#portal-switcher-menu button:hover{background:#eef8ec;color:#1b1b1b}
#portal-switcher-menu button[aria-current="page"]{background:#e7f6e4;color:#2f7a28}
#portal-switcher-menu button#portal-switcher-admin{
  margin-top:4px;border-top:1px solid #e4efe2;color:#2f7a28;font-weight:700;
}
#portal-switcher-menu button#portal-switcher-admin:hover{background:#e7f6e4;color:#2f7a28}
