/**
 * 7 Emlak B2B portal UI.
 *
 * Everything is scoped to .yedi-b2b-portal so the portal can live inside any
 * WordPress theme without changing the public site styles.
 */

.yedi-b2b-portal {
  --yedi-b2b-navy: #07124f;
  --yedi-b2b-navy-2: #101e63;
  --yedi-b2b-green: #17631d;
  --yedi-b2b-green-dark: #104b15;
  --yedi-b2b-yellow: #ffd213;
  --yedi-b2b-ink: #131a2c;
  --yedi-b2b-muted: #657087;
  --yedi-b2b-line: #dfe4ec;
  --yedi-b2b-soft: #f4f6f9;
  --yedi-b2b-white: #fff;
  --yedi-b2b-danger: #b42318;
  --yedi-b2b-warning: #8a5b00;
  --yedi-b2b-success: #17631d;
  --yedi-b2b-shadow: 0 18px 45px rgba(7, 18, 79, 0.09);
  --yedi-b2b-radius: 14px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(100%, 1440px);
  min-height: 720px;
  margin: clamp(18px, 3vw, 42px) auto;
  overflow: clip;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 20px;
  background: var(--yedi-b2b-soft);
  color: var(--yedi-b2b-ink);
  box-shadow: var(--yedi-b2b-shadow);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.55;
  isolation: isolate;
}

.yedi-b2b-portal,
.yedi-b2b-portal *,
.yedi-b2b-portal *::before,
.yedi-b2b-portal *::after {
  box-sizing: border-box;
}

.yedi-b2b-portal [hidden] {
  display: none !important;
}

.yedi-b2b-portal img {
  max-width: 100%;
  height: auto;
}

.yedi-b2b-portal a {
  color: var(--yedi-b2b-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.yedi-b2b-portal a:hover {
  color: var(--yedi-b2b-green-dark);
}

.yedi-b2b-portal button,
.yedi-b2b-portal input,
.yedi-b2b-portal select,
.yedi-b2b-portal textarea {
  font: inherit;
}

.yedi-b2b-portal :where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--yedi-b2b-navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--yedi-b2b-yellow);
}

.yedi-b2b-portal .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Portal shell and navigation. */
.yedi-b2b-header {
  position: sticky;
  top: 18px;
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  min-height: calc(100vh - 36px);
  padding: 30px 22px;
  overflow: auto;
  background:
    radial-gradient(circle at 100% 0, rgba(255, 210, 19, 0.16), transparent 30%),
    linear-gradient(165deg, var(--yedi-b2b-navy-2), var(--yedi-b2b-navy));
  color: var(--yedi-b2b-white);
}

.yedi-b2b-header > div {
  padding: 0 8px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.yedi-b2b-header > div > span {
  display: block;
  margin-bottom: 13px;
  color: var(--yedi-b2b-yellow);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.yedi-b2b-header > div > strong {
  display: block;
  color: var(--yedi-b2b-white);
  font-size: 1.15rem;
  line-height: 1.3;
}

.yedi-b2b-header > div > small {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.8rem;
}

.yedi-b2b-header nav {
  margin-top: 26px;
}

.yedi-b2b-header ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yedi-b2b-header li {
  margin: 0;
  padding: 0;
}

.yedi-b2b-header nav a {
  position: relative;
  display: flex;
  min-height: 45px;
  align-items: center;
  padding: 10px 13px 10px 17px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.yedi-b2b-header nav a::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 20px;
  border-radius: 4px;
  background: transparent;
  content: "";
}

.yedi-b2b-header nav a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--yedi-b2b-white);
  transform: translateX(2px);
}

.yedi-b2b-header nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.13);
  color: var(--yedi-b2b-white);
}

.yedi-b2b-header nav a[aria-current="page"]::before {
  background: var(--yedi-b2b-yellow);
}

.yedi-b2b-header li:last-child {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.yedi-b2b-nav-toggle {
  display: none;
  min-width: 46px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--yedi-b2b-white);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
}

.yedi-b2b-nav-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.yedi-b2b-skip {
  position: fixed;
  z-index: 99999;
  top: 8px;
  left: 8px;
  padding: 11px 16px;
  border-radius: 6px;
  background: var(--yedi-b2b-yellow);
  color: var(--yedi-b2b-navy) !important;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 120ms ease;
}

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

.yedi-b2b-main {
  grid-column: 2;
  min-width: 0;
  padding: clamp(26px, 4vw, 52px);
  outline: 0;
}

/* Notices can sit between the fixed navigation and main content. */
.yedi-b2b-portal > .yedi-b2b-notice {
  grid-column: 2;
  margin: clamp(22px, 3vw, 38px) clamp(26px, 4vw, 52px) 0;
}

.yedi-b2b-notice {
  position: relative;
  padding: 14px 18px 14px 49px;
  border: 1px solid var(--yedi-b2b-line);
  border-left-width: 5px;
  border-radius: 10px;
  background: var(--yedi-b2b-white);
  box-shadow: 0 7px 20px rgba(7, 18, 79, 0.05);
}

.yedi-b2b-notice::before {
  position: absolute;
  top: 14px;
  left: 17px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: inherit;
  content: "";
  opacity: 0.13;
}

.yedi-b2b-notice p {
  margin: 0;
}

.yedi-b2b-notice.is-success {
  border-left-color: var(--yedi-b2b-success);
  color: #124f18;
}

.yedi-b2b-notice.is-warning {
  border-left-color: #d99b00;
  background: #fffaf0;
  color: var(--yedi-b2b-warning);
}

.yedi-b2b-notice.is-error {
  border-left-color: var(--yedi-b2b-danger);
  background: #fff8f7;
  color: #8d1b12;
}

