:root {
  --portal-bg: #f2f4f7;
  --portal-panel: rgba(255, 255, 255, 0.92);
  --portal-panel-strong: rgba(255, 255, 255, 0.98);
  --portal-line: rgba(11, 34, 83, 0.12);
  --portal-ink: #0b1f4a;
  --portal-muted: #5b6680;
  --portal-navy: #0b1223;
  --portal-cyan: #00c2ff;
  --portal-violet: #7a5cff;
  --portal-slate: #33415c;
  --portal-soft: #e6e9f0;
  --portal-shadow: 0 28px 70px rgba(11, 18, 35, 0.14);
  --portal-shadow-soft: 0 14px 38px rgba(28, 44, 89, 0.12);
  --portal-radius-xl: 32px;
  --portal-radius-lg: 24px;
  --portal-radius-md: 18px;
  --portal-font: "Segoe UI", Roboto, Arial, sans-serif;
  --portal-heading-font: "Segoe UI", Roboto, Arial, sans-serif;
  --portal-text-title: clamp(1.5rem, 2vw, 2rem);
  --portal-text-section: clamp(1.125rem, 1.45vw, 1.375rem);
  --portal-text-kpi: clamp(1.625rem, 2.2vw, 2.25rem);
  --portal-text-body: 0.9375rem;
  --portal-text-label: 0.875rem;
  --portal-text-small: 0.8125rem;
  --portal-text-xs: 0.75rem;
  --portal-text-button: 0.9375rem;
  --portal-text-table: 0.875rem;
  --portal-weight-regular: 400;
  --portal-weight-medium: 600;
  --portal-weight-strong: 700;
  --portal-line-height-body: 1.55;
  --portal-line-height-heading: 1.18;
  --portal-letter-tight: -0.02em;
  --portal-letter-wide: 0.08em;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--portal-font);
  font-size: var(--portal-text-body);
  font-weight: var(--portal-weight-regular);
  line-height: var(--portal-line-height-body);
  letter-spacing: 0;
  color: var(--portal-ink);
  background:
    radial-gradient(circle at top left, rgba(0, 194, 255, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(122, 92, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #fbfcfe 0%, var(--portal-bg) 100%);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 32vw;
  height: 32vw;
  border-radius: 50%;
  filter: blur(64px);
  opacity: 0.38;
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: -14vw;
  left: -10vw;
  background: rgba(0, 194, 255, 0.22);
}

body::after {
  right: -12vw;
  bottom: -16vw;
  background: rgba(122, 92, 255, 0.18);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

textarea {
  font: inherit;
}

body,
button,
input,
select,
textarea {
  font-family: var(--portal-font);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--portal-heading-font);
  font-weight: var(--portal-weight-strong);
  line-height: var(--portal-line-height-heading);
  letter-spacing: var(--portal-letter-tight);
}

.portal-body--auth,
.portal-body--app {
  position: relative;
  z-index: 1;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(520px, 1.12fr) minmax(400px, 0.88fr);
  width: min(calc(100vw - 32px), 1560px);
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 12px;
  gap: 24px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 32px 90px rgba(15, 33, 73, 0.16);
}

.auth-hero,
.auth-panel,
.portal-topbar,
.dashboard-shell-card,
.admin-card,
.admin-hero,
.state-card,
.fatal-state {
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--portal-shadow);
  backdrop-filter: blur(18px);
}

.auth-hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 40px 42px;
  border-radius: var(--portal-radius-xl);
  color: white;
  overflow: hidden;
}

.auth-hero__video,
.auth-hero__shade,
.auth-hero__grid {
  position: absolute;
  inset: 0;
}

.auth-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}

.auth-hero__shade {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(2, 8, 22, 0.18) 0%, rgba(4, 10, 24, 0.42) 22%, rgba(5, 12, 30, 0.82) 100%),
    radial-gradient(circle at 18% 18%, rgba(0, 194, 255, 0.18), transparent 22%),
    radial-gradient(circle at 82% 84%, rgba(122, 92, 255, 0.18), transparent 26%);
}

.auth-hero__grid {
  z-index: 2;
  opacity: 0.1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mix-blend-mode: screen;
}

.auth-panel__eyebrow,
.dashboard-shell-card__eyebrow,
.portal-topbar__eyebrow,
.state-card__eyebrow,
.fatal-state__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-hero__eyebrow {
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.auth-hero__content {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 30px;
  width: min(100%, 640px);
}

.auth-hero h1,
.auth-panel h2,
.dashboard-shell-card h1,
.admin-hero h1,
.state-card h1,
.fatal-state h1,
.admin-card h2 {
  margin: 0;
  font-family: var(--portal-heading-font);
  line-height: 0.98;
  font-weight: 800;
}

.auth-hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 4.2vw, 4.6rem);
  line-height: 1.02;
}

.auth-hero p,
.auth-panel p,
.dashboard-shell-card p,
.admin-hero p,
.state-card p,
.fatal-state p,
.admin-card p {
  margin: 0;
  line-height: 1.6;
  color: inherit;
}

.auth-showcase__brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: fit-content;
}

.auth-showcase__logo {
  display: block;
  width: clamp(240px, 24vw, 360px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.22));
}

.auth-showcase__copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  max-width: 620px;
}

.auth-highlight-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(100%, 540px);
}

.auth-highlight-card {
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(9, 20, 48, 0.56);
  box-shadow:
    inset 0 0 0 1px rgba(142, 165, 255, 0.12),
    0 18px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
}

.auth-highlight-card strong {
  font-family: var(--portal-heading-font);
  font-size: 1.02rem;
  letter-spacing: -0.03em;
}

.auth-highlight-card span {
  color: rgba(223, 233, 247, 0.86);
  font-size: 0.92rem;
  line-height: 1.6;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 38px;
  border-radius: var(--portal-radius-xl);
  background:
    linear-gradient(180deg, rgba(253, 254, 255, 0.97) 0%, rgba(244, 247, 252, 0.93) 100%);
}

