:root {
  color-scheme: light;
  --am-color-accent: #e7661c;
  --am-color-accent-hover: #ff8740;
  --am-color-accent-soft: #fff3ec;
  --am-color-accent-border: #f5c7aa;
  --am-color-bg-global: #f6f7f9;
  --am-color-surface: #ffffff;
  --am-color-surface-soft: #f8f9fb;
  --am-color-hover: #f2f4f7;
  --am-color-text: #1f2937;
  --am-color-text-strong: #111827;
  --am-color-muted: #4b5563;
  --am-color-subtle: #9ca3af;
  --am-color-border: #e7e9ee;
  --am-color-border-strong: #d7dbe3;
  --am-color-success: #237a52;
  --am-color-success-soft: #edf8f2;
  --am-color-warning: #9a6700;
  --am-color-warning-soft: #fff8e6;
  --am-color-danger: #b42318;
  --am-color-danger-soft: #fff1f0;
  --am-color-focus: rgba(231, 102, 28, .3);
  --am-font-sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --am-space-1: 4px;
  --am-space-2: 8px;
  --am-space-3: 12px;
  --am-space-4: 16px;
  --am-space-5: 24px;
  --am-space-6: 32px;
  --am-space-7: 48px;
  --am-radius-sm: 8px;
  --am-radius-md: 12px;
  --am-radius-lg: 16px;
  --am-shadow-card: 0 1px 2px rgba(16, 24, 40, .025), 0 3px 10px rgba(16, 24, 40, .025);
  --am-shadow-float: 0 18px 48px rgba(16, 24, 40, .13);
  --am-sidebar-width: 232px;
  --am-topbar-height: 64px;
  --am-panel-width: 480px;
  --bg: var(--am-color-bg-global);
  --surface: var(--am-color-surface);
  --surface-raised: var(--am-color-surface-soft);
  --line: var(--am-color-border);
  --line-strong: var(--am-color-border-strong);
  --text: var(--am-color-text);
  --muted: var(--am-color-muted);
  --accent: var(--am-color-accent);
  --success: var(--am-color-success);
  --danger: var(--am-color-danger);
}

/* Partner and Customer canonical account profile */
.portal-account-governance,
.portal-account-section,
.portal-account-security {
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(20, 27, 38, .06);
  margin-bottom: 1.25rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.portal-account-readonly-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}

.portal-account-readonly-grid > div {
  background: #f6f7f9;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: grid;
  gap: .3rem;
  min-width: 0;
  padding: .8rem .9rem;
}

.portal-account-readonly-grid dt,
.portal-account-governance__note {
  color: #687080;
  font-size: .82rem;
}

.portal-account-readonly-grid dd {
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.portal-account-governance__note {
  margin: 1rem 0 0;
}

.portal-account-form {
  display: grid;
  gap: 0;
}

.portal-account-form .portal-account-section {
  margin-bottom: 1.25rem;
}

.portal-account-form__actions {
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 18px;
  margin-bottom: 1.25rem;
  padding: 1rem 1.5rem;
}

.portal-account-security {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.portal-account-security h2,
.portal-account-security p {
  margin-bottom: .35rem;
  margin-top: 0;
}

.portal-account-form input:disabled,
.portal-account-form select:disabled,
.portal-account-form textarea:disabled {
  background: #f1f3f5;
  color: #596170;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .portal-account-readonly-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .portal-account-readonly-grid {
    grid-template-columns: 1fr;
  }

  .portal-account-security {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-account-security .button-link,
  .portal-account-form__actions button {
    justify-content: center;
    width: 100%;
  }
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--am-color-bg-global); }
body.global-app {
  min-height: 100vh;
  margin: 0;
  background: var(--am-color-bg-global);
  color: var(--am-color-text);
  font: 14px/1.55 var(--am-font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-scroll-locked { overflow: hidden; }
.portal-login-page {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  padding: 24px;
  background: #f3f4f6;
  color: var(--am-color-text);
  font: 14px/1.55 var(--am-font-sans);
}
.portal-login-card {
  width: min(100%, 430px);
  border: 1px solid var(--am-color-border);
  border-radius: 18px;
  padding: 34px;
  background: #fff;
  box-shadow: var(--am-shadow-float);
}
.portal-login-card > img {
  width: 150px;
  border-radius: 9px;
  padding: 7px;
  background: #1c1c1a;
}
.portal-login-card h1 { margin: 20px 0 6px; font-size: 28px; }
.portal-login-card > p { color: var(--am-color-muted); }
.portal-login-card form { display: grid; gap: 16px; margin-top: 24px; }
.unsaved-dialog {
  width: min(92vw, 480px);
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 24px;
  box-shadow: var(--am-shadow-float);
}
.unsaved-dialog::backdrop { background: rgba(17, 24, 39, .38); }
.unsaved-dialog h2 { margin: 0 0 6px; }
.unsaved-dialog p { margin: 0 0 20px; color: var(--am-color-muted); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}
.global-nav svg,
.global-search svg,
.topbar-icon svg,
.sidebar-toggle svg,
.sidebar-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
.button-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--am-color-accent);
  border-radius: var(--am-radius-sm);
  padding: 8px 14px;
  background: var(--am-color-accent);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
  color: var(--am-color-text-strong);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
button:hover,
.button-link:hover {
  border-color: var(--am-color-accent-hover);
  background: var(--am-color-accent-hover);
  box-shadow: 0 3px 8px rgba(180, 71, 10, .16);
}
button:active,
.button-link:active { transform: translateY(1px); }
button.secondary,
.button-secondary,
.button-link--secondary,
.button-link:not(.button-link--primary) {
  border-color: var(--am-color-border-strong);
  background: var(--am-color-surface);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .035);
  color: var(--am-color-text);
}
button.secondary:hover,
.button-secondary:hover,
.button-link--secondary:hover,
.button-link:not(.button-link--primary):hover {
  border-color: #c9ced8;
  background: var(--am-color-hover);
  box-shadow: 0 2px 6px rgba(16, 24, 40, .06);
}
button.danger,
.button-danger {
  border-color: #f0b8b4;
  background: #fff;
  box-shadow: none;
  color: var(--am-color-danger);
}
button.danger:hover,
.button-danger:hover {
  border-color: #e59a94;
  background: var(--am-color-danger-soft);
}
button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--am-color-focus);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--am-color-border-strong);
  border-radius: var(--am-radius-sm);
  padding: 9px 12px;
  background: #fff;
  color: var(--am-color-text);
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover,
select:hover,
textarea:hover { border-color: #c6cbd5; }
input:focus,
select:focus,
textarea:focus {
  border-color: var(--am-color-accent);
  box-shadow: 0 0 0 3px var(--am-color-focus);
  outline: 0;
}
input::placeholder,
textarea::placeholder { color: var(--am-color-subtle); }
textarea { resize: vertical; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-140%);
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-sm);
  padding: 10px 14px;
  background: #fff;
  box-shadow: var(--am-shadow-float);
  color: var(--am-color-text);
}
.skip-link:focus { transform: none; }