/* Page headings and primary actions. */
.yedi-b2b-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.yedi-b2b-section-heading > div > span,
.yedi-b2b-section-heading > span {
  display: block;
  margin-bottom: 5px;
  color: var(--yedi-b2b-green);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.yedi-b2b-section-heading h1,
.yedi-b2b-section-heading h2 {
  margin: 0;
  color: var(--yedi-b2b-navy);
  font-family: inherit;
  line-height: 1.15;
}

.yedi-b2b-section-heading h1 {
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.yedi-b2b-section-heading h2 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.yedi-b2b-section-heading > a:not(.yedi-b2b-button) {
  flex: 0 0 auto;
  font-size: 0.84rem;
  font-weight: 700;
}

.yedi-b2b-button,
.yedi-b2b-portal input[type="submit"] {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #cbd2dc;
  border-radius: 8px;
  background: var(--yedi-b2b-white);
  color: var(--yedi-b2b-navy);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.yedi-b2b-button:hover,
.yedi-b2b-portal input[type="submit"]:hover {
  border-color: var(--yedi-b2b-green);
  color: var(--yedi-b2b-green-dark);
  transform: translateY(-1px);
}

.yedi-b2b-button.is-primary,
.yedi-b2b-portal #wp-submit {
  border-color: var(--yedi-b2b-green);
  background: var(--yedi-b2b-green);
  color: var(--yedi-b2b-white);
}

.yedi-b2b-button.is-primary:hover,
.yedi-b2b-portal #wp-submit:hover {
  border-color: var(--yedi-b2b-green-dark);
  background: var(--yedi-b2b-green-dark);
  color: var(--yedi-b2b-white);
}

.yedi-b2b-button.is-danger {
  border-color: #b42318;
  background: #fff5f4;
  color: #9f1c13;
}

.yedi-b2b-button.is-danger:hover {
  border-color: #8f1710;
  background: #8f1710;
  color: #fff;
}

.yedi-b2b-button:disabled,
.yedi-b2b-button[aria-disabled="true"],
.yedi-b2b-portal input[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.yedi-b2b-button.is-busy::before,
.yedi-b2b-portal input[type="submit"].is-busy::before {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: yedi-b2b-spin 700ms linear infinite;
}

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

/* Dashboard. */
.yedi-b2b-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
}

.yedi-b2b-metrics article {
  position: relative;
  min-width: 0;
  min-height: 128px;
  padding: 24px 21px 19px;
  overflow: hidden;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
  box-shadow: 0 9px 28px rgba(7, 18, 79, 0.055);
}

.yedi-b2b-metrics article::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--yedi-b2b-green);
  content: "";
}

.yedi-b2b-metrics article:nth-child(2)::before {
  background: var(--yedi-b2b-yellow);
}

.yedi-b2b-metrics article:nth-child(3)::before {
  background: var(--yedi-b2b-navy);
}

.yedi-b2b-metrics strong {
  display: block;
  overflow: hidden;
  color: var(--yedi-b2b-navy);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.yedi-b2b-metrics strong small {
  color: var(--yedi-b2b-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.yedi-b2b-metrics article > span {
  display: block;
  margin-top: 12px;
  color: var(--yedi-b2b-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.yedi-b2b-recent {
  margin-top: 36px;
}

/* Tenant-scoped listing search and publication-status filters. */
.yedi-b2b-list-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.48fr) minmax(150px, 0.48fr) auto auto;
  grid-template-rows: auto auto;
  gap: 7px 12px;
  align-items: end;
  margin: 0 0 20px;
  padding: 17px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 11px;
  background: var(--yedi-b2b-white);
}

.yedi-b2b-list-filters label[for="yedi-b2b-search"],
.yedi-b2b-list-filters #yedi-b2b-search { grid-column: 1; }
.yedi-b2b-list-filters label[for="yedi-b2b-status-filter"],
.yedi-b2b-list-filters #yedi-b2b-status-filter { grid-column: 2; }
.yedi-b2b-list-filters label[for="yedi-b2b-org-filter"],
.yedi-b2b-list-filters #yedi-b2b-org-filter { grid-column: 3; }
.yedi-b2b-list-filters label[for="yedi-consultant-org"],
.yedi-b2b-list-filters #yedi-consultant-org { grid-column: 1 / span 2; }

.yedi-b2b-list-filters label {
  color: var(--yedi-b2b-muted);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.yedi-b2b-list-filters label:first-of-type,
.yedi-b2b-list-filters input[type="search"] {
  grid-column: 1;
}

.yedi-b2b-list-filters label:nth-of-type(2),
.yedi-b2b-list-filters select {
  grid-column: 2;
}

.yedi-b2b-list-filters label {
  grid-row: 1;
}

.yedi-b2b-list-filters input[type="search"],
.yedi-b2b-list-filters select,
.yedi-b2b-list-filters .yedi-b2b-button,
.yedi-b2b-list-filters > a {
  grid-row: 2;
}

.yedi-b2b-list-filters input[type="search"],
.yedi-b2b-list-filters select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #cbd2dc;
  border-radius: 8px;
  background: var(--yedi-b2b-white);
  color: var(--yedi-b2b-ink);
}

.yedi-b2b-list-filters .yedi-b2b-button {
	grid-column: 4;
}

.yedi-b2b-list-filters > a {
	grid-column: 5;
  align-self: center;
  min-height: 44px;
  padding: 11px 4px;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.yedi-b2b-scope-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 18px;
  padding: 14px 17px;
  border: 1px solid #cddbcf;
  border-radius: 10px;
  background: #f4faf5;
  color: var(--yedi-b2b-green-dark);
}

.yedi-b2b-scope-banner span {
  color: var(--yedi-b2b-muted);
  font-size: 0.76rem;
  text-align: right;
}

.yedi-b2b-review-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.45fr) minmax(0, 1fr);
  gap: 26px;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #d7dce5;
  border-left: 5px solid var(--yedi-b2b-yellow);
  border-radius: var(--yedi-b2b-radius);
  background: #fffdf4;
}

.yedi-b2b-review-panel h2 {
  margin: 4px 0 8px;
  color: var(--yedi-b2b-navy);
  font-size: 1.25rem;
}

.yedi-b2b-review-panel > div > span {
  color: var(--yedi-b2b-green-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.yedi-b2b-review-panel p {
  margin: 0;
  color: var(--yedi-b2b-muted);
  font-size: 0.82rem;
}

.yedi-b2b-review-panel textarea {
  width: 100%;
  margin-top: 7px;
}

.yedi-b2b-review-checks {
  margin: 0 0 16px;
  padding: 13px 15px;
  border: 1px solid #edc5c2;
  border-radius: 8px;
  background: #fff6f5;
  color: #8f1710;
  font-size: 0.78rem;
}

.yedi-b2b-review-checks ul {
  margin: 7px 0 0 18px;
}

/* Data tables and compact row actions. */
.yedi-b2b-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
  box-shadow: 0 9px 28px rgba(7, 18, 79, 0.045);
}

.yedi-b2b-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  background: transparent;
  font-size: 0.86rem;
}

.yedi-b2b-table thead {
  background: #f7f8fa;
}

.yedi-b2b-table th,
.yedi-b2b-table td {
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--yedi-b2b-line);
  color: var(--yedi-b2b-ink);
  text-align: left;
  vertical-align: middle;
}

