/*
 * Iderwell Portal quality system
 *
 * This final cascade layer aligns Portal with the restrained Iderwell product
 * language used by Hotspot while preserving Portal's role and workflow logic.
 */

:root {
  --font-body: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: Inter, "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg: #f4f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef3f8;
  --surface-raised: #ffffff;
  --control-bg: #ffffff;
  --line: #d8e0e9;
  --line-strong: #bdc9d6;
  --text: #172435;
  --text-soft: #5e6d80;
  --text-faint: #7b8899;
  --brand: #0078d4;
  --brand-strong: #005ea8;
  --brand-soft: #eef7fe;
  --focus-ring: #00527f;
  --navy: #084a83;
  --navy-strong: #003b7a;
  --navy-deep: #05243f;
  --accent-sky: #0078d4;
  --accent-gold: #b56a11;
  --accent-coral: #b65353;
  --accent-blue: #0078d4;
  --danger: #b13b3b;
  --warning: #9a5a12;
  --success: #16734f;
  --success-soft: #e9f6ef;
  --warning-soft: #fff5e6;
  --danger-soft: #fdefef;
  --sidebar-bg: #05243f;
  --sidebar-raised: #0b3555;
  --sidebar-line: rgba(255, 255, 255, 0.1);
  --sidebar-text: #e6f0f8;
  --sidebar-soft: #9fb3c6;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --shadow-soft: 0 1px 2px rgba(5, 36, 63, 0.035);
  --shadow: 0 18px 46px rgba(5, 36, 63, 0.12);
  --page-focused: 900px;
  --page-standard: 1180px;
  --page-dashboard: 1480px;
  --page-data-wide: 1600px;
}