.global-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
  display: flex;
  width: var(--am-sidebar-width);
  flex-direction: column;
  border-right: 1px solid var(--am-color-border);
  background: var(--am-color-surface);
  color: var(--am-color-text);
}
.global-brand {
  display: flex;
  min-height: var(--am-topbar-height);
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--am-color-border);
  padding: 9px 16px;
}
.global-brand > a {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.global-brand img {
  display: block;
  width: 106px;
  height: 40px;
  border-radius: 8px;
  padding: 5px 7px;
  background: #1c1c1a;
  object-fit: contain;
  object-position: left center;
}
.global-brand a > span {
  border: 1px solid var(--am-color-accent-border);
  border-radius: 999px;
  padding: 3px 6px 2px;
  background: var(--am-color-accent-soft);
  color: #a8460f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}
.sidebar-close {
  display: none;
  width: 36px;
  min-height: 36px;
  border-color: var(--am-color-border);
  padding: 0;
  background: #fff;
  box-shadow: none;
  color: var(--am-color-muted);
}
.global-nav {
  display: grid;
  gap: 3px;
  padding: 18px 12px;
}
.global-nav a {
  position: relative;
  display: grid;
  min-height: 42px;
  grid-template-columns: 20px 1fr;
  align-items: center;
  gap: 11px;
  border-radius: 9px;
  padding: 9px 11px;
  color: var(--am-color-muted);
  text-decoration: none;
  transition: background .14s ease, color .14s ease;
}
.global-nav a svg { color: #8b93a1; }
.global-nav a strong { font-size: 13px; font-weight: 560; letter-spacing: -.005em; }
.global-nav a:hover {
  background: var(--am-color-hover);
  color: var(--am-color-text-strong);
}
.global-nav a:hover svg { color: var(--am-color-text); }
.global-nav a[aria-current="page"] {
  background: var(--am-color-accent-soft);
  color: #993f0b;
}
.global-nav a[aria-current="page"]::before {
  position: absolute;
  inset: 10px auto 10px -12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--am-color-accent);
  content: "";
}
.global-nav a[aria-current="page"] svg { color: var(--am-color-accent); }
.global-nav a[aria-current="page"] strong { font-weight: 680; }
.global-sidebar__footer {
  display: grid;
  gap: 3px;
  margin: auto 12px 14px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  padding: 13px 14px;
  background: var(--am-color-surface-soft);
}
.global-sidebar__footer span,
.global-sidebar__footer small { color: var(--am-color-muted); font-size: 10px; }
.global-sidebar__footer strong { color: var(--am-color-text-strong); font-size: 12px; }
.sidebar-website-link {
  display: grid;
  min-height: 38px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--am-color-border);
  padding: 5px 0 11px;
  color: var(--am-color-text);
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}
.sidebar-website-link span { color: inherit; font-size: 11px; }
.sidebar-website-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-website-link:hover,
.sidebar-website-link:focus-visible { color: var(--am-color-accent); }

.global-shell { min-height: 100vh; margin-left: var(--am-sidebar-width); }
.global-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  min-height: var(--am-topbar-height);
  grid-template-columns: minmax(190px, .62fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid var(--am-color-border);
  padding: 8px 32px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
}
.master-mode-bar {
  position: sticky;
  top: var(--am-topbar-height);
  z-index: 29;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #b45309;
  padding: 10px 32px;
  background: #fff7ed;
  box-shadow: 0 6px 16px rgba(120, 53, 15, .08);
  color: #7c2d12;
}
.master-mode-bar > div:first-child {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}
.master-mode-bar strong { color: #9a3412; letter-spacing: .08em; }
.master-mode-bar span { min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.master-mode-bar small { color: #9a5a31; }
.master-mode-bar__actions { display: flex; flex: 0 0 auto; gap: 8px; }
.master-mode-bar__actions form { margin: 0; }
.master-mode-bar__actions button,
.master-mode-bar__actions .button-link { min-height: 36px; }

.master-access-page { display: grid; gap: 24px; }
.master-access-summary,
.master-context-search,
.master-context-form {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 24px;
  background: var(--am-color-surface);
  box-shadow: var(--am-shadow-card);
}
.master-access-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.master-access-summary h2 { margin: 4px 0; }
.master-access-summary p { margin: 0; }
.master-context-search,
.master-context-form { display: grid; gap: 18px; }
.master-context-search__row,
.master-context-actions { display: flex; align-items: center; gap: 12px; }
.master-context-search__row input { flex: 1 1 auto; }
.master-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.master-context-form label,
.master-context-search label { display: grid; min-width: 0; gap: 7px; }
.master-context-form label > span,
.master-context-search > label { font-weight: 700; }
.master-context-form small { color: var(--am-color-muted); }
.master-context-form .field-error { color: var(--am-color-danger); }
.sidebar-toggle {
  display: none;
  width: 38px;
  min-height: 38px;
  border-color: var(--am-color-border);
  padding: 0;
  background: #fff;
  box-shadow: none;
  color: var(--am-color-text);
}
.topbar-greeting {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 6px;
  min-width: 0;
}
.topbar-greeting > span { color: var(--am-color-muted); font-size: 11px; }
.topbar-greeting > strong {
  overflow: hidden;
  color: var(--am-color-text-strong);
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-greeting > time {
  grid-column: 1 / -1;
  color: var(--am-color-subtle);
  font-size: 9px;
}
.global-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 620px;
}
.global-search > svg {
  position: absolute;
  left: 13px;
  z-index: 1;
  color: var(--am-color-muted);
  pointer-events: none;
}
.global-search input {
  min-height: 40px;
  border-color: transparent;
  padding-left: 41px;
  background: var(--am-color-bg-global);
}
.global-search input:hover { border-color: var(--am-color-border); }
.global-search input:focus { border-color: var(--am-color-accent); background: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.test-bootstrap-return {
  border: 1px solid #9a3412;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(154, 52, 18, .22);
  white-space: nowrap;
}
.test-bootstrap-return:hover {
  background: #9a3412;
  border-color: #7c2d12;
}
.test-bootstrap-return__short { display: none; }
.topbar-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--am-color-muted);
  text-decoration: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.topbar-icon:hover {
  border-color: var(--am-color-border);
  background: var(--am-color-hover);
  color: var(--am-color-text);
}
.language-selector {
  display: flex;
  gap: 2px;
  border: 1px solid var(--am-color-border);
  border-radius: 9px;
  padding: 2px;
  background: var(--am-color-surface-soft);
}
.language-selector button {
  min-width: 30px;
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 3px 6px;
  background: transparent;
  box-shadow: none;
  color: var(--am-color-muted);
  font-size: 9px;
}
.language-selector button:hover { background: #fff; color: var(--am-color-text); box-shadow: none; }
.language-selector button[aria-current="true"] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
  color: var(--am-color-text-strong);
}
.profile-menu { position: relative; }
.profile-menu summary { list-style: none; cursor: pointer; }
.profile-menu summary::-webkit-details-marker { display: none; }
.user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--am-color-accent-border);
  border-radius: 9px;
  background: var(--am-color-accent-soft);
  color: #9d410c;
  font-size: 12px;
  font-weight: 750;
}
.profile-menu > div {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  display: grid;
  width: 270px;
  gap: 5px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  padding: 16px;
  background: #fff;
  box-shadow: var(--am-shadow-float);
}
.profile-menu small,
.profile-menu span { color: var(--am-color-muted); }
.profile-menu a {
  margin-top: 8px;
  color: #a74710;
  font-weight: 620;
  text-decoration: none;
}

.global-main {
  width: min(1580px, 100%);
  margin: 0 auto;
  padding: 38px 40px 84px;
}
.page-heading,
.section-heading,
.preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.page-heading > div { max-width: 900px; }
.page-heading p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--am-color-muted);
  font-size: 14px;
}
.eyebrow {
  margin: 0 !important;
  color: #a74710 !important;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
h1 {
  margin: 5px 0 0;
  color: var(--am-color-text-strong);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.1;
}
h2 {
  margin: 0 0 20px;
  color: var(--am-color-text-strong);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.018em;
}
h3 {
  margin: 0 0 12px;
  color: var(--am-color-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}
p { line-height: 1.6; }
section { border-top: 0; padding: 0; }
.work-queue-section { margin-top: 42px; }
.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  align-items: center;
  color: var(--am-color-muted);
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
}
.back-link:hover { color: var(--am-color-text); }
.page-status,
.supporting,
.result-summary,
.preview-warning { color: var(--am-color-muted); }
.page-status {
  border: 1px solid var(--am-color-border);
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  font-size: 11px;
}
.section-heading h2 { margin: 4px 0 0; }

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}
.message {
  margin: 0;
  border: 1px solid var(--am-color-border);
  border-left: 3px solid var(--am-color-border-strong);
  border-radius: var(--am-radius-sm);
  padding: 13px 16px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
  color: var(--am-color-text);
}
.message--success { border-left-color: var(--am-color-success); }
.message--error { border-left-color: var(--am-color-danger); }
.message--warning { border-left-color: var(--am-color-warning); }
.temporary-password-message {
  border: 1px solid var(--am-color-accent-border);
  border-left: 3px solid var(--am-color-accent);
  border-radius: var(--am-radius-md);
  padding: 18px;
  background: var(--am-color-accent-soft);
  box-shadow: var(--am-shadow-card);
}
.temporary-password-message > p { margin: 6px 0 14px; color: var(--am-color-muted); }
.temporary-password-message__actions { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 10px; }
.temporary-password-message code,
.temporary-password-message__value {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  border: 1px solid var(--am-color-border-strong);
  border-radius: var(--am-radius-sm);
  padding: 10px 12px;
  background: #fff;
  color: var(--am-color-text-strong);
  font-size: 14px;
}
.temporary-password-message__value { min-width: min(100%, 360px); font: inherit; }
.temporary-password-message .temporary-password-visibility { position: static; min-width: 44px; min-height: 44px; }