.yedi-b2b-table thead th {
  color: #5b6577;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.yedi-b2b-table tbody tr:last-child > * {
  border-bottom: 0;
}

.yedi-b2b-table tbody tr:hover {
  background: #fbfcfd;
}

.yedi-b2b-table tbody th > a {
  display: block;
  color: var(--yedi-b2b-navy);
  font-weight: 750;
  text-decoration: none;
}

.yedi-b2b-table tbody th > a:hover {
  color: var(--yedi-b2b-green);
}

.yedi-b2b-table tbody th small {
  display: block;
  margin-top: 3px;
  color: var(--yedi-b2b-muted);
  font-size: 0.7rem;
  font-weight: 500;
}

.yedi-b2b-status,
.yedi-b2b-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e9edf3;
  color: #495266;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.yedi-b2b-status.is-publish {
  background: #e6f4e8;
  color: #14571a;
}

.yedi-b2b-status.is-pending {
  background: #fff3c8;
  color: #735200;
}

.yedi-b2b-status.is-draft {
  background: #edf0f4;
  color: #586174;
}

.yedi-b2b-badge {
  margin-left: 5px;
  background: var(--yedi-b2b-navy);
  color: var(--yedi-b2b-white);
}

.yedi-b2b-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
  white-space: nowrap;
}

.yedi-b2b-row-actions form {
  display: inline;
  margin: 0;
}

.yedi-b2b-row-actions a,
.yedi-b2b-link-button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 9px 5px;
  border: 0;
  background: none;
  color: var(--yedi-b2b-green);
  cursor: pointer;
  font: inherit;
  font-size: 0.77rem;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.yedi-b2b-link-button:hover {
  color: var(--yedi-b2b-danger);
}

.yedi-b2b-pagination {
  margin-top: 20px;
}

.yedi-b2b-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yedi-b2b-pagination a,
.yedi-b2b-pagination .current {
  display: grid;
  min-width: 40px;
  min-height: 40px;
  place-items: center;
  padding: 6px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 7px;
  background: var(--yedi-b2b-white);
  color: var(--yedi-b2b-navy);
  font-size: 0.78rem;
  font-weight: 750;
  text-decoration: none;
}

.yedi-b2b-pagination .current {
  border-color: var(--yedi-b2b-green);
  background: var(--yedi-b2b-green);
  color: var(--yedi-b2b-white);
}

/* General forms. */
.yedi-b2b-form {
  color: var(--yedi-b2b-ink);
}

.yedi-b2b-form:not(.yedi-b2b-portfolio-form) {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
  box-shadow: 0 9px 28px rgba(7, 18, 79, 0.05);
}

.yedi-b2b-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 22px;
}

.yedi-b2b-field,
.yedi-field {
  min-width: 0;
}

.yedi-b2b-field.is-wide,
.yedi-field-wide {
  grid-column: 1 / -1;
}

.yedi-b2b-field > label,
.yedi-b2b-label,
.yedi-field > label {
  display: block;
  margin: 0 0 7px;
  color: #293247;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.35;
}

.yedi-b2b-field > small,
.yedi-b2b-field > .yedi-b2b-help,
.yedi-field-help {
  display: block;
  margin-top: 6px;
  color: var(--yedi-b2b-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) select,
.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) textarea,
.yedi-b2b-login input[type="text"],
.yedi-b2b-login input[type="password"] {
  width: 100%;
  max-width: none;
  min-height: 45px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cbd2dc;
  border-radius: 8px;
  background: var(--yedi-b2b-white);
  color: var(--yedi-b2b-ink);
  box-shadow: none;
  line-height: 1.35;
}

.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) textarea {
  min-height: 112px;
  resize: vertical;
}

.yedi-b2b-portal .yedi-editor-field textarea {
  min-height: 245px;
}

.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) input:hover,
.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) select:hover,
.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) textarea:hover {
  border-color: #9ba6b7;
}

.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) input:focus,
.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) select:focus,
.yedi-b2b-portal :where(.yedi-b2b-field, .yedi-field) textarea:focus,
.yedi-b2b-login input:focus {
  border-color: var(--yedi-b2b-green);
  outline: 3px solid var(--yedi-b2b-navy);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--yedi-b2b-yellow);
}

.yedi-b2b-portal input[aria-invalid="true"],
.yedi-b2b-portal input:invalid:not(:placeholder-shown) {
  border-color: var(--yedi-b2b-danger);
}

