/* SEL Nexus CyberSuite sign-in page. Same tokens as the Infrastructure Security portal's dark theme
   (InfrastructureSecurity/Unified_Cyber_Portal/web/src/index.css, .dark), so moving between them feels like one product. */
:root {
  --canvas: #05070d;
  --panel: #0e1424;
  --raised: #141b2e;
  --field: #0a0f1c;
  --hairline: #1d2740;
  --hairline-strong: #2c3857;
  --ink: #eef2fb;
  --ink-2: #bcc6dd;
  --ink-3: #8792b0;
  --blue: #1d5cff;
  --blue-hi: #3b74ff;
  --sky: #6b97ff;
  --violet: #8b5cf6;
  --teal: #22d3ee;
  --rose: #f43f5e;
  --glass: rgb(16 23 42 / 0.3);
  --glass-edge: rgb(255 255 255 / 0.11);
  --glass-field: rgb(4 7 15 / 0.5);
  --elev: 0 1px 0 rgb(255 255 255 / 0.03) inset, 0 1px 2px rgb(0 0 0 / 0.6), 0 16px 36px -20px rgb(0 0 0 / 1);
  --float: 0 2px 8px rgb(0 0 0 / 0.6), 0 30px 64px -24px rgb(0 0 0 / 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --canvas: #f5f7fc;
  --panel: #ffffff;
  --raised: #eef2fa;
  --field: #ffffff;
  --hairline: #dce2ef;
  --hairline-strong: #bdc9df;
  --ink: #081030;
  --ink-2: #3a4366;
  --ink-3: #636b8c;
  --sky: #2459d3;
  --glass: rgb(255 255 255 / 0.85);
  --glass-edge: rgb(40 60 100 / 0.16);
  --glass-field: #ffffff;
  --elev: 0 1px 3px rgb(30 50 90 / 0.08), 0 16px 36px -20px rgb(30 50 90 / 0.2);
  --float: 0 12px 36px -12px rgb(30 50 90 / 0.2);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(1100px 620px at 76% 40%, rgb(29 92 255 / 0.14), transparent 70%),
    radial-gradient(700px 480px at 10% 100%, rgb(139 92 246 / 0.08), transparent 70%),
    radial-gradient(circle at 1px 1px, rgb(255 255 255 / 0.045) 1px, transparent 1.4px) 0 0 / 28px 28px,
    var(--canvas);
  background-attachment: fixed;
  font: 14px/1.43 "Inter Variable", "Segoe UI", system-ui, sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}
::selection { background: color-mix(in oklab, var(--blue) 32%, transparent); }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---- top bar: the product name, large enough to anchor the page */
.top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 20px 0; }
@media (min-width: 640px) { .top { padding: 28px 40px 0; } }
@media (min-width: 1024px) { .top { padding: 40px 64px 0; } }
.wordmark { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.wm-text { display: flex; align-items: baseline; gap: 10px; }
.wm-sel { font-size: 19px; font-weight: 800; letter-spacing: 0.2em; }
.wm-suite { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--sky); }
@media (min-width: 640px) { .wm-sel { font-size: 22px; } .wm-suite { font-size: 23px; } }
.tile {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff;
  background: var(--blue); border: 1px solid var(--blue);
  box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18), 0 6px 16px -8px var(--blue);
}
.tile .ico { width: 17px; height: 17px; stroke-width: 2.1; }
.tile-lg { width: 40px; height: 40px; }
.tile-brand { width: 44px; height: 44px; border-radius: 12px; box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18), 0 10px 26px -10px var(--blue); }
.tile-brand .ico { width: 22px; height: 22px; }
.tile-violet { background: var(--violet); border-color: var(--violet); box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.18), 0 6px 16px -8px var(--violet); }
.tile-mix { background: linear-gradient(135deg, var(--blue), var(--violet)); border-color: transparent; }
.tile-idle { background: var(--raised); border-color: var(--hairline-strong); color: var(--ink-3); box-shadow: none; }
.who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.who-name { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .who-name { display: none; } }
.link-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--hairline-strong); background: transparent; color: var(--ink-2); font: inherit; font-weight: 500; cursor: pointer;
  transition: color 160ms, border-color 160ms, background-color 160ms;
}
.link-btn:hover { color: var(--ink); border-color: var(--ink-3); background: rgb(255 255 255 / 0.03); }
.link-btn .ico { width: 16px; height: 16px; }