.global-app--read-only form[method="post"]:not(.global-read-only-allowed),
.global-app--read-only a[href*="/create/"],
.global-app--read-only a[href*="/edit/"],
.global-app--read-only a[href*="/profile/"] {
  display: none !important;
}
.temporary-password-copy { min-height: 44px; }
.temporary-password-copy__feedback { min-width: 58px; color: var(--am-color-success); font-size: 12px; font-weight: 700; }

.metric-strip,
.metrics,
.workflow-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
}
.metric-strip { margin-bottom: 34px; }
.metric-strip > div,
.metrics > div,
.workflow-counter {
  display: flex;
  min-height: 128px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 21px 22px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
  color: var(--am-color-text);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.metric-strip span,
.metrics span,
.workflow-counter span {
  color: var(--am-color-muted);
  font-size: 11px;
  font-weight: 680;
  letter-spacing: .025em;
  text-transform: uppercase;
}
.metric-strip strong,
.metrics strong,
.workflow-counter strong {
  color: var(--am-color-text-strong);
  font-size: 34px;
  font-weight: 620;
  letter-spacing: -.035em;
  line-height: 1;
}
.workflow-counter { text-decoration: none; }
.workflow-counter:hover {
  border-color: var(--am-color-accent-border);
  box-shadow: 0 10px 28px rgba(16, 24, 40, .07);
  transform: translateY(-2px);
}
.workflow-counter:focus-visible { border-color: var(--am-color-accent); }

.filter-bar,
.workflow-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 15px;
  align-items: end;
  margin: 0 0 20px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 20px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.global-filter-bar { grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(160px, .7fr)) auto auto; }

.geography-cascade {
  display: contents;
}

.geography-cascade__status {
  color: var(--global-muted, #667085);
  font-size: .82rem;
  grid-column: 1 / -1;
  margin: -.35rem 0 .25rem;
}

.geography-cascade__status:empty {
  display: none;
}
.territory-create-form [data-territory-partner-field] { order: 1; }
.territory-create-form [data-geo-country-field] { order: 2; }
.territory-create-form [data-territory-coverage-field] { order: 3; }
.territory-create-form [data-geo-area-field] { order: 4; }
.territory-create-form .geography-cascade__status { order: 5; }
.territory-partner-context {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-sm);
  background: var(--am-color-surface-soft);
}
.territory-partner-context > span,
.territory-partner-context > small { color: var(--am-color-muted); }
.territory-section-heading { margin-bottom: 12px; }
.territory-section-heading h2 { margin: 0; }
.commercial-territory-list {
  max-height: 430px;
  overflow-y: auto;
}
.territory-section-actions { margin-top: 12px; }
.filter-bar label,
.workflow-filters label,
.form-field {
  display: grid;
  gap: 7px;
}
.filter-bar label > span,
.workflow-filters label > span,
.form-field > label {
  color: var(--am-color-muted);
  font-size: 11px;
  font-weight: 660;
}
.workflow-filter-flags,
.workflow-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.workflow-filter-actions {
  padding-top: 3px;
  border-top: 1px solid var(--am-color-border);
  padding-top: 16px;
}
.workflow-filter-flags label,
.confirm-option {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: var(--am-color-muted);
  font-size: 12px;
}
.workflow-filter-flags input,
.confirm-option input {
  width: 17px;
  min-height: 17px;
  accent-color: var(--am-color-accent);
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fbfcfd;
  color: var(--am-color-muted);
  text-align: left;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .055em;
  text-transform: uppercase;
}
th,
td {
  border-bottom: 1px solid var(--am-color-border);
  padding: 17px 16px;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .14s ease; }
