.emv-portal-host {
  height: auto;
  min-height: 100vh;
  overflow: visible;
  color: #14171c;
  background: #f3f5f7;
}

/* Department subprojects use the same smart-workbench chrome as their parent. */
.workbench-native-tool {
  min-width: 0;
  width: 100%;
}

.shell-nav-link,
.smart-workbench-link,
.workbench-back {
  text-decoration: none;
}

@media (max-width: 700px) {
  .procurement-app .topbar-status:not(.smart-workbench-link),
  .quality-app .topbar-status:not(.smart-workbench-link) {
    display: none;
  }

  .procurement-app .ai-topbar,
  .quality-app .ai-topbar {
    padding-inline: 14px;
  }
}

[data-theme="dark"] .emv-portal-host {
  color: #f4f5f7;
  background: #080e1b;
}

.emv-portal-shell {
  --portal-gold: #eab83f;
  --portal-gold-strong: #d99b10;
  --portal-ink: #111827;
  --portal-muted: #667085;
  --portal-line: #dce1e8;
  --portal-panel: #ffffff;
  --portal-soft: #f7f8fa;
  --portal-success: #198754;
  min-height: 100vh;
  letter-spacing: 0;
}

[data-theme="dark"] .emv-portal-shell {
  --portal-ink: #f5f7fb;
  --portal-muted: #9ca9be;
  --portal-line: #253047;
  --portal-panel: #0e1728;
  --portal-soft: #0a1221;
  --portal-success: #49c97e;
}

.portal-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 10px 28px;
  color: #f8fafc;
  border-bottom: 1px solid #273146;
  background: #0b1323;
}

.portal-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.portal-brand img {
  width: 168px;
  height: 52px;
  object-fit: contain;
}

.portal-brand > span {
  width: 1px;
  height: 36px;
  margin: 0 20px;
  background: #344057;
}

.portal-brand div {
  display: grid;
  gap: 2px;
}

.portal-brand strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.1;
}

.portal-brand small {
  color: #9ca9be;
  font-size: 13px;
  white-space: nowrap;
}

.portal-topbar-actions,
.portal-language,
.portal-account {
  display: flex;
  align-items: center;
}

.portal-topbar-actions {
  gap: 10px;
}

.portal-language {
  overflow: hidden;
  height: 42px;
  border: 1px solid #33415a;
  border-radius: 6px;
}

.portal-language button {
  width: 54px;
  height: 100%;
  color: #a9b5c9;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.portal-language button.is-active {
  color: #111827;
  background: var(--portal-gold);
}

.portal-icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #dce3ef;
  border: 1px solid #33415a;
  border-radius: 6px;
  background: #0e182a;
  cursor: pointer;
}

.portal-icon-button:hover,
.portal-icon-button:focus-visible {
  color: #111827;
  border-color: var(--portal-gold);
  background: var(--portal-gold);
}

.portal-icon-button svg {
  width: 19px;
}

.portal-account {
  min-width: 184px;
  gap: 10px;
  padding: 0 12px;
}

.portal-account > span,
.portal-user-name > span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #111827;
  border-radius: 6px;
  background: var(--portal-gold);
  font-weight: 850;
}

.portal-account > div,
.portal-user-name > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

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

.portal-account strong {
  font-size: 14px;
}

.portal-account small {
  color: #9ca9be;
  font-size: 12px;
}

.portal-layout {
  display: grid;
  min-height: calc(100vh - 78px);
  grid-template-columns: 94px minmax(0, 1fr);
}

.portal-sidebar {
  position: sticky;
  top: 78px;
  display: flex;
  align-self: start;
  height: calc(100vh - 78px);
  flex-direction: column;
  justify-content: space-between;
  padding: 24px 10px;
  border-right: 1px solid var(--portal-line);
  background: var(--portal-panel);
}

.portal-sidebar nav {
  display: grid;
  gap: 10px;
}

.portal-sidebar button {
  display: grid;
  min-height: 64px;
  place-items: center;
  gap: 5px;
  padding: 8px 4px;
  color: var(--portal-muted);
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.portal-sidebar button svg {
  width: 21px;
}

.portal-sidebar button span {
  max-width: 72px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.portal-sidebar button.is-active {
  color: #111827;
  border-color: #d9a729;
  background: var(--portal-gold);
}

.portal-sidebar-mark {
  display: grid;
  height: 42px;
  place-items: center;
  color: var(--portal-muted);
  border-top: 1px solid var(--portal-line);
  font-size: 11px;
  font-weight: 800;
}

.portal-main {
  width: min(1440px, 100%);
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 34px clamp(24px, 4vw, 64px) 64px;
}

.portal-page-header {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 178px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 34px;
  color: #f8fafc;
  border: 1px solid #26334b;
  border-radius: 8px;
  background: #0d1729;
}

.portal-page-header::after {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(42%, 520px);
  content: "";
  opacity: 0.22;
  background: #0d1729 url("../assets/images/auth-factory.jpg") center / cover no-repeat;
}

.portal-page-header > div,
.portal-page-header > button {
  position: relative;
  z-index: 1;
}

.portal-page-header p,
.portal-page-header h1,
.portal-page-header span,
.portal-section-heading h2,
.portal-section-heading p {
  margin: 0;
}

.portal-page-header p {
  margin-bottom: 8px;
  color: var(--portal-gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-page-header h1 {
  max-width: 720px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.portal-page-header > div > span {
  display: block;
  max-width: 660px;
  margin-top: 12px;
  color: #b4bfd1;
  font-size: 15px;
  line-height: 1.6;
}

.portal-context {
  display: flex;
  max-width: 260px;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid #40506a;
  border-radius: 6px;
  background: #101c30;
}

.portal-context svg {
  width: 18px;
  color: var(--portal-gold);
}

.portal-context span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-header {
  min-height: 146px;
  align-items: center;
}

.portal-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 36px 0 18px;
}

.portal-section-heading h2 {
  color: var(--portal-ink);
  font-size: 22px;
}

.portal-section-heading p {
  margin-top: 6px;
  color: var(--portal-muted);
  font-size: 14px;
}

.portal-app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.portal-app-card {
  position: relative;
  display: grid;
  min-height: 152px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: start;
  gap: 14px;
  padding: 22px;
  color: var(--portal-ink);
  text-align: left;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
  font: inherit;
}

.portal-app-card.is-available {
  cursor: pointer;
}

.portal-app-card.is-available:hover,
.portal-app-card.is-available:focus-visible {
  border-color: var(--portal-gold-strong);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.09);
  transform: translateY(-2px);
}

.portal-app-card.is-muted {
  color: var(--portal-muted);
}

.portal-app-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #111827;
  border-radius: 7px;
  background: var(--portal-gold);
}

.portal-app-card.is-muted .portal-app-icon {
  color: var(--portal-muted);
  background: var(--portal-soft);
}

.portal-app-icon svg {
  width: 23px;
}

.portal-app-copy {
  display: grid;
  gap: 8px;
}

.portal-app-copy strong {
  font-size: 17px;
}

.portal-app-copy small {
  color: var(--portal-muted);
  font-size: 13px;
  line-height: 1.55;
}

.portal-app-status,
.portal-role,
.portal-status {
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.portal-app-status {
  padding: 5px 7px;
  color: var(--portal-success);
  background: color-mix(in srgb, var(--portal-success) 10%, transparent);
}

.portal-app-status.is-pending {
  color: var(--portal-muted);
  background: var(--portal-soft);
}

.portal-app-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 18px;
  color: var(--portal-muted);
}

.portal-feedback {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0;
  padding: 12px 14px;
  color: #146c43;
  border: 1px solid #a7dfc0;
  border-radius: 6px;
  background: #edf9f2;
  font-size: 13px;
}

[data-theme="dark"] .portal-feedback {
  color: #8ce0ad;
  border-color: #285f40;
  background: #10251a;
}

.portal-feedback.is-error {
  color: #a12b2b;
  border-color: #efb4b4;
  background: #fff1f1;
}

[data-theme="dark"] .portal-feedback.is-error {
  color: #ffaaaa;
  border-color: #6f3333;
  background: #291515;
}

.portal-feedback svg {
  flex: 0 0 auto;
  width: 18px;
}

.portal-primary,
.portal-secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: 6px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-primary {
  color: #111827;
  border: 1px solid var(--portal-gold-strong);
  background: var(--portal-gold);
}

.portal-secondary {
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  background: var(--portal-panel);
}

.portal-primary svg,
.portal-secondary svg {
  width: 18px;
}

.portal-primary:disabled {
  cursor: wait;
  opacity: 0.64;
}

.portal-management-tabs {
  display: grid;
  overflow: hidden;
  margin: 22px 0 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-user-management-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.portal-management-tabs button {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--portal-muted);
  border: 0;
  border-right: 1px solid var(--portal-line);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-management-tabs button:last-child {
  border-right: 0;
}

.portal-management-tabs button.is-active {
  color: #111827;
  background: var(--portal-gold);
}

.portal-management-tabs svg {
  width: 19px;
}

.portal-human-resources-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 0;
}

.portal-human-resources-tabs .portal-management-tab-note {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  color: var(--portal-muted);
  border-left: 1px solid var(--portal-line);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.portal-human-resources-tabs .portal-management-tab-note svg {
  flex: 0 0 auto;
}

.portal-metrics {
  display: grid;
  margin: 22px 0;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-metrics > div {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 18px;
  border-right: 1px solid var(--portal-line);
}

.portal-metrics > div:last-child {
  border-right: 0;
}

.portal-metrics span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #111827;
  border-radius: 6px;
  background: var(--portal-gold);
}

.portal-metrics svg {
  width: 18px;
}

.portal-metrics small {
  overflow: hidden;
  color: var(--portal-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-metrics strong {
  font-size: 24px;
}

.portal-user-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.portal-user-toolbar > label {
  display: flex;
  width: min(440px, 100%);
  height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-panel);
}

.portal-user-toolbar > label:focus-within {
  border-color: var(--portal-gold-strong);
  box-shadow: 0 0 0 3px rgba(234, 184, 63, 0.16);
}

.portal-user-toolbar svg {
  width: 18px;
  color: var(--portal-muted);
}

.portal-user-toolbar input {
  width: 100%;
  color: var(--portal-ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.portal-activity-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 14px;
  color: var(--portal-muted);
  border: 1px solid var(--portal-line);
  border-left: 4px solid var(--portal-gold-strong);
  background: var(--portal-panel);
}

.portal-activity-note svg {
  flex: 0 0 auto;
  width: 18px;
  margin-top: 1px;
  color: var(--portal-gold-strong);
}

.portal-activity-note p {
  margin: 0;
  line-height: 1.65;
}

.portal-activity-table {
  min-width: 980px;
}

.portal-activity-table td strong,
.portal-activity-table td small {
  display: block;
}

.portal-activity-table td small {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.45;
}

.portal-activity-result {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid currentColor;
  font-size: 11px;
  font-weight: 800;
}

.portal-activity-result.is-success {
  color: #287a4b;
}

.portal-activity-result.is-failure {
  color: #a33a32;
}

.portal-segments {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-panel);
}

.portal-segments button {
  min-height: 40px;
  padding: 0 14px;
  color: var(--portal-muted);
  border: 0;
  border-right: 1px solid var(--portal-line);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.portal-segments button:last-child {
  border-right: 0;
}

.portal-segments button.is-active {
  color: #111827;
  background: var(--portal-gold);
}

.portal-user-table-wrap {
  overflow: auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-user-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.portal-user-table th,
.portal-user-table td {
  padding: 15px 16px;
  text-align: left;
  border-bottom: 1px solid var(--portal-line);
  font-size: 13px;
}

.portal-user-table th {
  color: var(--portal-muted);
  background: var(--portal-soft);
  font-size: 12px;
  font-weight: 800;
}

.portal-user-table tbody tr:last-child td {
  border-bottom: 0;
}

.portal-user-table tbody tr:hover td {
  background: color-mix(in srgb, var(--portal-gold) 5%, transparent);
}

.portal-user-table td > strong,
.portal-user-table td > small {
  display: block;
}

.portal-user-table td > small {
  max-width: 230px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--portal-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-user-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-user-name > span {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.portal-user-name small {
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-role {
  display: inline-block;
  padding: 5px 8px;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  background: var(--portal-soft);
}

.portal-role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-role-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-role-card.is-disabled {
  opacity: 0.64;
}

.portal-role-card > header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 36px;
  align-items: start;
  gap: 12px;
}

.portal-role-card > header h2,
.portal-role-card > header p {
  margin: 0;
}

.portal-role-card > header h2 {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.portal-role-card > header p {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.55;
}

.portal-role-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  border-radius: 6px;
  background: var(--portal-gold);
}

.portal-role-card-icon svg {
  width: 20px;
}

.portal-role-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin: 16px 0 12px;
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-role-meta > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
}

.portal-role-meta svg {
  width: 14px;
  flex: 0 0 auto;
}

.portal-role-permissions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-role-permissions span {
  padding: 5px 8px;
  color: var(--portal-muted);
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  background: var(--portal-soft);
  font-size: 11px;
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--portal-success);
}

.portal-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.portal-status.is-disabled {
  color: #b54747;
}

.portal-row-action {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--portal-muted);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.portal-row-action:hover {
  color: #111827;
  border-color: var(--portal-gold-strong);
  background: var(--portal-gold);
}

.portal-row-action svg {
  width: 17px;
}

.portal-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.portal-row-action.is-sync {
  display: inline-flex;
  width: auto;
  min-width: 96px;
  padding: 0 12px;
  gap: 7px;
  color: #111827;
  border-color: var(--portal-gold-strong);
  background: var(--portal-gold);
  font-weight: 700;
  white-space: nowrap;
}

.portal-row-action.is-sync:hover,
.portal-row-action.is-sync:focus-visible {
  color: var(--portal-gold);
  background: #050505;
}

.portal-table-empty,
.portal-loading {
  display: flex;
  min-height: 220px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--portal-muted);
}

.portal-table-empty svg {
  width: 20px;
}

.portal-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--portal-gold);
  animation: portal-pulse 1s ease-in-out infinite alternate;
}

.portal-loading span:nth-child(2) { animation-delay: 0.2s; }
.portal-loading span:nth-child(3) { animation-delay: 0.4s; }

@keyframes portal-pulse {
  to { opacity: 0.25; transform: translateY(-4px); }
}

.portal-modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  background: rgba(4, 8, 15, 0.72);
}

.portal-modal {
  position: fixed;
  z-index: 51;
  top: 50%;
  left: 50%;
  overflow: auto;
  width: min(760px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
}

.portal-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-modal > header > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-modal > header > div > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: #111827;
  border-radius: 6px;
  background: var(--portal-gold);
}

.portal-modal header h2,
.portal-modal header p,
.portal-password-reset h3 {
  margin: 0;
}

.portal-modal header h2 {
  font-size: 20px;
}

.portal-modal header p {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-modal > header > button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--portal-muted);
  border: 0;
  border-radius: 5px;
  background: var(--portal-soft);
  cursor: pointer;
}

.portal-modal form {
  padding: 24px;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.portal-form-field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.portal-form-field > span,
.portal-permissions legend {
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 800;
}

.portal-form-field > div {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-soft);
}

.portal-form-field > div:focus-within {
  border-color: var(--portal-gold-strong);
  box-shadow: 0 0 0 3px rgba(234, 184, 63, 0.14);
}

.portal-form-field svg {
  width: 17px;
  flex: 0 0 auto;
  color: var(--portal-muted);
}

.portal-form-field input,
.portal-form-field select,
.portal-form-field textarea {
  width: 100%;
  color: var(--portal-ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
}

.portal-form-field textarea {
  min-height: 72px;
  padding: 11px 0;
  resize: vertical;
}

.portal-form-field.is-wide { grid-column: 1 / -1; }
.portal-form-field > .portal-textarea { align-items: flex-start; }
.portal-form-field > .portal-textarea > svg { margin-top: 12px; }

.portal-form-field small {
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.45;
}

.portal-position-combobox input[data-personnel-position-name]:not(:disabled) {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  cursor: text;
  opacity: 1;
}

.portal-position-combobox > .portal-position-combobox-control {
  position: relative;
  overflow: visible;
}

.portal-position-combobox-input {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
}

.portal-position-combobox-input > input[data-personnel-position-name] {
  padding-right: 42px;
}

.portal-position-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: -4px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-panel);
  cursor: pointer;
  transform: translateY(-50%);
}