.auth-panel__stage {
  display: grid;
  gap: 24px;
  width: min(100%, 430px);
  margin: 0 auto;
}

.auth-panel__head {
  display: grid;
  gap: 10px;
}

.auth-panel__head-main,
.login-panel__head-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auth-panel__head-copy,
.login-panel__head-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.auth-panel__subtitle {
  color: var(--portal-muted);
  font-size: 0.98rem;
}

.auth-panel__eyebrow,
.dashboard-shell-card__eyebrow,
.state-card__eyebrow,
.fatal-state__eyebrow {
  color: var(--portal-violet);
  background: rgba(122, 92, 255, 0.08);
}

.auth-panel h2,
.admin-card h2 {
  font-size: clamp(2.2rem, 3vw, 3rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.auth-copy {
  color: var(--portal-muted);
  font-size: 0.96rem;
}

.stack-form {
  display: grid;
  gap: 14px;
}

.stack-form--compact {
  gap: 14px;
}

.control {
  display: grid;
  gap: 8px;
}

.control span {
  color: var(--portal-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.control input,
.control select {
  width: 100%;
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: #fbfcff;
  color: var(--portal-ink);
  box-shadow: none;
}

.control input:focus,
.control select:focus {
  outline: none;
  border-color: rgba(122, 92, 255, 0.44);
  box-shadow:
    0 0 0 4px rgba(122, 92, 255, 0.08),
    var(--portal-shadow-soft);
}

.control-grid {
  display: grid;
  gap: 16px;
}

.control-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 52px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(11, 18, 35, 0.07);
  color: var(--portal-ink);
  cursor: pointer;
}

.stack-form--auth-login .control {
  position: relative;
}

.stack-form--auth-login .control span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.stack-form--auth-login input::placeholder {
  color: rgba(51, 65, 92, 0.54);
}

.auth-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.86rem;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--portal-muted);
}

.remember-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--portal-violet);
}

.auth-meta-link {
  color: #4f8cff;
  font-weight: 600;
}

.auth-divider {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(91, 102, 128, 0.72);
  font-size: 0.82rem;
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(11, 34, 83, 0.12);
}

.auth-divider span {
  position: relative;
  z-index: 1;
  padding: 0 10px;
  background: white;
}

.auth-panel__footer {
  padding-top: 4px;
  color: rgba(91, 102, 128, 0.78);
  font-size: 0.82rem;
  text-align: center;
}

.inline-note {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 194, 255, 0.08);
  color: var(--portal-slate);
  line-height: 1.55;
}

.inline-note code {
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(11, 18, 35, 0.08);
  color: var(--portal-navy);
}

.inline-note--success {
  background: rgba(30, 190, 121, 0.1);
}

.inline-note--warning {
  background: rgba(255, 180, 0, 0.14);
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.portal-button:hover {
  transform: translateY(-1px);
}

.portal-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
  box-shadow: none;
}

.portal-button--full {
  width: 100%;
}

.portal-button--primary {
  color: white;
  background: linear-gradient(135deg, #0b1223 0%, #152d68 56%, #6f49ff 100%);
  box-shadow: 0 18px 30px rgba(21, 45, 104, 0.26);
}

.portal-button--secondary {
  color: var(--portal-ink);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(11, 34, 83, 0.12);
}

.portal-button--ghost {
  color: var(--portal-ink);
  background: rgba(255, 255, 255, 0.68);
  border-color: rgba(11, 34, 83, 0.12);
}

.theme-toggle {
  gap: 12px;
  min-width: 142px;
  padding-inline: 16px;
  white-space: nowrap;
}

.theme-toggle::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--portal-violet);
  box-shadow: 0 0 0 6px rgba(122, 92, 255, 0.12);
  flex: 0 0 auto;
}

.theme-toggle__label {
  display: inline-flex;
  align-items: center;
}

.flash {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.flash__message {
  font-weight: 700;
  line-height: 1.55;
}

.flash--success {
  background: rgba(30, 190, 121, 0.09);
  border-color: rgba(30, 190, 121, 0.2);
}

.flash--error {
  background: rgba(228, 70, 85, 0.08);
  border-color: rgba(228, 70, 85, 0.16);
}

.flash--info,
.flash--warning {
  background: rgba(0, 194, 255, 0.08);
  border-color: rgba(0, 194, 255, 0.16);
}

.flash-secret {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(11, 18, 35, 0.06);
}

.flash-secret__label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--portal-muted);
  letter-spacing: 0.08em;
}

.flash-secret code {
  display: inline-block;
  width: fit-content;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--portal-navy);
  color: white;
  font-size: 0.98rem;
}

.flash-secret p {
  color: var(--portal-muted);
  font-size: 0.92rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-body {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 18%, rgba(0, 194, 255, 0.16), transparent 22%),
    radial-gradient(circle at 82% 22%, rgba(122, 92, 255, 0.2), transparent 28%),
    linear-gradient(135deg, #040d1f 0%, #091733 48%, #0c1230 100%);
}

.login-body::before,
.login-body::after {
  display: none;
}

.login-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 24% 24%, rgba(0, 194, 255, 0.2), transparent 24%),
    radial-gradient(circle at 78% 70%, rgba(122, 92, 255, 0.24), transparent 28%),
    linear-gradient(160deg, rgba(6, 16, 40, 0.98) 0%, rgba(5, 11, 30, 0.94) 100%);
}

.login-backdrop__shade,
.login-backdrop__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-backdrop__shade {
  background:
    linear-gradient(115deg, rgba(2, 8, 22, 0.72) 0%, rgba(3, 8, 22, 0.46) 34%, rgba(3, 8, 22, 0.78) 100%),
    radial-gradient(circle at 18% 12%, rgba(0, 194, 255, 0.16), transparent 20%),
    radial-gradient(circle at 78% 84%, rgba(122, 92, 255, 0.18), transparent 24%);
}