tbody tr:hover { background: var(--am-color-surface-soft); }
td {
  color: var(--am-color-text);
  font-size: 12px;
}
td > small,
td > span,
td > a { display: block; margin-top: 4px; }
td > small { color: var(--am-color-muted); }
.primary-link {
  color: var(--am-color-text-strong);
  font-weight: 700;
  text-decoration-color: #c9ced8;
  text-underline-offset: 3px;
}
.primary-link:hover { color: #9f400b; text-decoration-color: var(--am-color-accent); }
.empty {
  margin: 0;
  padding: 52px 24px;
  color: var(--am-color-muted);
  text-align: center;
}

.status,
.priority,
.signal,
.organization-badge,
.future-badge,
.preview-badge {
  display: inline-flex;
  width: max-content;
  min-height: 24px;
  align-items: center;
  border: 1px solid var(--am-color-border-strong);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--am-color-surface-soft);
  color: var(--am-color-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .035em;
  line-height: 1;
  text-transform: uppercase;
}
.status--active,
.status--approved,
.status--generated,
.status--sent,
.status--promoted,
.status--reviewed,
.status--selected,
.status--workflow-accepted,
.status--workflow-closed {
  border-color: #b8dec9;
  background: var(--am-color-success-soft);
  color: var(--am-color-success);
}
.status--inactive,
.status--failed,
.status--rejected,
.status--discontinued,
.status--workflow-declined,
.status--workflow-cancelled {
  border-color: #efb8b4;
  background: var(--am-color-danger-soft);
  color: var(--am-color-danger);
}
.status--pending,
.status--draft,
.status--generating,
.status--retrying,
.status--workflow-needs_clarification,
.status--workflow-quote_ready,
.priority--high,
.signal--warning {
  border-color: #efd39a;
  background: var(--am-color-warning-soft);
  color: var(--am-color-warning);
}
.priority--urgent,
.signal--danger {
  border-color: #efb8b4;
  background: var(--am-color-danger-soft);
  color: var(--am-color-danger);
}
.future-badge {
  border-color: var(--am-color-accent-border);
  background: var(--am-color-accent-soft);
  color: #a74710;
}
.organization-badge {
  min-height: 30px;
  border-color: var(--am-color-accent-border);
  padding: 5px 11px;
  background: var(--am-color-accent-soft);
  color: #9d410c;
}

.entity-form {
  max-width: 1020px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 28px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.form-field--full { grid-column: 1 / -1; }
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-field input {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  margin-top: 2px;
}
.form-field--hidden,
.form-field[hidden] { display: none; }
.form-field small { color: var(--am-color-muted); font-size: 11px; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-visibility-toggle {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-grid;
  width: 44px;
  height: 100%;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: 0 9px 9px 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--am-color-muted);
  cursor: pointer;
}
.password-visibility-toggle:hover { background: var(--am-color-hover); color: var(--am-color-text); box-shadow: none; transform: none; }
.password-visibility-toggle:focus-visible { z-index: 1; }
.password-visibility-toggle__icon { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.password-visibility-toggle__icon--hide { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-visibility-toggle__icon--show { display: none; }
.password-visibility-toggle[aria-pressed="true"] .password-visibility-toggle__icon--hide { display: block; }
.field-error { color: var(--am-color-danger); font-size: 11px; }
.form-field--error input,
.form-field--error select { border-color: var(--am-color-danger); }
.form-alert {
  grid-column: 1 / -1;
  border: 1px solid #f2c1bd;
  border-left: 3px solid var(--am-color-danger);
  border-radius: var(--am-radius-sm);
  padding: 11px 13px;
  background: var(--am-color-danger-soft);
}
.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--am-color-border);
}

.record-list,
.workflow-recent-list,
.workflow-record-list,
.workflow-timeline {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.record-list > a,
.record-list > div,
.workflow-recent-list > a,
.workflow-record-list > article,
.workflow-timeline > article {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(220px, 1.4fr) auto;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--am-color-border);
  padding: 17px 19px;
  color: var(--am-color-text);
  text-decoration: none;
}
.record-list > a:hover,
.workflow-recent-list > a:hover { background: var(--am-color-hover); }
.record-list > :last-child,
.workflow-recent-list > :last-child { border-bottom: 0; }
.record-list span:not(.status),
.record-list small,
.workflow-recent-list span,
.workflow-recent-list time {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--am-color-muted);
}

.notice {
  margin-bottom: 20px;
  border: 1px solid var(--am-color-border);
  border-left: 3px solid var(--am-color-accent);
  border-radius: var(--am-radius-md);
  padding: 16px 18px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.notice p { margin: 4px 0 0; color: var(--am-color-muted); }
.customer-identity-panel {
  margin-bottom: 20px;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  background: var(--am-color-surface);
  box-shadow: var(--am-shadow-card);
}
.customer-identity-panel .section-heading { margin-bottom: 16px; }
.customer-identity-panel h2 { margin: 0; }
.customer-identity-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.customer-identity-grid > div {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 14px;
  border-radius: var(--am-radius-sm);
  background: var(--am-color-surface-soft);
}
.customer-identity-grid span { color: var(--am-color-muted); font-size: 12px; }
.customer-identity-grid strong { overflow-wrap: anywhere; }
.customer-admin-actions {
  margin-top: 28px;
  border-left: 3px solid var(--am-color-border-strong);
}
.customer-admin-actions > summary {
  cursor: pointer;
  color: var(--am-color-text);
}
.customer-admin-actions__content { margin-top: 20px; }
.customer-admin-actions__content > :last-child { margin-bottom: 0; }
.network-removal {
  border-left-color: var(--am-color-danger);
}

@media (max-width: 900px) {
  .customer-identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .customer-identity-grid { grid-template-columns: 1fr; }
}
.network-removal__form {
  display: grid;
  max-width: 680px;
  gap: 12px;
  margin-top: 16px;
}
.network-removal__form label:not(.network-removal__confirmation) {
  display: grid;
  gap: 6px;
}
.network-removal__confirmation {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.network-removal__confirmation input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}
.network-removal__form .button-danger {
  justify-self: start;
}
.network-removal details { margin-top: 14px; }
.future-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  border-top: 0;
}
.future-grid article {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 22px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.future-grid article h2 { margin-top: 15px; }
.future-grid article p { color: var(--am-color-muted); }
.system-hub-heading { margin-bottom: 32px; }
.system-hub-section,
.system-information { margin-top: 34px; }
.system-hub-section > .section-heading,
.system-information > .section-heading { margin-bottom: 16px; }
.system-hub-section > .section-heading h2,
.system-information > .section-heading h2 { margin-bottom: 0; }
.system-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.system-hub-grid--advanced { grid-template-columns: minmax(0, 1fr); }
.system-hub-card {
  display: flex;
  min-width: 0;
  min-height: 190px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 24px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.system-hub-grid--advanced .system-hub-card { min-height: 150px; }
.system-hub-card h3 {
  margin: 0 0 10px;
  color: var(--am-color-text-strong);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.015em;
  text-transform: none;
}
.system-hub-card p { margin: 0; color: var(--am-color-muted); }
.system-hub-card p + p { margin-top: 9px; }
.system-hub-card .button-link { max-width: 100%; }
.system-hub-card__access {
  color: var(--am-color-muted);
  font-size: 12px;
  font-weight: 650;
}
.system-information {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 24px;
  background: var(--am-color-surface-soft);
}
.system-information .section-heading p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--am-color-muted);
}
.system-information-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  background: var(--am-color-border);
}
.system-information-grid > div {
  min-width: 0;
  padding: 18px;
  background: #fff;
}
.system-information-grid dt {
  margin-bottom: 8px;
  color: var(--am-color-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.system-information-grid dd {
  min-width: 0;
  margin: 0;
  color: var(--am-color-text-strong);
  overflow-wrap: anywhere;
}
.system-information-grid dd code {
  max-width: 100%;
  white-space: normal;
}
.system-information-grid small {
  display: block;
  margin-top: 7px;
  color: var(--am-color-muted);
  line-height: 1.45;
}
@media (max-width: 700px) {
  .system-hub-grid,
  .system-information-grid { grid-template-columns: 1fr; }
  .system-hub-card { min-height: 0; padding: 20px; }
  .system-information { padding: 18px; }
}
.row-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-actions { margin: 26px 0 34px; }
.quick-actions__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
}
.quick-action {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  padding: 14px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
  color: var(--am-color-text-strong);
  font-size: 12px;
  font-weight: 680;
  text-decoration: none;
}
.quick-action span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--am-color-accent-soft);
  color: var(--am-color-accent);
  font-size: 16px;
}
.quick-action:hover { border-color: var(--am-color-accent-border); background: #fffcfa; }
.page-actions,
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.section-tabs {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  contain: inline-size;
  overflow-x: auto;
  gap: 4px;
  margin: -8px 0 24px;
  border-bottom: 1px solid var(--am-color-border);
  scrollbar-width: thin;
}
.section-tabs a {
  flex: 0 0 auto;
  border-bottom: 2px solid transparent;
  padding: 11px 13px;
  color: var(--am-color-muted);
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.section-tabs a:hover { color: var(--am-color-text-strong); }
.section-tabs a[aria-current="page"] {
  border-bottom-color: var(--am-color-accent);
  color: #9d410c;
}
.section-tabs--wrap { flex-wrap: wrap; overflow: visible; }
.settings-section { margin-top: 12px; }
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.detail-grid > article,
.report-sector {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 22px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.detail-grid h2 { margin-top: 0; }
.detail-grid dl { display: grid; gap: 12px; margin: 0; }
.detail-grid dl > div { border-bottom: 1px solid var(--am-color-border); padding-bottom: 10px; }
.detail-grid dt { color: var(--am-color-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.detail-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.detail-grid pre { margin: 0; white-space: pre-wrap; }
.account-detail-heading > div,
.account-detail-grid > article,
.account-detail-grid .row-actions,
.account-detail-grid .row-actions > * { min-width: 0; }
.account-detail-heading h1 { overflow-wrap: anywhere; }
.account-detail-grid .row-actions > *,
.account-detail-grid .button-small { max-width: 100%; }
.account-detail-grid .button-small {
  height: auto;
  white-space: normal;
  overflow-wrap: anywhere;
}
.report-sector { margin-top: 18px; padding: 0; overflow: hidden; }
.report-sector .section-heading { padding: 18px 20px 0; }
.report-sector .table-shell { border: 0; border-radius: 0; box-shadow: none; }
.daily-archive-list > div > div:first-child,
.report-revision-history .record-list > div > div:first-child { display: grid; gap: 6px; }
.daily-archive-list > div > div:nth-child(2) { display: grid; gap: 4px; }
.daily-archive-list .row-actions,
.report-revision-history .row-actions { justify-content: flex-end; }
.report-admin-actions > summary,
.report-revision-history > summary { cursor: pointer; }
.report-revision-history > summary { display: flex; justify-content: space-between; gap: 16px; }
.report-revision-history > summary span { color: var(--am-color-muted); font-size: 12px; }
.report-admin-form {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, .4fr) auto;
  gap: 16px;
  align-items: end;
  margin-top: 20px;
}
.report-admin-form p { margin: 5px 0 0; color: var(--am-color-muted); }
.report-admin-form label { display: grid; gap: 5px; }
.report-failed-state { border-left-color: var(--am-color-danger); background: var(--am-color-danger-soft); }
.report-failed-state p,
.report-failed-state p strong { color: #7a271a; }
.report-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.audit-filter-bar { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
@media (max-width: 1280px) {
  .quick-actions__grid { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}
@media (max-width: 680px) {
  .quick-actions__grid { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .section-tabs--wrap { flex-wrap: nowrap; overflow-x: auto; }
}
@media (max-width: 420px) {
  .quick-actions__grid { grid-template-columns: 1fr; }
}
.row-actions form { margin: 0; }
.button-small { min-height: 32px; padding: 5px 9px; font-size: 10px; }
.account-record-link { display: inline-grid; gap: 3px; color: inherit; }
.account-record-link strong { text-decoration: underline; text-decoration-color: var(--am-color-accent); text-underline-offset: 3px; }
.account-record-link:focus-visible { outline: 3px solid var(--am-color-focus); outline-offset: 3px; }
.work-queue-table { min-width: 1160px; }
.work-queue-row { cursor: pointer; }
.work-queue-row:focus-visible {
  outline: 3px solid var(--am-color-focus);
  outline-offset: -3px;
}
.work-queue-row td:first-child {
  position: relative;
  border-left: 3px solid transparent;
}
.work-queue-row:hover td:first-child { border-left-color: var(--am-color-accent); }
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 20px;
  color: var(--am-color-muted);
}
.pagination a { color: #a74710; font-weight: 620; }

.queue-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 80;
  width: min(var(--am-panel-width), calc(100vw - 16px));
  overflow: auto;
  border: 0;
  border-left: 1px solid var(--am-color-border);
  padding: 0;
  background: var(--am-color-bg-global);
  box-shadow: -24px 0 64px rgba(16, 24, 40, .16);
}
.queue-drawer > div { min-height: 100%; padding: 24px; }
.queue-drawer__header {
  position: sticky;
  top: -24px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: -24px -24px 20px;
  border-bottom: 1px solid var(--am-color-border);
  padding: 22px 24px 18px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
}
.queue-drawer__header h2 {
  max-width: 340px;
  margin: 4px 0 0;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.queue-drawer__header [data-preview-close] {
  width: 34px;
  min-height: 34px;
  flex: 0 0 auto;
  border-radius: 9px;
  padding: 0;
  font-size: 18px;
}
.queue-drawer__status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.queue-preview-sections { display: grid; gap: 14px; }
.queue-preview-section {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  padding: 17px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.queue-preview-section h3 { margin-bottom: 13px; }
.queue-preview-data {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  background: transparent;
}
.queue-preview-data > div {
  min-width: 0;
  padding: 11px 12px 11px 0;
  border-top: 1px solid var(--am-color-border);
  background: transparent;
}
.queue-preview-data > div:nth-child(even) { padding-right: 0; padding-left: 12px; }
.queue-preview-data > div:nth-child(-n+2) { border-top: 0; }
.queue-preview-data__wide { grid-column: 1 / -1; padding-right: 0 !important; padding-left: 0 !important; }
.queue-preview-data--single { grid-template-columns: 1fr; }
.queue-preview-data--single > div { border-top: 0; padding: 0; }
.queue-drawer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  padding: 17px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.queue-drawer__actions h3,
.queue-drawer__actions > .button-link--primary {
  grid-column: 1 / -1;
}
.queue-drawer__actions form,
.queue-drawer__actions button,
.queue-drawer__actions a { width: 100%; }
.queue-drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(31, 41, 55, .28);
  backdrop-filter: blur(2px);
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  background: var(--am-color-border);
}
.data-grid div { min-width: 0; padding: 15px; background: #fff; }
dt {
  color: var(--am-color-muted);
  font-size: 10px;
  font-weight: 730;
  letter-spacing: .045em;
  text-transform: uppercase;
}
dd {
  margin: 6px 0 0;
  color: var(--am-color-text);
  overflow-wrap: anywhere;
}
code {
  color: #4b5563;
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
}
.detail-aside {
  border-left: 1px solid var(--am-color-border);
  padding-left: 28px;
}
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.actions,
.asset-row__actions,
.heading-actions,
.status-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}
.asset-list,
.event-list {
  overflow: hidden;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.asset-row,
.event-list > div {
  border-bottom: 1px solid var(--am-color-border);
  padding: 14px 16px;
}
.asset-row:last-child,
.event-list > div:last-child { border-bottom: 0; }

.active-fabric-count {
  display: grid;
  justify-items: end;
  gap: 2px;
  margin: 0;
  color: var(--am-color-muted);
}
.active-fabric-count strong {
  color: var(--am-color-text-strong);
  font-size: 32px;
  font-weight: 620;
  letter-spacing: -.03em;
}
.site-workspace-status {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 20px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.site-workspace-status__heading { padding-bottom: 16px; }
.site-workspace-metrics {
  overflow: hidden;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  background: var(--am-color-border);
}
.site-workspace-metrics div { border-color: var(--am-color-border); background: #fff; }
.site-workspace-actions {
  padding-top: 18px;
  border-top-color: var(--am-color-border);
}
.site-workspace-status__issues {
  border: 1px solid #f2c1bd;
  border-radius: var(--am-radius-sm);
  background: var(--am-color-danger-soft);
}
.operational-toolbar {
  min-height: 76px;
  margin: 24px 0 18px;
  border: 0;
  border-radius: var(--am-radius-md);
  padding: 0;
}
.fabric-card-grid,
.private-catalog-grid { gap: 18px; }
.operational-fabric-card,
.private-catalog-card {
  overflow: hidden;
  border-color: var(--am-color-border);
  border-radius: var(--am-radius-lg);
  background: #fff;
  box-shadow: var(--am-shadow-card);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.operational-fabric-card:hover,
.private-catalog-card:hover {
  border-color: #d7dbe3;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .07);
  transform: translateY(-2px);
}
.operational-fabric-card__body { padding: 18px; }
.operational-fabric-card__actions {
  border-top-color: var(--am-color-border);
  padding: 15px 18px;
  background: #fbfcfd;
}
.operational-empty {
  border-color: var(--am-color-border);
  border-radius: var(--am-radius-lg);
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.catalog-filter-bar {
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-lg);
  padding: 18px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.replacement-notice,
.color-disclaimer {
  border-radius: var(--am-radius-sm);
  background: #fff;
  color: var(--am-color-muted);
}
.batch-toolbar {
  margin-bottom: 18px;
  border: 1px solid var(--am-color-border);
  border-radius: var(--am-radius-md);
  padding: 15px 17px;
  background: #fff;
}

.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(31, 41, 55, .28);
  backdrop-filter: blur(2px);
}

@media (max-width: 1280px) {
  :root { --am-sidebar-width: 220px; }
  .global-topbar {
    grid-template-columns: minmax(175px, .64fr) minmax(230px, 1fr) auto;
    padding-inline: 24px;
  }
  .global-main { padding-inline: 28px; }
  .filter-bar,
  .workflow-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .global-filter-bar { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 980px) {
  .global-sidebar {
    transform: translateX(-101%);
    box-shadow: var(--am-shadow-float);
    transition: transform .2s ease;
  }
  .global-sidebar.is-open { transform: none; }
  .sidebar-close,
  .sidebar-toggle { display: inline-flex; }
  .global-shell { margin-left: 0; }
  .global-topbar {
    grid-template-columns: auto minmax(160px, 1fr) auto;
    padding-inline: 20px;
  }
  .master-mode-bar { padding-inline: 20px; }
  .master-context-grid { grid-template-columns: 1fr; }
  .global-search {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
  }
  .topbar-greeting time { display: none; }
  .metric-strip,
  .metrics,
  .workflow-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-admin-form { grid-template-columns: 1fr 1fr; }
  .report-admin-form > div { grid-column: 1 / -1; }
  .detail-layout,
  .split { grid-template-columns: 1fr; }
  .detail-aside {
    border-top: 1px solid var(--am-color-border);
    border-left: 0;
    padding: 26px 0 0;
  }
  .form-grid { grid-template-columns: 1fr; }
  .future-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .global-topbar {
    min-height: 60px;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 8px 14px;
  }
  .master-mode-bar {
    top: 60px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }
  .master-mode-bar > div:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
  .master-mode-bar__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .master-mode-bar__actions form,
  .master-mode-bar__actions button,
  .master-mode-bar__actions .button-link { width: 100%; }
  .master-access-summary,
  .master-context-search,
  .master-context-form { padding: 18px; }
  .master-access-summary,
  .master-context-search__row,
  .master-context-actions { align-items: stretch; flex-direction: column; }
  .topbar-greeting > span,
  .topbar-greeting > time,
  .topbar-actions .topbar-icon { display: none; }
  .topbar-greeting { display: block; }
  .topbar-actions {
    min-width: 0;
    gap: 5px;
  }
  .sidebar-toggle,
  .sidebar-close,
  .language-selector button,
  .profile-menu summary,
  .user-avatar {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  .global-nav a,
  .sidebar-utility-link,
  .global-main button:not([type="checkbox"]):not([type="radio"]),
  .global-main .button-link {
    min-height: 44px;
  }
  .global-search,
  .global-search input,
  .global-main,
  .global-main > * {
    min-width: 0;
  }
  .global-main { padding: 26px 14px 56px; }
  .page-heading,
  .section-heading,
  .preview-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .page-heading { margin-bottom: 24px; }
  .page-heading .button-link { width: 100%; }
  h1 { font-size: 30px; }
  .metric-strip,
  .metrics,
  .workflow-dashboard {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .metric-strip > div,
  .metrics > div,
  .workflow-counter {
    min-height: 112px;
    padding: 17px;
  }
  .metric-strip strong,
  .metrics strong,
  .workflow-counter strong { font-size: 30px; }
  .work-queue-section { margin-top: 34px; }
  .filter-bar,
  .workflow-filters,
  .global-filter-bar {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .workflow-filter-flags,
  .workflow-filter-actions { grid-column: 1; }
  .entity-form { padding: 19px; }
  .form-actions { flex-direction: column; }
  .form-actions > * { width: 100%; }
  .record-list > a,
  .record-list > div,
  .workflow-recent-list > a {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 17px;
  }
  .daily-archive-list .row-actions,
  .report-revision-history .row-actions { justify-content: flex-start; }
  .report-admin-form { grid-template-columns: 1fr; }
  .report-admin-form > div { grid-column: auto; }
  .report-admin-form button { width: 100%; }
  .report-revision-history > summary { align-items: flex-start; flex-direction: column; }
  .responsive-table {
    overflow: clip;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .responsive-table table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .responsive-table table,
  .responsive-table tbody,
  .responsive-table tr {
    contain: inline-size;
  }
  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    contain: strict;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
  }
  .responsive-table thead th { position: static; }
  .responsive-table tbody { display: grid; gap: 13px; }
  .responsive-table tr {
    border: 1px solid var(--am-color-border);
    border-radius: var(--am-radius-lg);
    padding: 11px 16px;
    background: #fff;
    box-shadow: var(--am-shadow-card);
  }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(108px, .72fr) 1fr;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid var(--am-color-border);
    padding: 12px 0;
  }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td > * {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: var(--am-color-muted);
    font-size: 10px;
    font-weight: 720;
    letter-spacing: .035em;
    text-transform: uppercase;
  }
  .responsive-table td.empty { display: block; padding: 32px 10px; }
  .responsive-table td.empty::before { content: none; }
  .row-actions { grid-column: 1 / -1; }
  .queue-drawer { width: min(100vw, 480px); }
  .queue-drawer > div { padding: 16px; }
  .queue-drawer__header {
    top: -16px;
    margin: -16px -16px 18px;
    padding: 18px 16px;
  }
  .queue-preview-data { grid-template-columns: 1fr; }
  .queue-preview-data > div,
  .queue-preview-data > div:nth-child(even) {
    border-top: 1px solid var(--am-color-border);
    padding: 11px 0;
  }
  .queue-preview-data > div:first-child { border-top: 0; }
  .queue-preview-data__wide { grid-column: auto; }
  .queue-drawer__actions { grid-template-columns: 1fr; }
  .queue-drawer__actions h3,
  .queue-drawer__actions > .button-link--primary { grid-column: 1; }
}

@media (max-width: 420px) {
  .temporary-password-message__actions { align-items: stretch; }
  .temporary-password-message code,
  .temporary-password-copy { width: 100%; }
  .temporary-password-copy__feedback { min-width: 0; }
  .test-bootstrap-return__long { display: none; }
  .test-bootstrap-return__short { display: inline; }
  .profile-menu { display: none; }
}

@media (max-width: 430px) {
  .metric-strip,
  .metrics,
  .workflow-dashboard { grid-template-columns: 1fr; }
  .profile-menu > div {
    right: -8px;
    width: min(270px, calc(100vw - 28px));
  }
}

@media (pointer: coarse) {
  button,
  .button-link,
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  summary,
  .topbar-icon,
  .global-nav a,
  .sidebar-utility-link,
  .sidebar-website-link {
    min-height: 44px !important;
  }

  .language-selector button,
  .sidebar-toggle,
  .sidebar-close,
  .profile-menu summary,
  .user-avatar,
  .topbar-icon {
    min-width: 44px !important;
  }
}

/* Natural Flow: official portal shell */
.global-brand img {
  height: 34px;
  padding: 0;
  background: transparent;
}
.global-sidebar__footer { gap: 5px; }
.sidebar-utility-link {
  display: grid;
  min-height: 38px;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 9px;
  margin: -5px -5px 7px;
  border-bottom: 1px solid var(--am-color-border);
  padding: 5px 5px 11px;
  color: var(--am-color-text);
  font-weight: 650;
  text-decoration: none;
}
.sidebar-utility-link svg,
.natural-home svg,
.company-portal-card svg,
.work-mode-banner svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-utility-link:hover { color: var(--am-color-accent); }
.topbar-greeting {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
}
.topbar-greeting > span {
  color: #a74710;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
}
.topbar-greeting > strong {
  font-size: 14px;
  font-weight: 680;
}

.natural-home {
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--am-topbar-height) - 122px);
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--am-color-border);
  border-radius: 22px;
  padding: clamp(46px, 8vw, 104px) 28px;
  background:
    radial-gradient(circle at 74% 22%, rgba(231, 102, 28, .08), transparent 30%),
    linear-gradient(145deg, #fff 0%, #fbfbfa 70%, #f7f5f2 100%);
  box-shadow: var(--am-shadow-card);
  text-align: center;
}
.natural-home__logo {
  position: absolute;
  right: clamp(30px, 7vw, 110px);
  bottom: clamp(24px, 6vw, 78px);
  width: clamp(190px, 26vw, 390px);
  opacity: .035;
  pointer-events: none;
}
.natural-home__content {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 820px);
  min-width: 0;
  justify-items: center;
}
.natural-home h1 {
  width: 100%;
  max-width: 780px;
  margin-top: 11px;
  font-size: clamp(38px, 5.4vw, 70px);
  font-weight: 560;
  letter-spacing: -.052em;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.natural-home__message {
  max-width: 660px;
  margin: 23px 0 0;
  color: var(--am-color-muted);
  font-size: clamp(18px, 2.2vw, 27px);
  line-height: 1.45;
}
.natural-home__message strong {
  color: var(--am-color-text-strong);
  font-weight: 680;
}
.natural-home__start {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  gap: 15px;
  margin-top: 38px;
  border: 1px solid var(--am-color-accent);
  border-radius: 999px;
  padding: 13px 25px 12px 29px;
  background: var(--am-color-accent);
  box-shadow: 0 8px 24px rgba(183, 70, 6, .17);
  color: #24140c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}
.natural-home__start:hover {
  background: var(--am-color-accent-hover);
  transform: translateY(-1px);
}
.natural-home__success {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin-bottom: 21px;
  border: 1px solid #b9ddca;
  border-radius: 50%;
  background: var(--am-color-success-soft);
  color: var(--am-color-success);
  font-size: 29px;
  font-weight: 600;
}
.natural-home__tools {
  display: grid;
  width: min(100%, 740px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin-top: 38px;
}
.natural-home__tools a {
  display: grid;
  min-height: 58px;
  grid-template-columns: 21px 1fr 18px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--am-color-border);
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .88);
  color: var(--am-color-text);
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.natural-home__tools a:hover {
  border-color: var(--am-color-accent-border);
  box-shadow: 0 7px 20px rgba(20, 20, 18, .06);
  transform: translateY(-1px);
}
.natural-home__tools a svg:first-child { color: var(--am-color-accent); }
.natural-home__tools a svg:last-child { color: var(--am-color-subtle); }

.companies-heading { margin-bottom: 32px; }
.companies-portals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.companies-portals > :only-child { grid-column: 1 / -1; width: min(100%, 760px); }
.company-portal-card {
  display: flex;
  min-height: 390px;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--am-color-border);
  border-radius: 20px;
  padding: clamp(25px, 4vw, 42px);
  background: #fff;
  box-shadow: var(--am-shadow-card);
}
.company-portal-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 25px;
  border-radius: 14px;
  background: var(--am-color-accent-soft);
  color: var(--am-color-accent);
}
.company-portal-card__icon svg { width: 24px; height: 24px; }
.company-portal-card h2 {
  margin: 7px 0 7px;
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: -.04em;
}
.company-portal-card > p:not(.eyebrow) {
  max-width: 500px;
  margin: 0 0 23px;
  color: var(--am-color-muted);
}
.company-portal-card__count {
  margin-top: auto;
  color: var(--am-color-text-strong);
  font-size: 43px;
  font-weight: 580;
  letter-spacing: -.05em;
  line-height: 1;
}
.company-portal-card > span { margin-top: 6px; color: var(--am-color-muted); font-size: 12px; }
.company-portal-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}
.companies-account-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 34px;
}
.companies-account-strip a {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border: 1px solid var(--am-color-border);
  border-radius: 13px;
  padding: 15px 18px;
  background: #fff;
  color: var(--am-color-muted);
  text-decoration: none;
}
.companies-account-strip a:hover { border-color: var(--am-color-accent-border); }
.companies-account-strip strong { color: var(--am-color-text-strong); font-size: 23px; }

.work-mode .global-main { position: relative; }
.work-mode-banner {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: -13px 0 28px;
  border: 1px solid var(--am-color-accent-border);
  border-radius: 13px;
  padding: 11px 15px 11px 18px;
  background: var(--am-color-accent-soft);
}
.work-mode-banner > span { display: grid; }
.work-mode-banner strong {
  color: #9b3f0c;
  font-size: 10px;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.work-mode-banner small { color: var(--am-color-muted); }
.work-mode-banner a {
  color: #923b0a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.focus-mode-toggle {
  position: fixed;
  top: calc(var(--am-topbar-height) + 16px);
  right: 26px;
  z-index: 42;
  min-height: 34px;
  border-color: var(--am-color-border-strong);
  border-radius: 999px;
  padding: 5px 8px 5px 12px;
  background: #fff;
  box-shadow: var(--am-shadow-card);
  color: var(--am-color-muted);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.focus-mode-toggle i {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 99px;
  background: #d8d8d2;
  transition: background .2s ease;
}
.focus-mode-toggle i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  content: "";
  transition: transform .2s ease;
}
.focus-mode-toggle[aria-pressed="true"] {
  border-color: var(--am-color-accent-border);
  color: #9b3f0c;
}
.focus-mode-toggle[aria-pressed="true"] i { background: var(--am-color-accent); }
.focus-mode-toggle[aria-pressed="true"] i::after { transform: translateX(12px); }
body.focus-mode .global-topbar,
body.focus-mode .work-mode-banner,
body.focus-mode .back-link,
body.focus-mode .global-main > .page-heading {
  display: none;
}
body.focus-mode .focus-mode-toggle { top: 18px; }
body.focus-mode .global-main { padding-top: 70px; }

.portal-login-page {
  background:
    radial-gradient(circle at 12% 15%, rgba(231, 102, 28, .1), transparent 26%),
    linear-gradient(145deg, #f8f7f4, #eef0f3);
}
.portal-login-shell {
  display: grid;
  width: min(100%, 1040px);
  grid-template-columns: minmax(0, 1.18fr) minmax(350px, .82fr);
  overflow: hidden;
  border: 1px solid rgba(215, 219, 227, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 28px 90px rgba(16, 24, 40, .14);
}
.portal-login-intro {
  display: flex;
  min-height: 570px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 7vw, 76px);
  background:
    radial-gradient(circle at 85% 15%, rgba(231, 102, 28, .16), transparent 29%),
    #f8f7f4;
}
.portal-login-intro img { width: min(260px, 72%); margin-bottom: 65px; }
.portal-login-intro h1 {
  max-width: 510px;
  margin-top: 11px;
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 560;
}
.portal-login-intro > p:last-child {
  max-width: 510px;
  margin: 24px 0 0;
  color: var(--am-color-muted);
  font-size: 16px;
}
.portal-login-shell .portal-login-card {
  display: flex;
  width: 100%;
  min-height: 570px;
  flex-direction: column;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--am-color-border);
  border-radius: 0;
  padding: clamp(30px, 5vw, 56px);
  box-shadow: none;
}
.portal-login-shell .portal-login-card h2 {
  margin: 9px 0 5px;
  font-size: 30px;
}
.portal-login-shell .portal-login-card > p:not(.eyebrow) {
  margin: 0;
  color: var(--am-color-muted);
}
.portal-access-card form { margin-top: 20px; }

@media (max-width: 900px) {
  .companies-portals { grid-template-columns: 1fr; }
  .companies-portals > :only-child { grid-column: auto; width: 100%; }
  .portal-login-shell { grid-template-columns: 1fr; }
  .portal-login-intro { min-height: auto; padding: 42px; }
  .portal-login-intro img { width: 200px; margin-bottom: 36px; }
  .portal-login-intro h1 { font-size: clamp(36px, 9vw, 52px); }
  .portal-login-shell .portal-login-card {
    min-height: auto;
    border-top: 1px solid var(--am-color-border);
    border-left: 0;
    padding: 42px;
  }
}

@media (max-width: 700px) {
  .natural-home { min-height: calc(100vh - var(--am-topbar-height) - 70px); padding: 48px 18px; }
  .natural-home__tools { grid-template-columns: 1fr; }
  .companies-account-strip { grid-template-columns: 1fr; }
  .focus-mode-toggle { top: 11px; right: 14px; }
}

@media (max-width: 480px) {
  .portal-login-page { padding: 12px; }
  .portal-login-intro,
  .portal-login-shell .portal-login-card { padding: 28px 22px; }
  .portal-login-intro img { margin-bottom: 27px; }
  .portal-login-intro h1 { font-size: 36px; }
  .natural-home h1 { font-size: 28px; letter-spacing: -.03em; }
  .company-portal-card__actions { display: grid; width: 100%; }
}

.profile-menu .profile-menu__danger-link { color: #a32921; }
.request-reset-page { display: grid; gap: 24px; }
.request-reset-environment {
  align-self: flex-start;
  border: 1px solid #e6b6b1;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff5f4;
  color: #8d261f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.request-reset-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 20px;
  align-items: start;
}
.request-reset-card { min-width: 0; margin: 0; }
.request-reset-card .table-wrap { max-width: 100%; overflow-x: auto; }
.request-reset-card--protected { border-color: #bdd9c7; background: #f7fcf8; }
.request-reset-total {
  display: grid;
  min-width: 56px;
  min-height: 56px;
  place-items: center;
  border-radius: 18px;
  background: #fff0ee;
  color: #9d271f;
  font-size: 24px;
}
.request-reset-table th:last-child,
.request-reset-table td:last-child { width: 92px; text-align: right; }
.request-reset-action {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #dfaaa5;
  border-radius: 18px;
  padding: 22px;
  background: #fff8f7;
}
.request-reset-action p { max-width: 720px; margin: 5px 0 0; color: var(--am-color-muted); }
.request-reset-notice--error { border-color: #dfaaa5; background: #fff3f2; }
.request-reset-notice--success { border-color: #bdd9c7; background: #f3fbf5; }
.request-reset-backup {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}
.request-reset-backup div { min-width: 0; }
.request-reset-backup dt { color: var(--am-color-muted); font-size: 12px; text-transform: uppercase; }
.request-reset-backup dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.request-reset-dialog {
  width: min(92vw, 570px);
  border: 1px solid #dfaaa5;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 28px 90px rgba(16, 24, 40, .22);
}
.request-reset-dialog::backdrop { background: rgba(16, 24, 40, .55); }
.request-reset-dialog h2 { margin: 6px 0 12px; }
.request-reset-dialog label { display: block; margin: 22px 0 8px; font-weight: 700; }
.request-reset-dialog input { width: 100%; }
.request-reset-dialog .form-actions { margin-top: 22px; }

@media (max-width: 1024px) {
  .request-reset-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .request-reset-action { align-items: stretch; flex-direction: column; }
  .request-reset-action .button-danger { width: 100%; }
  .request-reset-backup { grid-template-columns: 1fr; }
  .request-reset-dialog { padding: 22px; }
  .request-reset-dialog .form-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Final portal-detail accessibility and narrow-screen safeguards. */
.practice-original-badge,
.partner-unit-id,
.partner-quantity {
  color: #963a00 !important;
}

.practice-step--current .practice-step__marker {
  border-color: #a64000;
  background: #a64000;
}

@media (max-width: 900px) {
  .workflow-record-list > article,
  .workflow-timeline > article {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-record-list > article > *,
  .workflow-timeline > article > * {
    min-width: 0;
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
  }
}

/* Shared responsive primitives for additive portal workflows. */
.global-panel {
  min-width: 0;
  margin-bottom: 24px;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
  border: 1px solid #e7e9ee;
  border-radius: 14px;
  background: #fff;
}

.global-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.global-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.global-table th,
.global-table td {
  padding: 12px;
  border-bottom: 1px solid #e7e9ee;
  text-align: left;
  vertical-align: top;
}

.global-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px;
  min-width: 0;
}

.global-form label { min-width: 0; font-weight: 650; }
.global-form input,
.global-form select,
.global-form textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border: 1px solid #cfd3d8;
}
.global-form button { align-self: end; justify-self: start; }
.global-form > .global-table-wrap { grid-column: 1 / -1; }
.global-form__full { grid-column: 1 / -1; }
.global-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #e0e3e7;
  border-radius: 10px;
}
.global-form fieldset legend { padding: 0 6px; font-weight: 750; }
.global-form fieldset label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 8px 22px 0 0;
}
.global-form input[type="radio"] {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin: 0;
}
.installation-fields {
  padding: 16px;
  border: 1px solid #f2c8ad;
  border-radius: 12px;
  background: #fff9f5;
}
.installation-fields[hidden],
.global-form label[hidden] { display: none; }
.installation-fields h3 { margin: 0 0 12px; }
.quotation-history + .quotation-history { margin-top: 22px; padding-top: 22px; border-top: 1px solid #e7e9ee; }
.quotation-version { margin-top: 12px; padding: 14px; border-radius: 10px; background: #f7f8f6; }
.quotation-version ul { margin: 8px 0 12px; padding-left: 20px; }

@media (max-width: 767px) {
  .global-panel { padding: 16px; }
  .global-table { min-width: 680px; }

  .global-table-wrap--project-cards {
    overflow: visible;
  }

  .global-table--project-cards {
    min-width: 0;
  }

  .global-table--project-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .global-table--project-cards tbody,
  .global-table--project-cards tr,
  .global-table--project-cards td {
    display: block;
    width: 100%;
  }

  .global-table--project-cards tr {
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid #e7e9ee;
    border-radius: 12px;
    background: #fff;
  }

  .global-table--project-cards td {
    display: grid;
    grid-template-columns: minmax(90px, .42fr) minmax(0, 1fr);
    gap: 10px;
    padding: 6px 0;
    border: 0;
  }

  .global-table--project-cards td[data-label]::before {
    content: attr(data-label);
    color: #697078;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .global-table--project-cards .global-table__actions {
    display: block;
    padding-top: 10px;
  }

  .global-table--project-cards .button-link {
    width: 100%;
  }

  .network-removal__form .button-danger {
    width: 100%;
  }
}

/* International country search and explicit Partner coverage (phase 331). */
.geography-country-field{display:grid;gap:6px;min-width:0;align-content:start}
.geography-country-field label{font-weight:600}
.geography-country-field input,.geography-country-field select{width:100%;min-width:0;min-height:44px}
.geography-country-field small:empty{display:none}
.coverage-picker__summary{font-weight:650;margin:0 0 12px;overflow-wrap:anywhere}
.coverage-picker__hint{color:#475569;font-size:.9rem;margin:12px 0 0}
.coverage-picker__dialog{width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;padding:24px;border:1px solid #bccbd2;border-radius:16px;color:#182c37;background:#fff;box-shadow:0 20px 80px #142a3540;overflow:auto}
.coverage-picker__dialog::backdrop{background:#142a3580}
.coverage-picker__dialog h3{margin:0 0 20px;font-size:1.35rem}
.coverage-picker__controls{display:grid;gap:8px}
.coverage-picker__controls label{font-weight:600;margin-top:8px}
.coverage-picker__controls input,.coverage-picker__controls select,.coverage-picker__areas>input{width:100%;box-sizing:border-box;min-width:0;min-height:44px}
.coverage-picker__areas{padding:16px 0 0;margin:16px 0;border:0;min-width:0}
.coverage-picker__areas legend{font-weight:650}
.coverage-picker__choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:12px;max-height:320px;overflow-y:auto;overscroll-behavior:contain}
.coverage-picker__choices>div{display:contents}
.coverage-picker__choices label{display:flex;align-items:center;gap:10px;min-height:44px;box-sizing:border-box;padding:8px;border:1px solid #dce3e6;border-radius:8px;cursor:pointer;overflow-wrap:anywhere}
.coverage-picker__choices label:has(input:checked){background:#edf5f6;border-color:#1b747b}
.coverage-picker__choices label span{font-size:.95rem;font-weight:500}
.coverage-picker__count{font-size:.85rem;color:#475569;margin:8px 0}
.coverage-picker__choices input{width:18px;height:18px;min-height:0;flex:0 0 18px;margin:0;accent-color:#1b747b}
.coverage-picker__actions{position:sticky;bottom:-24px;display:flex;flex-wrap:wrap;gap:10px;background:#fff;padding:16px 0 8px;border-top:1px solid #dce3e6;z-index:1}
.coverage-picker button{min-height:44px}
.coverage-picker [hidden],.geography-country-field [hidden]{display:none!important}
@media(max-width:540px){.coverage-picker__dialog{padding:16px}.coverage-picker__choices{grid-template-columns:1fr}.coverage-picker__actions{bottom:-16px}.coverage-picker__actions button{flex:1 1 100%}}

/* Qualified city selection, shared by Partner and Dealer forms. */
.city-coverage-editor { min-width:0; margin:16px 0; padding:16px; border:1px solid var(--border-color,#cbd5e1); border-radius:12px; }
.city-coverage-editor > label { display:grid; gap:6px; margin-bottom:12px; }
.city-coverage-editor select,.city-coverage-editor textarea { width:100%; max-width:100%; box-sizing:border-box; min-height:44px; }
.city-coverage-editor__list { display:grid; gap:8px; list-style:none; padding:0; margin:12px 0 0; }
.city-coverage-editor__list li { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 10px; border:1px solid #cbd5e1; border-radius:8px; }
.city-coverage-editor__list span { overflow-wrap:anywhere; min-width:0; }
.city-coverage-editor button { min-height:44px; }
.city-coverage-editor__list button { flex-shrink:0; }
@media (max-width:380px) { .city-coverage-editor { padding:10px; } .city-coverage-editor__list li { flex-wrap:wrap; } }

/* The three password fields follow reading order on every device. */
.password-change-form { max-width: 660px; }
.password-change-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
.password-change-form .form-field { min-width: 0; display: grid; gap: 8px; }
.password-change-form .form-field small ul { margin: 0; padding-left: 20px; }
.password-change-form .password-field { width: 100%; min-width: 0; }
.password-change-form .password-field input { width: 100%; min-width: 0; }
.password-change-form .password-visibility-toggle { height: 44px; top: 50%; transform: translateY(-50%); }

.password-change-form .form-field label { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px; }

.partner-account-directory .section-heading { display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.partner-account-directory .section-heading>div { flex:1 1 260px; min-width:0; }
.partner-account-list__row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding:16px 0; border-top:1px solid #d8dfe4; }
.partner-account-list__row>div { flex:1 1 220px; min-width:0; overflow-wrap:anywhere; }
.partner-account-list__row small { display:block; margin-top:7px; color:#58636c; }
.partner-account-list__row p { margin:5px 0; }
.partner-account-list__row a { display:inline-flex; align-items:center; min-height:44px; }