.portal-position-toggle:is(:hover, :focus-visible),
.portal-position-toggle[aria-expanded="true"] {
  color: var(--portal-ink);
  border-color: var(--portal-gold-strong);
  outline: 2px solid rgba(234, 184, 63, 0.18);
  outline-offset: 1px;
}

.portal-position-toggle svg {
  transition: transform 160ms ease;
}

.portal-position-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.portal-position-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.portal-position-options {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  overflow-y: auto;
  max-height: 240px;
  margin: 0;
  padding: 5px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  background: var(--portal-panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

.portal-position-options[hidden] {
  display: none !important;
}

.portal-position-options [data-personnel-position-option] {
  display: grid;
  width: 100%;
  min-height: 46px;
  justify-items: start;
  gap: 2px;
  padding: 7px 9px;
  color: var(--portal-ink);
  border: 0;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.portal-position-options [data-personnel-position-option]:is(:hover, :focus-visible, [data-active="true"]) {
  color: var(--portal-ink);
  background: var(--portal-soft);
  outline: 2px solid var(--portal-gold-strong);
  outline-offset: -2px;
}

.portal-position-options [data-personnel-position-option] strong,
.portal-position-options [data-personnel-position-option] small {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.portal-position-options [data-personnel-position-option] small {
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-position-empty {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 12px;
  color: var(--portal-ink);
}

.portal-position-empty > small {
  color: var(--portal-muted);
}

.portal-position-empty > button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  padding: 0 12px;
  color: #201b10;
  border: 0;
  border-radius: 5px;
  background: var(--portal-gold-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-position-option-state {
  min-height: 16px;
}

.portal-position-option-state.is-empty {
  color: var(--portal-gold-strong);
  font-weight: 700;
}

.portal-modal footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 24px -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--portal-line);
  background: var(--portal-soft);
}

.portal-modal footer > span:first-child {
  flex: 1;
}

.portal-danger {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-right: auto;
  padding: 0 16px;
  color: #b54747;
  border: 1px solid color-mix(in srgb, #b54747 55%, var(--portal-line));
  border-radius: 6px;
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.portal-danger svg {
  width: 17px;
}

.portal-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
}

.portal-toggle-row > span {
  display: grid;
  gap: 3px;
}

.portal-toggle-row small {
  color: var(--portal-muted);
}

.portal-toggle-row input {
  position: absolute;
  opacity: 0;
}

.portal-toggle-row > i {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #aab2bf;
  cursor: pointer;
}

.portal-toggle-row > i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  content: "";
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}

.portal-toggle-row input:checked + i {
  background: var(--portal-success);
}

.portal-toggle-row input:checked + i::after {
  transform: translateX(20px);
}

.portal-permissions {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  border: 0;
}

.portal-inherit-row {
  margin-bottom: 14px;
}

.portal-permissions:disabled {
  opacity: 0.5;
}

.portal-permissions:disabled label {
  cursor: not-allowed;
}

.portal-department-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
  padding: 0;
  border: 0;
}

.portal-department-options legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 800;
}

.portal-department-options legend small {
  margin-left: 7px;
  color: var(--portal-muted);
  font-weight: 500;
}

.portal-department-options label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  cursor: pointer;
}

.portal-department-options input {
  position: absolute;
  opacity: 0;
}

.portal-department-options label > span {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: transparent;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
}

.portal-department-options input:checked + span {
  color: #111827;
  border-color: var(--portal-gold-strong);
  background: var(--portal-gold);
}

.portal-department-options svg {
  width: 12px;
}

.portal-department-options b {
  font-size: 12px;
}

.portal-department-options:disabled {
  opacity: 0.5;
}

.portal-permissions legend {
  margin-bottom: 10px;
}

.portal-permissions label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  cursor: pointer;
}

.portal-permissions input {
  position: absolute;
  opacity: 0;
}

.portal-permissions label > span {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  color: transparent;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
}

.portal-permissions input:checked + span {
  color: #111827;
  border-color: var(--portal-gold-strong);
  background: var(--portal-gold);
}

.portal-permissions svg {
  width: 14px;
}

.portal-permissions b {
  font-size: 12px;
}

.portal-password-reset {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--portal-line);
}

.portal-password-reset h3 {
  margin-bottom: 12px;
  font-size: 14px;
}

.portal-password-reset .portal-form-field + .portal-form-field {
  margin-top: 12px;
}

.resource-heading {
  align-items: center;
}

.portal-resource-list {
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-resource-row {
  display: grid;
  min-height: 82px;
  grid-template-columns: 42px minmax(0, 1fr) auto 112px;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  color: var(--portal-ink);
  text-decoration: none;
  border-bottom: 1px solid var(--portal-line);
}

.portal-resource-row:last-child {
  border-bottom: 0;
}

.portal-resource-row:hover {
  background: var(--portal-soft);
}

.portal-file-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #111827;
  border-radius: 6px;
  background: var(--portal-gold);
}

.portal-file-icon svg {
  width: 19px;
}

.portal-resource-copy {
  display: grid;
  gap: 4px;
}

.portal-resource-copy small,
.portal-resource-date {
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-download {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--portal-gold-strong);
  font-size: 12px;
}

.portal-download svg {
  width: 17px;
}

.portal-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  padding: 40px;
  text-align: center;
  border: 1px dashed var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-empty > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: #111827;
  border-radius: 7px;
  background: var(--portal-gold);
}

.portal-empty svg {
  width: 26px;
}

.portal-empty h2 {
  margin: 18px 0 7px;
  font-size: 20px;
}

.portal-empty p {
  margin: 0;
  color: var(--portal-muted);
}

.portal-home-button {
  flex: 0 0 auto;
}

.portal-default-home {
  display: grid;
  gap: 2px;
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-default-home select,
.portal-sync-form select,
.portal-sync-form textarea,
.portal-dictionary-grid input,
.portal-dictionary-grid select {
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-panel);
}

.portal-default-home select {
  min-width: 126px;
  height: 30px;
  padding: 0 8px;
  font: inherit;
}

.portal-personnel-table small {
  display: block;
  margin-top: 4px;
  color: var(--portal-muted);
}

.portal-personnel-name-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.portal-cross-account-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px;
  color: var(--portal-ink);
  border: 1px solid color-mix(in srgb, var(--portal-gold-strong) 55%, var(--portal-line));
  background: color-mix(in srgb, var(--portal-gold) 18%, var(--portal-soft));
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.portal-source-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--portal-muted);
  font-size: 10px;
  white-space: nowrap;
}

.portal-source-sync b {
  color: var(--portal-ink);
  font-weight: 750;
}

.portal-personnel-panel {
  margin-top: 20px;
  padding: 22px;
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.portal-personnel-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.portal-personnel-panel h2,
.portal-personnel-panel h3,
.portal-personnel-panel p {
  margin: 0;
}

.portal-personnel-panel p {
  margin-top: 6px;
  color: var(--portal-muted);
}

.portal-dictionary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.portal-dictionary-column { min-width: 0; }
.portal-dictionary-column.is-positions { grid-column: 1 / -1; }

.portal-dictionary-grid form,
.portal-sync-form {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 1fr auto;
  gap: 8px;
  margin: 12px 0;
}

.portal-dictionary-grid form.is-position {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.portal-dictionary-field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.portal-dictionary-field > span {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 700;
}

.portal-dictionary-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  min-width: 0;
}

.portal-dictionary-actions button {
  min-height: 40px;
}

.portal-dictionary-actions button[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

.portal-dictionary-actions.is-position-actions button { width: 100%; }

.portal-personnel-panel > summary {
  cursor: pointer;
  color: var(--portal-ink);
  font-weight: 700;
}

.portal-workflow-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}

.portal-workflow-form .portal-dictionary-field.is-wide { grid-column: span 2; }

.portal-workflow-form input,
.portal-workflow-form select,
.portal-workflow-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-panel);
  font: inherit;
}

.portal-workflow-form textarea { resize: vertical; }

.portal-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-workflow-actions > span { color: var(--portal-muted); font-size: 12px; }

.portal-workflow-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--portal-line);
}

.portal-workflow-notice > div { display: flex; align-items: center; gap: 8px; }
.portal-workflow-notice > div:first-child { display: grid; }
.portal-workflow-notice span { color: var(--portal-muted); font-size: 12px; }

.portal-workflow-rule-list {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.portal-workflow-rule-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
}

.portal-workflow-rule-list span { color: var(--portal-muted); font-size: 12px; }

.portal-u8-mapping-groups {
  display: grid;
  gap: 8px;
}

.portal-u8-mapping-card {
  padding: 12px 14px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
}

.portal-u8-mapping-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.portal-u8-mapping-card > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.portal-u8-mapping-card small,
.portal-u8-mapping-card > p { color: var(--portal-muted); font-size: 12px; }

.portal-u8-mapping-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.portal-u8-mapping-field {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
}

.portal-u8-mapping-field legend { padding: 0 5px; font-size: 12px; font-weight: 700; }
.portal-u8-mapping-field label { display: grid; gap: 5px; min-width: 0; }
.portal-u8-mapping-field label > span { color: var(--portal-muted); font-size: 11px; }

.portal-dictionary-grid input,
.portal-dictionary-grid select,
.portal-sync-form select,
.portal-sync-form textarea {
  min-height: 40px;
  min-width: 0;
  width: 100%;
  padding: 9px 11px;
}

.portal-dictionary-list {
  display: grid;
  gap: 6px;
  max-height: 240px;
  overflow: auto;
}

.portal-dictionary-list > span {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--portal-line);
  border-radius: 5px;
}

.portal-dictionary-list small { color: var(--portal-muted); }
.portal-dictionary-list button { color: #b54747; border: 0; background: transparent; }
.portal-dictionary-list svg { width: 15px; }

.portal-dictionary-list.is-positions {
  gap: 8px;
  max-height: 420px;
  container-name: position-list;
  container-type: inline-size;
}

.portal-position-card {
  display: grid;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns:
    minmax(0, 1.15fr)
    minmax(0, 1.9fr)
    minmax(0, 0.8fr)
    minmax(0, 1fr)
    minmax(0, 0.75fr)
    minmax(64px, 0.5fr);
  grid-template-areas: "code name account department status actions";
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  background: var(--portal-panel);
}

.portal-position-cell {
  display: grid;
  align-content: start;
  max-width: 100%;
  min-width: 0;
  gap: 5px;
}

.portal-position-cell.is-code { grid-area: code; }
.portal-position-cell.is-name { grid-area: name; }
.portal-position-cell.is-account-set { grid-area: account; }
.portal-position-cell.is-department { grid-area: department; }
.portal-position-cell.is-status { grid-area: status; }
.portal-position-cell.is-actions { grid-area: actions; }

.portal-position-cell > span {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 700;
}

.portal-position-cell code,
.portal-position-cell strong {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--portal-ink);
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: normal;
}

.portal-position-cell code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.portal-position-cell.is-name > strong { word-break: normal; }

.portal-position-cell.is-name small {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: var(--portal-muted);
  overflow-wrap: anywhere;
}

.portal-position-cell .portal-status {
  justify-self: start;
}

.portal-position-cell.is-actions {
  justify-items: center;
}

.portal-position-delete {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-height: 36px;
  border-radius: 6px;
  cursor: pointer;
}

.portal-position-delete:hover { background: color-mix(in srgb, #b54747 10%, transparent); }
.portal-position-delete:focus-visible { outline: 2px solid var(--portal-accent); outline-offset: 2px; }
.portal-position-readonly { color: var(--portal-muted); font-size: 11px; }

@container position-list (max-width: 900px) {
  .portal-position-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "code name"
      "account department"
      "status actions";
  }

  .portal-position-cell.is-actions { justify-items: start; }
}

@container position-list (max-width: 560px) {
  .portal-position-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "code" "name" "account" "department" "status" "actions";
  }
}

.portal-sync-form {
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: end;
}

.portal-sync-form textarea { resize: vertical; }

.portal-sync-result {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  background: var(--portal-soft);
}

.portal-feedback > span {
  display: grid;
  gap: 2px;
}

.portal-feedback > span small {
  color: inherit;
  opacity: 0.78;
}

.portal-sync-details {
  margin-top: 12px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  overflow: hidden;
}

.portal-sync-details > h3 {
  margin: 0;
  padding: 11px 12px;
  border-bottom: 1px solid var(--portal-line);
  font-size: 13px;
}

.portal-sync-details > div {
  max-height: 360px;
  overflow: auto;
}

.portal-sync-details table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.portal-sync-details th,
.portal-sync-details td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--portal-line);
  text-align: left;
  vertical-align: top;
}

.portal-sync-details th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--portal-panel);
}

.portal-sync-details td > strong,
.portal-sync-details td > small {
  display: block;
}

.portal-sync-details td > small { color: var(--portal-muted); }
.portal-sync-empty { margin-top: 12px !important; }