/* ---- signed-out layout: headline left, card right (card alone on smaller screens) */
.layout {
  flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; display: grid; align-items: center; gap: 56px;
  padding: 32px 16px 48px;
}
@media (min-width: 640px) { .layout { padding: 40px 40px 56px; } }
@media (min-width: 1024px) { .layout { grid-template-columns: minmax(0, 1fr) minmax(0, 540px); padding: 32px 64px 56px; } }
.hero { display: none; position: relative; z-index: 1; }
@media (min-width: 1024px) { .hero { display: block; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 20px; padding: 6px 12px; border-radius: 9999px;
  border: 1px solid rgb(107 151 255 / 0.28); background: rgb(29 92 255 / 0.1); color: var(--sky);
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.hero h2 { margin: 0; font-size: clamp(46px, 4.4vw, 62px); font-weight: 750; line-height: 1.05; letter-spacing: -0.035em; text-wrap: balance; }
.hero h2 span {
  display: block; margin-top: 14px;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--sky), #a78bfa 70%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin: 24px 0 0; max-width: 35rem; font-size: 18px; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.areas { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 14px; max-width: 32rem; }
.areas li {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 0.06); background: rgb(14 20 36 / 0.45);
}
.areas b { display: block; font-size: 15px; font-weight: 600; padding-top: 1px; }
.areas small { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: var(--ink-3); }

/* ---- the card on its stage, with the security backdrop turning slowly behind it */
.stage { position: relative; display: grid; place-items: center; isolation: isolate; }
.orbit {
  position: absolute; z-index: -1; left: 50%; top: 50%; width: min(860px, 175vw); height: auto; aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: none; overflow: visible;
}
.orbit line, .orbit circle, .orbit path, .orbit polygon { vector-effect: non-scaling-stroke; }
.o-layer { transform-box: fill-box; transform-origin: center; }
.o-ring { fill: none; stroke: rgb(107 151 255 / 0.2); stroke-width: 1; }
.o-faint { stroke: rgb(107 151 255 / 0.1); }
.o-none { stroke: none; }
.o-dash { stroke-dasharray: 2 9; }
.o-tick { stroke: rgb(107 151 255 / 0.22); stroke-width: 1; }
.o-tick-major { stroke: rgb(107 151 255 / 0.6); stroke-width: 1.5; }
.o-arc-blue, .o-arc-violet, .o-arc-teal { fill: none; stroke-width: 3; stroke-linecap: round; }
.o-arc-blue { stroke: #3b74ff; }
.o-arc-violet { stroke: #a78bfa; }
.o-arc-teal { stroke: var(--teal); }
.o-arcs { opacity: 0.8; }
.o-links line { stroke: rgb(139 92 246 / 0.16); stroke-width: 1; }
.o-node { fill: var(--sky); filter: drop-shadow(0 0 6px rgb(107 151 255 / 0.9)); }
.o-hex { fill: none; stroke: rgb(34 211 238 / 0.2); stroke-width: 1; }
.o-halo { opacity: 0.9; }
@media (prefers-reduced-motion: no-preference) {
  .o-spin-slow { animation: o-spin 100s linear infinite; }
  .o-spin-rev { animation: o-spin 70s linear infinite reverse; }
  .o-spin-mid { animation: o-spin 55s linear infinite; }
  .o-spin-rev-slow { animation: o-spin 85s linear infinite reverse; }
  .o-sweep { animation: o-spin 12s linear infinite; }
  .o-node { animation: o-pulse 4s ease-in-out infinite; }
  .o-halo { animation: o-breathe 9s ease-in-out infinite; }
}
/* With "reduce motion" on (often the default on virtual desktops) the backdrop still turns, but only its two outer
   rings, slowly: no sweep, no pulsing, nothing that moves quickly. */
@media (prefers-reduced-motion: reduce) {
  .o-spin-slow { animation: o-spin 180s linear infinite; }
  .o-spin-rev { animation: o-spin 150s linear infinite reverse; }
  .o-sweep { display: none; }
}
@keyframes o-spin { to { transform: rotate(360deg); } }
@keyframes o-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@keyframes o-breathe { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }

/* glass: the backdrop shows through, softened, with a light edge */
.card {
  position: relative; width: 100%; max-width: 420px; margin: 0 auto; border-radius: 20px;
  border: 1px solid var(--glass-edge); background: var(--glass);
  background-image: linear-gradient(155deg, rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.01) 42%, rgb(255 255 255 / 0) 60%);
  -webkit-backdrop-filter: blur(6px) saturate(140%); backdrop-filter: blur(6px) saturate(140%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 1px 2px rgb(0 0 0 / 0.5), 0 40px 90px -36px rgb(0 0 0 / 0.95), 0 0 0 1px rgb(0 0 0 / 0.25);
}
.card::before {
  content: ""; position: absolute; inset: 0 28px auto; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(107 151 255 / 0.65), rgb(167 139 250 / 0.5), transparent);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: linear-gradient(180deg, #111829 0%, var(--panel) 42%); }
}
.card-body { padding: 32px 22px 28px; }
@media (min-width: 640px) { .card-body { padding: 32px 36px 28px; } }
h1 { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.lead { margin: 8px 0 18px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

form { display: flex; flex-direction: column; gap: 14px; }
form h1 + .lead { margin-bottom: 10px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span:first-child { font-size: 14px; font-weight: 500; color: var(--ink); }
.field input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgb(255 255 255 / 0.12);
  background: var(--glass-field); color: var(--ink); font: inherit; font-size: 15px; outline: none; caret-color: var(--sky);
  transition: border-color 160ms, box-shadow 200ms, background-color 160ms;
}
.field input::placeholder { color: rgb(135 146 176 / 0.75); }
.field input:hover { border-color: rgb(255 255 255 / 0.22); }
.field input:focus { border-color: var(--blue); background: rgb(4 7 15 / 0.72); box-shadow: 0 0 0 4px rgb(29 92 255 / 0.18); }
.field input[aria-invalid="true"] { border-color: var(--rose); box-shadow: 0 0 0 4px rgb(244 63 94 / 0.15); }
.field input:disabled { opacity: 0.6; }
.hint { font-size: 13px; line-height: 1.45; color: var(--ink-3); }
.pw { position: relative; display: block; }
.pw input { padding-right: 56px; }
.pw-toggle {
  position: absolute; inset: 0 0 0 auto; width: 52px; display: grid; place-items: center; border: 0; border-radius: 0 12px 12px 0;
  background: transparent; color: var(--ink-3); cursor: pointer; transition: color 160ms;
}
.pw-toggle:hover { color: var(--ink); }

/* ---- domain picker: our own dropdown, a single choice on sign-in, check boxes on sign-up */
.picker { position: relative; }
.picker-trigger {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 9px 14px 9px 10px; border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.12); background: var(--glass-field); color: var(--ink); font: inherit; font-size: 15px;
  font-weight: 500; text-align: left; cursor: pointer; transition: border-color 160ms, box-shadow 200ms, background-color 160ms;
}
.picker-trigger:hover { border-color: rgb(255 255 255 / 0.22); }
.picker-trigger:focus-visible, .picker.open .picker-trigger { outline: none; border-color: var(--blue); background: rgb(4 7 15 / 0.72); box-shadow: 0 0 0 4px rgb(29 92 255 / 0.18); }
.picker-trigger:disabled { opacity: 0.6; cursor: default; }
.picker-icons { display: flex; flex-shrink: 0; }
.picker-icons .tile { width: 32px; height: 32px; border-radius: 9px; }
.picker-icons .tile + .tile { margin-left: -8px; box-shadow: 0 0 0 2px #0b1120; }
.picker-icons .ico { width: 16px; height: 16px; }
.picker-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-value.placeholder { color: rgb(135 146 176 / 0.9); font-weight: 400; }
.picker .chevron { width: 18px; height: 18px; color: var(--ink-3); transition: transform 200ms; }
.picker.open .chevron { transform: rotate(180deg); color: var(--sky); }
.picker-panel {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 8px); padding: 6px; border-radius: 14px; outline: none;
  border: 1px solid rgb(255 255 255 / 0.12); background: rgb(13 19 35 / 0.94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset, 0 24px 48px -16px rgb(0 0 0 / 0.9);
}
.picker-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background-color 120ms;
}
.picker-option + .picker-option { margin-top: 2px; }
.picker-option.active { background: rgb(255 255 255 / 0.06); }
.picker-option[aria-selected="true"] { background: rgb(29 92 255 / 0.12); }
.picker-option[aria-selected="true"].active { background: rgb(29 92 255 / 0.18); }
.picker-option[aria-disabled="true"] { cursor: default; opacity: 0.5; }
.picker-option .tile { width: 34px; height: 34px; flex-shrink: 0; }
.opt-text { flex: 1; min-width: 0; }
.opt-text b { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.opt-text small { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--ink-3); }
.mark {
  width: 20px; height: 20px; flex-shrink: 0; display: grid; place-items: center;
  border: 1.5px solid var(--hairline-strong); transition: background-color 140ms, border-color 140ms;
}
.mark-dot { border-radius: 50%; }
.mark-box { border-radius: 6px; }
.mark .ico { width: 13px; height: 13px; stroke-width: 3; color: #fff; opacity: 0; transition: opacity 140ms; }
.picker-option[aria-selected="true"] .mark { background: var(--blue); border-color: var(--blue); }
.picker-option[aria-selected="true"] .mark .ico { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .picker-panel:not([hidden]) { animation: drop 160ms cubic-bezier(0.16, 1, 0.3, 1); }
}
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.error {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgb(244 63 94 / 0.35); background: rgb(244 63 94 / 0.12); font-size: 14px;
}
.error .ico { width: 16px; height: 16px; margin-top: 2px; color: var(--rose); }
.page-error { max-width: 540px; margin: 0 auto 32px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 44px; width: 100%; margin-top: 4px; border: 0; border-radius: 10px;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue)); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.2), 0 1px 2px rgb(0 0 0 / 0.25), 0 12px 28px -12px rgb(29 92 255 / 0.9);
  transition: filter 160ms, transform 160ms, opacity 160ms;
}
.btn .ico { width: 16px; height: 16px; transition: transform 160ms; }
.btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.btn:hover:not(:disabled) .ico { transform: translateX(2px); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.7; cursor: default; }
.switch { margin: 2px 0 0; text-align: center; font-size: 14px; color: var(--ink-3); }
.switch a { color: var(--sky); font-weight: 600; text-underline-offset: 4px; text-decoration: none; }
.switch a:hover { text-decoration: underline; }

/* ---- signed in: domain switcher (no backdrop animation here) */
.choose { flex: 1; width: 100%; max-width: 1040px; margin: 0 auto; padding: 56px 16px 64px; }
@media (min-width: 640px) { .choose { padding: 72px 40px 80px; } }
.choose h1 { font-size: clamp(30px, 3.2vw, 40px); letter-spacing: -0.025em; }
.modules { display: grid; gap: 20px; }
@media (min-width: 760px) { .modules { grid-template-columns: 1fr 1fr; } }
.module {
  position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 260px; padding: 28px; text-align: left;
  border-radius: 20px; border: 1px solid var(--hairline); background: linear-gradient(180deg, #111829 0%, var(--panel) 42%);
  box-shadow: var(--elev); color: inherit; font: inherit; text-decoration: none; cursor: pointer;
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
}
button.module:hover { border-color: var(--hairline-strong); transform: translateY(-2px); box-shadow: var(--float); }
button.module:hover .go { background: var(--blue-hi); }
.module .tile { width: 48px; height: 48px; border-radius: 12px; }
.module .tile .ico { width: 22px; height: 22px; }
.module h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.module p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-2); flex: 1; }
.module .go {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--blue); color: #fff; font-weight: 600; transition: background-color 160ms;
}
.module .go .ico { width: 16px; height: 16px; }
.module.off { cursor: default; }
.module.off .tile { filter: saturate(0.4); opacity: 0.75; }
.module .soon {
  align-self: flex-start; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 9999px;
  border: 1px solid var(--hairline-strong); color: var(--ink-3); font-size: 13px; font-weight: 500;
}
.module .here {
  align-self: flex-start; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 9999px;
  border: 1px solid var(--blue); color: var(--sky); font-size: 13px; font-weight: 600;
}

