/*
   Fikrova customer portal v3.
   This is the single customer-facing presentation layer. It owns the
   portal shell, authentication screens, and authenticated workspace while
   leaving routes, form names, handlers, and licensing decisions untouched.
*/

.portal-shell-body {
  --pv-bg: #f4f7f8;
  --pv-surface: #ffffff;
  --pv-surface-soft: #f8fafb;
  --pv-surface-strong: #edf3f3;
  --pv-line: #dbe5e6;
  --pv-line-strong: #c4d4d5;
  --pv-ink: #102c2e;
  --pv-muted: #607275;
  --pv-subtle: #8b9a9c;
  --pv-accent: #0f766e;
  --pv-accent-hover: #0b625b;
  --pv-accent-soft: #e5f3f0;
  --pv-gold: #b7792c;
  --pv-gold-soft: #fff4e2;
  --pv-danger: #b42318;
  --pv-danger-soft: #fff0ee;
  --pv-success: #167c52;
  --pv-success-soft: #e8f7ef;
  --pv-shadow-1: 0 2px 6px rgba(15, 42, 44, .04), 0 10px 24px rgba(15, 42, 44, .05);
  --pv-shadow-2: 0 18px 50px rgba(15, 42, 44, .10);
  --pv-radius-sm: 10px;
  --pv-radius-md: 16px;
  --pv-radius-lg: 22px;
  background: var(--pv-bg);
  color: var(--pv-ink);
  font-family: Inter, Cairo, sans-serif;
}

html[data-theme="dark"] .portal-shell-body {
  --pv-bg: #0c1719;
  --pv-surface: #132224;
  --pv-surface-soft: #172a2c;
  --pv-surface-strong: #1d3537;
  --pv-line: #294346;
  --pv-line-strong: #3b5a5b;
  --pv-ink: #eff8f6;
  --pv-muted: #aec0bd;
  --pv-subtle: #7e9694;
  --pv-accent: #32bda7;
  --pv-accent-hover: #5cd7c1;
  --pv-accent-soft: rgba(50, 189, 167, .14);
  --pv-gold: #e1ad65;
  --pv-gold-soft: rgba(225, 173, 101, .14);
  --pv-danger: #ff8274;
  --pv-danger-soft: rgba(255, 130, 116, .13);
  --pv-success: #69d29f;
  --pv-success-soft: rgba(105, 210, 159, .14);
  --pv-shadow-1: 0 2px 6px rgba(0, 0, 0, .12), 0 12px 28px rgba(0, 0, 0, .16);
  --pv-shadow-2: 0 20px 54px rgba(0, 0, 0, .28);
}

.portal-shell-body .portal-page {
  display: grid;
  width: min(1360px, calc(100% - 48px));
  min-height: 100vh;
  margin-inline: auto;
  align-content: start;
  gap: 20px;
  padding: 24px 0 64px;
}

.portal-shell-body .portal-top {
  position: relative;
  top: auto;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  gap: 22px;
  padding: 9px 12px 9px 18px;
  border: 1px solid var(--pv-line);
  border-radius: var(--pv-radius-md);
  background: color-mix(in srgb, var(--pv-surface) 94%, transparent);
  box-shadow: var(--pv-shadow-1);
  backdrop-filter: blur(18px);
}

.portal-shell-body .portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  color: var(--pv-ink);
  text-decoration: none;
}

.portal-shell-body .portal-brand .brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--pv-line);
  border-radius: 11px;
  background: var(--pv-surface-soft);
}

.portal-shell-body .portal-brand .brand-mark img { display: block; width: 100%; height: 100%; }
.portal-shell-body .portal-brand strong { font-size: 17px; font-weight: 800; }

.portal-shell-body .portal-top-context {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--pv-muted);
}

.portal-shell-body .portal-top-context-mark {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--pv-gold);
  box-shadow: 0 0 0 5px var(--pv-gold-soft);
}