.portal-profile-write-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
  border: 1px solid var(--portal-line);
}

.portal-profile-write-meta > span {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--portal-line);
  background: var(--portal-panel);
}

.portal-profile-write-meta > span:last-child { border-right: 0; }
.portal-profile-write-meta strong { font-size: 11px; }
.portal-profile-write-meta small { overflow-wrap: anywhere; color: var(--portal-muted); }

.portal-form-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.portal-field-source {
  display: inline-flex !important;
  align-items: center;
  flex: 0 0 auto;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.portal-field-source.is-u8 {
  color: #1d4ed8;
  background: color-mix(in srgb, #3b82f6 14%, var(--portal-panel));
}

.portal-field-source.is-web {
  color: #8a5a00;
  background: color-mix(in srgb, var(--portal-gold) 18%, var(--portal-panel));
}

.portal-personnel-modal { width: min(1120px, calc(100vw - 32px)); }
.portal-personnel-section {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  background: color-mix(in srgb, var(--portal-soft) 58%, transparent);
}
.portal-personnel-section > h3,
.portal-sensitive-group > h4,
.portal-sensitive-attachments > h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 14px;
}
.portal-personnel-section > h3 svg { width: 17px; }
.portal-personnel-section > p { margin: -6px 0 14px; color: var(--portal-muted); font-size: 12px; }
.portal-personnel-photo { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; gap: 14px; margin-bottom: 16px; padding: 12px; border: 1px solid var(--portal-line); border-radius: 7px; background: var(--portal-soft); }
.portal-personnel-photo > span,
.portal-personnel-photo > img { grid-area: 1 / 1; width: 76px; height: 92px; border-radius: 6px; }
.portal-personnel-photo > span { display: grid; place-items: center; color: #111827; background: var(--portal-gold); font-size: 22px; font-weight: 900; }
.portal-personnel-photo > img { position: relative; z-index: 1; object-fit: cover; border: 1px solid var(--portal-line); background: var(--portal-panel); }
.portal-personnel-photo > div { grid-column: 2; display: grid; gap: 4px; }
.portal-personnel-photo > div strong { font-size: 13px; }
.portal-personnel-photo > div small { color: var(--portal-muted); font-size: 11px; }
.portal-personnel-photo.has-photo > div small { color: #2563eb; }
.portal-personnel-photo.is-missing > div small { color: var(--portal-muted); }
.portal-attachment-zone,
.portal-sensitive-zone { margin-top: 18px; padding: 16px; border: 1px solid var(--portal-line); border-radius: 7px; }
.portal-sensitive-zone { border-color: color-mix(in srgb, #b45309 45%, var(--portal-line)); background: color-mix(in srgb, #f59e0b 7%, var(--portal-panel)); }
.portal-sensitive-zone > h3 { display: flex; align-items: center; gap: 8px; color: #b45309; }
.portal-sensitive-zone > p { color: var(--portal-muted); }
.portal-sensitive-group,
.portal-sensitive-attachments { margin-top: 18px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, #b45309 24%, var(--portal-line)); }
.portal-sensitive-collection { margin-top: 14px; padding: 13px; border: 1px solid color-mix(in srgb, #b45309 24%, var(--portal-line)); border-radius: 7px; background: color-mix(in srgb, var(--portal-panel) 90%, transparent); }
.portal-sensitive-collection > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.portal-sensitive-collection > header > div { display: flex; min-width: 0; align-items: center; gap: 9px; }
.portal-sensitive-collection > header > div > svg { width: 17px; color: #b45309; }
.portal-sensitive-collection > header span { display: grid; gap: 2px; }
.portal-sensitive-collection > header strong { font-size: 13px; }
.portal-sensitive-collection > header small,
.portal-sensitive-collection-empty { color: var(--portal-muted); font-size: 11px; }
.portal-sensitive-collection-list { display: grid; gap: 10px; }
.portal-sensitive-collection-row { overflow: hidden; border: 1px solid var(--portal-line); border-radius: 6px; background: var(--portal-panel); }
.portal-sensitive-collection-row.is-u8 { border-left: 3px solid #2563eb; }
.portal-sensitive-collection-row.is-web { border-left: 3px solid var(--portal-gold-strong); }
.portal-sensitive-collection-row > header { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--portal-line); background: var(--portal-soft); }
.portal-sensitive-collection-row > header small { flex: 1; color: var(--portal-muted); }
.portal-sensitive-collection-row > header button { display: grid; width: 30px; height: 30px; place-items: center; color: #b54747; border: 0; border-radius: 5px; background: transparent; }
.portal-sensitive-collection-row > header button:hover { background: color-mix(in srgb, #b54747 10%, transparent); }
.portal-sensitive-collection-row fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 11px; border: 0; }
.portal-sensitive-collection-row fieldset:disabled { opacity: 0.76; }
.portal-sensitive-collection-field { display: grid; gap: 5px; color: var(--portal-muted); font-size: 11px; }
.portal-sensitive-collection-field.is-wide { grid-column: 1 / -1; }
.portal-sensitive-collection-field input,
.portal-sensitive-collection-field textarea { width: 100%; padding: 9px 10px; color: var(--portal-ink); border: 1px solid var(--portal-line); border-radius: 5px; background: var(--portal-input); font: inherit; resize: vertical; }
.portal-attachment-zone ul,
.portal-sensitive-zone ul { display: grid; gap: 7px; padding: 0; list-style: none; }
.portal-attachment-zone li,
.portal-sensitive-zone li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.portal-attachment-zone a,
.portal-sensitive-zone a { display: inline-flex; align-items: center; gap: 7px; color: var(--portal-gold-strong); }
.portal-attachment-zone a > span,
.portal-sensitive-zone a > span { display: grid; gap: 2px; }
.portal-attachment-zone a small,
.portal-sensitive-zone a small { color: var(--portal-muted); font-size: 10px; }
.portal-attachment-zone li button,
.portal-sensitive-zone li button { color: #b54747; border: 0; background: transparent; }
.portal-attachment-zone svg,
.portal-sensitive-zone svg { width: 16px; }
.portal-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.portal-upload span { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px dashed var(--portal-line); border-radius: 6px; cursor: pointer; }
.portal-upload-row { display: flex; flex-wrap: wrap; gap: 8px; }

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

@media (max-width: 1100px) {
  .portal-app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-role-grid { grid-template-columns: 1fr; }
  .portal-metrics { grid-template-columns: repeat(2, 1fr); }
  .portal-metrics > div:nth-child(2) { border-right: 0; }
  .portal-metrics > div:nth-child(-n + 2) { border-bottom: 1px solid var(--portal-line); }
  .portal-account { min-width: 0; }
  .portal-account > div { display: none; }
  .portal-default-home { display: none; }
  .portal-dictionary-grid form.is-position { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-workflow-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-position-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "code name" "account department" "status actions";
  }
  .portal-position-cell.is-actions { justify-items: start; }
}

@media (max-width: 760px) {
  .portal-topbar { min-height: 66px; padding: 8px 12px; }
  .portal-brand img { width: 116px; height: 42px; }
  .portal-brand > span, .portal-brand div { display: none; }
  .portal-topbar-actions { gap: 6px; }
  .portal-account { display: none; }
  .portal-language { height: 40px; }
  .portal-language button { width: 44px; }
  .portal-icon-button { width: 40px; height: 40px; }
  .portal-layout { min-height: calc(100vh - 66px); grid-template-columns: 1fr; }
  .portal-sidebar {
    position: fixed;
    z-index: 18;
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62px;
    padding: 5px 12px;
    border-top: 1px solid var(--portal-line);
    border-right: 0;
  }
  .portal-sidebar nav { display: flex; justify-content: center; gap: 12px; }
  .portal-sidebar button { min-width: 100px; min-height: 50px; grid-template-columns: 20px auto; gap: 8px; padding: 5px 10px; }
  .portal-sidebar button span { max-width: 100px; font-size: 12px; }
  .portal-sidebar-mark { display: none; }
  .portal-main { padding: 18px 14px 84px; }
  .portal-page-header { min-height: 176px; align-items: flex-start; flex-direction: column; padding: 24px; }
  .portal-page-header::after { width: 55%; opacity: 0.13; }
  .portal-page-header h1 { font-size: 29px; }
  .portal-page-header > div > span { font-size: 14px; }
  .portal-context { max-width: 100%; }
  .compact-header { min-height: 190px; }
  .portal-app-grid { grid-template-columns: 1fr; }
  .portal-app-card { min-height: 138px; }
  .portal-section-heading, .portal-user-toolbar, .resource-heading { align-items: stretch; flex-direction: column; }
  .portal-user-toolbar > label { width: 100%; }
  .portal-segments { overflow-x: auto; width: 100%; }
  .portal-segments button { flex: 1 0 auto; }
  .portal-metrics { grid-template-columns: 1fr 1fr; }
  .portal-metrics > div { grid-template-columns: 34px minmax(0, 1fr); }
  .portal-metrics > div strong { grid-column: 2; font-size: 20px; }
  .portal-management-tabs button { min-height: 48px; }
  .portal-role-card { padding: 15px; }
  .portal-role-card > header { grid-template-columns: 38px minmax(0, 1fr) 36px; gap: 10px; }
  .portal-role-card-icon { width: 38px; height: 38px; }
  .portal-department-options { grid-template-columns: 1fr; }
  .portal-form-grid, .portal-permissions { grid-template-columns: 1fr; }
  .portal-form-grid > span { display: none; }
  .portal-sensitive-collection > header { align-items: stretch; flex-direction: column; }
  .portal-sensitive-collection > header button { justify-content: center; }
  .portal-sensitive-collection-row fieldset { grid-template-columns: 1fr; }
  .portal-sensitive-collection-field.is-wide { grid-column: auto; }
  .portal-modal { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .portal-modal > header, .portal-modal form { padding: 18px; }
  .portal-modal footer { margin: 20px -18px -18px; padding: 14px 18px; }
  .portal-resource-row { grid-template-columns: 40px minmax(0, 1fr) 40px; padding: 13px; }
  .portal-resource-date { display: none; }
  .portal-download b { display: none; }
  .portal-dictionary-grid { grid-template-columns: 1fr; }
  .portal-dictionary-grid form, .portal-dictionary-grid form.is-position, .portal-sync-form { grid-template-columns: 1fr; }
  .portal-workflow-form { grid-template-columns: 1fr; }
  .portal-workflow-form .portal-dictionary-field.is-wide { grid-column: auto; }
  .portal-u8-mapping-field { grid-template-columns: 1fr; }
  .portal-u8-mapping-card > summary { align-items: flex-start; flex-direction: column; }
  .portal-workflow-notice, .portal-workflow-rule-list li { align-items: flex-start; flex-direction: column; }
  .portal-dictionary-column.is-positions { grid-column: auto; }
  .portal-dictionary-actions, .portal-dictionary-actions button { width: 100%; }
  .portal-dictionary-actions button { justify-content: center; }
  .portal-position-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "code" "name" "account" "department" "status" "actions";
  }
  .portal-position-cell.is-actions { justify-items: start; }
  .portal-sync-result { align-items: stretch; flex-direction: column; }
}

@media (max-width: 430px) {
  .portal-brand img { width: 102px; }
  .portal-language button { width: 40px; }
  .portal-icon-button { width: 38px; height: 38px; }
  .portal-page-header { min-height: 190px; }
  .portal-metrics { grid-template-columns: 1fr; }
  .portal-metrics > div { border-right: 0; border-bottom: 1px solid var(--portal-line); }
  .portal-metrics > div:nth-child(3) { border-bottom: 1px solid var(--portal-line); }
  .portal-metrics > div:last-child { border-bottom: 0; }
  .portal-management-tabs button { gap: 6px; font-size: 12px; }
  .portal-role-meta { display: grid; grid-template-columns: 1fr; }
  .portal-app-card { grid-template-columns: 44px minmax(0, 1fr); padding: 18px; }
  .portal-app-icon { width: 42px; height: 42px; }
  .portal-app-status { position: absolute; right: 14px; top: 14px; }
  .portal-modal footer { flex-direction: column-reverse; }
  .portal-modal footer button { width: 100%; }
}

/* EMV-12 network operations */
.emv-portal-shell .vpn-section-tabs{display:inline-grid;grid-template-columns:repeat(2,minmax(180px,1fr));width:min(100%,520px);margin-bottom:16px;border:1px solid var(--line);background:var(--surface)}
.emv-portal-shell .vpn-section-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:0 16px;border:0;border-right:1px solid var(--line);border-radius:0;background:transparent;color:var(--muted);font:850 12px inherit;cursor:pointer}.emv-portal-shell .vpn-section-tabs button:last-child{border-right:0}.emv-portal-shell .vpn-section-tabs button.is-active{color:#31c48d;background:color-mix(in srgb,#31c48d 9%,var(--surface));box-shadow:inset 0 -3px 0 #31c48d}.emv-portal-shell .vpn-section-tabs svg{width:16px;height:16px}
.emv-portal-shell .network-monitor{display:grid;gap:16px;color:var(--ink)}
.emv-portal-shell .network-monitor :is(button,a,select,article,.network-panel,.network-gaps){border-radius:0;box-shadow:none}
.emv-portal-shell .network-monitor :is(h1,h2,h3,p){margin:0}
.emv-portal-shell .network-monitor-header,.emv-portal-shell .network-panel>header,.emv-portal-shell .network-node>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.emv-portal-shell .network-monitor-header{padding:22px;border:1px solid var(--line);border-left:4px solid #31c48d;background:var(--surface)}
.emv-portal-shell .network-monitor-header p,.emv-portal-shell .network-panel>header p,.emv-portal-shell .network-node>header p{color:#31c48d;font-size:10px;font-weight:900;letter-spacing:.12em;text-transform:uppercase}
.emv-portal-shell .network-monitor-header h1{margin:6px 0;font-size:clamp(22px,3vw,32px)}
.emv-portal-shell .network-monitor-header span,.emv-portal-shell .network-panel>header>span,.emv-portal-shell .network-node>header>span,.emv-portal-shell .network-muted{color:var(--muted);font-size:11px}
.emv-portal-shell .network-monitor-actions{display:flex;gap:8px}
.emv-portal-shell .network-monitor-actions :is(button,a),.emv-portal-shell .network-empty button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:38px;padding:0 13px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:800 11px inherit;text-decoration:none;cursor:pointer}
.emv-portal-shell .network-monitor-actions svg{width:14px;height:14px}
.emv-portal-shell .network-filters{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));border:1px solid var(--line);background:var(--surface)}
.emv-portal-shell .network-filters label{padding:10px;border-right:1px solid var(--line);color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.emv-portal-shell .network-filters select{width:100%;margin-top:6px;padding:8px;border:1px solid var(--line);background:var(--surface);color:var(--ink)}
.emv-portal-shell .network-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--line);background:var(--surface)}
.emv-portal-shell .network-kpis article{padding:15px;border-right:1px solid var(--line)}
.emv-portal-shell .network-kpis span{display:block;color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.06em}
.emv-portal-shell .network-kpis strong{display:block;margin-top:7px;font:800 clamp(16px,2vw,23px) ui-monospace,SFMono-Regular,Menlo,monospace}
.emv-portal-shell .network-interface-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.emv-portal-shell .network-interface-grid>article{padding:13px;border-right:1px solid var(--line)}.emv-portal-shell .network-interface-grid>article:last-child{border-right:0}.emv-portal-shell .network-interface-grid>article>b{display:block;margin-bottom:8px}.emv-portal-shell .network-interface-grid span{display:grid;gap:3px;padding:7px 0;border-top:1px solid var(--line)}.emv-portal-shell .network-interface-grid small{color:var(--muted);font-size:9px}.emv-portal-shell .network-interface-grid strong{color:#31c48d;font:800 10px ui-monospace,SFMono-Regular,Menlo,monospace}
.emv-portal-shell .network-topology{display:grid;grid-template-columns:auto repeat(2,1fr auto) 1fr auto;align-items:center;gap:9px;padding:18px}.emv-portal-shell .network-topology>span{color:var(--muted);font-size:10px}.emv-portal-shell .network-topology>svg{width:16px;color:var(--muted)}.emv-portal-shell .network-topology article{display:grid;gap:4px;min-height:68px;align-content:center;padding:11px;border:1px solid var(--line);border-left:4px solid #64748b}.emv-portal-shell .network-topology article.is-online{border-left-color:#31c48d}.emv-portal-shell .network-topology article.is-warning{border-left-color:#f59e0b}.emv-portal-shell .network-topology article small{color:var(--muted);font-size:9px}
.emv-portal-shell .network-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.emv-portal-shell .network-node{border:1px solid var(--line);border-top:3px solid #64748b;background:var(--surface)}
.emv-portal-shell .network-node.is-online{border-top-color:#31c48d}.emv-portal-shell .network-node.is-warning{border-top-color:#f59e0b}.emv-portal-shell .network-node.is-stale{border-top-color:#f97316}
.emv-portal-shell .network-node>header,.emv-portal-shell .network-panel>header{padding:14px;border-bottom:1px solid var(--line)}
.emv-portal-shell .network-node h3,.emv-portal-shell .network-panel h2{margin-top:4px;font-size:15px}
.emv-portal-shell .network-node>header small{display:block;margin-top:4px;color:var(--muted);font-size:9px}.emv-portal-shell .network-service-alert{display:grid;gap:3px;padding:9px 13px;border-bottom:1px solid var(--line);color:#f59e0b;font:700 9px ui-monospace,SFMono-Regular,Menlo,monospace}.emv-portal-shell .network-host-missing{padding:13px;border-bottom:1px solid var(--line);color:var(--muted);font-size:10px}
.emv-portal-shell .network-resource{display:grid;gap:7px;padding:13px;border-bottom:1px solid var(--line)}
.emv-portal-shell .network-resource span{display:flex;justify-content:space-between;color:var(--muted);font-size:10px}.emv-portal-shell .network-resource b{color:var(--ink);font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.emv-portal-shell .network-path-list>div{display:flex;justify-content:space-between;gap:10px;padding:11px 13px;border-bottom:1px solid var(--line)}
.emv-portal-shell .network-path-list span{display:grid;gap:3px}.emv-portal-shell .network-path-list span:last-child{text-align:right}.emv-portal-shell .network-path-list small{color:var(--muted);font-size:9px}.emv-portal-shell .network-path-list strong{color:#31c48d;font:800 11px ui-monospace,SFMono-Regular,Menlo,monospace}
.emv-portal-shell .network-panel{border:1px solid var(--line);background:var(--surface)}
.emv-portal-shell .network-chart{padding:16px}.emv-portal-shell .network-chart svg{display:block;width:100%;height:200px}.emv-portal-shell .network-chart line{stroke:var(--line)}.emv-portal-shell .network-chart polyline{fill:none;stroke-width:2.2}.emv-portal-shell .network-chart .is-rx{stroke:#31c48d}.emv-portal-shell .network-chart .is-tx{stroke:#38bdf8}
.emv-portal-shell .network-chart-legend{display:flex;gap:14px;align-items:center;color:var(--muted);font-size:10px}.emv-portal-shell .network-chart-legend span{display:flex;gap:5px;align-items:center}.emv-portal-shell .network-chart-legend i{width:18px;height:2px;background:currentColor}.emv-portal-shell .network-chart-legend i.is-rx{color:#31c48d}.emv-portal-shell .network-chart-legend i.is-tx{color:#38bdf8}.emv-portal-shell .network-chart-legend strong{margin-left:auto}
.emv-portal-shell .network-device-head,.emv-portal-shell .network-device-row{display:grid;grid-template-columns:1.5fr .8fr 1.1fr 1.1fr .8fr;align-items:center}.emv-portal-shell .network-device-head{color:var(--muted);font-size:9px;font-weight:900;text-transform:uppercase}.emv-portal-shell .network-device-head span,.emv-portal-shell .network-device-row>span{min-width:0;padding:11px;border-right:1px solid var(--line)}.emv-portal-shell .network-device-row{border-top:1px solid var(--line);font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace}.emv-portal-shell .network-device-row>span:first-child,.emv-portal-shell .network-device-state{display:grid;gap:3px}.emv-portal-shell .network-device-row small{overflow:hidden;color:var(--muted);text-overflow:ellipsis;white-space:nowrap}.emv-portal-shell .network-device-state.is-active b{color:#31c48d}.emv-portal-shell .network-device-state.is-expired b{color:#f59e0b}.emv-portal-shell .network-device-state.is-revoked b{color:#f87171}
.emv-portal-shell .network-empty{display:flex;align-items:center;justify-content:center;gap:9px;min-height:110px;padding:22px;border:1px dashed var(--line);color:var(--muted)}
.emv-portal-shell .network-gaps{display:flex;gap:10px;padding:13px;border:1px solid #9a681d;background:var(--surface)}.emv-portal-shell .network-gaps>svg{width:17px;color:#f59e0b}.emv-portal-shell .network-gaps div{display:grid;gap:4px}.emv-portal-shell .network-gaps span{color:var(--muted);font-size:10px}.emv-portal-shell .network-monitor-foot{color:var(--muted);font-size:9px;line-height:1.6}.emv-portal-shell .network-site-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.emv-portal-shell .network-site-grid article{display:grid;gap:8px;border:1px solid var(--line);padding:14px}.emv-portal-shell .network-site-grid article header{display:flex;justify-content:space-between;gap:8px}.emv-portal-shell .network-site-grid small{display:block;color:var(--muted)}
.emv-portal-shell .network-device-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0}.emv-portal-shell .network-device-summary span{display:flex;justify-content:space-between;border:1px solid var(--line);padding:10px}.emv-portal-shell .network-device-group{border-top:1px solid var(--line)}.emv-portal-shell .network-device-group summary{cursor:pointer;padding:11px;font-weight:700}.emv-portal-shell .network-device-table footer{padding:10px;color:var(--muted)}
@media(max-width:1100px){.emv-portal-shell .network-filters,.emv-portal-shell .network-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.emv-portal-shell .network-grid,.emv-portal-shell .network-interface-grid{grid-template-columns:1fr}.emv-portal-shell .network-interface-grid>article{border-right:0;border-bottom:1px solid var(--line)}}
@media(max-width:720px){.emv-portal-shell .network-monitor-header,.emv-portal-shell .network-panel>header{flex-direction:column}.emv-portal-shell .network-filters,.emv-portal-shell .network-kpis{grid-template-columns:1fr 1fr}.emv-portal-shell .network-device-head{display:none}.emv-portal-shell .network-device-row{grid-template-columns:1fr 1fr}.emv-portal-shell .network-device-row>span:first-child{grid-column:1/-1}}

/* EMV-12 cross-platform VPN self-service and verified onboarding guide. */
.vpn-page-header {
  align-items: flex-end;
}

.vpn-security-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 28px;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-top: 3px solid var(--portal-gold-strong);
  border-radius: 8px;
  background: var(--portal-panel);
}

.vpn-security-strip article {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-right: 1px solid var(--portal-line);
}

.vpn-security-strip article:last-child {
  border-right: 0;
}

.vpn-security-strip svg,
.vpn-device-icon svg {
  flex: 0 0 auto;
  width: 22px;
  color: var(--portal-gold-strong);
}

.vpn-security-strip div,
.vpn-security-strip small,
.vpn-device-row div,
.vpn-device-row small {
  display: block;
  min-width: 0;
}

.vpn-security-strip strong,
.vpn-device-row strong {
  display: block;
  color: var(--portal-ink);
}

.vpn-security-strip small,
.vpn-device-row small {
  margin-top: 4px;
  color: var(--portal-muted);
  line-height: 1.45;
}

.vpn-section-heading {
  align-items: end;
}

.vpn-platform-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.vpn-platform-card {
  display: grid;
  min-width: 0;
  min-height: 124px;
  padding: 15px 12px;
  gap: 8px;
  justify-items: start;
  text-align: left;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
  cursor: pointer;
}

.vpn-platform-card:hover,
.vpn-platform-card:focus-visible,
.vpn-platform-card.is-active {
  border-color: var(--portal-gold-strong);
  box-shadow: 0 0 0 1px var(--portal-gold-strong);
}

.vpn-platform-card.is-active {
  background: color-mix(in srgb, var(--portal-gold) 10%, var(--portal-panel));
}

.vpn-platform-card > span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #111827;
  border-radius: 7px;
  background: var(--portal-gold);
}

.vpn-platform-card svg {
  width: 19px;
}

.vpn-platform-card strong,
.vpn-platform-card small {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.vpn-process-heading {
  margin-top: 30px;
}

.vpn-process-flow {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.vpn-process-step {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--portal-line);
  border-left: 5px solid #b58b25;
  border-radius: 8px;
  background: var(--portal-panel);
}

.vpn-process-step.is-ready {
  border-left-color: #1b8a58;
}

.vpn-process-step.is-partial {
  border-left-color: #c57b15;
}

.vpn-process-step.is-blocked {
  border-left-color: #a84949;
}

.vpn-process-step > header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vpn-process-step > header > i {
  flex: 0 0 auto;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #111827;
  border-radius: 50%;
  background: var(--portal-gold);
}

.vpn-process-step > header > i svg {
  width: 20px;
  height: 20px;
}

.vpn-process-step > header h3 {
  margin: 0;
  color: var(--portal-ink);
  font-size: 16px;
  line-height: 1.35;
}

.vpn-process-step > header b {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 10px;
  color: #805800;
  border: 1px solid #edc86e;
  border-radius: 999px;
  background: #fff7d8;
  font-size: 11px;
  white-space: nowrap;
}

.vpn-process-step.is-ready > header b {
  color: #0a6840;
  border-color: #83d6ad;
  background: #e8fff3;
}

.vpn-process-step.is-blocked > header b {
  color: #8d3030;
  border-color: #e0a3a3;
  background: #fff0f0;
}

.vpn-process-action {
  padding: 14px;
  border-radius: 7px;
  background: var(--portal-soft);
}

.vpn-process-action strong,
.vpn-process-step dt {
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 900;
}

.vpn-process-action p {
  margin: 7px 0 0;
  color: var(--portal-ink);
  line-height: 1.65;
}

.vpn-process-step dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
}

.vpn-process-step dl > div {
  padding: 13px;
}

.vpn-process-step dl > div + div {
  border-left: 1px solid var(--portal-line);
}

.vpn-process-step dt {
  display: flex;
  gap: 7px;
  align-items: center;
}

.vpn-process-step dt svg {
  width: 16px;
  color: var(--portal-gold-strong);
}

.vpn-process-step dd {
  margin: 7px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.6;
}

.vpn-activation-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--portal-line);
}

.vpn-activation-form > small {
  color: var(--portal-muted);
  line-height: 1.55;
}

.vpn-platform-card small {
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.35;
}

.vpn-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
  gap: 18px;
  align-items: start;
}

.vpn-guide-card,
.vpn-enrollment-card,
.vpn-routing-section,
.vpn-device-list {
  border: 1px solid var(--portal-line);
  border-radius: 8px;
  background: var(--portal-panel);
}

.vpn-guide-card,
.vpn-enrollment-card,
.vpn-routing-section {
  padding: 22px;
}

.vpn-guide-card > header,
.vpn-enrollment-card > header,
.vpn-routing-section > header,
.vpn-guide-card > header > div,
.vpn-enrollment-card > header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.vpn-guide-card > header > div > span,
.vpn-enrollment-card > header > svg {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111827;
  border-radius: 8px;
  background: var(--portal-gold);
}

.vpn-enrollment-card > header > svg {
  padding: 10px;
}

.vpn-guide-card header p,
.vpn-enrollment-card header p,
.vpn-routing-section header p {
  margin: 0 0 3px;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vpn-guide-card h2,
.vpn-enrollment-card h2,
.vpn-routing-section h2 {
  margin: 0;
  color: var(--portal-ink);
  font-size: 20px;
}

.vpn-guide-status {
  padding: 7px 9px;
  color: #805800;
  border: 1px solid #edc86e;
  border-radius: 999px;
  background: #fff7d8;
  font-size: 11px;
  line-height: 1.25;
}

.vpn-guide-status.is-ready {
  color: #0a6840;
  border-color: #83d6ad;
  background: #e8fff3;
}

[data-theme="dark"] .vpn-guide-status {
  color: #ffe09a;
  border-color: #7a5a13;
  background: #2a210d;
}

.vpn-guide-note,
.vpn-enrollment-card > p {
  margin: 18px 0;
  color: var(--portal-muted);
  line-height: 1.7;
}

.vpn-guide-download {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
  background: var(--portal-soft);
}

.vpn-guide-download + .vpn-guide-download,
.vpn-guide-download + .vpn-pending-warning {
  margin-top: 12px;
}

.vpn-guide-download strong,
.vpn-guide-download small {
  display: block;
}

.vpn-guide-download small {
  margin-top: 4px;
  color: var(--portal-muted);
  overflow-wrap: anywhere;
}

.vpn-download {
  flex: 0 0 auto;
  text-decoration: none;
}

.vpn-no-download {
  display: inline-flex;
  max-width: 250px;
  gap: 8px;
  align-items: center;
  color: #9b5a00;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.vpn-guide-steps {
  display: grid;
  margin: 20px 0 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.vpn-guide-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.vpn-guide-steps li > i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #111827;
  border-radius: 50%;
  background: var(--portal-gold);
}

.vpn-guide-steps li > i svg {
  width: 15px;
  height: 15px;
}

.vpn-guide-steps p {
  margin: 2px 0 0;
  color: var(--portal-ink);
  line-height: 1.65;
}

.vpn-optional-automation-collapse {
  margin-top: 22px;
  border: 1px solid color-mix(in srgb, var(--portal-accent) 55%, var(--portal-line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--portal-accent) 8%, var(--portal-panel));
}

.vpn-optional-automation-collapse > summary {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  color: var(--portal-ink);
  font-weight: 700;
}

.vpn-optional-automation-collapse > summary::-webkit-details-marker {
  display: none;
}

.vpn-optional-automation-collapse > summary > svg:first-child {
  width: 18px;
  height: 18px;
  color: var(--portal-accent);
}

.vpn-optional-automation-collapse > summary > span {
  flex: 1 1 auto;
}

.vpn-optional-automation-collapse > summary .vpn-collapse-chevron {
  width: 16px;
  height: 16px;
  color: var(--portal-muted);
  transition: transform .2s ease;
}

.vpn-optional-automation-collapse[open] > summary .vpn-collapse-chevron {
  transform: rotate(180deg);
}

.vpn-optional-automation-collapse > .vpn-optional-automation {
  margin-top: 0;
  border: 0;
  border-top: 1px solid var(--portal-line);
  border-radius: 0;
  background: transparent;
}

.vpn-optional-automation {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--portal-accent) 55%, var(--portal-line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--portal-accent) 8%, var(--portal-panel));
}

.vpn-optional-automation > header,
.vpn-optional-automation > header > div,
.vpn-optional-automation footer {
  display: flex;
  gap: 12px;
  align-items: center;
}

.vpn-optional-automation > header {
  justify-content: space-between;
}

.vpn-optional-automation > header svg {
  width: 36px;
  height: 36px;
  padding: 8px;
  color: var(--portal-accent);
  background: var(--portal-panel);
}

.vpn-optional-automation h3,
.vpn-optional-automation small,
.vpn-optional-automation p {
  margin: 0;
}

.vpn-optional-automation > header small,
.vpn-optional-automation > p {
  color: var(--portal-muted);
}

.vpn-optional-automation > header b {
  padding: 5px 8px;
  border: 1px solid var(--portal-accent);
  color: var(--portal-accent);
  font-size: 12px;
}

.vpn-optional-automation > p {
  margin-top: 12px;
  line-height: 1.65;
}

.vpn-optional-automation ol {
  display: grid;
  margin: 16px 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.vpn-optional-automation li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
}

.vpn-optional-automation li > i {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--portal-accent);
}

.vpn-optional-automation li > i svg {
  width: 16px;
  height: 16px;
}

.vpn-optional-automation li p {
  line-height: 1.6;
}

.vpn-optional-automation footer {
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--portal-line);
}

.vpn-optional-automation footer a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: var(--portal-accent);
  font-weight: 700;
}

.vpn-optional-automation footer svg {
  width: 15px;
  height: 15px;
}

.vpn-enrollment-card form,
.vpn-enrollment-card label {
  display: grid;
  gap: 8px;
}

.vpn-enrollment-card form {
  gap: 14px;
}

.vpn-enrollment-card label span {
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 800;
}

.vpn-enrollment-card input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--portal-ink);
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-soft);
  font: inherit;
}

.vpn-enrollment-card .vpn-binding-consent {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  padding: 12px;
  border: 1px solid var(--portal-line);
  background: var(--portal-soft);
}

.vpn-enrollment-card .vpn-binding-consent input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--portal-gold-strong);
}

.vpn-enrollment-card .vpn-binding-consent span {
  line-height: 1.55;
}

.vpn-profile-ready {
  display: grid;
  margin-top: 16px;
  padding: 14px;
  gap: 12px;
  color: var(--portal-ink);
  border: 1px solid #83d6ad;
  background: #e8fff3;
}

.vpn-profile-ready > div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.vpn-profile-ready > div > svg {
  flex: 0 0 auto;
  width: 20px;
  color: #0a6840;
}

.vpn-profile-ready strong,
.vpn-profile-ready small {
  display: block;
}

.vpn-profile-ready small {
  color: #365f4d;
  line-height: 1.55;
}

.vpn-profile-ready .vpn-profile-download {
  width: 100%;
  justify-content: center;
  text-decoration: none;
}

[data-theme="dark"] .vpn-profile-ready {
  color: #dff9eb;
  border-color: #2f7956;
  background: #122b20;
}

[data-theme="dark"] .vpn-profile-ready small {
  color: #a8d8be;
}

.vpn-pending-warning {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 12px;
  color: #805800;
  border-left: 3px solid var(--portal-gold-strong);
  background: color-mix(in srgb, var(--portal-gold) 12%, var(--portal-soft));
  font-size: 12px;
  line-height: 1.55;
}

.vpn-pending-warning svg {
  flex: 0 0 auto;
  width: 18px;
}

.vpn-routing-section {
  margin-top: 18px;
}

.vpn-routing-section > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 7px;
}

.vpn-routing-section article {
  display: flex;
  min-width: 0;
  gap: 11px;
  padding: 16px;
  border-right: 1px solid var(--portal-line);
}

.vpn-routing-section article:last-child {
  border-right: 0;
}

.vpn-routing-section article b {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #111827;
  border-radius: 5px;
  background: var(--portal-gold);
}

.vpn-routing-section article strong,
.vpn-routing-section article small {
  display: block;
}

.vpn-routing-section article small {
  margin-top: 5px;
  color: var(--portal-muted);
  line-height: 1.5;
}

.vpn-routing-section > p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
}

.vpn-routing-section > p svg {
  flex: 0 0 auto;
  width: 17px;
}

.vpn-device-list {
  overflow: hidden;
}

.vpn-device-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--portal-line);
}

.vpn-device-row:last-child {
  border-bottom: 0;
}

.vpn-device-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--portal-soft);
}

.vpn-empty {
  display: grid;
  min-height: 140px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--portal-muted);
}