.yedi-b2b-portal select:disabled,
.yedi-b2b-portal input:disabled,
.yedi-b2b-portal textarea:disabled {
  background-color: #edf0f4;
  color: #697286;
}

.yedi-b2b-form > fieldset:not(.yedi-b2b-media) {
  margin: 24px 0 0;
  padding: 18px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 10px;
  background: #f8f9fb;
}

.yedi-b2b-form fieldset legend {
  padding: 0 8px;
  color: var(--yedi-b2b-navy);
  font-size: 0.8rem;
  font-weight: 800;
}

.yedi-b2b-form > fieldset:not(.yedi-b2b-media) > label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 9px 0;
  color: #374055;
  font-size: 0.8rem;
}

.yedi-b2b-form input[type="checkbox"],
.yedi-b2b-form input[type="radio"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--yedi-b2b-green);
}

.yedi-b2b-help,
.yedi-b2b-control-status {
  color: var(--yedi-b2b-muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.yedi-b2b-control-status:not(:empty) {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--yedi-b2b-yellow);
  background: #fff9df;
  color: #604b00;
}

.yedi-b2b-form-actions {
  position: sticky;
  z-index: 10;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 13px;
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -9px 24px rgba(7, 18, 79, 0.08);
  backdrop-filter: blur(9px);
}

.yedi-b2b-form-actions > a {
  margin-right: auto;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Shared portfolio form. It is intentionally complete without admin CSS. */
.yedi-portfolio-assistant,
.yedi-portfolio-entry {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.yedi-progress {
  padding: 19px 21px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 90% 0, rgba(255, 210, 19, 0.18), transparent 34%),
    var(--yedi-b2b-navy);
  color: var(--yedi-b2b-white);
}

.yedi-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 10px;
}

.yedi-progress strong {
  color: var(--yedi-b2b-white);
  font-size: 0.82rem;
}

.yedi-progress [data-yedi-progress-label] {
  color: var(--yedi-b2b-yellow);
  font-size: 0.83rem;
  font-weight: 800;
}

.yedi-progress small {
  display: block;
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.69rem;
}

.yedi-progress-track {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
}

.yedi-progress-track i {
  display: block;
  width: 0;
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--yedi-b2b-yellow);
  transition: width 180ms ease;
}

.yedi-admin-card,
.yedi-form-section {
  overflow: hidden;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
  box-shadow: 0 7px 22px rgba(7, 18, 79, 0.04);
}

.yedi-admin-card[hidden],
.yedi-form-section[hidden],
.yedi-field[hidden] {
  display: none !important;
}

.yedi-admin-card > header,
.yedi-form-section > header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 21px;
  border-bottom: 1px solid var(--yedi-b2b-line);
  background: #f7f8fa;
}

.yedi-admin-card > header > span,
.yedi-form-section > header > span {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 50%;
  background: var(--yedi-b2b-white);
  color: var(--yedi-b2b-green);
  font-size: 0.66rem;
  font-weight: 850;
}

.yedi-admin-card h3,
.yedi-form-section h3 {
  margin: 0 0 3px;
  color: var(--yedi-b2b-navy);
  font-family: inherit;
  font-size: 0.94rem;
  line-height: 1.25;
}

.yedi-admin-card header p,
.yedi-form-section header p {
  margin: 0;
  color: var(--yedi-b2b-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.yedi-admin-card-primary > header {
  border-bottom-color: rgba(255, 255, 255, 0.15);
  background: var(--yedi-b2b-navy);
}

.yedi-admin-card-primary > header h3 {
  color: var(--yedi-b2b-white);
}

.yedi-admin-card-primary > header p {
  color: rgba(255, 255, 255, 0.66);
}

.yedi-admin-card-primary > header > span {
  border-color: var(--yedi-b2b-yellow);
  background: var(--yedi-b2b-yellow);
  color: var(--yedi-b2b-navy);
}

.yedi-admin-card-private {
  border-color: #decf91;
}

.yedi-admin-card-private > header {
  background: #fff9df;
}

.yedi-admin-grid,
.yedi-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 19px 22px;
  padding: 23px;
}

.yedi-presentation-card > .yedi-admin-grid {
  grid-template-columns: minmax(0, 1fr);
}

.yedi-check-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(125px, 1fr));
  gap: 9px;
}

.yedi-check-grid label {
  display: flex;
  min-height: 43px;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 11px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 7px;
  background: #f8f9fb;
  color: #374055;
  font-size: 0.72rem;
  line-height: 1.35;
}

.yedi-check-grid label:has(input:checked) {
  border-color: #8db991;
  background: #eef7ef;
}

.yedi-required {
  color: var(--yedi-b2b-danger);
}

.yedi-eids-note {
  padding: 14px 16px;
  border-left: 4px solid var(--yedi-b2b-yellow);
  border-radius: 0 8px 8px 0;
  background: #fff9df;
  color: #5d5120;
  font-size: 0.72rem;
  line-height: 1.55;
}

/* Native, tenant-safe image upload fields and previews. */
.yedi-b2b-media {
  margin: 22px 0 0;
  padding: clamp(18px, 3vw, 25px);
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
  box-shadow: 0 7px 22px rgba(7, 18, 79, 0.04);
}

.yedi-b2b-media > legend {
  padding: 0 8px;
  color: var(--yedi-b2b-navy);
  font-size: 0.95rem;
  font-weight: 800;
}

.yedi-b2b-media > .yedi-b2b-help {
  margin: 0 0 18px;
}

.yedi-b2b-storage-meter {
  margin: -7px 0 18px;
  color: var(--yedi-b2b-muted);
  font-size: 0.74rem;
}

.yedi-b2b-storage-meter strong {
  color: var(--yedi-b2b-navy);
}