.login-backdrop__glow {
  inset: auto;
  border-radius: 50%;
  filter: blur(84px);
  opacity: 0.38;
  mix-blend-mode: screen;
}

.login-backdrop__glow--cyan {
  top: 10%;
  left: 6%;
  width: 24vw;
  height: 24vw;
  background: rgba(0, 194, 255, 0.3);
}

.login-backdrop__glow--violet {
  right: 8%;
  bottom: 6%;
  width: 28vw;
  height: 28vw;
  background: rgba(122, 92, 255, 0.26);
}

.login-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 12px 20px;
}

.login-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(860px, 1.38fr) minmax(500px, 0.74fr);
  width: min(calc(100vw - 24px), 1760px);
  min-height: 680px;
  height: min(760px, calc(100vh - 24px));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 36px;
  overflow: hidden;
  background: rgba(6, 18, 45, 0.34);
  box-shadow:
    0 40px 120px rgba(3, 10, 29, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.login-showcase {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(2, 10, 26, 0.86) 0%, rgba(8, 22, 52, 0.94) 100%);
}

.login-showcase__video,
.login-showcase__shade,
.login-showcase__grid {
  position: absolute;
  inset: 0;
}

.login-showcase__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.44;
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.02);
}

.login-showcase__shade {
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(2, 8, 22, 0.18) 0%, rgba(4, 10, 24, 0.42) 22%, rgba(5, 12, 30, 0.82) 100%),
    radial-gradient(circle at 18% 18%, rgba(0, 194, 255, 0.18), transparent 22%),
    radial-gradient(circle at 82% 84%, rgba(122, 92, 255, 0.18), transparent 26%);
}

.login-showcase__grid {
  z-index: 2;
  opacity: 0.1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mix-blend-mode: screen;
}

.login-showcase__content {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 28px;
  width: min(100%, 760px);
  padding: 40px 56px 44px;
  color: white;
  justify-items: center;
}

.login-showcase__brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  justify-self: center;
}

.login-showcase__logo {
  display: block;
  width: clamp(360px, 34vw, 560px);
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.22));
}

.login-showcase__copy {
  display: grid;
  gap: 18px;
  max-width: 680px;
  justify-items: center;
  text-align: center;
}

.login-showcase__eyebrow {
  color: rgba(186, 225, 255, 0.84);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.login-showcase__copy h2 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.8rem, 3.3vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.login-showcase__copy p {
  margin: 0;
  max-width: 34ch;
  color: rgba(223, 233, 247, 0.9);
  font-size: 1.08rem;
  line-height: 1.6;
}

.login-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 44px 48px 34px;
  background:
    linear-gradient(180deg, rgba(253, 254, 255, 0.97) 0%, rgba(244, 247, 252, 0.93) 100%);
  backdrop-filter: blur(12px);
}

.login-panel::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 34, 83, 0.12) 12%, rgba(11, 34, 83, 0.18) 50%, transparent 100%);
}

.login-panel__stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  width: min(100%, 480px);
}

.login-panel__head {
  display: grid;
  gap: 12px;
}