.portal-shell-body .portal-top-context-copy { display: grid; min-width: 0; gap: 2px; }
.portal-shell-body .portal-top-context-copy small { color: var(--pv-subtle); font-size: 9px; font-weight: 800; letter-spacing: 1.5px; }
.portal-shell-body .portal-top-context-copy strong { overflow: hidden; color: var(--pv-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.portal-shell-body .portal-top-actions,
.portal-shell-body .portal-user-bar { display: flex; align-items: center; gap: 8px; }

.portal-shell-body .portal-language {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--pv-line);
  border-radius: 10px;
  background: var(--pv-surface-soft);
}

.portal-shell-body .portal-language a {
  display: inline-grid;
  min-width: 36px;
  height: 29px;
  place-items: center;
  border-radius: 7px;
  color: var(--pv-muted);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.portal-shell-body .portal-language a:hover { color: var(--pv-accent); transform: translateY(-1px); }
.portal-shell-body .portal-language a.active { background: var(--pv-surface); color: var(--pv-accent); box-shadow: var(--pv-shadow-1); }

.portal-shell-body .portal-theme-toggle {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--pv-line);
  border-radius: 10px;
  background: var(--pv-surface-soft);
  color: var(--pv-muted);
}

.portal-shell-body .portal-theme-toggle:hover { border-color: var(--pv-accent); color: var(--pv-accent); transform: translateY(-1px); }
.portal-shell-body .portal-theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.portal-shell-body .portal-profile-chip {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  padding: 4px 11px 4px 5px;
  border: 1px solid var(--pv-line);
  border-radius: 12px;
  background: var(--pv-surface-soft);
  color: var(--pv-ink);
  text-decoration: none;
}

.portal-shell-body .portal-profile-chip:hover { border-color: var(--pv-accent); background: var(--pv-accent-soft); }
.portal-shell-body .portal-profile-avatar { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--pv-accent); color: #fff; font-size: 12px; font-weight: 800; }
.portal-shell-body .portal-profile-text { display: grid; gap: 1px; min-width: 0; }
.portal-shell-body .portal-profile-text strong, .portal-shell-body .portal-profile-text small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-profile-text strong { font-size: 11px; }
.portal-shell-body .portal-profile-text small { color: var(--pv-subtle); font-size: 10px; }

.portal-shell-body .btn {
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 750;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.portal-shell-body .btn:hover { transform: translateY(-1px); }
.portal-shell-body .btn-primary { border-color: var(--pv-accent); background: var(--pv-accent); color: #fff; box-shadow: 0 7px 16px rgba(15, 118, 110, .16); }
.portal-shell-body .btn-primary:hover { border-color: var(--pv-accent-hover); background: var(--pv-accent-hover); }
.portal-shell-body .btn-outline { border-color: var(--pv-line-strong); background: var(--pv-surface); color: var(--pv-ink); }
.portal-shell-body .btn-outline:hover { border-color: var(--pv-accent); background: var(--pv-accent-soft); color: var(--pv-accent); }

.portal-shell-body .portal-app-workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.portal-shell-body .portal-workspace-rail {
  position: sticky;
  top: 102px;
  display: flex;
  min-height: 590px;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #183f40;
  border-radius: 20px;
  background: #102b2d;
  color: #f4fbfa;
  box-shadow: var(--pv-shadow-2);
}

html[data-theme="dark"] .portal-shell-body .portal-workspace-rail { border-color: #28595a; background: #0b2022; }

.portal-shell-body .portal-rail-product { display: flex; align-items: center; gap: 10px; padding: 7px 6px 17px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.portal-shell-body .portal-rail-product-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; overflow: hidden; border-radius: 11px; background: #0f766e; }
.portal-shell-body .portal-rail-product-mark img { width: 100%; height: 100%; }
.portal-shell-body .portal-rail-product > span:last-child { display: grid; min-width: 0; gap: 3px; }
.portal-shell-body .portal-rail-product strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-rail-product small { color: rgba(255, 255, 255, .56); font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: .4px; }
.portal-shell-body .portal-rail-label { padding: 20px 6px 9px; color: rgba(255, 255, 255, .45); font-size: 9px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.portal-shell-body .portal-workspace-rail .portal-workspace-tabs { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-auto-flow: row; gap: 4px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.portal-shell-body .portal-workspace-rail .portal-workspace-tabs a { display: flex; width: 100%; min-width: 0; min-height: 42px; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 9px; border: 1px solid transparent; border-radius: 10px; color: rgba(255, 255, 255, .72); font-size: 11px; font-weight: 650; text-align: start; text-decoration: none; white-space: normal; transition: background .18s ease, color .18s ease, border-color .18s ease; }
.portal-shell-body .portal-workspace-rail .portal-workspace-tabs a:hover { border-color: rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .08); color: #fff; }
.portal-shell-body .portal-workspace-rail .portal-workspace-tabs a.is-active { border-color: rgba(70, 212, 188, .24); background: rgba(45, 190, 166, .17); color: #fff; box-shadow: inset 3px 0 0 #44ccb3; }
.portal-shell-body .portal-nav-icon { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 8px; background: rgba(255, 255, 255, .08); color: #8fe5d4; }
.portal-shell-body .portal-workspace-rail .portal-workspace-tabs a > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.portal-shell-body .portal-nav-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-rail-footer { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 13px 7px 5px; border-top: 1px solid rgba(255, 255, 255, .12); }
.portal-shell-body .portal-rail-footer-status { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: #46d0a1; box-shadow: 0 0 0 4px rgba(70, 208, 161, .13); }
.portal-shell-body .portal-rail-footer > span:last-child { display: grid; min-width: 0; gap: 3px; }
.portal-shell-body .portal-rail-footer strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-rail-footer small { overflow: hidden; color: rgba(255, 255, 255, .52); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.portal-shell-body .portal-workspace-content { display: grid; min-width: 0; gap: 16px; }
.portal-shell-body .portal-workspace-content .portal-alert { margin: 0; }
.portal-shell-body .portal-workspace-head { display: flex; min-height: 112px; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 28px; border: 1px solid var(--pv-line); border-radius: var(--pv-radius-lg); background: var(--pv-surface); box-shadow: var(--pv-shadow-1); }
.portal-shell-body .portal-workspace-head h1 { margin: 5px 0 5px; color: var(--pv-ink); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.08; }
.portal-shell-body .portal-workspace-head p { margin: 0; color: var(--pv-muted); font-size: 12px; }
.portal-shell-body .eyebrow { color: var(--pv-accent); font-size: 9px; font-weight: 850; letter-spacing: 1.2px; text-transform: uppercase; }

.portal-shell-body .portal-status-pill { display: inline-flex; min-height: 27px; align-items: center; justify-content: center; padding: 5px 10px; border: 1px solid var(--pv-line); border-radius: 999px; background: var(--pv-surface-soft); color: var(--pv-muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.portal-shell-body .portal-status-pill.state-active, .portal-shell-body .portal-status-pill.is-active { border-color: rgba(22, 124, 82, .24); background: var(--pv-success-soft); color: var(--pv-success); }
.portal-shell-body .portal-status-pill.state-expired, .portal-shell-body .portal-status-pill.state-suspended, .portal-shell-body .portal-status-pill.is-expired { border-color: rgba(180, 35, 24, .22); background: var(--pv-danger-soft); color: var(--pv-danger); }

.portal-shell-body .portal-overview-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.portal-shell-body .portal-overview-card { display: grid; min-width: 0; min-height: 126px; grid-template-columns: auto minmax(0, 1fr); align-content: start; column-gap: 9px; row-gap: 4px; padding: 16px; border: 1px solid var(--pv-line); border-radius: var(--pv-radius-md); background: var(--pv-surface); box-shadow: var(--pv-shadow-1); }
.portal-shell-body .portal-overview-card-featured { border-color: rgba(15, 118, 110, .28); background: linear-gradient(135deg, var(--pv-accent-soft), var(--pv-surface)); }
.portal-shell-body .portal-overview-icon { display: grid; width: 29px; height: 29px; grid-row: span 3; place-items: center; border-radius: 9px; background: var(--pv-accent-soft); color: var(--pv-accent); }
.portal-shell-body .portal-overview-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-overview-label { overflow: hidden; color: var(--pv-muted); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-overview-card strong { overflow: hidden; color: var(--pv-ink); font-size: 14px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-overview-card small { overflow: hidden; color: var(--pv-subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.portal-shell-body .portal-dashboard { display: grid; min-width: 0; gap: 16px; }
.portal-shell-body .portal-main-stack, .portal-shell-body .portal-action-stack { display: grid; min-width: 0; gap: 16px; }
.portal-shell-body .portal-section-license .portal-main-stack { grid-template-columns: minmax(0, 1fr); }
.portal-shell-body .portal-section-payment, .portal-shell-body .portal-section-reset, .portal-shell-body .portal-section-offline { grid-template-columns: minmax(0, 1fr); }

.portal-shell-body .portal-license-panel, .portal-shell-body .portal-machines-panel, .portal-shell-body .portal-releases-panel, .portal-shell-body .portal-requests-panel, .portal-shell-body .portal-action-panel, .portal-shell-body .portal-support-panel, .portal-shell-body .portal-payment-state { border: 1px solid var(--pv-line); border-radius: var(--pv-radius-lg); background: var(--pv-surface); box-shadow: var(--pv-shadow-1); }
.portal-shell-body .portal-license-panel { padding: 24px; }
.portal-shell-body .portal-license-head { display: flex; align-items: center; gap: 12px; }
.portal-shell-body .portal-license-head > div { min-width: 0; flex: 1; }
.portal-shell-body .license-card-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid rgba(15, 118, 110, .18); border-radius: 11px; background: var(--pv-accent-soft); color: var(--pv-accent); }
.portal-shell-body .license-card-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-license-head h2 { margin: 3px 0 3px; font-size: 20px; }
.portal-shell-body .portal-license-head p { margin: 0; color: var(--pv-muted); font-size: 11px; }

.portal-shell-body .portal-key-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 18px; padding: 12px 14px; border: 1px dashed var(--pv-line-strong); border-radius: 12px; background: var(--pv-surface-soft); }
.portal-shell-body .portal-key-strip span { color: var(--pv-muted); font-size: 10px; font-weight: 750; }
.portal-shell-body .portal-key-strip code { overflow: hidden; color: var(--pv-accent); font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 750; letter-spacing: .5px; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-line); }
.portal-shell-body .portal-detail-grid > div { display: grid; min-height: 74px; align-content: center; gap: 6px; padding: 12px; background: var(--pv-surface); }
.portal-shell-body .portal-detail-grid span, .portal-shell-body .portal-usage span { color: var(--pv-muted); font-size: 10px; }
.portal-shell-body .portal-detail-grid strong, .portal-shell-body .portal-usage strong { color: var(--pv-ink); font-size: 13px; }
.portal-shell-body .portal-usage { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 18px; }
.portal-shell-body .portal-usage > div:first-child { display: grid; gap: 5px; }
.portal-shell-body .portal-progress { height: 8px; overflow: hidden; border-radius: 99px; background: var(--pv-surface-strong); }
.portal-shell-body .portal-progress span { display: block; height: 100%; border-radius: inherit; background: var(--pv-accent); }

.portal-shell-body .portal-machines-panel, .portal-shell-body .portal-releases-panel, .portal-shell-body .portal-requests-panel, .portal-shell-body .portal-action-panel, .portal-shell-body .portal-support-panel { padding: 22px; }
.portal-shell-body .card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.portal-shell-body .section-title { margin: 0; color: var(--pv-ink); font-size: 18px; }
.portal-shell-body .muted { color: var(--pv-muted); font-size: 11px; }
.portal-shell-body .portal-release-list, .portal-shell-body .portal-request-list, .portal-shell-body .portal-machine-list { display: grid; gap: 9px; }
.portal-shell-body .portal-release-row, .portal-shell-body .portal-request-row, .portal-shell-body .portal-machine-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--pv-line); border-radius: 13px; background: var(--pv-surface-soft); }
.portal-shell-body .portal-release-row:hover, .portal-shell-body .portal-request-row:hover, .portal-shell-body .portal-machine-row:hover { border-color: var(--pv-line-strong); background: var(--pv-surface); }
.portal-shell-body .portal-request-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.portal-shell-body .portal-request-head strong { color: var(--pv-ink); font-size: 12px; }
.portal-shell-body .portal-request-head span { color: var(--pv-muted); font-size: 10px; font-weight: 700; }
.portal-shell-body .portal-request-facts { display: grid; gap: 4px; margin: 8px 0 0; padding-inline-start: 17px; color: var(--pv-muted); font-size: 10px; }
.portal-shell-body .portal-release-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 8px; color: var(--pv-muted); font-size: 10px; }
.portal-shell-body .portal-release-body p, .portal-shell-body .portal-request-note { margin: 9px 0 0; color: var(--pv-muted); font-size: 11px; line-height: 1.65; }
.portal-shell-body .portal-release-body code { display: block; overflow: hidden; margin-top: 8px; color: var(--pv-subtle); font-family: "JetBrains Mono", monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-release-required { color: var(--pv-gold); font-weight: 800; }
.portal-shell-body .portal-machine-row { align-items: center; }
.portal-shell-body .portal-machine-row strong, .portal-shell-body .portal-machine-row span { display: block; }
.portal-shell-body .portal-machine-row strong { color: var(--pv-ink); font-family: "JetBrains Mono", monospace; font-size: 11px; }
.portal-shell-body .portal-machine-row span, .portal-shell-body .portal-machine-row time, .portal-shell-body .portal-release-row time, .portal-shell-body .portal-request-row > time { color: var(--pv-subtle); font-size: 10px; }

.portal-shell-body .portal-action-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.portal-shell-body .portal-action-heading > div { min-width: 0; }
.portal-shell-body .portal-action-heading h2 { margin: 2px 0 5px; color: var(--pv-ink); font-size: 19px; }
.portal-shell-body .portal-action-heading p { margin: 0; color: var(--pv-muted); font-size: 11px; line-height: 1.6; }
.portal-shell-body .portal-action-panel form.grid, .portal-shell-body .portal-support-compose form.grid { gap: 14px; }
.portal-shell-body .form-label { display: block; margin-bottom: 7px; color: var(--pv-muted); font-size: 10px; font-weight: 750; }
.portal-shell-body .form-control { min-height: 43px; border: 1px solid var(--pv-line-strong); border-radius: 10px; background: var(--pv-surface-soft); color: var(--pv-ink); font-size: 12px; }
.portal-shell-body textarea.form-control { min-height: 96px; resize: vertical; }
.portal-shell-body .form-control:focus { border-color: var(--pv-accent); background: var(--pv-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pv-accent) 16%, transparent); outline: 0; }
.portal-shell-body .small.text-danger, .portal-shell-body .text-danger.small { display: block; margin-top: 5px; color: var(--pv-danger) !important; font-size: 10px; }
.portal-shell-body .portal-payment-state { padding: 18px; background: var(--pv-surface-soft); }
.portal-shell-body .portal-payment-state .portal-request-facts { margin-top: 12px; }
.portal-shell-body .portal-support-layout { display: grid; grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr); gap: 16px; }
.portal-shell-body .portal-support-compose, .portal-shell-body .portal-support-history { min-width: 0; }
.portal-shell-body .portal-support-thread { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pv-line); }
.portal-shell-body .portal-support-message { padding: 10px; border: 1px solid var(--pv-line); border-radius: 10px; background: var(--pv-surface); }
.portal-shell-body .portal-support-message.is-admin { border-color: rgba(15, 118, 110, .22); background: var(--pv-accent-soft); }
.portal-shell-body .portal-support-message-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--pv-muted); font-size: 10px; }
.portal-shell-body .portal-support-message p { margin: 7px 0 0; color: var(--pv-ink); font-size: 11px; line-height: 1.65; }
.portal-shell-body .portal-support-reply-form { display: grid; gap: 9px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--pv-line); }
.portal-shell-body .portal-empty { display: grid; min-height: 110px; place-items: center; border: 1px dashed var(--pv-line-strong); border-radius: 12px; color: var(--pv-muted); font-size: 11px; text-align: center; }

/* Public company and signed-out account surfaces retain the same language. */
.portal-shell-body .portal-account-context, .portal-shell-body .portal-account-panel, .portal-shell-body .portal-hero { border-color: var(--pv-line); background: var(--pv-surface); box-shadow: var(--pv-shadow-1); }
.portal-shell-body .portal-account-context { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; border: 1px solid var(--pv-line); border-radius: var(--pv-radius-md); }
.portal-shell-body .portal-account-context-main { display: flex; align-items: center; gap: 12px; }
.portal-shell-body .portal-context-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--pv-accent-soft); color: var(--pv-accent); }
.portal-shell-body .portal-context-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-account-context-main div { display: grid; gap: 3px; }
.portal-shell-body .portal-account-context-main strong { font-size: 15px; }
.portal-shell-body .portal-account-context-main small { color: var(--pv-muted); font-size: 10px; }
.portal-shell-body .portal-account-context-actions { display: flex; align-items: center; gap: 8px; }
.portal-shell-body .portal-context-stat { display: grid; gap: 2px; margin-inline-end: 5px; text-align: center; }
.portal-shell-body .portal-context-stat strong { color: var(--pv-accent); font-size: 17px; }
.portal-shell-body .portal-context-stat span { color: var(--pv-muted); font-size: 9px; }
.portal-shell-body .portal-account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.portal-shell-body .portal-account-panel { padding: 22px; border: 1px solid var(--pv-line); border-radius: var(--pv-radius-lg); }
.portal-shell-body .portal-account-summary, .portal-shell-body .portal-account-security, .portal-shell-body .portal-account-licenses { grid-column: 1 / -1; }
.portal-shell-body .portal-security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.portal-shell-body .portal-security-form { display: grid; gap: 13px; padding: 20px; border: 1px solid var(--pv-line); border-radius: 15px; background: var(--pv-surface-soft); box-shadow: 0 8px 24px rgba(8, 32, 34, .04); }
.portal-shell-body .portal-security-form-head { display: flex; align-items: center; gap: 11px; min-height: 44px; padding-bottom: 13px; border-bottom: 1px solid var(--pv-line); }
.portal-shell-body .portal-security-form-icon { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border: 1px solid rgba(15, 118, 110, .2); border-radius: 10px; background: var(--pv-accent-soft); color: var(--pv-accent); }
.portal-shell-body .portal-security-form-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-security-form-title { display: grid; min-width: 0; gap: 3px; }
.portal-shell-body .portal-security-form-title strong { color: var(--pv-ink); font-size: 13px; }
.portal-shell-body .portal-security-form-title span { overflow: hidden; color: var(--pv-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-field { display: grid; gap: 6px; margin: 0; }
.portal-shell-body .portal-field > span:first-child { color: var(--pv-muted); font-size: 10px; font-weight: 750; }
.portal-shell-body .portal-account-dashboard .portal-field .form-control { min-height: 46px; border: 1px solid var(--pv-line-strong); border-radius: 10px; background: var(--pv-surface) !important; color: var(--pv-ink); font-size: 12px; }
.portal-shell-body .portal-account-dashboard .portal-field .form-control::placeholder { color: var(--pv-subtle); }
.portal-shell-body .portal-account-dashboard .portal-field .form-control:focus { border-color: var(--pv-accent); background: var(--pv-surface) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--pv-accent) 16%, transparent); outline: 0; }
.portal-shell-body .portal-security-form .btn { justify-self: start; margin-top: 3px; }
.portal-shell-body .portal-account-license-list { display: grid; gap: 8px; }
.portal-shell-body .portal-account-license-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--pv-line); border-radius: 12px; background: var(--pv-surface-soft); }
.portal-shell-body .portal-account-license-row > div { display: grid; gap: 4px; min-width: 0; }
.portal-shell-body .portal-account-license-row strong { font-size: 12px; }
.portal-shell-body .portal-account-license-row span { color: var(--pv-accent); font-family: "JetBrains Mono", monospace; font-size: 10px; }
.portal-shell-body .portal-account-license-row small { color: var(--pv-muted); font-size: 10px; }

/* Signed-in account home: one focused workspace instead of a marketing page plus duplicate account cards. */
.portal-shell-body .portal-account-dashboard { display: grid; gap: 16px; min-width: 0; }
.portal-shell-body .portal-account-welcome { display: flex; min-height: 150px; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border: 1px solid var(--pv-line); border-radius: var(--pv-radius-lg); background: linear-gradient(120deg, var(--pv-surface), var(--pv-accent-soft)); box-shadow: var(--pv-shadow-1); }
.portal-shell-body .portal-account-welcome-copy { display: grid; gap: 7px; min-width: 0; }
.portal-shell-body .portal-account-welcome-copy h1 { margin: 0; color: var(--pv-ink); font-size: clamp(26px, 3vw, 38px); line-height: 1.08; }
.portal-shell-body .portal-account-welcome-copy p { margin: 0; color: var(--pv-muted); font-size: 12px; }
.portal-shell-body .portal-account-welcome-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.portal-shell-body .portal-account-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.portal-shell-body .portal-account-stat { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--pv-line); border-radius: var(--pv-radius-md); background: var(--pv-surface); box-shadow: var(--pv-shadow-1); }
.portal-shell-body .portal-account-stat-accent { border-color: rgba(15, 118, 110, .28); background: linear-gradient(135deg, var(--pv-accent-soft), var(--pv-surface)); }
.portal-shell-body .portal-account-stat-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; background: var(--pv-accent-soft); color: var(--pv-accent); }
.portal-shell-body .portal-account-stat-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-account-stat-copy { display: grid; min-width: 0; gap: 3px; }
.portal-shell-body .portal-account-stat-copy small { color: var(--pv-muted); font-size: 10px; font-weight: 700; }
.portal-shell-body .portal-account-stat-copy strong { overflow: hidden; color: var(--pv-ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-account-stat-copy > span { overflow: hidden; color: var(--pv-subtle); font-size: 9px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.portal-shell-body .portal-account-dashboard .portal-account-panel { padding: 24px; }
.portal-shell-body .portal-account-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.portal-shell-body .portal-account-panel-head > div { min-width: 0; }
.portal-shell-body .portal-account-panel-head h2 { margin: 4px 0 5px; color: var(--pv-ink); font-size: 20px; }
.portal-shell-body .portal-account-panel-head p { margin: 0; color: var(--pv-muted); font-size: 11px; line-height: 1.55; }
.portal-shell-body .portal-account-empty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px dashed var(--pv-line-strong); border-radius: 13px; background: var(--pv-surface-soft); }
.portal-shell-body .portal-account-empty-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--pv-accent-soft); color: var(--pv-accent); }
.portal-shell-body .portal-account-empty-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-account-empty strong { color: var(--pv-ink); font-size: 12px; }
.portal-shell-body .portal-account-empty p { margin: 4px 0 0; color: var(--pv-muted); font-size: 10px; }
.portal-shell-body .portal-account-dashboard .portal-account-security { scroll-margin-top: 20px; }