.yedi-b2b-media-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.5fr);
  gap: 22px;
}

.yedi-b2b-media-grid > div {
  min-width: 0;
  padding: 17px;
  border: 1px dashed #b7c0cd;
  border-radius: 10px;
  background: #f9fafb;
}

.yedi-b2b-media-grid > div > label:first-child {
  display: block;
  margin-bottom: 12px;
  color: var(--yedi-b2b-navy);
  font-size: 0.8rem;
}

.yedi-b2b-media figure {
  position: relative;
  margin: 0 0 12px;
  padding: 9px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 8px;
  background: var(--yedi-b2b-white);
}

.yedi-b2b-media figure img {
  display: block;
  width: 100%;
  max-height: 225px;
  border-radius: 6px;
  object-fit: cover;
}

.yedi-b2b-media figure label,
.yedi-b2b-existing-gallery label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #515b6e;
  font-size: 0.7rem;
}

.yedi-b2b-media figure.is-marked-for-removal,
.yedi-b2b-existing-gallery li.is-marked-for-removal {
  border-color: #e1aaa4;
  background: #fff2f1;
  opacity: 0.62;
}

.yedi-b2b-existing-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.yedi-b2b-existing-gallery li {
  margin: 0;
  padding: 7px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 8px;
  background: var(--yedi-b2b-white);
}

.yedi-b2b-existing-gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 5px;
  object-fit: cover;
}

.yedi-b2b-gallery-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 7px;
}

.yedi-b2b-gallery-move {
  min-height: 36px;
  padding: 5px 8px;
  border: 1px solid #cbd2dc;
  border-radius: 6px;
  background: #f7f8fa;
  color: var(--yedi-b2b-navy);
  cursor: pointer;
  font-weight: 800;
}

.yedi-b2b-gallery-move:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.yedi-b2b-media input[type="file"] {
  display: block;
  width: 100%;
  min-height: 45px;
  padding: 6px;
  border: 1px solid #cbd2dc;
  border-radius: 8px;
  background: var(--yedi-b2b-white);
  color: #4c566a;
  font-size: 0.72rem;
  cursor: pointer;
}

.yedi-b2b-media input[type="file"]::file-selector-button {
  min-height: 31px;
  margin-right: 9px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: var(--yedi-b2b-navy);
  color: var(--yedi-b2b-white);
  cursor: pointer;
  font-weight: 750;
}

.yedi-b2b-file-feedback {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: var(--yedi-b2b-muted);
  font-size: 0.69rem;
}

.yedi-b2b-file-feedback.is-error {
  color: var(--yedi-b2b-danger);
  font-weight: 700;
}

.yedi-b2b-upload-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 9px;
  margin-top: 11px;
}

.yedi-b2b-upload-preview.is-cover {
  grid-template-columns: minmax(0, 230px);
}

.yedi-b2b-upload-preview-item {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 8px;
  background: var(--yedi-b2b-white);
}

.yedi-b2b-upload-preview-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.yedi-b2b-upload-preview-item figcaption {
  padding: 6px 7px;
  overflow: hidden;
  color: #596276;
  font-size: 0.61rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Consultant cards. */
.yedi-b2b-consultant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.yedi-b2b-consultant-grid article {
  min-width: 0;
  padding: 21px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
  box-shadow: 0 8px 24px rgba(7, 18, 79, 0.045);
}

.yedi-b2b-consultant-grid article > div:first-child {
  min-height: 28px;
}

.yedi-b2b-consultant-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.yedi-b2b-consultant-badges .yedi-b2b-badge {
  margin-left: 0;
}

.yedi-b2b-status.is-account-none {
  background: #edf0f4;
  color: #586174;
}

.yedi-b2b-status.is-account-invited {
  background: #fff3c8;
  color: #735200;
}

.yedi-b2b-status.is-account-active {
  background: #e6f4e8;
  color: #14571a;
}

.yedi-b2b-status.is-account-manager {
  background: #fff3c8;
  color: #5f4500;
}

.yedi-b2b-status.is-account-suspended,
.yedi-b2b-status.is-account-broken {
  background: #fff0ef;
  color: #8f1710;
}

.yedi-b2b-consultant-grid h2 {
  margin: 15px 0 3px;
  color: var(--yedi-b2b-navy);
  font-family: inherit;
  font-size: 1.1rem;
  line-height: 1.25;
}

.yedi-b2b-consultant-grid article > p {
  min-height: 1.4em;
  margin: 0;
  color: #455067;
  font-size: 0.78rem;
}

.yedi-b2b-consultant-grid article > small {
  display: block;
  min-height: 2.7em;
  margin-top: 6px;
  color: var(--yedi-b2b-muted);
  font-size: 0.7rem;
}

.yedi-b2b-consultant-grid dl {
  margin: 17px 0;
  padding: 13px 0;
  border-top: 1px solid var(--yedi-b2b-line);
  border-bottom: 1px solid var(--yedi-b2b-line);
}

.yedi-b2b-consultant-grid dl > div {
  display: grid;
  grid-template-columns: minmax(75px, 0.75fr) minmax(0, 1.25fr);
  gap: 9px;
  margin: 5px 0;
}

.yedi-b2b-consultant-grid dt {
  color: var(--yedi-b2b-muted);
  font-size: 0.65rem;
}

.yedi-b2b-consultant-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #394257;
  font-size: 0.68rem;
  font-weight: 650;
}

.yedi-b2b-consultant-grid article > a,
.yedi-b2b-consultant-card-actions > a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 750;
}

.yedi-b2b-consultant-card-actions,
.yedi-b2b-account-actions,
.yedi-b2b-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 13px;
}

.yedi-b2b-account-actions form,
.yedi-b2b-profile-actions form {
  margin: 0;
}

.yedi-b2b-profile-actions {
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--yedi-b2b-line);
}