.login-panel__surface {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 250, 253, 0.88) 100%);
  box-shadow:
    0 20px 46px rgba(10, 24, 57, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-panel__head h1 {
  margin: 0;
  color: #0b1223;
  font-size: clamp(2.2rem, 3vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.login-panel__head p {
  margin: 0;
  color: rgba(51, 65, 92, 0.82);
  font-size: 1.02rem;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  position: relative;
  display: block;
}

.login-field::before,
.password-field--login::before,
.password-toggle--icon::before,
.login-form__sso-icon::before {
  content: "";
  position: absolute;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.login-field::before {
  top: 50%;
  left: 18px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  opacity: 0.58;
  pointer-events: none;
}

.login-field--user::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6680' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7.5h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2Z'/%3E%3Cpath d='m3 8 8.1 6.07a1.5 1.5 0 0 0 1.8 0L21 8'/%3E%3C/svg%3E");
}

.login-field input,
.password-field--login input {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(10, 27, 67, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--portal-ink);
  font-size: 1rem;
  box-shadow:
    0 10px 24px rgba(9, 24, 57, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-field input {
  padding: 16px 18px 16px 54px;
}

.password-field--login {
  position: relative;
}

.password-field--login::before {
  top: 50%;
  left: 18px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  opacity: 0.58;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6680' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='11' width='16' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 1 1 8 0v3'/%3E%3C/svg%3E");
}

.password-field--login input {
  padding: 16px 54px 16px 54px;
}

.login-field input:focus,
.password-field--login input:focus {
  outline: none;
  border-color: rgba(79, 140, 255, 0.44);
  background: white;
  box-shadow:
    0 0 0 4px rgba(79, 140, 255, 0.08),
    0 18px 36px rgba(17, 40, 96, 0.12);
}

.login-field input::placeholder,
.password-field--login input::placeholder {
  color: rgba(91, 102, 128, 0.58);
}

.password-toggle--icon {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 32px;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(11, 18, 35, 0.04);
  color: transparent;
  font-size: 0;
  cursor: pointer;
  transition: background 180ms ease;
}

.password-toggle--icon::before {
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6680' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12s3.5-6 9.5-6 9.5 6 9.5 6-3.5 6-9.5 6-9.5-6-9.5-6Z'/%3E%3Ccircle cx='12' cy='12' r='2.8'/%3E%3C/svg%3E");
  opacity: 0.74;
}

.password-toggle--icon:hover {
  background: rgba(11, 18, 35, 0.08);
}

.login-form__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.login-form__meta .remember-check {
  color: var(--portal-muted);
  font-size: 0.9rem;
}

.login-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #4f8cff;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease;
}

.login-link-button:hover {
  color: #244cba;
}

.login-form__submit {
  min-height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #081633 0%, #0d2a68 54%, #5f46ff 100%);
  box-shadow: 0 22px 34px rgba(12, 35, 92, 0.24);
}

.login-divider {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(91, 102, 128, 0.72);
  font-size: 0.86rem;
  text-transform: lowercase;
}

.login-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(11, 34, 83, 0.12);
}

.login-divider span {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  background: white;
}

.login-form__sso {
  min-height: 56px;
  gap: 10px;
  border-radius: 16px;
  background: rgba(248, 250, 253, 0.92);
  border-color: rgba(11, 34, 83, 0.1);
  box-shadow:
    0 10px 22px rgba(10, 24, 57, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.login-form__sso-icon {
  position: relative;
  display: inline-flex;
  width: 18px;
  height: 18px;
}

.login-form__sso-icon::before {
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6680' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='10' width='12' height='10' rx='2'/%3E%3Cpath d='M9 10V7.5a3 3 0 1 1 6 0V10'/%3E%3C/svg%3E");
  opacity: 0.86;
}

.login-panel__footer {
  padding-top: 2px;
  color: rgba(91, 102, 128, 0.82);
  font-size: 0.82rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .auth-hero__video,
  .login-showcase__video {
    display: none;
  }

  .portal-button,
  .login-link-button,
  .password-toggle--icon,
  .login-field input,
  .password-field--login input {
    transition: none;
  }
}

.portal-app-shell {
  position: relative;
  z-index: 1;
  padding: 24px;
}

.portal-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
}

.portal-topbar__brand,
.portal-topbar__account {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-topbar__eyebrow {
  padding: 0;
  background: transparent;
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.portal-topbar__logo {
  display: block;
  width: clamp(138px, 15vw, 190px);
  height: auto;
}

.portal-topbar__brand strong {
  display: block;
  font-size: 1rem;
  color: var(--portal-ink);
}

.portal-topbar__nav {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.portal-link {
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--portal-muted);
  font-weight: 700;
}

.portal-link--active {
  color: white;
  background: linear-gradient(135deg, #0b1223 0%, #152d68 52%, #6f49ff 100%);
  box-shadow: 0 10px 26px rgba(19, 40, 87, 0.18);
}

.portal-user-card {
  display: grid;
}

.portal-user-card__name {
  font-weight: 800;
}

.portal-user-card__meta {
  color: var(--portal-muted);
  font-size: 0.9rem;
}

.inline-form {
  display: inline-flex;
  gap: 10px;
}

.inline-form--wrap {
  flex-wrap: wrap;
}

.portal-content {
  display: grid;
  gap: 20px;
  padding-top: 22px;
}

.dashboard-shell-card,
.admin-hero,
.admin-card,
.state-card,
.fatal-state {
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
}

.dashboard-shell-card__header,
.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-shell-card__header {
  margin-bottom: 20px;
}

.dashboard-shell-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(11, 34, 83, 0.08);
  color: var(--portal-ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.pill--cyan {
  background: rgba(0, 194, 255, 0.12);
}

.pill--violet {
  background: rgba(122, 92, 255, 0.12);
}

.pill--navy {
  color: white;
  background: var(--portal-navy);
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.admin-grid--stacked {
  grid-template-columns: 1fr;
}

.admin-card {
  display: grid;
  gap: 18px;
}

.admin-card__header {
  display: grid;
  gap: 10px;
}

.admin-user-list {
  display: grid;
  gap: 16px;
  max-height: calc(100vh - 360px);
  overflow: auto;
  padding-right: 6px;
}

.admin-user-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--portal-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.admin-user-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admin-user-card__top h3 {
  margin: 0 0 6px;
  font-size: 1.16rem;
}

.admin-user-card__meta {
  color: var(--portal-muted);
  font-size: 0.92rem;
}

.admin-card--form-wide {
  position: relative;
  top: 0;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.admin-form-note {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 16px 18px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: rgba(247, 248, 252, 0.86);
}

.admin-form-note strong,
.admin-form-note p {
  margin: 0;
}

.admin-form-note p {
  color: var(--portal-muted);
  line-height: 1.55;
}

.admin-filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(180px, 0.6fr)) auto;
  gap: 16px;
  align-items: end;
}

.admin-table {
  min-width: 1080px;
}

.admin-table .dashboard-shell-card__pills {
  gap: 8px;
}

.admin-table .pill,
.admin-table .contracts-status {
  color: var(--portal-ink);
  background: rgba(11, 34, 83, 0.08);
  box-shadow: none;
}

.permissions-popover {
  display: grid;
  gap: 10px;
  width: max-content;
}

.permissions-popover summary {
  list-style: none;
}

.permissions-popover summary::-webkit-details-marker {
  display: none;
}

.permissions-popover__menu {
  display: grid;
  gap: 10px;
  min-width: 240px;
  padding: 16px;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--portal-shadow-soft);
}

.permissions-popover__title,
.permissions-popover__meta {
  margin: 0;
}

.permissions-popover__title {
  font-size: 0.96rem;
}

.permissions-popover__meta {
  color: var(--portal-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.checkbox-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 16px;
  border: 1px solid var(--portal-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--portal-shadow-soft);
  color: var(--portal-ink);
  font-weight: 700;
}

.checkbox-card--stacked {
  align-items: flex-start;
}

.checkbox-card__content {
  display: grid;
  gap: 4px;
}

.checkbox-card__content strong {
  font-size: 0.96rem;
  line-height: 1.35;
}

.checkbox-card__description {
  color: var(--portal-muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
}

.checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--portal-violet);
}

.checkbox-card input[disabled] + span,
.checkbox-card input[disabled] {
  opacity: 0.7;
}

.state-card,
.fatal-state {
  max-width: 840px;
  margin: 6vh auto 0;
}

.state-card__actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.fatal-state {
  display: grid;
  gap: 16px;
}

.portal-app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  width: min(calc(100vw - 32px), 1680px);
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 12px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 32px 90px rgba(15, 33, 73, 0.16);
}

.portal-sidebar,
.portal-topbar,
.dashboard-shell-card,
.admin-card,
.state-card,
.fatal-state,
.portal-page-hero,
.portal-page-section {
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: var(--portal-shadow);
  backdrop-filter: blur(18px);
}

.portal-sidebar {
  display: grid;
  align-content: start;
  gap: 24px;
  padding: 24px 20px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(8, 18, 44, 0.98) 0%, rgba(8, 24, 58, 0.96) 100%);
  color: white;
  position: relative;
  top: 0;
  height: auto;
  overflow: visible;
}

.portal-sidebar__brand {
  display: grid;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-sidebar__logo {
  display: block;
  width: min(100%, 228px);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
}

.portal-sidebar__caption,
.portal-sidebar__section-title,
.portal-sidebar__footer span {
  color: rgba(223, 233, 247, 0.7);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.portal-sidebar__section {
  display: grid;
  gap: 14px;
}

.portal-sidebar__nav,
.portal-sidebar__pills {
  display: grid;
  gap: 10px;
}

.portal-sidebar__pills .pill {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.portal-sidebar__pills .pill--cyan {
  background: rgba(0, 194, 255, 0.16);
}

.portal-sidebar__pills .pill--violet {
  background: rgba(122, 92, 255, 0.18);
}

.portal-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: rgba(238, 244, 255, 0.8);
  background: rgba(255, 255, 255, 0.02);
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.portal-sidebar__link::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 194, 255, 0.5);
  box-shadow: 0 0 0 6px rgba(0, 194, 255, 0.08);
}

.portal-sidebar__link--admin::before {
  background: rgba(122, 92, 255, 0.72);
  box-shadow: 0 0 0 6px rgba(122, 92, 255, 0.1);
}

.portal-sidebar__link:hover {
  transform: translateX(2px);
  background: rgba(255, 255, 255, 0.05);
}

.portal-sidebar__link--active {
  border-color: rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(10, 28, 66, 0.96) 0%, rgba(25, 42, 92, 0.96) 100%);
  color: white;
}

.portal-sidebar__footer {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding: 16px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.portal-sidebar__footer strong {
  font-family: var(--portal-heading-font);
  font-size: 1rem;
}

.portal-workspace {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.portal-topbar {
  position: relative;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
}

.portal-topbar__context,
.portal-topbar__meta,
.portal-topbar__account {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.portal-topbar__context {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.portal-topbar__titles {
  display: grid;
  gap: 6px;
}

.portal-topbar__titles h1 {
  margin: 0;
  font-family: var(--portal-heading-font);
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  letter-spacing: -0.04em;
}

.portal-topbar__titles p {
  margin: 0;
  color: var(--portal-muted);
  max-width: 62ch;
}

.portal-topbar__eyebrow {
  padding: 0;
  background: transparent;
  color: var(--portal-violet);
  font-size: 0.72rem;
}

.portal-topbar__meta {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.portal-context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.05);
  color: var(--portal-slate);
  font-size: 0.84rem;
  font-weight: 700;
}

.portal-user-card {
  display: grid;
  gap: 4px;
}

.portal-user-card__name {
  font-family: var(--portal-heading-font);
  font-size: 1rem;
  font-weight: 800;
}

.portal-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  color: var(--portal-muted);
  font-size: 0.86rem;
}

.portal-breadcrumbs__item--current {
  color: var(--portal-ink);
  font-weight: 700;
}

.portal-content {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.portal-page-hero,
.portal-page-section,
.dashboard-shell-card,
.admin-card,
.state-card,
.fatal-state {
  padding: 26px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
}

.portal-page-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.portal-page-hero__copy,
.portal-page-hero__aside,
.portal-page-section__header {
  display: grid;
  gap: 10px;
}

.portal-page-hero__copy h2,
.portal-page-section__header h3 {
  margin: 0;
  font-family: var(--portal-heading-font);
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  letter-spacing: -0.04em;
}

.portal-page-hero__copy p,
.portal-page-section__header p,
.portal-page-hero__note {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.6;
}

.portal-page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(122, 92, 255, 0.08);
  color: var(--portal-violet);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
}

.portal-page-hero__aside {
  justify-items: end;
  max-width: 420px;
}

.portal-page-hero__aside .dashboard-shell-card__pills {
  justify-content: flex-end;
}

.portal-page-hero {
  display: none;
}

.dashboard-shell-card--embed {
  padding: 22px;
  overflow: hidden;
}

.admin-grid {
  grid-template-columns: 1fr;
}

.admin-card--form {
  align-self: start;
  position: relative;
  top: 0;
}

.admin-grid--stacked .admin-card--form {
  position: relative;
  top: 0;
}

.state-card,
.fatal-state {
  max-width: 980px;
  margin: 0;
}

@media (max-width: 1180px) {
  .login-card,
  .auth-shell,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-grid,
  .admin-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-card {
    height: auto;
    min-height: auto;
    width: min(calc(100vw - 28px), 920px);
  }

  .login-showcase {
    min-height: 340px;
  }

  .login-showcase__content {
    width: min(100%, 100%);
    max-width: 680px;
    padding: 42px 36px 44px;
  }

  .login-panel {
    padding: 32px;
  }

  .login-panel::before {
    display: none;
  }

  .auth-kpi-grid {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .portal-topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .portal-topbar__nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .portal-topbar__account {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .login-shell,
  .auth-shell,
  .portal-app-shell {
    padding: 14px;
  }

  .login-card {
    border-radius: 28px;
  }

  .login-panel,
  .login-showcase {
    min-height: auto;
  }

  .login-showcase {
    min-height: 240px;
  }

  .login-showcase__content {
    gap: 16px;
    padding: 28px 22px 30px;
  }

  .login-showcase__copy {
    max-width: 100%;
  }

  .login-showcase__copy h2 {
    max-width: 10ch;
  }

  .auth-hero,
  .auth-panel,
  .dashboard-shell-card,
  .admin-card,
  .admin-hero,
  .state-card,
  .fatal-state {
    padding: 22px;
    border-radius: 24px;
  }

  .control-grid--2,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell-card__header,
  .admin-hero,
  .admin-user-card__top {
    flex-direction: column;
  }

  .auth-hero h1,
  .auth-panel h2,
  .admin-card h2,
  .dashboard-shell-card h1,
  .admin-hero h1,
  .login-panel__head h1,
  .state-card h1,
  .fatal-state h1 {
    font-size: 2.1rem;
  }

  .auth-showcase__brand,
  .auth-form-meta,
  .login-form__meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-panel {
    padding: 24px 20px 22px;
  }

  .login-panel__surface {
    padding: 22px;
    border-radius: 24px;
  }
}

@media (max-width: 1180px) {
  .auth-shell,
  .portal-app-shell {
    grid-template-columns: 1fr;
    width: min(calc(100vw - 24px), 960px);
  }

  .auth-hero,
  .portal-sidebar {
    min-height: auto;
    height: auto;
    position: relative;
    top: 0;
  }

  .portal-workspace {
    grid-template-rows: auto auto;
  }

  .portal-topbar,
  .portal-page-hero {
    flex-direction: column;
  }

  .portal-topbar__meta,
  .portal-page-hero__aside {
    width: 100%;
    justify-content: space-between;
    justify-items: start;
  }

  .admin-card--form {
    position: relative;
    top: 0;
  }

  .admin-form-grid,
  .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .admin-user-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
}

@media (max-width: 760px) {
  .auth-shell,
  .portal-app-shell {
    width: min(calc(100vw - 16px), 100%);
    margin: 8px auto;
    gap: 14px;
    padding: 8px;
    border-radius: 24px;
  }

  .auth-hero,
  .portal-sidebar,
  .portal-topbar,
  .portal-page-hero,
  .portal-page-section,
  .dashboard-shell-card,
  .admin-card,
  .state-card,
  .fatal-state {
    padding: 20px;
    border-radius: 22px;
  }

  .auth-showcase__logo {
    width: min(100%, 240px);
  }

  .auth-hero__content,
  .portal-page-hero__aside {
    width: 100%;
    max-width: 100%;
  }

  .portal-sidebar__brand {
    padding-bottom: 14px;
  }

  .portal-topbar__titles h1,
  .portal-page-hero__copy h2,
  .portal-page-section__header h3 {
    font-size: 1.7rem;
  }
}

/* Typography normalization */
.auth-panel__eyebrow,
.dashboard-shell-card__eyebrow,
.portal-topbar__eyebrow,
.state-card__eyebrow,
.fatal-state__eyebrow,
.auth-hero__eyebrow,
.login-showcase__eyebrow,
.portal-page-hero__eyebrow {
  font-size: var(--portal-text-xs);
  font-weight: var(--portal-weight-strong);
  letter-spacing: var(--portal-letter-wide);
  line-height: 1.2;
}

.auth-hero h1,
.login-showcase__copy h2,
.login-panel__head h1,
.portal-topbar__titles h1,
.portal-page-hero__copy h2,
.dashboard-shell-card h1,
.admin-hero h1,
.state-card h1,
.fatal-state h1 {
  font-size: var(--portal-text-title);
  line-height: var(--portal-line-height-heading);
  letter-spacing: var(--portal-letter-tight);
  font-weight: var(--portal-weight-strong);
}

.auth-panel h2,
.admin-card h2,
.portal-page-section__header h3,
.dashboard-shell-card h2,
.admin-user-card__top h3 {
  font-size: var(--portal-text-section);
  line-height: 1.24;
  letter-spacing: var(--portal-letter-tight);
  font-weight: var(--portal-weight-strong);
}

.dashboard-shell-card__header h3,
.portal-sidebar__footer strong,
.portal-user-card__name,
.auth-highlight-card strong {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: var(--portal-letter-tight);
  font-weight: var(--portal-weight-strong);
}

.auth-hero p,
.auth-panel p,
.dashboard-shell-card p,
.admin-hero p,
.state-card p,
.fatal-state p,
.admin-card p,
.portal-topbar__titles p,
.portal-page-hero__copy p,
.portal-page-section__header p,
.portal-page-hero__note,
.login-panel__head p,
.login-showcase__copy p,
.auth-copy,
.inline-note,
.admin-user-card__meta {
  font-size: var(--portal-text-body);
  line-height: var(--portal-line-height-body);
}

.control span,
.portal-breadcrumbs,
.portal-context-chip,
.auth-panel__subtitle {
  font-size: var(--portal-text-label);
  line-height: 1.4;
}

.auth-form-meta,
.auth-divider,
.auth-panel__footer,
.portal-sidebar__meta,
.portal-sidebar__footer span {
  font-size: var(--portal-text-small);
  line-height: 1.4;
}

button,
.contracts-tab,
.pill,
.contracts-status,
.portal-context-chip,
.portal-sidebar__link,
.password-toggle {
  font-size: var(--portal-text-button);
  font-weight: var(--portal-weight-medium);
  line-height: 1.25;
}

.control input,
.control select,
.contracts-form-card .control textarea {
  font-size: var(--portal-text-body);
  line-height: 1.4;
}

.dashboard-shell-card__pills,
.portal-sidebar__pills {
  align-items: center;
}

.pill,
.contracts-status {
  min-height: 32px;
  padding-inline: 12px;
  font-size: var(--portal-text-small);
  font-weight: var(--portal-weight-medium);
}

.admin-table,
.contracts-table {
  font-size: var(--portal-text-table);
  line-height: 1.45;
}

.admin-table th,
.contracts-table th {
  font-size: var(--portal-text-xs);
  font-weight: var(--portal-weight-strong);
  letter-spacing: var(--portal-letter-wide);
}

.admin-table td,
.contracts-table td,
.contracts-table td span {
  font-size: var(--portal-text-table);
}

.admin-table td strong,
.contracts-table td strong {
  font-weight: var(--portal-weight-medium);
}

@media (min-width: 1181px) {
  .admin-grid {
    grid-template-columns: minmax(320px, 0.84fr) minmax(0, 1.16fr);
    align-items: start;
  }

  .admin-card--form {
    position: relative;
    top: 0;
  }
}

@media (max-width: 760px) {
  .auth-hero h1,
  .login-showcase__copy h2,
  .login-panel__head h1,
  .portal-topbar__titles h1,
  .portal-page-hero__copy h2,
  .dashboard-shell-card h1,
  .admin-hero h1,
  .state-card h1,
  .fatal-state h1 {
    font-size: 1.75rem;
  }

  .auth-panel h2,
  .admin-card h2,
  .portal-page-section__header h3,
  .dashboard-shell-card h2,
  .admin-user-card__top h3 {
    font-size: 1.125rem;
  }
}

.module-panel-switcher {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--portal-shadow-soft);
}

.module-panel-switcher__button {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--portal-muted);
  font-size: var(--portal-text-button);
  font-weight: var(--portal-weight-medium);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.module-panel-switcher__button:hover {
  transform: translateY(-1px);
  background: rgba(11, 34, 83, 0.06);
  color: var(--portal-ink);
}

.module-panel-switcher__button--active {
  background: linear-gradient(135deg, #0b1223 0%, #153579 52%, #5f46ff 100%);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(18, 32, 76, 0.18);
}

.module-panel-grid > [data-panel-group][hidden] {
  display: none !important;
}

.admin-grid.module-panel-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .module-panel-switcher {
    display: flex;
    width: 100%;
  }

  .module-panel-switcher__button {
    flex: 1 1 100%;
  }

  .auth-panel__head-main,
  .login-panel__head-main {
    flex-direction: column;
  }

  .theme-toggle {
    width: 100%;
  }
}

/* Default dark theme */
body[data-theme="dark"] {
  color-scheme: dark;
  --portal-bg: #050d19;
  --portal-panel: rgba(12, 20, 35, 0.86);
  --portal-panel-strong: rgba(16, 27, 46, 0.96);
  --portal-line: rgba(140, 161, 198, 0.18);
  --portal-ink: #e8eef9;
  --portal-muted: #96a5be;
  --portal-navy: #040916;
  --portal-cyan: #37d3ff;
  --portal-violet: #8a7cff;
  --portal-slate: #cad5e5;
  --portal-soft: #101a2e;
  --portal-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  --portal-shadow-soft: 0 18px 42px rgba(0, 0, 0, 0.28);
  background:
    radial-gradient(circle at top left, rgba(0, 194, 255, 0.14), transparent 26%),
    radial-gradient(circle at top right, rgba(122, 92, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #030712 0%, #08101f 100%);
}

body[data-theme="dark"]::before {
  background: rgba(0, 194, 255, 0.16);
  opacity: 0.42;
}

body[data-theme="dark"]::after {
  background: rgba(122, 92, 255, 0.14);
  opacity: 0.34;
}

body[data-theme="dark"] .auth-shell,
body[data-theme="dark"] .portal-app-shell {
  background: rgba(4, 10, 21, 0.72);
  border: 1px solid rgba(140, 161, 198, 0.12);
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.38);
}

body[data-theme="dark"] .auth-panel,
body[data-theme="dark"] .login-panel,
body[data-theme="dark"] .portal-topbar,
body[data-theme="dark"] .dashboard-shell-card,
body[data-theme="dark"] .admin-card,
body[data-theme="dark"] .admin-hero,
body[data-theme="dark"] .state-card,
body[data-theme="dark"] .fatal-state,
body[data-theme="dark"] .portal-page-hero,
body[data-theme="dark"] .portal-page-section {
  border-color: rgba(140, 161, 198, 0.14);
  background: linear-gradient(180deg, rgba(13, 22, 39, 0.95) 0%, rgba(9, 16, 29, 0.9) 100%);
}

body[data-theme="dark"] .login-panel::before {
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(140, 161, 198, 0.12) 12%,
    rgba(140, 161, 198, 0.22) 50%,
    transparent 100%
  );
}

body[data-theme="dark"] .login-panel__surface {
  border-color: rgba(140, 161, 198, 0.16);
  background: linear-gradient(180deg, rgba(18, 30, 50, 0.96) 0%, rgba(11, 20, 36, 0.92) 100%);
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .auth-panel__eyebrow,
body[data-theme="dark"] .dashboard-shell-card__eyebrow,
body[data-theme="dark"] .portal-topbar__eyebrow,
body[data-theme="dark"] .state-card__eyebrow,
body[data-theme="dark"] .fatal-state__eyebrow,
body[data-theme="dark"] .portal-page-hero__eyebrow {
  background: rgba(138, 124, 255, 0.14);
  color: #bcaeff;
}

body[data-theme="dark"] .login-panel__head h1 {
  color: var(--portal-ink);
}

body[data-theme="dark"] .login-panel__head p,
body[data-theme="dark"] .login-panel__footer,
body[data-theme="dark"] .auth-panel__footer,
body[data-theme="dark"] .auth-divider,
body[data-theme="dark"] .login-divider,
body[data-theme="dark"] .portal-breadcrumbs,
body[data-theme="dark"] .portal-user-card__meta {
  color: var(--portal-muted);
}

body[data-theme="dark"] .control input,
body[data-theme="dark"] .control select,
body[data-theme="dark"] .login-field input,
body[data-theme="dark"] .password-field--login input {
  border-color: rgba(140, 161, 198, 0.18);
  background: rgba(5, 12, 24, 0.84);
  color: var(--portal-ink);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-theme="dark"] .control input:focus,
body[data-theme="dark"] .control select:focus,
body[data-theme="dark"] .login-field input:focus,
body[data-theme="dark"] .password-field--login input:focus {
  background: rgba(8, 17, 32, 0.94);
}

body[data-theme="dark"] .control input::placeholder,
body[data-theme="dark"] .login-field input::placeholder,
body[data-theme="dark"] .password-field--login input::placeholder {
  color: rgba(150, 165, 190, 0.72);
}

body[data-theme="dark"] .login-field::before,
body[data-theme="dark"] .password-field--login::before,
body[data-theme="dark"] .password-toggle--icon::before,
body[data-theme="dark"] .login-form__sso-icon::before {
  filter: invert(0.78) brightness(1.08);
  opacity: 0.92;
}

body[data-theme="dark"] .password-toggle,
body[data-theme="dark"] .password-toggle--icon {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .password-toggle:hover,
body[data-theme="dark"] .password-toggle--icon:hover {
  background: rgba(255, 255, 255, 0.1);
}

body[data-theme="dark"] .portal-button--secondary,
body[data-theme="dark"] .portal-button--ghost,
body[data-theme="dark"] .login-form__sso {
  border-color: rgba(140, 161, 198, 0.16);
  background: rgba(10, 18, 33, 0.88);
  color: var(--portal-ink);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

body[data-theme="dark"] .portal-button--primary,
body[data-theme="dark"] .login-form__submit {
  box-shadow: 0 24px 38px rgba(18, 41, 110, 0.28);
}

body[data-theme="dark"] .theme-toggle::before {
  background: var(--portal-cyan);
  box-shadow: 0 0 0 6px rgba(55, 211, 255, 0.12);
}

body[data-theme="dark"] .portal-context-chip,
body[data-theme="dark"] .admin-user-card,
body[data-theme="dark"] .admin-form-note,
body[data-theme="dark"] .checkbox-card,
body[data-theme="dark"] .permissions-popover__menu,
body[data-theme="dark"] .module-panel-switcher {
  border-color: rgba(140, 161, 198, 0.14);
  background: rgba(10, 18, 33, 0.82);
}

body[data-theme="dark"] .module-panel-switcher__button {
  color: var(--portal-muted);
}

body[data-theme="dark"] .module-panel-switcher__button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--portal-ink);
}

body[data-theme="dark"] .pill {
  background: rgba(143, 157, 186, 0.14);
  color: var(--portal-ink);
}

body[data-theme="dark"] .pill--navy {
  background: linear-gradient(135deg, rgba(7, 14, 28, 0.96), rgba(20, 39, 84, 0.96));
  color: #ffffff;
}

body[data-theme="dark"] .portal-sidebar {
  border-color: rgba(140, 161, 198, 0.12);
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.98) 0%, rgba(7, 17, 35, 0.95) 100%);
}

body[data-theme="dark"] .portal-sidebar__link {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .portal-sidebar__link:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .portal-sidebar__footer {
  background: rgba(255, 255, 255, 0.06);
}

body[data-theme="dark"] .auth-divider::before,
body[data-theme="dark"] .login-divider::before {
  border-color: rgba(140, 161, 198, 0.14);
}

body[data-theme="dark"] .auth-divider span,
body[data-theme="dark"] .login-divider span {
  background: rgba(12, 20, 35, 0.95);
  color: var(--portal-muted);
}

body[data-theme="dark"] .inline-note {
  background: rgba(55, 211, 255, 0.12);
  color: var(--portal-slate);
}

body[data-theme="dark"] .inline-note--success {
  background: rgba(30, 190, 121, 0.12);
}

body[data-theme="dark"] .inline-note--warning {
  background: rgba(255, 180, 0, 0.14);
}

body[data-theme="dark"] .inline-note code {
  background: rgba(255, 255, 255, 0.08);
  color: var(--portal-ink);
}

body[data-theme="dark"] .flash-secret {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .flash-secret code {
  background: #02050d;
  color: #f3f7ff;
}

body[data-theme="dark"] .portal-breadcrumbs__item--current {
  color: var(--portal-ink);
}

body[data-theme="light"].login-body {
  background:
    radial-gradient(circle at 16% 18%, rgba(0, 194, 255, 0.14), transparent 22%),
    radial-gradient(circle at 82% 22%, rgba(122, 92, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #f6f8fc 0%, #edf2fa 48%, #f7f9fd 100%);
}

body[data-theme="light"] .login-backdrop {
  background:
    radial-gradient(circle at 24% 24%, rgba(0, 194, 255, 0.16), transparent 24%),
    radial-gradient(circle at 78% 70%, rgba(122, 92, 255, 0.16), transparent 28%),
    linear-gradient(160deg, rgba(245, 248, 253, 0.96) 0%, rgba(237, 242, 250, 0.98) 100%);
}

body[data-theme="light"] .login-backdrop__shade {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 34%, rgba(230, 236, 248, 0.28) 100%),
    radial-gradient(circle at 18% 12%, rgba(0, 194, 255, 0.12), transparent 20%),
    radial-gradient(circle at 78% 84%, rgba(122, 92, 255, 0.12), transparent 24%);
}

body[data-theme="light"] .login-card {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.34);
  box-shadow:
    0 34px 90px rgba(15, 33, 73, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body[data-theme="light"] .login-showcase__copy p {
  color: rgba(232, 240, 250, 0.9);
}

body[data-theme="light"] .login-showcase__eyebrow {
  color: rgba(197, 231, 255, 0.88);
}