.vpn-empty svg {
  width: 30px;
}

.vpn-empty p {
  margin: 0;
}

@media (max-width: 1180px) {
  .vpn-platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .vpn-security-strip article:nth-child(2) {
    border-right: 0;
  }

  .vpn-security-strip article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--portal-line);
  }

  .vpn-process-step {
    grid-template-columns: minmax(230px, .7fr) minmax(0, 1.3fr);
  }

  .vpn-process-step dl {
    grid-column: 1 / -1;
  }
}

@media (max-width: 880px) {
  .vpn-guide-layout,
  .vpn-routing-section > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .vpn-routing-section article {
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .vpn-routing-section article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .vpn-platform-grid,
  .vpn-security-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .vpn-security-strip article,
  .vpn-security-strip article:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .vpn-security-strip article:last-child {
    border-bottom: 0;
  }

  .vpn-platform-card {
    min-height: 0;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
  }

  .vpn-platform-card small {
    grid-column: 2;
  }

  .vpn-guide-card,
  .vpn-enrollment-card,
  .vpn-routing-section {
    padding: 16px;
  }

  .vpn-guide-card > header,
  .vpn-guide-download {
    align-items: flex-start;
    flex-direction: column;
  }

  .vpn-optional-automation > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .vpn-device-row {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .vpn-device-row button {
    grid-column: 1 / -1;
  }

  .vpn-process-step {
    padding: 14px;
  }

  .vpn-process-step dl {
    grid-template-columns: minmax(0, 1fr);
  }

  .vpn-process-step dl > div + div {
    border-top: 1px solid var(--portal-line);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-app-card,
  .portal-toggle-row > i::after,
  .portal-loading span {
    transition: none;
    animation: none;
  }
}

/* EMV-06 commercial portal alignment -----------------------------------
 * Read-only reference: EMV-05 sales-invoice-phase3.css.
 * Keep this block scoped to the EMV portal so the deployed sales pages are
 * unaffected while account control uses the same square, dense visual system.
 */
.emv-portal-shell {
  --portal-ink: #17212b;
  --portal-muted: #5f6b77;
  --portal-line: #aeb7c1;
  --portal-panel: #ffffff;
  --portal-soft: #eef1f4;
  background: #e6e9ed;
  font-size: 13px;
}

.emv-portal-shell,
.emv-portal-shell :where(*) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.emv-portal-shell :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid #315472;
  outline-offset: 1px;
}

.emv-portal-shell .portal-topbar {
  min-height: 58px;
  padding: 6px 18px;
  border-bottom: 2px solid #162837;
  background: #273746;
}

.emv-portal-shell .portal-brand img {
  width: 126px;
  height: 42px;
}

.emv-portal-shell .portal-brand > span {
  height: 28px;
  margin: 0 14px;
  background: #687783;
}

.emv-portal-shell .portal-topbar-actions {
  gap: 6px;
}

.emv-portal-shell :is(.portal-language, .portal-icon-button) {
  height: 34px;
  border-color: #7e8994;
  background: #314556;
}

.emv-portal-shell .portal-language button {
  width: 42px;
  font-size: 11px;
}

.emv-portal-shell .portal-icon-button {
  width: 34px;
}

.emv-portal-shell .portal-account {
  min-width: 164px;
  padding: 0 8px;
}

.emv-portal-shell :is(.portal-account > span, .portal-user-name > span) {
  width: 32px;
  height: 32px;
}

.emv-portal-shell .portal-layout {
  min-height: calc(100vh - 58px);
  grid-template-columns: 82px minmax(0, 1fr);
}

.emv-portal-shell .portal-sidebar {
  top: 58px;
  height: calc(100vh - 58px);
  padding: 14px 8px;
  border-color: #aeb7c1;
  background: #eef1f4;
}

[data-theme="dark"] .emv-portal-shell .portal-sidebar {
  background: #1b232c;
}

.emv-portal-shell .portal-sidebar nav {
  gap: 4px;
}

.emv-portal-shell .portal-sidebar button {
  min-height: 56px;
  padding: 6px 3px;
  border-bottom: 1px solid #c2c9d0;
}

.emv-portal-shell .portal-main {
  width: min(1680px, 100%);
  padding: 18px 22px 36px;
}

.emv-portal-shell .portal-page-header {
  min-height: 100px;
  padding: 16px 18px;
  align-items: center;
  border-color: #162837;
  background: #273746;
}

.emv-portal-shell .portal-page-header::after {
  display: none;
}

.emv-portal-shell .portal-page-header h1 {
  font-size: clamp(24px, 2vw, 30px);
}

.emv-portal-shell .portal-page-header p {
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: .14em;
}

.emv-portal-shell .portal-page-header > div > span {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.emv-portal-shell .compact-header {
  min-height: 90px;
}

.emv-portal-shell .portal-context {
  padding: 7px 9px;
  border-color: #7e8994;
  background: #314556;
}

.emv-portal-shell .portal-section-heading {
  margin: 22px 0 10px;
}

.emv-portal-shell .portal-section-heading h2 {
  font-size: 18px;
}

.emv-portal-shell .portal-section-heading p {
  margin-top: 3px;
  font-size: 11px;
}

.emv-portal-shell .portal-app-grid {
  gap: 0;
  border-top: 2px solid #273746;
  border-left: 1px solid var(--portal-line);
}

.emv-portal-shell .portal-app-card {
  min-height: 112px;
  gap: 10px;
  padding: 14px;
  border-top: 0;
  border-left: 0;
}

.emv-portal-shell .portal-app-card.is-available:hover,
.emv-portal-shell .portal-app-card.is-available:focus-visible {
  border-color: var(--portal-line);
  background: #f2f4f5;
  transform: none;
}

.emv-portal-shell .portal-app-icon {
  width: 40px;
  height: 40px;
}

.emv-portal-shell .portal-app-copy {
  gap: 4px;
}

.emv-portal-shell .portal-app-copy strong {
  font-size: 14px;
}

.emv-portal-shell .portal-app-copy small {
  font-size: 11px;
  line-height: 1.4;
}

.emv-portal-shell :is(.portal-primary, .portal-secondary, .portal-danger) {
  min-height: 34px;
  padding: 0 11px;
  font-size: 11px;
}

.emv-portal-shell .portal-primary {
  color: #ffffff;
  border-color: #273746;
  background: #273746;
}

.emv-portal-shell .portal-primary:hover,
.emv-portal-shell .portal-primary:focus-visible {
  border-color: #162837;
  background: #162837;
}

.emv-portal-shell .portal-management-tabs {
  margin-top: 12px;
  background: #273746;
}

.emv-portal-shell .portal-management-tabs button {
  min-height: 38px;
  color: #dfe5ea;
  border-color: #687783;
  font-size: 11px;
}

.emv-portal-shell .portal-management-tabs button.is-active {
  color: #17212b;
  background: #ffffff;
}

.emv-portal-shell .portal-metrics {
  margin: 12px 0;
  border-top: 2px solid #273746;
}

.emv-portal-shell .portal-metrics > div {
  min-height: 76px;
  padding: 10px 12px;
}

.emv-portal-shell .portal-metrics span {
  width: 30px;
  height: 30px;
}

.emv-portal-shell .portal-metrics strong {
  font-size: 20px;
}

.emv-portal-shell .portal-user-toolbar {
  gap: 8px;
  margin-bottom: 8px;
}

.emv-portal-shell .portal-user-toolbar > label {
  height: 34px;
  padding: 0 9px;
}

.emv-portal-shell .portal-user-toolbar > label:focus-within,
.emv-portal-shell .portal-form-field > div:focus-within {
  border-color: #315472;
  outline: 2px solid rgba(49, 84, 114, .18);
  outline-offset: 0;
}

.emv-portal-shell .portal-segments button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.emv-portal-shell .portal-user-table-wrap {
  border-top: 2px solid #273746;
}

.emv-portal-shell .portal-user-table th,
.emv-portal-shell .portal-user-table td {
  padding: 9px 10px;
  border-right: 1px solid #c2c9d0;
  font-size: 12px;
}

.emv-portal-shell .portal-user-table :is(th, td):last-child {
  border-right: 0;
}

.emv-portal-shell .portal-user-table th {
  color: #263440;
  background: #e9edf1;
  font-size: 10px;
  letter-spacing: .04em;
}

.emv-portal-shell .portal-role-grid {
  gap: 0;
  border-top: 2px solid #273746;
  border-left: 1px solid var(--portal-line);
}

.emv-portal-shell .portal-role-card {
  padding: 12px;
  border-top: 0;
  border-left: 0;
}

.emv-portal-shell :is(.portal-personnel-panel, .portal-attachment-zone, .portal-sensitive-zone, .portal-sensitive-collection, .portal-position-card, .portal-sync-result, .portal-workflow-notice) {
  border-top: 2px solid #273746;
}

.emv-portal-shell .portal-personnel-panel {
  margin-top: 12px;
  padding: 14px;
}

.emv-portal-shell .portal-personnel-panel > header {
  margin-bottom: 10px;
}

.emv-portal-shell :is(.portal-form-grid, .portal-dictionary-grid, .portal-workflow-form) {
  gap: 9px 10px;
}

.emv-portal-shell .portal-form-field {
  gap: 4px;
}

.emv-portal-shell .portal-form-field > div {
  min-height: 34px;
  padding: 0 9px;
  background: #ffffff;
}

.emv-portal-shell :is(.portal-form-field input, .portal-form-field select, .portal-form-field textarea, .portal-dictionary-grid input, .portal-dictionary-grid select, .portal-sync-form select, .portal-sync-form textarea, .portal-sensitive-collection-field input, .portal-sensitive-collection-field textarea) {
  min-height: 34px;
  padding: 7px 9px;
  border-color: var(--portal-line);
  background: #ffffff;
  font-size: 12px;
}

.emv-portal-shell .portal-modal {
  width: min(820px, calc(100vw - 24px));
  max-height: min(860px, calc(100vh - 24px));
  border-color: #7e8994;
}

.emv-portal-shell .portal-modal > header {
  padding: 12px 14px;
  color: #ffffff;
  border-color: #162837;
  background: #273746;
}

.emv-portal-shell .portal-modal header p {
  color: #d9e0e7;
}

.emv-portal-shell .portal-modal > header > button {
  color: #ffffff;
  border: 1px solid #7e8994;
  background: #314556;
}

.emv-portal-shell .portal-modal form {
  padding: 14px;
}

.emv-portal-shell .portal-modal footer {
  margin: 14px -14px -14px;
  padding: 10px 14px;
}

@media (max-width: 760px) {
  .emv-portal-shell .portal-topbar {
    min-height: 54px;
    padding: 5px 10px;
  }

  .emv-portal-shell .portal-brand img {
    width: 104px;
    height: 38px;
  }

  .emv-portal-shell .portal-layout {
    min-height: calc(100vh - 54px);
  }

  .emv-portal-shell .portal-sidebar {
    top: auto;
    height: 58px;
    padding: 4px 8px;
  }

  .emv-portal-shell .portal-sidebar button {
    min-width: 82px;
    min-height: 46px;
    padding: 4px 7px;
  }

  .emv-portal-shell .portal-main {
    padding: 10px 10px 72px;
  }

  .emv-portal-shell :is(.portal-page-header, .compact-header) {
    min-height: auto;
    gap: 12px;
    padding: 14px;
  }

  .emv-portal-shell .portal-page-header h1 {
    font-size: 24px;
  }

  .emv-portal-shell .portal-app-card {
    min-height: 96px;
    padding: 12px;
  }

  .emv-portal-shell .portal-user-table-wrap,
  .emv-portal-shell .portal-sync-details {
    overflow-x: auto;
  }

  .emv-portal-shell .portal-profile-write-meta {
    grid-template-columns: 1fr;
  }

  .emv-portal-shell .portal-profile-write-meta > span {
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .emv-portal-shell .portal-profile-write-meta > span:last-child { border-bottom: 0; }

  .emv-portal-shell .portal-profile-write-preview .portal-sync-details {
    overflow: visible;
    border: 0;
  }

  .emv-portal-shell .portal-profile-write-preview .portal-sync-details :is(table, tbody, tr, td) {
    display: block;
    width: 100%;
  }

  .emv-portal-shell .portal-profile-write-preview .portal-sync-details thead { display: none; }

  .emv-portal-shell .portal-profile-write-preview .portal-sync-details tr {
    margin-top: 8px;
    border: 1px solid var(--portal-line);
    background: var(--portal-panel);
  }

  .emv-portal-shell .portal-profile-write-preview .portal-sync-details td {
    display: grid;
    grid-template-columns: minmax(90px, 36%) minmax(0, 1fr);
    gap: 8px;
    border-bottom: 1px solid var(--portal-line);
    overflow-wrap: anywhere;
  }

  .emv-portal-shell .portal-profile-write-preview .portal-sync-details td:last-child { border-bottom: 0; }
  .emv-portal-shell .portal-profile-write-preview .portal-sync-details td::before {
    content: attr(data-mobile-label);
    color: var(--portal-muted);
    font-size: 11px;
    font-weight: 800;
  }

  .emv-portal-shell .portal-profile-write-preview .portal-workflow-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .emv-portal-shell .portal-user-table th,
  .emv-portal-shell .portal-user-table td {
    padding: 8px;
  }

  .emv-portal-shell .portal-modal {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .emv-portal-shell .portal-modal > header,
  .emv-portal-shell .portal-modal form {
    padding: 12px;
  }

  .emv-portal-shell .portal-modal footer {
    margin: 12px -12px -12px;
    padding: 10px 12px;
  }
}

/* EMV-06 shared portal theme tokens ------------------------------------
 * One semantic theme contract covers user accounts, personnel profiles,
 * and HR records. Dark is the product default; light is an explicit,
 * persisted user choice. EMV-05 remains a read-only visual reference.
 */
.emv-portal-shell,
[data-theme="dark"] .emv-portal-shell {
  color-scheme: dark;
  --portal-page: #111820;
  --portal-panel: #18232d;
  --portal-soft: #202c37;
  --portal-input: #111a22;
  --portal-ink: #eef3f7;
  --portal-muted: #afbac4;
  --portal-line: #43515e;
  --portal-bar: #273746;
  --portal-bar-strong: #162837;
  --portal-bar-control: #314556;
  --portal-bar-line: #687783;
  --portal-table-head: #202e3a;
  --portal-row-hover: #253442;
  --portal-active: #f4f6f8;
  --portal-active-ink: #17212b;
  --portal-focus: #79a9d1;
  --portal-error-bg: #321b1d;
  --portal-error-line: #87484d;
  --portal-error-ink: #ffc2c6;
  --portal-success: #64d58f;
  color: var(--portal-ink);
  background: var(--portal-page);
}

[data-theme="light"] .emv-portal-shell {
  color-scheme: light;
  --portal-page: #e6e9ed;
  --portal-panel: #ffffff;
  --portal-soft: #eef1f4;
  --portal-input: #ffffff;
  --portal-ink: #17212b;
  --portal-muted: #5f6b77;
  --portal-line: #aeb7c1;
  --portal-bar: #273746;
  --portal-bar-strong: #162837;
  --portal-bar-control: #314556;
  --portal-bar-line: #7e8994;
  --portal-table-head: #e9edf1;
  --portal-row-hover: #f2f4f5;
  --portal-active: #ffffff;
  --portal-active-ink: #17212b;
  --portal-focus: #315472;
  --portal-error-bg: #fff1f1;
  --portal-error-line: #d98f94;
  --portal-error-ink: #8d2329;
  --portal-success: #198754;
}

[data-theme="dark"] .emv-portal-host {
  color: #eef3f7;
  background: #111820;
}

[data-theme="light"] .emv-portal-host {
  color: #17212b;
  background: #e6e9ed;
}

.emv-portal-shell .portal-layout,
.emv-portal-shell .portal-main {
  color: var(--portal-ink);
  background: var(--portal-page);
}

.emv-portal-shell .portal-topbar,
.emv-portal-shell .portal-page-header {
  color: #ffffff;
  border-color: var(--portal-bar-strong);
  background: var(--portal-bar);
}

.emv-portal-shell :is(.portal-language, .portal-icon-button, .portal-context, .portal-modal > header > button) {
  color: #ffffff;
  border-color: var(--portal-bar-line);
  background: var(--portal-bar-control);
}

.emv-portal-shell .portal-sidebar {
  color: var(--portal-ink);
  border-color: var(--portal-line);
  background: var(--portal-soft);
}

[data-theme="dark"] .emv-portal-shell .portal-sidebar {
  background: var(--portal-panel);
}

.emv-portal-shell .portal-sidebar button {
  border-color: var(--portal-line);
}

.emv-portal-shell :is(
  .portal-app-card,
  .portal-role-card,
  .portal-metrics,
  .portal-user-toolbar > label,
  .portal-segments,
  .portal-user-table-wrap,
  .portal-personnel-panel,
  .portal-attachment-zone,
  .portal-sensitive-collection,
  .portal-sensitive-collection-row,
  .portal-position-card,
  .portal-sync-result,
  .portal-workflow-notice,
  .portal-modal,
  .portal-empty
) {
  color: var(--portal-ink);
  border-color: var(--portal-line);
  background: var(--portal-panel);
}

.emv-portal-shell :is(
  .portal-app-card.is-available:hover,
  .portal-app-card.is-available:focus-visible,
  .portal-user-table tbody tr:hover td
) {
  background: var(--portal-row-hover);
}

.emv-portal-shell .portal-management-tabs {
  border-color: var(--portal-bar-line);
  background: var(--portal-bar);
}

.emv-portal-shell .portal-management-tabs button {
  color: #dfe5ea;
  border-color: var(--portal-bar-line);
}

.emv-portal-shell .portal-management-tabs button.is-active,
.emv-portal-shell .portal-segments button.is-active {
  color: var(--portal-active-ink);
  background: var(--portal-active);
}

.emv-portal-shell .portal-user-table th {
  color: var(--portal-ink);
  border-color: var(--portal-line);
  background: var(--portal-table-head);
}

.emv-portal-shell .portal-user-table td {
  color: var(--portal-ink);
  border-color: var(--portal-line);
  background: var(--portal-panel);
}

.emv-portal-shell :is(
  .portal-form-field > div,
  .portal-dictionary-field input,
  .portal-dictionary-field select,
  .portal-dictionary-field textarea,
  .portal-dictionary-grid input,
  .portal-dictionary-grid select,
  .portal-sync-form select,
  .portal-sync-form textarea,
  .portal-sensitive-collection-field input,
  .portal-sensitive-collection-field textarea,
  .portal-u8-mapping-field input,
  .portal-u8-mapping-field select,
  .portal-u8-mapping-field textarea
) {
  color: var(--portal-ink);
  border-color: var(--portal-line);
  background: var(--portal-input);
}

.emv-portal-shell :is(input, select, textarea)::placeholder {
  color: var(--portal-muted);
  opacity: 1;
}

.emv-portal-shell :where(button, a, input, select, textarea, summary):focus-visible,
.emv-portal-shell .portal-user-toolbar > label:focus-within,
.emv-portal-shell .portal-form-field > div:focus-within {
  outline-color: var(--portal-focus);
  border-color: var(--portal-focus);
}

.emv-portal-shell .portal-modal-backdrop {
  background: rgba(4, 8, 15, .78);
}

.emv-portal-shell .portal-modal > header {
  color: #ffffff;
  border-color: var(--portal-bar-strong);
  background: var(--portal-bar);
}

.emv-portal-shell .portal-modal form,
.emv-portal-shell .portal-modal footer {
  color: var(--portal-ink);
  border-color: var(--portal-line);
  background: var(--portal-panel);
}

.emv-portal-shell .portal-modal footer,
.emv-portal-shell .portal-sensitive-collection-row > header {
  background: var(--portal-soft);
}

.emv-portal-shell .portal-feedback.is-error {
  color: var(--portal-error-ink);
  border-color: var(--portal-error-line);
  background: var(--portal-error-bg);
}

.emv-portal-shell :is(.portal-table-empty, .portal-empty, .portal-loading) {
  color: var(--portal-muted);
  background: var(--portal-panel);
}

.portal-source-evidence {
  display: grid;
  gap: 2px;
}

.portal-source-evidence strong {
  color: var(--portal-ink);
  font-size: 11px;
}

.portal-source-evidence small {
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-data-state.is-missing {
  display: inline-block;
  padding: 3px 6px;
  color: #d89a2b;
  border: 1px solid color-mix(in srgb, #d89a2b 64%, var(--portal-line));
  background: color-mix(in srgb, #d89a2b 10%, var(--portal-panel));
  font-size: 10px;
  font-weight: 800;
}

/* EMV-117 employee profile theme contract ------------------------------
 * Keep the profile editor independent from page-level light defaults. Every
 * readable surface receives an opaque semantic token in both themes.
 */
.emv-portal-shell .portal-personnel-modal,
[data-theme="dark"] .emv-portal-shell .portal-personnel-modal {
  color-scheme: dark;
  --personnel-modal-bg: #18232d;
  --personnel-section-bg: #202c37;
  --personnel-control-bg: #111a22;
  --personnel-control-border: #566674;
  --personnel-text: #eef3f7;
  --personnel-label: #f7f9fb;
  --personnel-muted: #bac5ce;
  --personnel-placeholder: #aebac4;
  --personnel-icon: #bac7d1;
  --personnel-disabled-bg: #2a3742;
  --personnel-disabled-text: #c6d0d8;
  --personnel-readonly-bg: #26333e;
  --personnel-readonly-text: #d5dde4;
  --personnel-upload-bg: #111a22;
  --personnel-upload-text: #eef3f7;
  --personnel-footer-bg: #151f28;
  --personnel-primary-bg: #e0b548;
  --personnel-primary-text: #121820;
  --personnel-secondary-bg: #202c37;
  --personnel-secondary-text: #eef3f7;
  --personnel-focus: #8ec2ee;
  --personnel-error-bg: #351b1f;
  --personnel-error-border: #9a555c;
  --personnel-error-text: #ffd0d3;
  --personnel-success-bg: #142b21;
  --personnel-success-border: #387858;
  --personnel-success-text: #bdf1d0;
  display: grid;
  overflow: hidden;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr);
  color: var(--personnel-text);
  background: var(--personnel-modal-bg);
}

[data-theme="light"] .emv-portal-shell .portal-personnel-modal {
  color-scheme: light;
  --personnel-modal-bg: #ffffff;
  --personnel-section-bg: #f1f4f6;
  --personnel-control-bg: #ffffff;
  --personnel-control-border: #83909b;
  --personnel-text: #17212b;
  --personnel-label: #17212b;
  --personnel-muted: #4f5c67;
  --personnel-placeholder: #5f6b77;
  --personnel-icon: #4d6070;
  --personnel-disabled-bg: #dfe5e9;
  --personnel-disabled-text: #46545f;
  --personnel-readonly-bg: #e8edf1;
  --personnel-readonly-text: #354550;
  --personnel-upload-bg: #f1f4f6;
  --personnel-upload-text: #17212b;
  --personnel-footer-bg: #eef1f4;
  --personnel-primary-bg: #273746;
  --personnel-primary-text: #ffffff;
  --personnel-secondary-bg: #ffffff;
  --personnel-secondary-text: #17212b;
  --personnel-focus: #315f86;
  --personnel-error-bg: #fff0f1;
  --personnel-error-border: #b54c55;
  --personnel-error-text: #7d1f27;
  --personnel-success-bg: #e8f6ed;
  --personnel-success-border: #4d9b6d;
  --personnel-success-text: #175f3a;
}

.emv-portal-shell .portal-personnel-modal > header,
.emv-portal-shell .portal-personnel-modal > header > div,
.emv-portal-shell .portal-personnel-modal > header > div > div {
  min-width: 0;
}

.emv-portal-shell .portal-personnel-modal > header :is(h2, p) {
  overflow-wrap: anywhere;
}

.emv-portal-shell .portal-personnel-modal form {
  overflow-x: hidden;
  overflow-y: auto;
  min-width: 0;
  max-width: 100%;
  color: var(--personnel-text);
  background: var(--personnel-modal-bg);
  scrollbar-gutter: stable;
}

.emv-portal-shell .portal-personnel-modal :is(
  .portal-personnel-section,
  .portal-attachment-zone,
  .portal-sensitive-zone,
  .portal-sensitive-group,
  .portal-sensitive-attachments,
  .portal-sensitive-collection,
  .portal-sensitive-collection-row,
  .portal-feedback,
  footer
) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.emv-portal-shell .portal-personnel-modal :is(
  .portal-personnel-section,
  .portal-attachment-zone,
  .portal-sensitive-zone,
  .portal-sensitive-collection,
  .portal-sensitive-collection-row
) {
  color: var(--personnel-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-section-bg);
}

.emv-portal-shell .portal-personnel-modal :is(
  .portal-personnel-section > h3,
  .portal-attachment-zone > h3,
  .portal-sensitive-zone > h3,
  .portal-sensitive-group > h4,
  .portal-sensitive-attachments > h4,
  .portal-sensitive-collection strong,
  .portal-sensitive-collection-field > span
) {
  color: var(--personnel-label);
}

.emv-portal-shell .portal-personnel-modal :is(
  .portal-personnel-section > p,
  .portal-sensitive-zone > p,
  .portal-sensitive-group > p,
  .portal-sensitive-attachments > p,
  .portal-personnel-photo small,
  .portal-sensitive-collection small,
  .portal-sensitive-collection-empty,
  .portal-form-field > small,
  .portal-position-option-state
) {
  color: var(--personnel-muted);
}

.emv-portal-shell .portal-personnel-modal .portal-form-grid {
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.emv-portal-shell .portal-personnel-modal .portal-form-grid > *,
.emv-portal-shell .portal-personnel-modal .portal-form-field,
.emv-portal-shell .portal-personnel-modal .portal-form-field > div {
  min-width: 0;
  max-width: 100%;
}

.emv-portal-shell .portal-personnel-modal .portal-form-field > span {
  min-width: 0;
  flex-wrap: wrap;
  align-items: flex-start;
  padding-inline: 1px;
  color: var(--personnel-label);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.emv-portal-shell .portal-personnel-modal .portal-form-field > div {
  color: var(--personnel-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-control-bg);
}

.emv-portal-shell .portal-personnel-modal :is(input, select, textarea) {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  color: var(--personnel-text);
  background: var(--personnel-control-bg);
  caret-color: var(--personnel-text);
  -webkit-text-fill-color: var(--personnel-text);
  opacity: 1;
}

.emv-portal-shell .portal-personnel-modal :is(select, datalist) option {
  color: var(--personnel-text);
  background: var(--personnel-control-bg);
}

.emv-portal-shell .portal-personnel-modal :is(input, textarea)::placeholder {
  color: var(--personnel-placeholder);
  -webkit-text-fill-color: var(--personnel-placeholder);
  opacity: 1;
}

.emv-portal-shell .portal-personnel-modal .portal-form-field > div > :is(svg, i),
.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone, .portal-feedback) svg {
  color: var(--personnel-icon);
  stroke: currentColor;
}

.emv-portal-shell .portal-personnel-modal .portal-form-field > div:has(:disabled),
.emv-portal-shell .portal-personnel-modal :is(input, select, textarea):disabled {
  color: var(--personnel-disabled-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-disabled-bg);
  -webkit-text-fill-color: var(--personnel-disabled-text);
  cursor: not-allowed;
  opacity: 1;
}

.emv-portal-shell .portal-personnel-modal .portal-form-field > div:has([readonly]),
.emv-portal-shell .portal-personnel-modal :is(input, textarea)[readonly] {
  color: var(--personnel-readonly-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-readonly-bg);
  -webkit-text-fill-color: var(--personnel-readonly-text);
  cursor: default;
}

.emv-portal-shell .portal-personnel-modal .portal-field-source.is-u8 {
  color: #b9d4ff;
  background: #1d3b62;
}

.emv-portal-shell .portal-personnel-modal .portal-field-source.is-web {
  color: #ffe0a0;
  background: #563f14;
}

[data-theme="light"] .emv-portal-shell .portal-personnel-modal .portal-field-source.is-u8 {
  color: #1648a0;
  background: #e2ecff;
}

[data-theme="light"] .emv-portal-shell .portal-personnel-modal .portal-field-source.is-web {
  color: #754b00;
  background: #fff0c7;
}

.emv-portal-shell .portal-personnel-modal .portal-position-option-state.is-empty {
  color: var(--personnel-label);
}

.emv-portal-shell .portal-personnel-modal .portal-position-options {
  color: var(--personnel-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-control-bg);
}

.emv-portal-shell .portal-personnel-modal .portal-position-options [data-personnel-position-option] {
  color: var(--personnel-text);
}

.emv-portal-shell .portal-personnel-modal .portal-position-options [data-personnel-position-option]:is(:hover, :focus-visible, [data-active="true"]) {
  color: var(--personnel-text);
  background: var(--personnel-readonly-bg);
}

.emv-portal-shell .portal-personnel-modal .portal-position-options [data-personnel-position-option] small {
  color: var(--personnel-muted);
}

.emv-portal-shell .portal-personnel-modal .portal-position-toggle {
  color: var(--personnel-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-readonly-bg);
}

.emv-portal-shell .portal-personnel-modal .portal-position-combobox :is(
  input[data-personnel-position-name],
  .portal-position-toggle
):focus-visible {
  outline: 0;
  outline-offset: 0;
}

.emv-portal-shell .portal-personnel-modal .portal-position-empty {
  color: var(--personnel-text);
}

.emv-portal-shell .portal-personnel-modal .portal-position-empty > small {
  color: var(--personnel-muted);
}

.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone) ul,
.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone) li,
.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone) a,
.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone) a > span {
  min-width: 0;
  max-width: 100%;
}

.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone) a {
  flex: 1 1 auto;
  color: var(--personnel-text);
  overflow-wrap: anywhere;
}

.emv-portal-shell .portal-personnel-modal :is(.portal-attachment-zone, .portal-sensitive-zone) a small {
  color: var(--personnel-muted);
}

.emv-portal-shell .portal-personnel-modal .portal-upload span {
  max-width: 100%;
  color: var(--personnel-upload-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-upload-bg);
  overflow-wrap: anywhere;
}

.emv-portal-shell .portal-personnel-modal .portal-upload span svg {
  color: var(--personnel-icon);
  stroke: currentColor;
}

.emv-portal-shell .portal-personnel-modal .portal-upload input:focus-visible + span {
  outline: 2px solid var(--personnel-focus);
  outline-offset: 2px;
  border-color: var(--personnel-focus);
}

.emv-portal-shell .portal-personnel-modal :where(button, a, input, select, textarea):focus-visible,
.emv-portal-shell .portal-personnel-modal .portal-form-field > div:has(:focus-visible) {
  outline: 2px solid var(--personnel-focus);
  outline-offset: 2px;
  border-color: var(--personnel-focus);
}

.emv-portal-shell .portal-personnel-modal .portal-feedback {
  width: 100%;
  color: var(--personnel-success-text);
  border-color: var(--personnel-success-border);
  background: var(--personnel-success-bg);
}

.emv-portal-shell .portal-personnel-modal .portal-feedback.is-error {
  color: var(--personnel-error-text);
  border-color: var(--personnel-error-border);
  background: var(--personnel-error-bg);
}

.emv-portal-shell .portal-personnel-modal .portal-feedback :is(svg, i) {
  color: currentColor;
  stroke: currentColor;
}

.emv-portal-shell .portal-personnel-modal footer {
  position: sticky;
  z-index: 3;
  bottom: -14px;
  flex-wrap: wrap;
  color: var(--personnel-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-footer-bg);
}

.emv-portal-shell .portal-personnel-modal footer .portal-primary {
  color: var(--personnel-primary-text);
  border-color: var(--personnel-primary-bg);
  background: var(--personnel-primary-bg);
}

.emv-portal-shell .portal-personnel-modal footer .portal-secondary {
  color: var(--personnel-secondary-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-secondary-bg);
}

.emv-portal-shell .portal-personnel-modal footer :is(.portal-primary, .portal-secondary):disabled {
  color: var(--personnel-disabled-text);
  border-color: var(--personnel-control-border);
  background: var(--personnel-disabled-bg);
  cursor: not-allowed;
  opacity: 1;
}

@media (max-width: 700px) {
  .emv-portal-shell .portal-personnel-modal .portal-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .emv-portal-shell .portal-personnel-modal footer {
    bottom: -12px;
  }
}

/* EMV-06 unified application frame ------------------------------------
 * Account control is a functional page inside the same EMV application.
 * Reuse the shared header, collapsed rail, black/gold controls and semantic
 * surface tokens instead of presenting it as a separate purple/steel portal.
 */
.emv-portal-host {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface-2);
}

.emv-portal-shell,
[data-theme="dark"] .emv-portal-shell,
[data-theme="light"] .emv-portal-shell {
  color-scheme: normal;
  --portal-page: var(--surface-2);
  --portal-panel: var(--surface);
  --portal-soft: var(--surface-2);
  --portal-input: var(--surface);
  --portal-ink: var(--ink);
  --portal-muted: var(--muted);
  --portal-line: var(--line);
  --portal-bar: var(--surface);
  --portal-bar-strong: var(--line);
  --portal-bar-control: var(--surface-2);
  --portal-bar-line: var(--line);
  --portal-table-head: var(--surface-2);
  --portal-row-hover: var(--amber-soft);
  --portal-control-dark: #080807;
  --portal-active: var(--portal-control-dark);
  --portal-active-ink: var(--amber);
  --portal-focus: var(--amber-dark);
  --portal-error-bg: var(--danger-soft);
  --portal-error-line: var(--danger);
  --portal-error-ink: var(--danger);
  --portal-success: var(--success);
  min-height: 100vh;
  color: var(--ink);
  background: var(--surface-2);
}

.emv-portal-shell,
.emv-portal-shell :where(*) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.emv-portal-shell :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--amber-dark);
  outline-offset: 2px;
}