.yedi-b2b-account-panel + .yedi-b2b-profile-actions {
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: var(--yedi-b2b-white);
}

.yedi-b2b-link-button.is-danger {
  color: var(--yedi-b2b-danger);
}

.yedi-b2b-account-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(260px, 1.25fr);
  gap: 20px 28px;
  margin-top: 24px;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: #f8f9fb;
  box-shadow: 0 9px 28px rgba(7, 18, 79, 0.05);
}

.yedi-b2b-account-panel > div:first-child > span {
  color: var(--yedi-b2b-green);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yedi-b2b-account-panel h2 {
  margin: 6px 0 8px;
  color: var(--yedi-b2b-navy);
  font-family: inherit;
  font-size: 1.25rem;
}

.yedi-b2b-account-panel p {
  margin: 7px 0;
  color: var(--yedi-b2b-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.yedi-b2b-account-summary {
  align-self: start;
  padding: 16px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 10px;
  background: var(--yedi-b2b-white);
}

.yedi-b2b-account-panel > .yedi-b2b-form,
.yedi-b2b-account-panel > .yedi-b2b-account-actions {
  grid-column: 1 / -1;
}

.yedi-b2b-account-panel > .yedi-b2b-account-actions {
  padding-top: 16px;
  border-top: 1px solid var(--yedi-b2b-line);
}

.yedi-b2b-account-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.yedi-b2b-account-create-form .yedi-b2b-form-actions {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.yedi-b2b-trashed-consultants {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: var(--yedi-b2b-radius);
  background: #f8f9fb;
}

.yedi-b2b-trashed-consultants summary {
  min-height: 44px;
  color: var(--yedi-b2b-navy);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 44px;
}

.yedi-b2b-trashed-consultants > p {
  color: var(--yedi-b2b-muted);
  font-size: 0.75rem;
}

.yedi-b2b-trashed-consultants > ul {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.yedi-b2b-trashed-consultants > ul > li {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 9px;
  background: var(--yedi-b2b-white);
}

.yedi-b2b-trashed-consultants form {
  margin: 0;
}

/* Empty and access states. */
.yedi-b2b-empty,
.yedi-b2b-access-message {
  padding: clamp(30px, 6vw, 58px) 24px;
  border: 1px dashed #b8c1cf;
  border-radius: var(--yedi-b2b-radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--yedi-b2b-muted);
  text-align: center;
}

.yedi-b2b-empty::before {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: #e9f3ea;
  color: var(--yedi-b2b-green);
  content: "7";
  font-size: 1.15rem;
  font-weight: 850;
}

.yedi-b2b-empty p,
.yedi-b2b-access-message p {
  max-width: 560px;
  margin: 0 auto;
}

.yedi-b2b-access-message,
.yedi-b2b-portal > .yedi-b2b-notice:only-child {
  grid-column: 1 / -1;
  align-self: center;
  width: min(100% - 36px, 680px);
  margin: 40px auto;
}

.yedi-b2b-access-message h2 {
  margin: 0 0 10px;
  color: var(--yedi-b2b-navy);
  font-family: inherit;
}

/* Logged-out screen. */
.yedi-b2b-login {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.1fr);
  align-self: center;
  width: min(100% - 40px, 850px);
  margin: 40px auto;
  overflow: hidden;
  border: 1px solid var(--yedi-b2b-line);
  border-radius: 18px;
  background: var(--yedi-b2b-white);
  box-shadow: var(--yedi-b2b-shadow);
}

.yedi-b2b-login > header {
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 52px);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 210, 19, 0.22), transparent 34%),
    linear-gradient(160deg, var(--yedi-b2b-navy-2), var(--yedi-b2b-navy));
  color: var(--yedi-b2b-white);
}

.yedi-b2b-login > header > span {
  margin-bottom: 14px;
  color: var(--yedi-b2b-yellow);
  font-size: 0.71rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.yedi-b2b-login h1,
.yedi-b2b-login h2 {
  margin: 0 0 13px;
  color: var(--yedi-b2b-white);
  font-family: inherit;
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.16;
}

.yedi-b2b-login header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.83rem;
}

.yedi-b2b-login #loginform {
  align-self: center;
  margin: 0;
  padding: clamp(28px, 5vw, 52px);
}

.yedi-b2b-password-card > .yedi-b2b-form {
  align-self: center;
  margin: 0;
  padding: clamp(28px, 5vw, 52px);
  border: 0;
  box-shadow: none;
}

.yedi-b2b-password-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.yedi-b2b-password-toggle {
  min-width: 70px;
  min-height: 45px;
  padding: 9px 12px;
  border: 1px solid #cbd2dc;
  border-radius: 8px;
  background: #f7f8fa;
  color: var(--yedi-b2b-navy);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 800;
}

.yedi-b2b-password-toggle:hover {
  border-color: var(--yedi-b2b-green);
  background: #eef7ef;
}

.yedi-b2b-login #loginform p {
  margin: 0 0 16px;
}

.yedi-b2b-login #loginform label {
  display: block;
  margin-bottom: 6px;
  color: #30394d;
  font-size: 0.75rem;
  font-weight: 750;
}

.yedi-b2b-login .login-remember label {
  display: flex !important;
  align-items: center;
  gap: 7px;
  font-weight: 600 !important;
}

.yedi-b2b-login .login-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--yedi-b2b-green);
}

.yedi-b2b-login .login-submit input {
  width: 100%;
}

.yedi-b2b-login-help {
  grid-column: 2;
  margin: -72px clamp(28px, 5vw, 52px) 35px;
  align-self: end;
  font-size: 0.75rem;
  text-align: center;
}