@media (prefers-reduced-motion: no-preference) {
  .card, .module { animation: rise 520ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .orbit { animation: fade-in 1200ms ease-out both; }
  .module:nth-child(2) { animation-delay: 70ms; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }


/* Shared sign-in and the domain chooser follow the originating module's theme. */
:root[data-theme="light"] body {
  background:
    radial-gradient(1100px 620px at 76% 40%, rgb(29 92 255 / 0.06), transparent 70%),
    radial-gradient(circle at 1px 1px, rgb(40 60 100 / 0.08) 1px, transparent 1.4px) 0 0 / 28px 28px,
    var(--canvas);
  background-attachment: fixed;
}
:root[data-theme="light"] .module,
:root[data-theme="light"] .card { background: var(--panel); box-shadow: var(--elev); }
:root[data-theme="light"] .field input,
:root[data-theme="light"] .picker-trigger { border-color: var(--hairline-strong); }
:root[data-theme="light"] .field input:focus,
:root[data-theme="light"] .picker-trigger:focus-visible,
:root[data-theme="light"] .picker.open .picker-trigger { background: var(--panel); }
:root[data-theme="light"] .picker-panel { background: var(--panel); border-color: var(--hairline); box-shadow: var(--float); }
:root[data-theme="light"] .picker-option.active { background: var(--raised); }
:root[data-theme="light"] .areas li { background: rgb(255 255 255 / 0.72); border-color: var(--hairline); }