.emv-portal-shell .portal-topbar.ai-topbar {
  position: relative;
  z-index: 20;
  top: auto;
  display: flex;
  min-height: 68px;
  height: 68px;
  padding: 0 28px;
  gap: 18px;
  color: var(--ink);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.emv-portal-shell .portal-brand.brand {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  min-width: 0;
  gap: 14px;
  color: var(--ink);
}

.emv-portal-shell .portal-brand .brand-logo {
  width: 148px;
  height: auto;
  object-fit: contain;
}

.emv-portal-shell .portal-brand > .brand-divider {
  width: 1px;
  height: 34px;
  margin: 0;
  background: var(--line);
}

.emv-portal-shell .portal-brand .brand-copy {
  display: block;
  min-width: 0;
}

.emv-portal-shell .portal-brand .brand-title {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.18;
  font-weight: 820;
}

.emv-portal-shell .portal-brand .brand-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.emv-portal-shell .portal-topbar-actions.topbar-tools {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.emv-portal-shell .topbar-status,
.emv-portal-shell .portal-icon-button.theme-toggle,
.emv-portal-shell .portal-language.language-switcher {
  min-height: 34px;
  height: 34px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.emv-portal-shell .topbar-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 7px;
  padding: 0 10px;
  font-weight: 760;
}

.emv-portal-shell .project-console-link {
  color: var(--ink);
  border-color: color-mix(in srgb, #7c5cff 52%, var(--line));
  background: color-mix(in srgb, #7c5cff 11%, var(--surface-2));
}

.emv-portal-shell .project-console-link:hover,
.emv-portal-shell .project-console-link:focus-visible {
  color: var(--ink);
  border-color: #7c5cff;
  background: color-mix(in srgb, #7c5cff 20%, var(--surface-2));
  transform: translateY(-1px);
}

.emv-portal-shell .project-console-link .topbar-tool-icon {
  color: #7c5cff;
}

.emv-portal-shell .portal-language.language-switcher {
  display: inline-flex;
  overflow: hidden;
}

.emv-portal-shell .portal-language .language-button {
  width: auto;
  min-width: 58px;
  height: 34px;
  padding: 0 10px;
  color: var(--muted);
  border: 0;
  background: var(--surface);
  font-size: 12px;
  font-weight: 820;
}

.emv-portal-shell .portal-language .language-button + .language-button {
  border-left: 1px solid var(--line);
}

.emv-portal-shell .portal-language .language-button.is-active {
  color: var(--portal-control-dark);
  background: var(--amber);
}

.emv-portal-shell .portal-language-compact {
  display: none;
}

.emv-portal-shell .portal-icon-button.theme-toggle {
  display: inline-grid;
  width: 34px;
  padding: 0;
  place-items: center;
}

.emv-portal-shell .portal-icon-button.theme-toggle:hover,
.emv-portal-shell .portal-icon-button.theme-toggle:focus-visible,
.emv-portal-shell .portal-icon-button.theme-toggle.is-dark {
  color: var(--portal-control-dark);
  border-color: var(--amber);
  background: var(--amber);
}

.emv-portal-shell .portal-icon-button.theme-toggle svg,
.emv-portal-shell .topbar-tool-icon {
  width: 17px;
  height: 17px;
}

.emv-portal-shell .production-status .env-dot {
  width: 7px;
  height: 7px;
  background: var(--success);
}

.emv-portal-shell .portal-default-home {
  min-width: 154px;
  gap: 8px;
  padding: 0 8px 0 10px;
}

.emv-portal-shell .portal-default-home select {
  width: 116px;
  min-width: 116px;
  height: 30px;
  padding: 0 28px 0 6px;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.emv-portal-shell .portal-default-home.is-en {
  min-width: 170px;
}

.emv-portal-shell .portal-default-home.is-en select {
  width: 132px;
  min-width: 132px;
}

.emv-portal-shell .portal-default-home:focus-within {
  border-color: var(--amber-dark);
  outline: 2px solid color-mix(in srgb, var(--amber-dark) 36%, transparent);
  outline-offset: 1px;
}

.emv-portal-shell .portal-account.topbar-status {
  min-width: 0;
  padding: 0 10px;
}

.emv-portal-shell .portal-layout.layout.nav-collapsed.report-layout {
  display: grid;
  height: calc(100vh - 68px);
  min-height: 0;
  grid-template-columns: 68px minmax(0, 1fr);
  color: var(--ink);
  background: var(--surface-2);
}

.emv-portal-shell .portal-sidebar.sidebar {
  position: static;
  top: auto;
  align-self: stretch;
  height: auto;
  min-height: 0;
  padding: 20px 8px;
  overflow: auto;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.emv-portal-shell .portal-sidebar .nav-list {
  display: grid;
  gap: 6px;
}

.emv-portal-shell .portal-sidebar button.nav-item {
  display: flex;
  width: 100%;
  height: 48px;
  min-height: 48px;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 680;
}

.emv-portal-shell .portal-sidebar button.nav-item.active,
.emv-portal-shell .portal-sidebar button.nav-item.is-active {
  color: var(--amber);
  background: var(--portal-control-dark);
  box-shadow: inset 0 -3px 0 var(--amber) !important;
}

.emv-portal-shell .portal-sidebar .nav-icon {
  display: inline-grid;
  width: 100%;
  place-items: center;
  color: currentColor;
}

.emv-portal-shell .portal-sidebar .nav-icon svg,
.emv-portal-shell .portal-sidebar button.nav-item svg {
  width: 20px;
  height: 20px;
}

.emv-portal-shell .portal-sidebar .nav-label {
  display: none;
}

.emv-portal-shell .portal-main.report-main {
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 12px 24px 36px;
  overflow: auto;
  color: var(--ink);
  background: var(--surface-2);
}

.emv-portal-shell .portal-page-header,
.emv-portal-shell .portal-page-header.compact-header {
  min-height: 100px;
  padding: 16px 18px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber-dark);
  background: var(--surface);
}

.emv-portal-shell .portal-page-header::after {
  display: none;
}

.emv-portal-shell .portal-page-header p {
  margin-bottom: 4px;
  color: var(--amber-dark);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .08em;
}

.emv-portal-shell .portal-page-header h1 {
  color: var(--ink);
  font-size: clamp(22px, 2vw, 28px);
}

.emv-portal-shell .portal-page-header > div > span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.emv-portal-shell .portal-context {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-2);
}

.emv-portal-shell .portal-primary {
  color: var(--amber);
  border-color: var(--portal-control-dark);
  background: var(--portal-control-dark);
}

.emv-portal-shell .portal-primary:hover,
.emv-portal-shell .portal-primary:focus-visible {
  color: var(--portal-control-dark);
  border-color: var(--amber);
  background: var(--amber);
}

.emv-portal-shell .portal-management-tabs {
  border: 1px solid var(--line);
  background: var(--surface);
}

.emv-portal-shell .portal-management-tabs button {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface);
}

.emv-portal-shell .portal-management-tabs button.is-active,
.emv-portal-shell .portal-segments button.is-active {
  color: var(--amber);
  border-color: var(--portal-control-dark);
  background: var(--portal-control-dark);
}

.emv-portal-shell .portal-management-tab-note {
  color: var(--muted);
  background: var(--surface-2);
}

.emv-portal-shell :is(
  .portal-app-card,
  .portal-role-card,
  .portal-metrics,
  .portal-user-toolbar > label,
  .portal-segments,
  .portal-user-table-wrap,
  .portal-activity-note,
  .portal-personnel-panel,
  .portal-attachment-zone,
  .portal-sensitive-collection,
  .portal-sensitive-collection-row,
  .portal-position-card,
  .portal-sync-result,
  .portal-workflow-notice,
  .portal-modal,
  .portal-empty
) {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.emv-portal-shell .portal-app-grid,
.emv-portal-shell .portal-role-grid,
.emv-portal-shell .portal-metrics,
.emv-portal-shell .portal-user-table-wrap,
.emv-portal-shell :is(.portal-personnel-panel, .portal-attachment-zone, .portal-sensitive-zone, .portal-sensitive-collection, .portal-position-card, .portal-sync-result, .portal-workflow-notice) {
  border-top-color: var(--amber-dark);
}

.emv-portal-shell .portal-app-grid,
.emv-portal-shell .portal-role-grid {
  border-top-width: 2px;
}

.emv-portal-shell .portal-user-table th {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface-2);
}

.emv-portal-shell .portal-user-table td,
.emv-portal-shell .portal-form-field > div,
.emv-portal-shell :is(input, select, textarea) {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.emv-portal-shell .portal-user-table tbody tr:hover td,
.emv-portal-shell .portal-app-card.is-available:hover,
.emv-portal-shell .portal-app-card.is-available:focus-visible {
  background: var(--amber-soft);
}

.emv-portal-shell .portal-modal > header,
.emv-portal-shell .portal-personnel-modal > header {
  color: var(--amber);
  border-color: var(--portal-control-dark);
  background: var(--portal-control-dark);
}

.emv-portal-shell .portal-modal > header p,
.emv-portal-shell .portal-personnel-modal > header p {
  color: #dedbd4;
}

.emv-portal-shell .portal-personnel-modal,
[data-theme="dark"] .emv-portal-shell .portal-personnel-modal,
[data-theme="light"] .emv-portal-shell .portal-personnel-modal {
  --personnel-modal-bg: var(--surface);
  --personnel-panel-bg: var(--surface);
  --personnel-soft-bg: var(--surface-2);
  --personnel-control-bg: var(--surface);
  --personnel-control-border: var(--line);
  --personnel-text: var(--ink);
  --personnel-muted: var(--muted);
  --personnel-placeholder: var(--muted);
  --personnel-focus: var(--amber-dark);
  --personnel-primary-bg: var(--portal-control-dark);
  --personnel-primary-text: var(--amber);
  --personnel-secondary-bg: var(--surface-2);
  --personnel-secondary-text: var(--ink);
  --personnel-footer-bg: var(--surface-2);
}

/* EMV-150 compact desktop personnel directory; EMV-152 grouped account-set records */
@media (min-width: 761px) {
  .emv-portal-shell .portal-personnel-table {
    min-width: 1040px;
    table-layout: fixed;
  }

  .emv-portal-shell .portal-personnel-table :is(th, td) {
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.25;
    vertical-align: middle;
  }

  .emv-portal-shell .portal-personnel-table th {
    padding-block: 6px;
    font-size: 10px;
  }

  .emv-portal-shell .portal-personnel-table th:nth-child(1) { width: 27%; }
  .emv-portal-shell .portal-personnel-table th:nth-child(2) { width: 16%; }
  .emv-portal-shell .portal-personnel-table th:nth-child(3) { width: 12%; }
  .emv-portal-shell .portal-personnel-table th:nth-child(4) { width: 9%; }
  .emv-portal-shell .portal-personnel-table th:nth-child(5) { width: 10%; }
  .emv-portal-shell .portal-personnel-table th:nth-child(6) { width: 13%; }
  .emv-portal-shell .portal-personnel-table th:nth-child(7) { width: 140px; }

  .emv-portal-shell .portal-personnel-table .portal-user-name {
    gap: 7px;
  }

  .emv-portal-shell .portal-personnel-table .portal-user-name > span {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .emv-portal-shell .portal-personnel-table .portal-user-name strong {
    font-size: 11px;
    line-height: 1.2;
  }

  .emv-portal-shell .portal-personnel-table small,
  .emv-portal-shell .portal-personnel-table .portal-user-name small {
    margin-top: 1px;
    font-size: 10px;
    line-height: 1.2;
  }

  .emv-portal-shell .portal-personnel-table .portal-row-action {
    width: 30px;
    height: 30px;
  }

  .emv-portal-shell .portal-personnel-table .portal-row-action svg {
    width: 15px;
  }

  .emv-portal-shell .portal-personnel-table .portal-row-action.is-sync {
    width: auto;
    min-width: 84px;
    padding-inline: 9px;
    font-size: 10px;
  }

  .emv-portal-shell .portal-personnel-table .portal-row-actions {
    width: 100%;
    min-width: 122px;
  }

  .emv-portal-shell .portal-personnel-table tr.is-cross-account td:first-child {
    border-left: 3px solid var(--amber-dark);
  }

  .emv-portal-shell .portal-personnel-table tr.is-cross-account-start td {
    border-top: 2px solid color-mix(in srgb, var(--amber-dark) 52%, var(--line));
  }

  .emv-portal-shell .portal-personnel-table tr.is-cross-account-end td {
    border-bottom: 2px solid color-mix(in srgb, var(--amber-dark) 52%, var(--line));
  }

  .emv-portal-shell .portal-personnel-table .portal-status {
    font-size: 11px;
  }
}

@media (max-width: 1380px) {
  .emv-portal-shell .portal-default-home,
  .emv-portal-shell .portal-account.topbar-status {
    display: none;
  }
}

@media (max-width: 1120px) {
  .emv-portal-shell .portal-topbar.ai-topbar {
    padding: 0 16px;
  }

  .emv-portal-shell .topbar-status:not(.project-console-link),
  .emv-portal-shell .sales-workbench-link {
    display: none;
  }
}

@media (max-width: 760px) {
  .emv-portal-host {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
  }

  .emv-portal-shell .portal-topbar.ai-topbar {
    position: sticky;
    min-height: 60px;
    height: 60px;
    padding: 0 10px;
  }

  .emv-portal-shell .portal-brand .brand-logo {
    width: 108px;
  }

  .emv-portal-shell .portal-brand > .brand-divider,
  .emv-portal-shell .portal-brand .brand-copy,
  .emv-portal-shell .project-console-link,
  .emv-portal-shell .portal-overview-link {
    display: none;
  }

  .emv-portal-shell .portal-language .language-button {
    min-width: 42px;
    padding: 0 7px;
  }

  .emv-portal-shell .portal-language-wide {
    display: none;
  }

  .emv-portal-shell .portal-language-compact {
    display: inline;
  }

  .emv-portal-shell .portal-layout.layout.nav-collapsed.report-layout {
    display: block;
    height: auto;
    min-height: calc(100vh - 60px);
  }

  .emv-portal-shell .portal-sidebar.sidebar {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 58px;
    padding: 4px 8px;
    overflow-x: auto;
    border: 0;
    border-top: 1px solid var(--line);
  }

  .emv-portal-shell .portal-sidebar .nav-list {
    display: flex;
    width: max-content;
    min-width: 100%;
    justify-content: space-around;
  }

  .emv-portal-shell .portal-sidebar button.nav-item {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
  }

  .emv-portal-shell .portal-main.report-main {
    padding: 10px 10px 72px;
    overflow: visible;
  }

  .emv-portal-shell .portal-page-header,
  .emv-portal-shell .portal-page-header.compact-header {
    min-height: auto;
    gap: 12px;
    padding: 14px;
  }

  .emv-portal-shell .portal-user-table-wrap,
  .emv-portal-shell .portal-sync-details {
    overflow-x: auto;
  }

  .emv-portal-shell .portal-modal {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .emv-portal-shell .portal-management-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .emv-portal-shell .portal-user-management-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emv-portal-shell .portal-user-management-tabs button:nth-child(2n) {
    border-right: 0;
  }

  .emv-portal-shell .portal-user-management-tabs button:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .emv-portal-shell .portal-management-tabs button {
    min-width: 0;
    padding: 6px;
    line-height: 1.25;
  }

  .emv-portal-shell .portal-management-tabs button span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .emv-portal-shell .portal-segments {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .emv-portal-shell .portal-activity-segments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emv-portal-shell .portal-activity-note {
    padding: 10px 12px;
    font-size: 12px;
  }

  .emv-portal-shell .portal-segments button {
    min-width: 0;
    padding: 0 6px;
    white-space: normal;
  }

  .emv-portal-shell .portal-user-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .emv-portal-shell .portal-user-table,
  .emv-portal-shell .portal-user-table :is(tbody, tr, td) {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .emv-portal-shell .portal-user-table thead {
    position: absolute;
    overflow: hidden;
    width: 1px;
    height: 1px;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .emv-portal-shell .portal-user-table tbody {
    display: grid;
    gap: 10px;
  }

  .emv-portal-shell .portal-user-table tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-top: 3px solid var(--amber-dark);
    background: var(--surface);
  }

  .emv-portal-shell .portal-user-table td {
    min-height: 68px;
    padding: 10px 12px;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .emv-portal-shell .portal-user-table td > * {
    max-width: 100%;
    min-width: 0;
  }

  .emv-portal-shell .portal-user-table td::before {
    content: attr(data-mobile-label);
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
  }

  .emv-portal-shell .portal-user-table td:first-child,
  .emv-portal-shell .portal-user-table td[colspan] {
    grid-column: 1 / -1;
  }

  .emv-portal-shell .portal-user-table :is(td:nth-child(2n), td:last-child) {
    border-right: 0;
  }

  .emv-portal-shell .portal-user-table td[colspan] {
    border-right: 0;
  }

  .emv-portal-shell :is(.portal-account-table, .portal-personnel-table) td:first-child {
    min-height: 78px;
    padding-right: 62px;
  }

  .emv-portal-shell .portal-personnel-table tr:has(.portal-row-action.is-sync) td:first-child {
    padding-right: 154px;
  }

  .emv-portal-shell .portal-personnel-table .portal-personnel-name-heading {
    flex-wrap: wrap;
  }

  .emv-portal-shell :is(.portal-account-table, .portal-personnel-table) td:last-child {
    position: absolute;
    top: 12px;
    right: 12px;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
  }

  .emv-portal-shell :is(.portal-account-table, .portal-personnel-table) td:last-child::before {
    display: none;
  }
}

@media (max-width: 430px) {
  .emv-portal-shell .portal-activity-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emv-portal-shell .portal-activity-metrics > div {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .emv-portal-shell .portal-activity-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .emv-portal-shell .portal-activity-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .emv-portal-shell .portal-user-table tr {
    grid-template-columns: minmax(0, 1fr);
  }

  .emv-portal-shell .portal-user-table td,
  .emv-portal-shell .portal-user-table td:first-child,
  .emv-portal-shell .portal-user-table td[colspan] {
    grid-column: 1;
    border-right: 0;
  }
}