/* 1100px: compact sidebar and two-column data areas. */
@media (max-width: 1100px) {
  .yedi-b2b-portal {
    grid-template-columns: 220px minmax(0, 1fr);
    border-radius: 14px;
  }

  .yedi-b2b-header {
    padding-inline: 16px;
  }

  .yedi-b2b-main {
    padding: 30px;
  }

  .yedi-b2b-portal > .yedi-b2b-notice {
    margin-inline: 30px;
  }

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

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

  .yedi-check-grid {
    grid-template-columns: repeat(3, minmax(115px, 1fr));
  }

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

  .yedi-b2b-existing-gallery,
  .yedi-b2b-upload-preview {
    grid-template-columns: repeat(3, minmax(75px, 1fr));
  }

  .yedi-b2b-list-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto;
  }

  .yedi-b2b-list-filters label[for="yedi-b2b-search"] { grid-column: 1; grid-row: 1; }
  .yedi-b2b-list-filters #yedi-b2b-search { grid-column: 1; grid-row: 2; }
  .yedi-b2b-list-filters label[for="yedi-b2b-status-filter"] { grid-column: 2; grid-row: 1; }
  .yedi-b2b-list-filters #yedi-b2b-status-filter { grid-column: 2; grid-row: 2; }
  .yedi-b2b-list-filters label[for="yedi-b2b-org-filter"] { grid-column: 1; grid-row: 3; }
  .yedi-b2b-list-filters #yedi-b2b-org-filter { grid-column: 1; grid-row: 4; }
  .yedi-b2b-list-filters label[for="yedi-consultant-org"] { grid-column: 1 / -1; grid-row: 1; }
  .yedi-b2b-list-filters #yedi-consultant-org { grid-column: 1 / -1; grid-row: 2; }
  .yedi-b2b-list-filters .yedi-b2b-button { grid-column: 2; grid-row: 4; }
  .yedi-b2b-list-filters > a { grid-column: 2; grid-row: 3; justify-self: end; }
  .yedi-b2b-list-filters.has-no-office-filter .yedi-b2b-button { grid-column: 1; grid-row: 4; }
  .yedi-b2b-list-filters.is-consultant-filter #yedi-consultant-org { grid-column: 1; grid-row: 2; }
  .yedi-b2b-list-filters.is-consultant-filter .yedi-b2b-button { grid-column: 2; grid-row: 2; }
}