/* Authentication uses the same product language but a clearer sign-in task. */
.portal-shell-body .portal-auth-shell { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 36px 20px 60px; background: transparent; }
.portal-shell-body .portal-auth-layout { position: relative; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, .94fr) !important; width: min(100%, 1120px) !important; max-width: 1120px !important; min-height: 680px !important; overflow: hidden; border: 1px solid var(--pv-line) !important; border-radius: 24px !important; background: var(--pv-surface) !important; box-shadow: var(--pv-shadow-2) !important; }
.portal-shell-body .portal-auth-layout::before { content: ""; position: absolute; z-index: 3; inset: 0 32px auto; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--pv-accent), #39bfa8 58%, var(--pv-gold)); pointer-events: none; }
.portal-shell-body .portal-auth-card { display: flex; min-width: 0; min-height: 680px; flex-direction: column; justify-content: center; padding: 66px 72px !important; border: 0; border-radius: 0; background: var(--pv-surface) !important; box-shadow: none !important; }
.portal-shell-body .portal-card-brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 11px; margin-bottom: 36px; color: var(--pv-ink); text-decoration: none; }
.portal-shell-body .portal-card-brand-mark, .portal-shell-body .portal-auth-brand-mark { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; overflow: hidden; border-radius: 14px; box-shadow: 0 8px 18px rgba(15, 118, 110, .18); }
.portal-shell-body .portal-card-brand-mark img, .portal-shell-body .portal-auth-brand-mark img { display: block; width: 100%; height: 100%; }
.portal-shell-body .portal-card-brand strong { font-size: 19px; font-weight: 800; }
.portal-shell-body .portal-card-brand small { display: block; margin-top: 3px; color: var(--pv-muted); font-size: 11px; }
.portal-shell-body .portal-form-pane { display: flex; width: 100%; max-width: 430px; margin-inline: auto; flex-direction: column; gap: 18px; }
.portal-shell-body .portal-auth-language { position: static; align-self: flex-start; order: -1; margin-bottom: 3px; }
.portal-shell-body .portal-auth-language a { min-width: 56px; height: 30px; }
.portal-shell-body .portal-auth-card-head { margin-bottom: 5px; }
.portal-shell-body .portal-auth-card-head h2 { margin: 0; color: var(--pv-ink); font-size: clamp(30px, 3vw, 42px); line-height: 1.05; }
.portal-shell-body .portal-auth-card-head p { max-width: 37ch; margin: 10px 0 0; color: var(--pv-muted); font-size: 14px; line-height: 1.65; }
.portal-shell-body .portal-auth-form, .portal-shell-body .portal-register-form { gap: 12px; }
.portal-shell-body .portal-input-wrap input.form-control, .portal-shell-body .portal-country-picker button.portal-country-trigger { min-height: 51px; border: 1px solid var(--pv-line-strong); border-radius: 11px; background: var(--pv-surface-soft); color: var(--pv-ink); }
.portal-shell-body .portal-input-wrap input.form-control:focus, .portal-shell-body .portal-country-picker button.portal-country-trigger:focus-visible { border-color: var(--pv-accent); background: var(--pv-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pv-accent) 16%, transparent); outline: 0; }
.portal-shell-body .portal-auth-form .btn-primary, .portal-shell-body .portal-register-form .btn-primary { min-height: 51px; margin-top: 5px; }
.portal-shell-body .portal-auth-switch { padding-top: 20px; border-top: 1px solid var(--pv-line); color: var(--pv-muted); }
.portal-shell-body .portal-auth-copy { position: relative; display: flex !important; min-width: 0; min-height: 680px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 54px 58px 44px; background: #103b3d; color: #fff; }
.portal-shell-body .portal-auth-copy::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(to bottom, black, transparent 88%); pointer-events: none; }
.portal-shell-body .portal-auth-copy::after { content: ""; position: absolute; width: 370px; height: 370px; inset-block-end: -190px; inset-inline-end: -145px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; box-shadow: 0 0 0 36px rgba(255, 255, 255, .04), 0 0 0 72px rgba(255, 255, 255, .025); pointer-events: none; }
.portal-shell-body .portal-auth-copy > * { position: relative; z-index: 1; }
.portal-shell-body .portal-auth-copy .portal-auth-brand { display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; color: #fff; text-decoration: none; }
.portal-shell-body .portal-auth-copy .portal-auth-brand strong { color: #fff; }
.portal-shell-body .portal-auth-copy .portal-auth-brand small { color: rgba(255, 255, 255, .64); }
.portal-shell-body .portal-auth-copy-center { display: flex; max-width: 35rem; margin-block: auto; flex-direction: column; align-items: flex-start; gap: 18px; }
.portal-shell-body .portal-auth-copy-center h1 { max-width: 11ch; margin: 0; color: #fff; font-size: clamp(40px, 4vw, 60px); line-height: 1.02; }
.portal-shell-body .portal-auth-copy-center p { max-width: 34ch; margin: 0; color: rgba(255, 255, 255, .76); font-size: 15px; line-height: 1.75; }
.portal-shell-body .portal-auth-feature-list { position: relative; z-index: 2; display: grid; gap: 9px; margin-top: 28px; }
.portal-shell-body .portal-auth-feature-list span { display: flex; min-height: 34px; align-items: center; gap: 10px; width: fit-content; padding: 7px 11px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .88); font-size: 12px; font-weight: 650; }
.portal-shell-body .portal-auth-feature-list svg { display: block; width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.portal-shell-body .portal-auth-copy .portal-powered-by { margin-top: 28px; color: rgba(255, 255, 255, .68); }

@media (max-width: 1040px) {
  .portal-shell-body .portal-page { width: min(100% - 32px, 960px); }
  .portal-shell-body .portal-app-workspace { grid-template-columns: 1fr; }
  .portal-shell-body .portal-workspace-rail { position: static; min-height: 0; }
  .portal-shell-body .portal-workspace-rail .portal-workspace-tabs { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
  .portal-shell-body .portal-workspace-rail .portal-workspace-tabs a { min-width: max-content; }
  .portal-shell-body .portal-rail-footer { display: none; }
  .portal-shell-body .portal-overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-shell-body .portal-auth-layout { grid-template-columns: 1fr !important; width: min(100%, 600px) !important; min-height: 0 !important; }
  .portal-shell-body .portal-auth-copy { display: none !important; }
  .portal-shell-body .portal-auth-card { min-height: 0; padding: 54px 46px !important; }
}

@media (max-width: 760px) {
  .portal-shell-body .portal-page { width: min(100% - 20px, 620px); padding-top: 10px; }
  .portal-shell-body .portal-top { position: static; grid-template-columns: auto 1fr; gap: 10px; padding: 8px 10px; }
  .portal-shell-body .portal-top-context { display: none; }
  .portal-shell-body .portal-top-actions { grid-column: 1 / -1; justify-content: space-between; width: 100%; }
  .portal-shell-body .portal-user-bar { margin-inline-start: auto; }
  .portal-shell-body .portal-profile-text { display: none; }
  .portal-shell-body .portal-profile-chip { padding-inline: 5px; }
  .portal-shell-body .portal-workspace-head { align-items: flex-start; flex-direction: column; padding: 20px; }
  .portal-shell-body .portal-account-welcome { align-items: flex-start; flex-direction: column; padding: 22px; }
  .portal-shell-body .portal-account-welcome-actions { justify-content: flex-start; }
  .portal-shell-body .portal-account-stat-grid { grid-template-columns: 1fr; }
  .portal-shell-body .portal-account-panel-head { align-items: flex-start; flex-direction: column; }
  .portal-shell-body .portal-account-empty { grid-template-columns: auto minmax(0, 1fr); }
  .portal-shell-body .portal-account-empty > .btn { grid-column: 2; justify-self: start; }
  .portal-shell-body .portal-overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-shell-body .portal-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-shell-body .portal-support-layout, .portal-shell-body .portal-security-grid { grid-template-columns: 1fr; }
  .portal-shell-body .portal-account-context { align-items: flex-start; flex-direction: column; }
  .portal-shell-body .portal-account-context-actions { width: 100%; flex-wrap: wrap; }
  .portal-shell-body .portal-auth-shell { padding: 20px 10px 34px; }
  .portal-shell-body .portal-auth-layout, .portal-shell-body .portal-auth-card { border-radius: 18px !important; }
  .portal-shell-body .portal-auth-card { padding: 42px 30px 34px !important; }
}

@media (max-width: 480px) {
  .portal-shell-body .portal-overview-strip, .portal-shell-body .portal-detail-grid { grid-template-columns: 1fr; }
  .portal-shell-body .portal-overview-card { min-height: 100px; }
  .portal-shell-body .portal-license-panel, .portal-shell-body .portal-machines-panel, .portal-shell-body .portal-releases-panel, .portal-shell-body .portal-requests-panel, .portal-shell-body .portal-action-panel, .portal-shell-body .portal-support-panel { padding: 16px; }
  .portal-shell-body .portal-release-row, .portal-shell-body .portal-request-row, .portal-shell-body .portal-machine-row, .portal-shell-body .portal-account-license-row { grid-template-columns: auto minmax(0, 1fr); }
  .portal-shell-body .portal-release-row > .btn, .portal-shell-body .portal-account-license-row > .btn { grid-column: 2; width: 100%; }
  .portal-shell-body .portal-release-row > time, .portal-shell-body .portal-request-row > time { grid-column: 2; }
  .portal-shell-body .portal-auth-card { padding: 32px 20px 26px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-shell-body *, .portal-shell-body *::before, .portal-shell-body *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}