html[data-theme="dark"] {
  --bg: #0f1822;
  --surface: #172331;
  --surface-soft: #1c2a39;
  --surface-muted: #233344;
  --surface-raised: #1b2938;
  --control-bg: #121d29;
  --line: #304052;
  --line-strong: #46586a;
  --text: #f1f6fa;
  --text-soft: #b0becc;
  --text-faint: #93a4b4;
  --brand: #65b8f2;
  --brand-strong: #8ccaf5;
  --brand-soft: #173b59;
  --focus-ring: #9bd8ff;
  --navy: #a8d5f5;
  --navy-strong: #cae6fa;
  --navy-deep: #f1f7fc;
  --accent-sky: #65b8f2;
  --accent-gold: #f8cf89;
  --accent-coral: #ffaaa3;
  --accent-blue: #65b8f2;
  --danger: #ffaaa3;
  --warning: #f8cf89;
  --success: #8eddbb;
  --success-soft: #153a30;
  --warning-soft: #3a2d1c;
  --danger-soft: #402326;
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  color-scheme: light;
  background: var(--bg);
  scroll-behavior: smooth;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: block;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:not(:disabled),
summary,
a[href] {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--brand-strong);
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

::selection {
  color: #ffffff;
  background: #0078d4;
}

:where(button, a[href], input, select, textarea, summary):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: #ffffff;
  background: var(--navy-deep);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.iderwell-signal {
  width: 18px;
  height: 20px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  color: currentColor;
}

.iderwell-signal i {
  width: 3px;
  display: block;
  border-radius: 1px;
  background: currentColor;
  transform: skewY(-18deg);
}

.iderwell-signal i:nth-child(1) { height: 6px; opacity: 0.54; }
.iderwell-signal i:nth-child(2) { height: 11px; opacity: 0.72; }
.iderwell-signal i:nth-child(3) { height: 16px; }
.iderwell-signal i:nth-child(4) { height: 9px; opacity: 0.82; }

.iderwell-lockup {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.iderwell-lockup > span:last-child {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.iderwell-lockup strong,
.iderwell-lockup small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iderwell-lockup strong {
  font-size: 0.88rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.iderwell-lockup small {
  color: currentColor;
  font-size: 0.68rem;
  opacity: 0.7;
}

/* Secure entry experience */
.login-shell {
  width: 100%;
  min-height: 100svh;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(420px, 1.05fr) minmax(420px, 0.95fr);
  background: var(--bg);
}

.auth-story {
  position: relative;
  min-height: 100svh;
  padding: clamp(36px, 6vw, 78px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background: #05243f;
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-story::before {
  width: min(50vw, 680px);
  aspect-ratio: 1;
  right: -34%;
  bottom: -24%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.018);
}

.auth-story::after { display: none; }

.auth-story > * {
  position: relative;
  z-index: 1;
}

.auth-story-brand .iderwell-lockup {
  color: #ffffff;
}

.auth-story-copy {
  max-width: 650px;
  margin: auto 0;
  padding: 8vh 0;
}

.auth-story-copy .eyebrow {
  margin: 0 0 22px;
  color: #65b8f2;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.auth-story-copy h2 {
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 5.7vw, 6rem);
  font-weight: 760;
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.auth-story-copy > p:not(.eyebrow) {
  max-width: 580px;
  margin: 28px 0 0;
  color: #cbdceb;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.65;
}

.auth-story-points {
  max-width: 620px;
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.auth-story-points > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.auth-story-points svg {
  width: 21px;
  margin-top: 2px;
  color: #65b8f2;
}

.auth-story-points strong,
.auth-story-points small {
  display: block;
}

.auth-story-points strong {
  color: #ffffff;
  font-size: 0.78rem;
}

.auth-story-points small {
  margin-top: 5px;
  color: #9fb7ca;
  font-size: 0.7rem;
  line-height: 1.5;
}

.auth-story-foot,
.auth-entry-foot {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.025em;
}

.auth-story-foot {
  color: #8fa9bd;
}

.auth-entry {
  position: relative;
  min-width: 0;
  min-height: 100svh;
  padding: 52px clamp(28px, 6vw, 84px) 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.auth-theme-btn {
  position: absolute;
  top: 22px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-color: var(--line);
  background: var(--surface);
}

.login-card {
  width: min(450px, 100%);
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-login {
  display: none;
  margin-bottom: 34px;
  color: var(--navy-strong);
}

.auth-step {
  margin: 0 0 13px;
  color: var(--brand-strong);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.auth-heading h1[tabindex="-1"]:focus {
  outline: 0;
}

.auth-heading p {
  margin: 11px 0 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.login-card .stack-form {
  margin-top: 28px;
  gap: 17px;
}

.login-card .field > span {
  margin-bottom: 7px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 750;
}

.login-card input {
  min-height: 48px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.auth-submit {
  min-height: 48px;
  margin-top: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.auth-submit svg {
  width: 17px;
}

.auth-assurance {
  margin-top: 28px;
  padding-top: 20px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 11px;
  border-top: 1px solid var(--line);
}

.auth-assurance > svg {
  width: 21px;
  color: var(--brand);
}

.auth-assurance strong,
.auth-assurance small {
  display: block;
}

.auth-assurance strong {
  color: var(--text);
  font-size: 0.74rem;
}

.auth-assurance small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.69rem;
  line-height: 1.5;
}

.auth-entry-foot {
  margin-top: 24px;
  color: var(--text-faint);
}

.auth-failure .form-error {
  margin: 24px 0;
}

/* Application shell and information architecture */
.app-shell {
  width: 100%;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
}

.sidebar {
  width: 264px;
  padding: 0;
  border-right: 0;
  color: var(--sidebar-text);
  background: var(--sidebar-bg);
  box-shadow: none;
}

.sidebar-brand {
  min-height: 78px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--sidebar-line);
}

.sidebar .brand-lockup,
.sidebar .iderwell-lockup {
  width: 100%;
  color: #ffffff;
}

.workspace-switcher {
  min-height: 64px;
  margin: 14px 13px 8px;
  padding: 10px;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  border: 1px solid var(--sidebar-line);
  border-radius: var(--radius);
  background: var(--sidebar-raised);
}

.workspace-monogram {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(101, 184, 242, 0.28);
  border-radius: var(--radius-sm);
  color: #cfeafb;
  background: rgba(101, 184, 242, 0.12);
}

.workspace-switcher strong {
  color: #ffffff;
  font-size: 0.75rem;
}

.workspace-switcher small {
  margin-top: 2px;
  color: var(--sidebar-soft);
  font-size: 0.66rem;
}

.workspace-switcher small i,
.portal-connection i {
  background: #5bd39b;
  box-shadow: 0 0 0 3px rgba(91, 211, 155, 0.12);
}

.workspace-badge {
  padding: 3px 6px;
  border: 1px solid var(--sidebar-line);
  border-radius: 999px;
  color: var(--sidebar-soft);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.side-nav {
  padding: 7px 13px 18px;
}

.nav-section + .nav-section {
  margin-top: 18px;
}

.nav-section > p {
  margin: 0 9px 7px;
  color: var(--sidebar-soft);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-item {
  min-height: 44px;
  margin: 2px 0;
  padding: 0 10px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 0.76rem;
  font-weight: 600;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.is-active {
  border-color: rgba(101, 184, 242, 0.2);
  color: #ffffff;
  background: #12578c;
  box-shadow: inset 3px 0 0 #65b8f2;
}

.nav-icon {
  width: 25px;
  height: 25px;
  color: var(--sidebar-soft);
}

.nav-item.is-active .nav-icon,
.nav-item:hover .nav-icon {
  color: #d9effd;
}

.nav-icon svg {
  width: 16px;
}

.sidebar-footer {
  padding: 10px 13px 13px;
  color: var(--sidebar-soft);
  background: var(--sidebar-bg);
}

.sidebar-operator {
  margin-top: 10px;
  padding: 13px 4px 0;
}

.sidebar-operator .profile-avatar {
  color: #d9effd;
  background: #12578c;
}

.content-shell {
  width: calc(100% - 264px);
  margin-left: 264px;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 96px;
  padding: 15px clamp(22px, 2.6vw, 38px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
}

.topbar-copy {
  min-width: 0;
  gap: 2px;
}

.topbar-breadcrumb {
  color: var(--text-faint);
  font-size: 0.67rem;
  font-weight: 700;
}

.topbar-breadcrumb span::after {
  color: var(--line-strong);
}

.topbar h1 {
  margin: 1px 0 0;
  color: var(--text);
  font-size: 1.32rem;
  font-weight: 760;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.topbar-description {
  max-width: 720px;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.4;
}

.topbar-tools {
  gap: 8px;
}

.portal-connection {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 0.68rem;
}

.topbar .icon-btn {
  width: 38px;
  height: 38px;
  border-color: var(--line);
  background: var(--surface);
}

.topbar .profile-chip {
  min-height: 40px;
  border-color: var(--line);
  background: var(--surface);
}

.topbar .profile-avatar {
  color: #ffffff;
  background: var(--navy-strong);
}

.page-shell {
  width: min(100%, var(--page-data-wide));
  min-width: 0;
  margin: 0 auto;
  padding: clamp(24px, 2.7vw, 42px) clamp(22px, 2.7vw, 42px) 56px;
  outline: 0;
  scroll-margin-top: 112px;
}

.page-shell > * {
  animation: portal-page-enter 180ms ease-out both;
}

@keyframes portal-page-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-stack,
.page-grid,
.page-shell {
  gap: 20px;
}

/* Shared page and component language */
.surface-panel,
.product-catalogue-card,
.kpi-card,
.destination-card,
.product-customer-card,
.credential-vault {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.surface-panel {
  padding: clamp(18px, 2vw, 24px);
}

.panel-head {
  margin-bottom: 19px;
  gap: 16px;
}

.panel-head h2,
.detail-head h2,
.product-section-head h3 {
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.panel-head h2,
.detail-head h2 {
  font-size: 1.05rem;
}

.panel-subtitle,
.muted-text,
.form-help {
  color: var(--text-soft);
  line-height: 1.55;
}

.panel-subtitle,
.form-help {
  font-size: 0.75rem;
}

.eyebrow {
  color: var(--brand-strong);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.105em;
  text-transform: uppercase;
}

.btn,
.icon-btn {
  appearance: none;
  min-height: 40px;
  border-color: var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: none;
  font-size: 0.76rem;
  font-weight: 750;
}

.btn {
  padding: 0 15px;
}

.btn:hover,
.icon-btn:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line-strong));
  color: var(--brand-strong);
  background: var(--brand-soft);
  transform: none;
}

.btn-primary {
  border-color: var(--brand-strong);
  color: #ffffff;
  background: var(--brand-strong);
}

.btn-primary:hover {
  border-color: var(--navy-strong);
  color: #ffffff;
  background: var(--navy-strong);
}

.btn-secondary {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface);
}

.btn-quiet {
  color: var(--text-soft);
  background: transparent;
}

.btn-danger {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
}

.btn-danger:hover {
  border-color: color-mix(in srgb, var(--danger) 78%, #000000);
  color: #ffffff;
  background: color-mix(in srgb, var(--danger) 86%, #000000);
}

.btn-sm {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 0.7rem;
}

input,
select,
textarea,
.application-review-form textarea {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--control-bg);
  font-size: 0.82rem;
}

textarea,
.application-review-form textarea {
  min-height: 104px;
  padding: 11px 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.application-review-form textarea:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}

.field > span {
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 720;
}

.status,
.count-pill {
  min-height: 24px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 750;
}

.status.ok,
.status.running {
  border-color: color-mix(in srgb, var(--success) 24%, var(--line));
  color: var(--success);
  background: var(--success-soft);
}

.status.warn,
.status.partial {
  border-color: color-mix(in srgb, var(--warning) 24%, var(--line));
  color: var(--warning);
  background: var(--warning-soft);
}

.status.bad,
.status.off,
.status.stopped {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  color: var(--danger);
  background: var(--danger-soft);
}

.inline-alert,
.form-error {
  border-radius: var(--radius);
  font-size: 0.75rem;
  line-height: 1.55;
}

.inline-alert {
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line));
  border-left: 3px solid var(--success);
  color: var(--success);
  background: var(--success-soft);
}

.inline-alert.info {
  border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
  border-left-color: var(--brand);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.inline-alert.warn {
  border-color: color-mix(in srgb, var(--warning) 24%, var(--line));
  border-left-color: var(--warning);
  color: var(--warning);
  background: var(--warning-soft);
}

.inline-alert.bad,
.form-error {
  border-color: color-mix(in srgb, var(--danger) 24%, var(--line));
  border-left-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

.form-error {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--danger) 24%, var(--line));
  border-left-width: 3px;
}

.empty-state {
  min-height: 104px;
  padding: 26px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: center;
}

.empty-state.compact,
.table .empty-state,
.file-table .empty-state {
  min-height: 72px;
  padding: 18px;
}

.empty-state[role="status"]::before,
.hotspot-state[role="status"]::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 8px;
  display: inline-block;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: portal-spin 700ms linear infinite;
  vertical-align: -3px;
}

@keyframes portal-spin {
  to { transform: rotate(360deg); }
}

.icon-btn.is-refreshing svg {
  animation: portal-spin 700ms linear infinite;
}

.table,
.file-table,
.service-table,
.audit-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.table-row,
.file-row,
.service-row {
  min-height: 50px;
  border-color: var(--line);
}

.table-row:not(.table-head):hover,
.file-row:not(.file-head):hover,
.service-row:not(.service-header):hover {
  background: var(--surface-soft);
}

.table-head,
.file-head,
.service-header {
  color: var(--text-soft);
  background: var(--surface-muted);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.definition-list > div,
.product-detail-grid > div,
.product-channel-facts > div {
  border-color: var(--line);
}

.dashboard-welcome {
  min-height: 92px;
  padding: 4px 0 10px;
}

.dashboard-welcome h2 {
  color: var(--text);
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  font-weight: 760;
  letter-spacing: -0.048em;
}

.dashboard-welcome p:last-child {
  color: var(--text-soft);
  font-size: 0.86rem;
}

.dashboard-kpis {
  gap: 14px;
}

.kpi-card {
  min-height: 136px;
  padding: 20px;
}

.kpi-card > div > span,
.kpi-card small {
  color: var(--text-soft);
}

.kpi-card strong {
  color: var(--text);
}

.kpi-icon.is-green,
.kpi-icon.is-blue,
.kpi-icon.is-blue {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.revenue-bar::-webkit-progress-value,
.health-ring,
.revenue-bar::-moz-progress-bar {
  background-color: var(--brand);
}

.customer-monogram,
.destination-icon,
.product-catalogue-icon {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.product-catalogue-metrics span,
.hotspot-overview-metrics span {
  font-size: 0.6875rem;
}

.destination-card:hover {
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: 0 10px 26px rgba(5, 36, 63, 0.08);
  transform: translateY(-1px);
}

.client-list-panel,
.applications-list-panel {
  background: var(--surface-soft);
}

.client-row,
.application-list-item,
.inline-row,
.revenue-row,
.workspace-business-list > button,
.operator-action-row {
  border-color: var(--line);
}

.client-row:hover,
.application-list-item:hover,
.inline-row:hover,
.operator-action-row:hover {
  background: var(--brand-soft);
}

.client-row.is-selected,
.application-list-item.is-selected {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.applications-workspace,
.client-layout {
  align-items: start;
}

.sticky-save-bar,
.studio-action-bar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -8px 24px rgba(5, 36, 63, 0.045);
  backdrop-filter: blur(12px);
}

.commercial-disclosure,
.interview-guide,
.security-advanced {
  border-color: var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.commercial-disclosure > summary,
.interview-guide > summary,
.security-advanced > summary {
  min-height: 44px;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 750;
}

.files-panel.is-dragging {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
}

.breadcrumbs button {
  min-height: 34px;
  color: var(--brand-strong);
}

/* Operational text remains readable at every density and viewport. */
.sidebar small,
.sidebar .workspace-badge,
.profile-copy small,
#page small,
#page time,
#page dt,
#page .kpi-card small,
#page .action-checklist small,
#page .activity-row small,
#page .activity-row time,
#page .health-summary dt {
  font-size: 0.6875rem;
}

.upload-progress {
  border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
  background: var(--brand-soft);
}

.progress-track > span {
  background: var(--brand);
}

.log-output,
.commercial-json,
.operations-console {
  border-color: #263b50;
  color: #dbe9f4;
  background: #071725;
}

/* Hotspot inside Portal follows the same blue product language. */
.hotspot-workspace {
  --brand: #0078d4;
  --brand-strong: #005ea8;
  --brand-soft: #eef7fe;
  max-width: 1320px;
}

html[data-theme="dark"] .hotspot-workspace {
  --brand: #65b8f2;
  --brand-strong: #8ccaf5;
  --brand-soft: #173b59;
}

.hotspot-workspace-nav,
.hotspot-tenant-nav {
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.hotspot-workspace-nav button.is-active,
.hotspot-tenant-nav a.is-active {
  color: var(--brand-strong);
  background: var(--surface);
  box-shadow: inset 0 -2px 0 var(--brand);
}

.hotspot-overview-hero,
.hotspot-page-heading,
.product-hero {
  border-radius: var(--radius-lg);
}

.product-hero::before {
  background: var(--brand);
}

/* Deliberate confirmations replace browser-native prompts. */
.portal-dialog {
  width: min(480px, calc(100% - 32px));
  max-height: min(720px, calc(100svh - 32px));
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: var(--radius-lg);
  color: var(--text);
  background: transparent;
  box-shadow: var(--shadow);
}

.portal-dialog::backdrop {
  background: rgba(3, 13, 23, 0.7);
  backdrop-filter: blur(5px);
}

.portal-dialog-card {
  width: 100%;
  max-height: inherit;
  padding: 26px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.portal-dialog-heading {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.portal-dialog-heading h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.portal-dialog-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.portal-dialog-icon svg {
  width: 21px;
}

.portal-dialog.is-danger .portal-dialog-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.portal-dialog-message {
  margin: 21px 0 0;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.6;
}

.portal-dialog-details {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  line-height: 1.55;
}

.portal-dialog-field {
  margin-top: 20px;
}

.portal-dialog-actions {
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
}

html[data-theme="dark"] .auth-story {
  background: #071725;
}

html[data-theme="dark"] .log-output,
html[data-theme="dark"] .commercial-json,
html[data-theme="dark"] .operations-console {
  border-color: var(--line);
  color: #dceaf5;
  background: #09131d;
}

html[data-theme="dark"] .btn-secondary,
html[data-theme="dark"] .icon-btn,
html[data-theme="dark"] .topbar .icon-btn,
html[data-theme="dark"] .topbar .profile-chip,
html[data-theme="dark"] .breadcrumbs button {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}

html[data-theme="dark"] .btn-secondary:hover,
html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .breadcrumbs button:hover {
  border-color: var(--line-strong);
  color: var(--brand-strong);
  background: var(--brand-soft);
}

html[data-theme="dark"] .action-checklist > button,
html[data-theme="dark"] .action-checklist strong,
html[data-theme="dark"] .inline-row,
html[data-theme="dark"] .inline-row strong,
html[data-theme="dark"] .mini-project strong {
  color: var(--text);
}

@media (max-width: 1240px) {
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-primary-grid,
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .login-shell {
    grid-template-columns: minmax(360px, 0.9fr) minmax(400px, 1.1fr);
  }

  .auth-story-points {
    grid-template-columns: 1fr;
  }

  .auth-story-points > span:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 960px) {
  .sidebar {
    width: min(300px, calc(100vw - 54px));
    z-index: 60;
    transform: translateX(-104%);
    transition: transform 180ms ease;
    box-shadow: 24px 0 60px rgba(3, 13, 23, 0.28);
  }

  body.mobile-sidebar-open {
    overflow: hidden;
  }

  body.mobile-sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.mobile-sidebar-open .mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    background: rgba(3, 13, 23, 0.58);
    backdrop-filter: blur(2px);
  }

  .content-shell {
    width: 100%;
    margin-left: 0;
  }

  .mobile-nav-btn {
    display: grid;
  }
}

@media (max-width: 840px) {
  .login-shell {
    display: block;
    background: var(--bg);
  }

  .auth-story {
    min-height: 250px;
    padding: 28px 26px 82px;
  }

  .auth-story-copy {
    margin: 32px 0 0;
    padding: 0;
  }

  .auth-story-copy .eyebrow,
  .auth-story-copy > p:not(.eyebrow),
  .auth-story-points,
  .auth-story-foot {
    display: none;
  }

  .auth-story-copy h2 {
    max-width: 420px;
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .auth-entry {
    min-height: 0;
    margin-top: -54px;
    padding: 0 20px 32px;
  }

  .auth-theme-btn {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 5;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
  }

  .login-card {
    padding: 30px;
  }

  .auth-entry-foot {
    margin-top: 18px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .topbar {
    min-height: 76px;
    padding: 12px 14px;
    gap: 11px;
  }

  .topbar-copy {
    flex: 1 1 auto;
  }

  .topbar-breadcrumb,
  .topbar-description,
  .portal-connection,
  .topbar .profile-chip {
    display: none;
  }

  .topbar h1 {
    font-size: 1.08rem;
  }

  .topbar-tools {
    margin-left: auto;
  }

  .page-shell {
    padding: 22px 14px 42px;
  }

  .dashboard-welcome {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-welcome-actions,
  .panel-actions,
  .product-heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpis,
  .destination-grid,
  .page-grid.two-up,
  .application-metrics,
  .product-customer-grid,
  .product-settings-grid,
  .product-control-grid,
  .credential-history,
  .form-grid.two-up-fields,
  .form-grid.three-up-fields {
    grid-template-columns: 1fr;
  }

  .surface-panel,
  .kpi-card,
  .product-catalogue-card,
  .credential-vault {
    padding: 16px;
  }

  .btn,
  .icon-btn,
  button,
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  summary {
    min-height: 44px;
  }

  .btn-sm {
    min-height: 44px;
  }

  .domain-chip {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  #page .application-toolbar .btn {
    min-height: 44px;
  }

  #page .breadcrumbs button {
    min-height: 44px;
  }

  .sidebar small,
  .sidebar .workspace-badge,
  #page small,
  #page time,
  #page dt,
  #page .kpi-card small,
  #page .action-checklist small,
  #page .activity-row small,
  #page .activity-row time,
  #page .health-summary dt {
    font-size: 0.6875rem;
  }

  .applications-workspace,
  .client-layout,
  .studio-request-layout,
  .commercial-layout,
  .hotspot-overview-grid {
    grid-template-columns: 1fr;
  }

  .sticky-save-bar,
  .studio-action-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .sticky-save-bar .btn,
  .studio-action-bar .btn {
    width: 100%;
  }

  .portal-dialog-card {
    padding: 21px;
  }

  .portal-dialog-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .portal-dialog-actions .btn-primary,
  .portal-dialog-actions .btn-danger {
    grid-row: 1;
  }
}

@media (max-width: 480px) {
  .auth-story {
    min-height: 218px;
    padding: 24px 22px 68px;
  }

  .auth-story-copy {
    margin-top: 28px;
  }

  .auth-story-copy h2 {
    max-width: 310px;
    font-size: 2.35rem;
  }

  .auth-entry {
    margin-top: -42px;
    padding-inline: 14px;
  }

  .login-card {
    padding: 25px 21px;
  }

  .brand-login {
    margin-bottom: 27px;
  }

  .dashboard-welcome-actions,
  .panel-actions,
  .product-heading-actions {
    grid-template-columns: 1fr;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Coordinated operating-platform shell and relational workspaces. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-400-700.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

.iderwell-lockup {
  display: grid;
  gap: 3px;
  align-items: center;
}

.brand-logo-pair { display: block; height: 25px; }
.brand-logo { display: block; width: auto; height: 25px; object-fit: contain; }
.brand-logo-dark { display: none; }
.sidebar .brand-logo-light,
.auth-story .brand-logo-light,
html[data-theme="dark"] .brand-logo-light { display: none; }
.sidebar .brand-logo-dark,
.auth-story .brand-logo-dark,
html[data-theme="dark"] .brand-logo-dark { display: block; }
.iderwell-lockup > small { color: currentColor; font-size: 0.67rem; opacity: 0.7; }

.sidebar { width: 232px; }
.content-shell { width: calc(100% - 232px); margin-left: 232px; }
.sidebar-brand { min-height: 70px; padding-inline: 19px; }
.side-nav { padding: 10px 10px 18px; }
.nav-section + .nav-section { margin-top: 14px; }
.nav-item { min-height: 39px; font-size: 0.77rem; }
.topbar { min-height: 70px; padding: 9px clamp(18px, 2.3vw, 34px); backdrop-filter: none; background: var(--surface); }
.topbar h1 { font-size: 1.22rem; }
.topbar-description { max-width: 620px; margin-top: 1px; }
.topbar-breadcrumb { margin-bottom: 0; }
.page-shell { padding-top: clamp(20px, 2.2vw, 32px); scroll-margin-top: 82px; }
.profile-chip { appearance: none; color: var(--text); text-align: left; }

.setup-required {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid #d7a45a;
  border-left: 4px solid var(--warning);
  border-radius: var(--radius);
  background: var(--warning-soft);
}
.setup-required h2 { margin: 3px 0 4px; font-size: 1.08rem; }
.setup-required p { max-width: 760px; margin: 0; color: var(--text-soft); }

.filter-bar {
  padding: 12px;
  display: flex;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  flex-wrap: wrap;
}
.filter-bar label { min-width: min(420px, 100%); display: grid; gap: 5px; color: var(--text-soft); font-size: 0.72rem; font-weight: 650; }
.filter-bar input { min-height: 38px; }

.page-stack,
.surface-panel { min-width: 0; }
.table-scroll { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; contain: inline-size paint; }
.surface-panel:has(.table-scroll) { overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th,
.data-table td { padding: 12px 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.data-table th { color: var(--text-soft); background: var(--surface-soft); font-size: 0.68rem; letter-spacing: 0.045em; text-transform: uppercase; }
.data-table td { font-size: 0.78rem; }
.data-table td > strong,
.data-table td > small { display: block; }
.data-table td > small { margin-top: 2px; color: var(--text-soft); }
.data-table tbody tr:last-child td { border-bottom: 0; }

.subnav { padding: 4px; display: flex; gap: 3px; align-self: flex-start; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.subnav button { min-height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); color: var(--text-soft); background: transparent; font-weight: 650; }
.subnav button:hover { color: var(--text); background: var(--surface-muted); }
.subnav button.is-active { color: #ffffff; background: var(--navy-strong); }

.operating-list { border-top: 1px solid var(--line); }
.operating-row {
  width: 100%; min-height: 58px; padding: 11px 4px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left;
}
button.operating-row:hover { background: var(--surface-soft); }
.operating-row > span { min-width: 0; display: flex; align-items: center; gap: 9px; }
.operating-row > span:first-child { display: grid; gap: 2px; }
.operating-row strong { font-size: 0.79rem; }
.operating-row small { overflow-wrap: anywhere; color: var(--text-soft); font-size: 0.72rem; }
.operating-row > svg { width: 16px; color: var(--text-faint); }

.quiet-state,
.loading-state,
.error-state { min-height: 116px; padding: 24px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; color: var(--text-soft); }
.error-state { color: var(--danger); }
.error-state .btn { margin-top: 10px; }

.workspace-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.workspace-links > button { min-height: 76px; padding: 13px; display: grid; grid-template-columns: 32px 1fr 16px; align-items: center; gap: 10px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; }
.workspace-links > button:hover { background: var(--surface-soft); }
.workspace-links > button > span:nth-child(2) { min-width: 0; display: grid; gap: 2px; }
.workspace-links strong { font-size: 0.8rem; }
.workspace-links small { color: var(--text-soft); font-size: 0.7rem; }
.workspace-links svg { width: 16px; color: var(--text-faint); }

.summary-table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.summary-table button { min-height: 82px; padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 4px; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; }
.summary-table button:hover { background: var(--surface-soft); }
.summary-table span { grid-column: 1 / -1; color: var(--text-soft); font-size: 0.71rem; }
.summary-table strong { font-size: 1.2rem; }
.summary-table svg { width: 15px; color: var(--text-faint); }

@media (max-width: 1023px) {
  .sidebar { width: 232px; transform: translateX(-100%); transition: transform 160ms ease; }
  .nav-item { min-height: 44px; }
  body.mobile-sidebar-open { overflow: hidden; }
  body.mobile-sidebar-open .sidebar { transform: translateX(0); }
  body.mobile-sidebar-open .mobile-sidebar-backdrop { display: block; opacity: 1; pointer-events: auto; }
  .content-shell { width: 100%; margin-left: 0; }
  .mobile-nav-btn { display: inline-flex; }
  .topbar { min-height: 70px; }
  .workspace-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-table { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1040px) {
  .portal-account .profile-chip {
    display: flex;
  }
}

@media (max-width: 720px) {
  .portal-connection,
  .topbar-description,
  .topbar-breadcrumb,
  .topbar .profile-copy { display: none; }
  .topbar .profile-chip { width: 38px; padding: 0; justify-content: center; }
  .topbar-tools { margin-left: auto; }
  .setup-required { align-items: flex-start; flex-direction: column; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .filter-bar label { min-width: 0; }
  .subnav { width: 100%; overflow-x: auto; }
  .subnav button { min-height: 44px; flex: 1 0 auto; }
  .workspace-links,
  .summary-table { grid-template-columns: 1fr; }
  .operating-row { align-items: flex-start; }
}

/* Final operating-platform shell and governed workspace refinements. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.side-nav {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.nav-item {
  min-height: 44px;
}

#page button,
#page .btn,
#page summary,
#page a.btn {
  min-height: 44px;
}

.subnav button {
  min-height: 44px;
}

.sidebar-settings {
  flex: 0 0 auto;
  padding: 10px;
  border-top: 1px solid var(--sidebar-line);
  background: var(--sidebar-bg);
}

.sidebar-settings .nav-item {
  width: 100%;
  margin: 0;
}

.topbar .icon-btn,
.topbar .profile-chip {
  min-width: 44px;
  min-height: 44px;
}

.portal-account {
  position: relative;
}

.portal-account > summary {
  list-style: none;
}

.portal-account > summary::-webkit-details-marker {
  display: none;
}

.account-chevron {
  width: 16px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
}

.account-chevron svg {
  width: 15px;
  transition: transform 140ms ease;
}

.portal-account[open] .account-chevron svg {
  transform: rotate(180deg);
}

.account-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 80;
  width: min(300px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.account-menu-identity {
  padding: 10px 11px 13px;
  display: grid;
  gap: 2px;
  border-bottom: 1px solid var(--line);
}

.account-menu-identity strong,
.account-menu-identity small,
.account-menu-identity span {
  overflow-wrap: anywhere;
}

.account-menu-identity small,
.account-menu-identity span {
  color: var(--text-soft);
  font-size: 0.75rem;
}

.account-menu-action {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.account-menu-action:hover {
  background: var(--surface-muted);
}

.account-menu-action svg {
  width: 18px;
}

.account-menu-action.is-danger {
  color: var(--danger);
}

.portal-dialog-message,
.portal-dialog-details {
  white-space: pre-line;
}

.portal-form-dialog {
  width: min(620px, calc(100% - 28px));
}

.portal-form-dialog .portal-dialog-card {
  width: 100%;
  max-height: inherit;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.portal-dialog-fields {
  min-height: 0;
  max-height: none;
  margin-top: 18px;
  padding-right: 3px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  overflow-y: auto;
}

.portal-dialog-fields .field {
  min-width: 0;
}

.portal-dialog-fields textarea {
  min-height: 90px;
  resize: vertical;
}

.settings-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.settings-subnav {
  position: sticky;
  top: 94px;
  padding: 9px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-subnav > p {
  margin: 5px 9px 8px;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.settings-subnav button {
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
}

.settings-subnav button:hover {
  color: var(--text);
  background: var(--surface-muted);
}

.settings-subnav button.is-active {
  border-color: var(--line);
  color: var(--navy-strong);
  background: var(--brand-soft);
}

.settings-content {
  min-width: 0;
}

.application-empty-detail {
  min-height: 220px;
  padding: 26px;
}

.applications-workspace:has(.application-list > .empty-state) {
  grid-template-columns: 1fr;
}

.applications-workspace:has(.application-list > .empty-state) .application-detail-column {
  display: none;
}

.applications-workspace:has(.application-list > .empty-state) .applications-list-panel {
  position: static;
  max-height: none;
}

.table-scroll:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 28%, transparent);
  outline-offset: -3px;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.nav-section > p,
.topbar-breadcrumb,
.topbar-description,
.data-table th,
.filter-bar label,
.panel-subtitle,
#page small,
#page time,
#page dt,
.sidebar small {
  font-size: 0.75rem;
}

.filter-bar input,
.filter-bar select,
.filter-bar .btn,
.portal-dialog-field select {
  min-height: 44px;
}

.filter-bar label {
  min-width: min(280px, 100%);
}

.filter-bar label.is-compact {
  min-width: min(190px, 100%);
}

.pagination-bar {
  padding: 12px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.operating-notice {
  margin: 0 0 16px;
}

.pagination-bar p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.75rem;
}

.pagination-actions {
  display: flex;
  gap: 8px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

@media (max-width: 1023px) {
  .sidebar {
    width: min(288px, calc(100vw - 48px));
  }

  .settings-subnav {
    top: 88px;
  }
}

@media (max-width: 800px) {
  .settings-workspace {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .settings-subnav {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .settings-subnav > p {
    display: none;
  }

  .settings-subnav button {
    width: auto;
    min-width: max-content;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 60px;
  }

  .topbar .profile-chip {
    display: flex;
    width: 44px;
    min-width: 44px;
    padding: 0;
    justify-content: center;
  }

  .topbar .account-chevron {
    display: none;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-actions .btn {
    flex: 1 1 0;
  }

  .portal-dialog-fields {
    grid-template-columns: 1fr;
  }
}

/* Final keyboard, type and dense-data acceptance corrections. */
:where(button, a[href], input, select, textarea, summary):focus-visible,
.hotspot-workspace :where(button, a[href], input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.application-review-form textarea:focus-visible {
  border-color: var(--focus-ring);
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
  box-shadow: none;
}

.table-scroll:focus-visible,
.product-table-wrap:focus-visible,
.table:focus-visible,
.file-table:focus-visible,
.service-table:focus-visible,
.audit-table:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
}

body {
  font-size: 15px;
  line-height: 1.47;
}

.btn,
.icon-btn,
input,
select,
textarea,
.application-review-form textarea,
.data-table td,
.product-table td {
  font-size: 14px;
  line-height: 1.43;
}

.btn-sm,
.field > span,
.filter-bar label,
.data-table th,
.product-table th {
  font-size: 13px;
  line-height: 1.38;
}

.status,
.count-pill,
#page small,
#page time,
#page dt,
.sidebar small {
  font-size: 12px;
}

.switch {
  width: 58px;
  height: 44px;
}

.switch span {
  inset: 6px 0;
}

.switch input:focus + span {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.verification-modal {
  max-width: calc(100vw - 28px);
  max-height: calc(100svh - 28px);
  overflow: auto;
}

.verification-modal::backdrop {
  background: rgba(3, 13, 23, 0.7);
  backdrop-filter: blur(5px);
}

.verification-modal-head .icon-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
}

.table,
.file-table,
.service-table,
.audit-table,
.product-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

@media (max-width: 720px) {
  .portal-dialog {
    max-height: calc(100svh - 24px);
  }

  .portal-dialog-card {
    padding: 18px;
  }
}

/* Tickets-aligned standard pages, Settings directory, and product portfolio. */
.sidebar {
  width: 240px;
}

.content-shell {
  width: calc(100% - 240px);
  margin-left: 240px;
}

.nav-section > p {
  font-size: 12px;
  line-height: 16px;
}

.nav-item {
  font-size: 14px;
  line-height: 20px;
}

.topbar {
  min-height: 72px;
  padding-block: 0;
  padding-inline: 36px;
}

.topbar h1 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 28px;
}

.topbar-breadcrumb {
  color: var(--brand-strong);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.topbar-description {
  display: none;
}

.page-shell--standard {
  width: min(100%, var(--page-standard));
  padding: 36px 36px 56px;
}

.settings-directory-page,
.settings-workspace {
  width: 100%;
  min-width: 0;
  max-width: 1108px;
  margin-inline: auto;
  font-size: 15px;
  line-height: 22px;
}

.settings-directory-intro {
  margin: 0 0 24px;
  color: var(--text-soft);
}

.settings-directory {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

#page .settings-directory > button {
  width: 100%;
  min-height: 76px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: transparent;
  text-align: left;
}

#page .settings-directory > button:first-child {
  border-top: 0;
}

#page .settings-directory > button:hover {
  background: var(--surface-soft);
}

#page .settings-directory > button:focus-visible {
  outline-offset: -3px;
}

.settings-directory > button > span:nth-child(2) {
  min-width: 0;
}

.settings-directory strong,
.settings-directory small {
  display: block;
}

.settings-directory strong {
  font-size: 15px;
  line-height: 22px;
}

.settings-directory small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 18px;
}

.settings-directory-icon,
.settings-directory-arrow {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--navy-strong);
}

.settings-directory-icon svg,
.settings-directory-arrow svg {
  width: 18px;
  height: 18px;
}

.settings-directory-arrow {
  color: var(--text-soft);
}

.settings-workspace {
  display: block;
}

.settings-page-breadcrumb {
  min-height: 44px;
  margin: -8px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  line-height: 16px;
}

.settings-page-breadcrumb button {
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--text-soft);
  background: transparent;
  font: inherit;
}

.settings-page-breadcrumb button:hover {
  color: var(--brand-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.settings-page-breadcrumb > span[aria-hidden="true"] {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: var(--text-faint);
}

.settings-page-breadcrumb svg {
  width: 14px;
  height: 14px;
}

.settings-page-breadcrumb [aria-current="page"] {
  color: var(--text);
}

.settings-content {
  width: min(900px, 100%);
  min-width: 0;
}

.settings-content .surface-panel,
.settings-content .definition-list {
  border-radius: var(--radius);
}

.settings-content .security-intro {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.settings-content .security-definition {
  width: 100%;
  min-width: 0;
}

.settings-content .settings-account-stack {
  grid-template-columns: minmax(0, 1fr);
}

.product-portfolio-page {
  width: 100%;
  min-width: 0;
  max-width: 1108px;
  margin-inline: auto;
}

.portfolio-heading {
  min-height: 92px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.portfolio-heading h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 30px;
}

.portfolio-heading p:not(.eyebrow) {
  max-width: 680px;
  margin: 7px 0 0;
  color: var(--text-soft);
}

.product-portfolio {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-portfolio-columns,
.product-portfolio-row {
  display: grid;
  grid-template-columns: minmax(300px, 1.45fr) minmax(130px, 0.55fr) minmax(250px, 1fr) minmax(180px, auto);
  gap: 20px;
}

.product-portfolio-columns {
  min-height: 42px;
  align-items: center;
  padding: 0 18px;
  color: var(--text-soft);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.product-portfolio-row {
  min-height: 124px;
  align-items: center;
  padding: 20px 18px;
  border-top: 1px solid var(--line);
}

.product-portfolio-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.product-portfolio-code {
  padding-top: 3px;
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 750;
  line-height: 16px;
  letter-spacing: 0.06em;
}

.product-portfolio-identity h3 {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
}

.product-portfolio-identity p,
.product-portfolio-attention p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 18px;
}

.product-portfolio-label {
  display: none;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 16px;
}

.product-portfolio-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.portfolio-footnote {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 18px;
}

.product-workspace-header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 18px;
}

.product-workspace-header > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-workspace-header strong {
  color: var(--text);
}

html[data-theme="dark"] .hotspot-workspace {
  --brand: #65b8f2;
  --brand-strong: #8ccaf5;
  --brand-soft: #173b59;
}

@media (max-width: 1199px) {
  .product-portfolio-columns {
    display: none;
  }

  .product-portfolio-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  }

  .product-portfolio-state,
  .product-portfolio-attention {
    grid-column: 1;
  }

  .product-portfolio-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    flex-direction: column;
  }

  .product-portfolio-label {
    display: block;
    margin-bottom: 4px;
  }
}

@media (max-width: 1023px) {
  .sidebar {
    width: min(288px, calc(100vw - 48px));
  }

  .content-shell {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    padding-inline: 20px;
  }

  .product-portfolio-columns {
    display: none;
  }

  .product-portfolio-row {
    grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  }

  .product-portfolio-state,
  .product-portfolio-attention {
    grid-column: 1;
  }

  .product-portfolio-actions {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    flex-direction: column;
  }

  .product-portfolio-label {
    display: block;
    margin-bottom: 4px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 60px;
    padding-inline: 12px;
  }

  .topbar h1 {
    font-size: 18px;
    line-height: 24px;
  }

  .page-shell--standard {
    padding: 24px 16px 42px;
  }

  .settings-directory-intro {
    margin-bottom: 20px;
  }

  #page .settings-directory > button {
    padding-inline: 14px;
    grid-template-columns: 22px minmax(0, 1fr) 18px;
    gap: 12px;
  }

  .portfolio-heading,
  .product-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .portfolio-heading {
    min-height: 0;
  }

  .portfolio-heading .btn,
  .product-workspace-header > .btn {
    width: 100%;
  }

  .product-portfolio-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .product-portfolio-identity {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .product-portfolio-actions {
    grid-column: 1;
    grid-row: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .settings-content .security-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-content .security-actions .btn,
  .settings-session-actions .btn {
    width: 100%;
  }
}
