/* AVP sign-in, trade navigation, and account creation workspaces. */
body.auth-page {
  display: block !important;
  min-height: 100vh;
  margin: 0;
  background: #f3f6f2 !important;
  color: #203a2a;
  font-family: "Segoe UI", system-ui, sans-serif !important;
}
.avp-auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 0.96fr); }
.avp-auth-story {
  position: relative;
  overflow: hidden;
  display: flex;
  padding: clamp(32px, 5vw, 72px);
  background: radial-gradient(circle at 8% 92%, rgba(112, 172, 86, .24), transparent 38%), linear-gradient(145deg, #103522, #1d5535 68%, #286541);
  color: #fff;
}
.avp-auth-story::after { content: ""; position: absolute; right: -190px; bottom: -230px; width: 470px; height: 470px; border: 1px solid rgba(218, 244, 210, .18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255, 255, 255, .035), 0 0 0 150px rgba(255, 255, 255, .025); pointer-events: none; }
.avp-auth-story-inner { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; max-width: 610px; margin: 0 auto; }
.avp-auth-home { align-self: flex-start; color: #e3f3df; font-size: 14px; font-weight: 650; line-height: 1.5; text-decoration: none; }
.avp-auth-home:hover, .avp-auth-home:focus-visible { color: #fff; text-decoration: underline; }
.avp-auth-logo { display: block; width: min(250px, 70%); height: auto; max-height: 92px; object-fit: contain; object-position: left center; margin: 50px 0 0; filter: brightness(0) invert(1); }
.avp-auth-story-copy { margin: auto 0; padding: 70px 0; }
.avp-auth-eyebrow, .avp-auth-card-label { display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em; line-height: 1.45; }
.avp-auth-eyebrow { color: #bee3a7; }
body.auth-page .avp-auth-story h1 { max-width: 590px; margin: 18px 0 20px; color: #fff; font-size: clamp(43px, 4.5vw, 67px); font-weight: 750; letter-spacing: -.045em; line-height: 1.08; }
body.auth-page .avp-auth-story-copy > p { max-width: 485px; margin: 0; color: #d8ead8; font-size: 18px; line-height: 1.65; }
.avp-auth-features { display: grid; gap: 0; max-width: 470px; margin-top: 38px; border-top: 1px solid rgba(226, 244, 222, .23); }
.avp-auth-features > div { display: flex; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid rgba(226, 244, 222, .17); }
.avp-auth-features span { color: #b8dc9c; font-size: 12px; font-weight: 800; letter-spacing: .05em; }
.avp-auth-features strong { color: #f3fbef; font-size: 15px; font-weight: 650; }
.avp-auth-story-inner > small { color: #c3dbc5; font-size: 13px; }
.avp-auth-main { min-width: 0; display: grid; place-items: center; padding: clamp(28px, 5vw, 72px); }
.avp-auth-card { width: min(100%, 480px); padding: clamp(28px, 4vw, 48px); border: 1px solid #dde8dd; border-radius: 20px; background: #fff; box-shadow: 0 22px 65px rgba(20, 55, 32, .08); }
.avp-auth-mobile-logo { display: none; }
.avp-auth-card-label { color: #417b4a; }
body.auth-page .avp-auth-card h2 { margin: 12px 0 10px; color: #173b27; font-size: clamp(32px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -.04em; }
body.auth-page .avp-auth-lead { margin: 0 0 30px; color: #5b7062; font-size: 16px; line-height: 1.6; }
.avp-auth-form { display: grid; gap: 19px; }
body.auth-page .avp-auth-form label.field { display: flex; flex-direction: column; gap: 8px; color: #304f39; font-size: 15px !important; font-weight: 700; line-height: 1.4; }
body.auth-page .avp-auth-form input { width: 100%; min-height: 54px !important; padding: 13px 15px; border: 1px solid #bdcdbf; border-radius: 9px; background: #fff; color: #193725; font-size: 16px !important; line-height: 1.4; }
body.auth-page .avp-auth-form input:focus-visible { outline: 3px solid rgba(71, 150, 81, .25); outline-offset: 2px; border-color: #3b8c4c; }
body.auth-page .avp-auth-form .btn { min-height: 55px; margin-top: 3px; padding: 14px 20px; border: 0; border-radius: 9px; background: #245f38; color: #fff; font-size: 16px !important; font-weight: 750; cursor: pointer; box-shadow: none; }
body.auth-page .avp-auth-form .btn:hover { background: #194a2c; }
body.auth-page .avp-auth-form .btn:focus-visible, .avp-auth-help a:focus-visible, .avp-auth-home:focus-visible { outline: 3px solid #8ac877; outline-offset: 3px; }
.avp-auth-help { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 30px; padding-top: 24px; border-top: 1px solid #e3ebe3; }
.avp-auth-help strong { display: block; color: #294c33; font-size: 15px; }
body.auth-page .avp-auth-help p { margin: 5px 0 0; color: #607365; font-size: 14px; line-height: 1.5; }
.avp-auth-help a { flex: none; color: #205d36; font-size: 14px; font-weight: 750; line-height: 1.5; text-decoration: none; }
.avp-auth-help a:hover { text-decoration: underline; }
body.auth-page .avp-auth-footnote { margin: 25px 0 0; color: #718079; font-size: 13px; line-height: 1.5; }
body.auth-page .avp-auth-card .notice-error { margin-bottom: 20px; font-size: 15px; line-height: 1.5; }
@media (max-width: 980px) {
  .avp-auth-layout { grid-template-columns: 1fr; }
  .avp-auth-story { padding: 25px 24px 28px; }
  .avp-auth-story-inner { max-width: 660px; }
  .avp-auth-logo { width: 185px; max-height: 58px; margin: 20px 0 0; }
  .avp-auth-story-copy { padding: 26px 0 0; }
  body.auth-page .avp-auth-story h1 { margin: 9px 0; font-size: 32px; }
  body.auth-page .avp-auth-story-copy > p { font-size: 15px; }
  .avp-auth-features, .avp-auth-story-inner > small { display: none; }
  .avp-auth-main { padding: 28px 18px 45px; }
  .avp-auth-card { width: min(100%, 580px); }
}
@media (max-width: 540px) {
  .avp-auth-story { padding: 22px 18px; }
  .avp-auth-logo { width: 165px; margin-top: 16px; }
  body.auth-page .avp-auth-story h1 { font-size: 28px; }
  .avp-auth-main { padding: 18px 12px 32px; }
  .avp-auth-card { padding: 28px 22px; border-radius: 15px; }
  .avp-auth-help { flex-direction: column; gap: 10px; }
}

/* Clear hierarchy and comfortable touch targets throughout the trade sidebar. */
body.app-shell .sidebar { font-family: "Segoe UI", system-ui, sans-serif; }
body.app-shell .side-heading { color: #b1cbb7 !important; font-size: 12px !important; font-weight: 750 !important; letter-spacing: .09em !important; line-height: 1.45 !important; }
body.app-shell .side-nav .nav-link { min-height: 45px !important; color: #d6e5d9; font-size: 15px !important; font-weight: 600 !important; line-height: 1.4 !important; letter-spacing: .005em; }
body.app-shell .side-nav .nav-link.on { color: #fff; font-weight: 750 !important; }
body.app-shell .side-nav .nav-link:hover { color: #fff; }
body.app-shell .side-nav .nav-link svg { color: #b2cbb7; }
body.app-shell .side-person strong { color: #fff; font-size: 14px; line-height: 1.4; }
body.app-shell .side-person small { color: #c0d2c3; font-size: 12px; line-height: 1.4; }
body.app-shell .side-nav .nav-link:focus-visible { outline: 3px solid #a7d982; outline-offset: -3px; }

/* Each create form has its own page and remains readable at narrow widths. */
body.app-shell:is(.page-customer_new, .page-supplier_new, .page-commission_customer_new) .content { min-width: 0; }
body.app-shell :is(.directory-create-panel, .commission-create-panel) .form-section-heading strong { font-size: 15px; line-height: 1.4; }
body.app-shell :is(.directory-create-panel, .commission-create-panel) .form-section-heading small { color: #607367; font-size: 14px !important; line-height: 1.5; }
body.app-shell :is(.directory-create-panel, .commission-create-panel) .form-action-bar strong { font-size: 14px; }
body.app-shell :is(.directory-create-panel, .commission-create-panel) .form-action-bar span { font-size: 14px; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { body.auth-page * { animation: none !important; scroll-behavior: auto !important; } }

/* Account landing: separate, straightforward ways into each workspace. */
body.app-shell.page-account_directory .partner-hub {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 6px 0 22px;
}
body.app-shell .partner-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 270px;
  padding: clamp(24px, 2.6vw, 34px);
  border: 1px solid #d8e6da;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(23, 61, 36, .045);
}
body.app-shell .partner-card-icon {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  flex: none;
  border-radius: 12px;
  background: #eaf4e8;
  color: #28643c;
}
body.app-shell .partner-card-icon svg { width: 23px; height: 23px; }
body.app-shell .partner-card-copy h2 { margin: 22px 0 8px; color: #193e29; font-size: 23px; line-height: 1.2; letter-spacing: -.025em; }
body.app-shell .partner-card-copy p { max-width: 450px; margin: 0; color: #607366; font-size: 16px !important; line-height: 1.55; }
body.app-shell .partner-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: auto; padding-top: 26px; }
body.app-shell .partner-card-actions .btn { min-height: 46px; }
body.app-shell .partner-secondary-link { color: #25613a; font-size: 15px; font-weight: 700; line-height: 1.5; text-decoration: none; }
body.app-shell .partner-secondary-link:hover, body.app-shell .partner-tool-link:hover { color: #123f25; text-decoration: underline; }
body.app-shell .partner-secondary-link:focus-visible, body.app-shell .partner-tool-link:focus-visible { outline: 3px solid #8ac877; outline-offset: 4px; }
body.app-shell .partner-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 22px 26px; border: 1px solid #dce8dc; border-radius: 14px; background: #f6faf5; }
body.app-shell .partner-tools h2 { margin: 0 0 5px; color: #234a31; font-size: 17px; line-height: 1.35; }
body.app-shell .partner-tools p { margin: 0; color: #607366; font-size: 15px !important; line-height: 1.5; }
body.app-shell .partner-tools-links { display: flex; flex-wrap: wrap; gap: 12px 20px; }
body.app-shell .partner-tool-link { color: #25613a; font-size: 15px; font-weight: 700; text-decoration: none; }

/* Make both directory screens feel like part of the same workspace. */
body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 16px 0 18px;
  padding: 18px;
  border: 1px solid #dce8dd;
  border-radius: 13px;
  background: #fff;
}
body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter .field { flex: 1 1 155px; min-width: 145px; margin: 0; }
body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter .field-search { flex: 2 1 240px; }
body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter :is(input, select) { width: 100%; }
body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter .btn { flex: 0 0 auto; }
body.app-shell:is(.page-customers, .page-suppliers) .directory-panel { border: 1px solid #dce8dd; border-radius: 14px; box-shadow: 0 8px 25px rgba(23, 61, 36, .035); }
body.app-shell:is(.page-customers, .page-suppliers) .directory-panel .table-scroll { max-width: 100%; overflow-x: auto; }
body.app-shell:is(.page-customers, .page-suppliers) .directory-panel .data-table { min-width: 760px; }
body.app-shell:is(.page-customers, .page-suppliers) .directory-panel .data-table th { color: #365941; background: #f0f6ef; }
body.app-shell:is(.page-customers, .page-suppliers) .directory-panel .data-table tbody tr:nth-child(even) { background: #fbfdfb; }
body.app-shell:is(.page-customers, .page-suppliers) .directory-panel .data-table tbody tr:hover { background: #f0f8ee; }
@media (max-width: 900px) {
  body.app-shell.page-account_directory .partner-hub { grid-template-columns: 1fr; }
  body.app-shell .partner-card { min-height: 0; }
}
@media (max-width: 650px) {
  body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter { align-items: stretch; flex-direction: column; padding: 16px; }
  body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter .field,
  body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter .field-search { flex: 1 1 auto; width: 100%; min-width: 0; }
  body.app-shell:is(.page-customers, .page-suppliers) .partner-directory-filter .btn { width: 100%; }
  body.app-shell .partner-tools { align-items: flex-start; flex-direction: column; }
}