/* 760px: sidebar becomes an accessible collapsible top navigation. */
@media (max-width: 760px) {
  .yedi-b2b-portal {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    margin: 12px auto;
    overflow: visible;
    border-radius: 12px;
  }

  .yedi-b2b-header {
    position: relative;
    top: auto;
    z-index: 20;
    grid-column: 1;
    grid-row: auto;
    display: grid;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 16px;
    overflow: visible;
  }

  .yedi-b2b-header > div {
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .yedi-b2b-header > div > span {
    margin-bottom: 4px;
    font-size: 0.61rem;
  }

  .yedi-b2b-header > div > strong {
    overflow: hidden;
    font-size: 0.93rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .yedi-b2b-header > div > small {
    display: none;
  }

  .yedi-b2b-nav-toggle {
    display: inline-flex;
  }

  .yedi-b2b-header nav {
    grid-column: 1 / -1;
    margin-top: 14px;
    padding-top: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .yedi-b2b-header nav ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yedi-b2b-header li:last-child {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .yedi-b2b-header nav a {
    min-height: 42px;
  }

  .yedi-b2b-main,
  .yedi-b2b-portal > .yedi-b2b-notice {
    grid-column: 1;
  }

  .yedi-b2b-main {
    padding: 24px 18px 30px;
  }

  .yedi-b2b-portal > .yedi-b2b-notice {
    margin: 18px 18px 0;
  }

  .yedi-b2b-section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .yedi-b2b-list-filters {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    padding: 15px;
  }

  .yedi-b2b-list-filters label,
  .yedi-b2b-list-filters label:first-of-type,
  .yedi-b2b-list-filters label:nth-of-type(2),
  .yedi-b2b-list-filters input[type="search"],
  .yedi-b2b-list-filters select,
  .yedi-b2b-list-filters .yedi-b2b-button,
  .yedi-b2b-list-filters > a {
    grid-column: 1;
    grid-row: auto;
  }

  .yedi-b2b-list-filters label[for="yedi-b2b-search"],
  .yedi-b2b-list-filters #yedi-b2b-search,
  .yedi-b2b-list-filters label[for="yedi-b2b-status-filter"],
  .yedi-b2b-list-filters #yedi-b2b-status-filter,
  .yedi-b2b-list-filters label[for="yedi-b2b-org-filter"],
  .yedi-b2b-list-filters #yedi-b2b-org-filter,
  .yedi-b2b-list-filters label[for="yedi-consultant-org"],
  .yedi-b2b-list-filters #yedi-consultant-org {
    grid-column: 1;
  }

  .yedi-b2b-list-filters label:nth-of-type(2) {
    margin-top: 7px;
  }

  .yedi-b2b-list-filters .yedi-b2b-button {
    width: 100%;
    margin-top: 5px;
  }

  .yedi-b2b-list-filters.has-no-office-filter .yedi-b2b-button,
  .yedi-b2b-list-filters.is-consultant-filter .yedi-b2b-button,
  .yedi-b2b-list-filters.is-consultant-filter #yedi-consultant-org {
    grid-column: 1;
    grid-row: auto;
  }

  .yedi-b2b-list-filters > a {
    justify-self: start;
    min-height: 0;
    padding-block: 5px;
  }

  .yedi-b2b-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .yedi-b2b-table,
  .yedi-b2b-table tbody,
  .yedi-b2b-table tr,
  .yedi-b2b-table th,
  .yedi-b2b-table td {
    display: block;
    width: 100%;
  }

  .yedi-b2b-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .yedi-b2b-table tbody {
    display: grid;
    gap: 12px;
  }

  .yedi-b2b-table tr {
    padding: 16px;
    border: 1px solid var(--yedi-b2b-line);
    border-radius: 11px;
    background: var(--yedi-b2b-white);
    box-shadow: 0 6px 18px rgba(7, 18, 79, 0.04);
  }

  .yedi-b2b-table th,
  .yedi-b2b-table td {
    padding: 6px 0;
    border: 0;
  }

  .yedi-b2b-table td[data-label]::before {
    display: inline-block;
    width: 92px;
    color: var(--yedi-b2b-muted);
    font-size: 0.67rem;
    font-weight: 750;
  }

  .yedi-b2b-table td[data-label]::before { content: attr(data-label); }

  .yedi-b2b-row-actions {
    justify-content: flex-start;
    margin-top: 5px;
    padding-top: 10px;
    border-top: 1px solid var(--yedi-b2b-line);
  }

  .yedi-b2b-field-grid,
  .yedi-admin-grid,
  .yedi-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-field-wide,
  .yedi-b2b-field.is-wide {
    grid-column: auto;
  }

  .yedi-admin-grid,
  .yedi-form-grid {
    padding: 18px;
  }

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

  .yedi-b2b-media-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-b2b-consultant-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-b2b-account-panel,
  .yedi-b2b-account-create-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-b2b-account-create-form .yedi-b2b-form-actions {
    justify-content: flex-start;
  }

  .yedi-b2b-form-actions {
    margin-inline: -5px;
    border-radius: 9px;
  }

  .yedi-b2b-scope-banner,
  .yedi-b2b-review-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-b2b-scope-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .yedi-b2b-scope-banner span {
    text-align: left;
  }

  .yedi-b2b-login {
    grid-template-columns: minmax(0, 1fr);
    width: min(100% - 24px, 520px);
    margin: 18px auto;
  }

  .yedi-b2b-login > header {
    min-height: 0;
    padding: 30px 25px;
  }

  .yedi-b2b-login #loginform {
    width: 100%;
    padding: 28px 25px 70px;
  }

  .yedi-b2b-password-card > .yedi-b2b-form {
    width: 100%;
    padding: 28px 25px;
  }

  .yedi-b2b-login-help {
    grid-column: 1;
    margin: -58px 25px 25px;
  }
}

/* 520px: single-column, touch-first controls. */
@media (max-width: 520px) {
  .yedi-b2b-main {
    padding-inline: 14px;
  }

  .yedi-b2b-portal > .yedi-b2b-notice {
    margin-inline: 14px;
  }

  .yedi-b2b-header nav ul,
  .yedi-b2b-metrics,
  .yedi-check-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-b2b-section-heading {
    gap: 14px;
  }

  .yedi-b2b-section-heading > .yedi-b2b-button {
    width: 100%;
  }

  .yedi-b2b-metrics article {
    min-height: 104px;
    padding-block: 20px 16px;
  }

  .yedi-b2b-notice {
    padding-left: 18px;
  }

  .yedi-b2b-notice::before {
    display: none;
  }

  .yedi-admin-card > header,
  .yedi-form-section > header {
    padding: 15px;
  }

  .yedi-admin-grid,
  .yedi-form-grid {
    padding: 15px;
  }

  .yedi-b2b-existing-gallery,
  .yedi-b2b-upload-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yedi-b2b-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .yedi-b2b-form-actions > *,
  .yedi-b2b-form-actions .yedi-b2b-button {
    width: 100%;
  }

  .yedi-b2b-form-actions > a {
    order: 2;
    margin: 2px 0 0;
    text-align: center;
  }

  .yedi-b2b-consultant-grid dl > div {
    grid-template-columns: minmax(70px, 0.7fr) minmax(0, 1.3fr);
  }

  .yedi-b2b-consultant-card-actions,
  .yedi-b2b-account-actions,
  .yedi-b2b-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .yedi-b2b-consultant-card-actions > a,
  .yedi-b2b-account-actions > a,
  .yedi-b2b-account-actions form,
  .yedi-b2b-account-actions button,
  .yedi-b2b-profile-actions form,
  .yedi-b2b-profile-actions button {
    width: 100%;
  }

  .yedi-b2b-consultant-card-actions > a,
  .yedi-b2b-account-actions > a,
  .yedi-b2b-account-actions button,
  .yedi-b2b-profile-actions button {
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }

  .yedi-b2b-trashed-consultants > ul > li {
    align-items: stretch;
    flex-direction: column;
  }

  .yedi-b2b-trashed-consultants form,
  .yedi-b2b-trashed-consultants button {
    width: 100%;
  }

  .yedi-b2b-password-control {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .yedi-b2b-portal *,
  .yedi-b2b-portal *::before,
  .yedi-b2b-portal *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .yedi-b2b-portal {
    display: block;
    width: 100%;
    min-height: 0;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }

  .yedi-b2b-header,
  .yedi-b2b-skip,
  .yedi-b2b-form-actions,
  .yedi-b2b-section-heading .yedi-b2b-button,
  .yedi-b2b-row-actions,
  .yedi-b2b-pagination,
  .yedi-b2b-media input[type="file"],
  .yedi-b2b-file-feedback,
  .yedi-b2b-upload-preview {
    display: none !important;
  }

  .yedi-b2b-main {
    display: block;
    padding: 0;
  }

  .yedi-b2b-portal > .yedi-b2b-notice {
    margin: 0 0 16px;
  }

  .yedi-b2b-metrics,
  .yedi-b2b-consultant-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yedi-b2b-metrics article,
  .yedi-b2b-consultant-grid article,
  .yedi-admin-card,
  .yedi-form-section,
  .yedi-b2b-table-wrap,
  .yedi-b2b-form,
  .yedi-b2b-media {
    break-inside: avoid;
    box-shadow: none !important;
  }
}
