:root {
  --internal-green-900: #003f2f;
  --internal-green-800: #075b3e;
  --internal-green-700: #008653;
  --internal-gold: #f4a622;
  --internal-line: #dce8e1;
  --internal-muted: #5d7069;
  --internal-card-shadow: 0 28px 70px rgba(20, 70, 45, 0.1);
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.site-header {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  border-bottom-color: rgba(0, 122, 77, 0.16);
  box-shadow: 0 10px 26px rgba(20, 70, 45, 0.055);
}

/* Intermediate widths keep the authenticated action inside the header container. */
@media (min-width: 621px) and (max-width: 1279px) {
  .site-header .internal-header-top {
    position: relative;
  }

  .site-header .internal-primary-nav {
    position: absolute;
    top: 50%;
    right: 0;
    left: auto;
    width: auto;
    padding: 0;
    transform: translateY(-50%);
  }
}

.header-subnav {
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  border-top: 1px solid rgba(0, 122, 77, 0.14);
  border-bottom: 1px solid rgba(0, 122, 77, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 252, 249, 0.92));
}

.wrapper.p-t-m {
  width: min(1200px, calc(100% - 40px));
  padding-top: 36px;
}

.wrapper-accounts,
.wrapper-business,
.events-wrapper,
.profile-dashboard,
.wrapper-profile {
  border: 1px solid rgba(0, 122, 77, 0.18);
  border-radius: 10px;
  background:
    radial-gradient(circle at 95% 8%, rgba(244, 166, 34, 0.1), transparent 24%),
    radial-gradient(circle at 4% 88%, rgba(0, 134, 83, 0.07), transparent 26%),
    linear-gradient(135deg, #ffffff, #fbfdfb);
  box-shadow: var(--internal-card-shadow);
}

.wrapper-business,
.events-wrapper,
.wrapper-profile {
  padding: 46px 50px 50px;
}

.profile-dashboard {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 28px;
}

.profile-nav {
  width: 285px;
  flex: 0 0 285px;
  float: none;
  overflow: hidden;
  border: 1px solid rgba(0, 122, 77, 0.14);
  border-top: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(20, 70, 45, 0.06);
}

.profile-nav .title {
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--internal-green-700), #0a9b61);
  color: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.profile-nav li {
  border-top: 1px solid rgba(0, 122, 77, 0.08);
}

.profile-nav a {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: var(--internal-green-900);
  font-size: 15px;
  font-weight: 800;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.profile-nav a:hover {
  background: rgba(231, 247, 236, 0.78);
  color: var(--internal-green-700);
  transform: translateX(2px);
}

.profile-nav li.is-active a {
  background: rgba(231, 247, 236, 0.96);
  color: var(--internal-green-700);
  box-shadow: inset 4px 0 0 var(--internal-green-600);
}

.product-list-top-action {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 26px auto 34px;
  width: 100%;
}

.product-list-top-action .button {
  width: min(560px, 100%);
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  line-height: 1.2;
  text-align: center;
}

.profile-list {
  width: auto;
  min-width: 0;
  flex: 1 1 auto;
  float: none;
  margin-left: 0;
  padding: 34px;
  border: 1px solid rgba(0, 122, 77, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(20, 70, 45, 0.055);
}

.profile-list .banner {
  overflow: hidden;
  border-radius: 10px;
}

.accounts-login {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 34px;
  align-items: stretch;
}

.accounts-login > div {
  width: auto !important;
  padding: 38px 42px !important;
  border: 1px solid rgba(0, 122, 77, 0.12) !important;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(20, 70, 45, 0.045);
  vertical-align: top;
}

.accounts-login > div.bd-r {
  border-right: 1px solid rgba(0, 122, 77, 0.12) !important;
}

.accounts-login .form-block {
  margin-top: 28px;
}

.accounts-login .field:last-child {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.accounts-login .field:last-child .button {
  flex: 0 0 auto;
}

.accounts-login .field:last-child .pull-left,
.accounts-login .field:last-child .pull-right {
  float: none;
}

.accounts-login .field:last-child a {
  float: none;
  margin-top: 0;
  color: var(--internal-muted);
}

.accounts-login .text-default {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.accounts-login .text-default p {
  max-width: 430px;
}

.accounts-login .text-default .button {
  margin-top: 22px;
}

.title-large {
  margin: 0;
  color: var(--internal-green-900);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 34px;
  line-height: 1.16;
  text-transform: none;
}

.border-section {
  border-top: 0;
}

.message-alert,
.bd-gray,
.text-default,
.catalog-search .content {
  border: 1px solid rgba(0, 122, 77, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f9fcfa);
  box-shadow: 0 12px 28px rgba(20, 70, 45, 0.04);
}

.message-alert {
  padding: 18px 20px;
}

.message-alert p,
.text-default p,
.catalog-result p,
.catalog-list li p {
  color: var(--internal-muted);
}

.form fieldset,
.accounts-register .form-register fieldset,
.form-search fieldset {
  padding: 30px;
  border: 1px solid rgba(0, 122, 77, 0.12);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 253, 251, 0.96));
  box-shadow: 0 14px 34px rgba(20, 70, 45, 0.045);
}

.form h2 {
  color: var(--internal-green-900);
  font-size: 19px;
}

.form label {
  margin-bottom: 8px;
  color: var(--internal-green-900);
  font-size: 13px;
  font-weight: 800;
}

.form input,
.form textarea,
.form select {
  min-height: 48px;
  border: 1px solid rgba(0, 122, 77, 0.18);
  border-radius: 9px;
  background-color: #fff;
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.form input:-webkit-autofill,
.form input:-webkit-autofill:hover,
.form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}

.form textarea {
  min-height: 150px;
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  border-color: var(--internal-green-700);
  box-shadow: 0 0 0 3px rgba(0, 134, 83, 0.12);
}

.catalog-list,
.catalog-result {
  overflow: hidden;
  border: 1px solid rgba(0, 122, 77, 0.12);
  border-radius: 10px;
  background: #fff;
}

.catalog-list li,
.catalog-result li {
  border-bottom: 1px solid rgba(0, 122, 77, 0.1);
  padding: 16px 18px;
  color: var(--internal-green-900);
  transition: background-color 180ms ease;
}

.catalog-list li:hover,
.catalog-result li:hover {
  background: rgba(231, 247, 236, 0.58);
}

.catalog-header {
  border-color: rgba(0, 122, 77, 0.16);
  background: var(--internal-green-900);
}

.catalog-header li,
.catalog-header li:hover {
  background: var(--internal-green-900) !important;
  color: #fff;
}

.catalog-list li .name {
  border-left-color: var(--internal-green-700);
  color: var(--internal-muted);
}

.button,
.button-green,
.button-green-light,
.button-orange {
  border-radius: 7px;
  font-family: Inter, Arial, sans-serif;
  font-weight: 900;
}

.button-green,
.button-green-light {
  border-color: var(--internal-green-700);
  background: var(--internal-green-700);
  color: #fff;
  box-shadow: 0 12px 26px rgba(0, 122, 77, 0.14);
}

.button-orange {
  border-color: var(--internal-gold);
  background: var(--internal-gold);
  color: #fff;
}

.button-red {
  border-radius: 7px;
}

.form-search ul,
.form-register fieldset ul {
  display: flex;
  flex-wrap: wrap;
  gap: 22px 26px;
  overflow: visible;
}

.form-search li {
  width: calc(50% - 13px);
  float: none;
  margin-right: 0 !important;
}

.form-search .text-center {
  margin-top: 26px;
}

.wrapper-business .form-register .field,
.events-wrapper .form-register .field {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .profile-dashboard {
    display: block;
    padding: 18px;
  }

  .profile-nav {
    width: 100%;
    margin-bottom: 18px;
  }

  .profile-list {
    width: 100%;
    padding: 24px 20px;
  }

  .accounts-login {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .header-subnav .secondary-nav {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin: 0 auto !important;
    padding: 10px 14px !important;
    overflow: visible !important;
  }

  .header-subnav .secondary-nav a {
    width: 100%;
    min-width: 0 !important;
    height: auto !important;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px !important;
    font-size: 11px !important;
    line-height: 1.15;
    text-align: center;
    white-space: normal !important;
  }

  .header-subnav .secondary-nav .nav-login {
    padding: 0 8px !important;
  }

  .wrapper.p-t-m {
    width: 100%;
    padding: 28px 14px 54px;
  }

  .wrapper-accounts,
  .wrapper-business,
  .events-wrapper,
  .wrapper-profile {
    padding: 24px 20px;
  }

  .title-large {
    font-size: 31px;
  }

  .form fieldset,
  .accounts-register .form-register fieldset,
  .form-search fieldset {
    padding: 22px 20px;
  }

  .form-search ul,
  .form-register fieldset ul {
    display: block;
  }

  .form-search li,
  .form-register .field,
  .form-register .field > div,
  .form input,
  .form textarea,
  .form select {
    width: 100% !important;
    max-width: 100%;
  }

  .accounts-login > div {
    padding: 24px 20px !important;
  }

  .accounts-login .field:last-child {
    align-items: stretch;
    flex-direction: column;
  }

  .form-register .field:not(:last-child),
  .form-search li:not(:last-child) {
    margin-bottom: 18px;
  }
}


/* Codex internal mobile clarity 2026-08-23 */
@media (max-width: 620px) {
  .internal-header-top {
    padding: 12px 0 10px;
  }

  .internal-header-top .brand img {
    width: 214px;
    max-width: 76vw;
  }

  .internal-primary-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 8px;
  }

  .internal-primary-nav .header-button {
    width: min(220px, 100%);
    min-height: 42px;
    border-radius: 12px;
  }

  .profile-dashboard {
    padding: 14px;
    border-radius: 14px;
  }

  .profile-nav {
    margin-bottom: 14px;
    border-radius: 12px;
  }

  .profile-nav ul {
    display: none;
  }

  .profile-nav .title {
    padding: 15px 18px;
    font-size: 14px;
  }

  .profile-nav a {
    min-height: 52px;
    padding: 0 16px;
    font-size: 14px;
  }

  .profile-list {
    padding: 18px 14px;
    border-radius: 12px;
  }

  .profile-list .banner img {
    border-radius: 10px;
  }

  .product-list-top-action {
    margin: 24px auto 28px !important;
  }

  .product-list-top-action .button {
    width: min(560px, 100%) !important;
    min-height: 54px !important;
    padding: 0 18px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
  }
}

/* Modo instalado no celular: torna as telas internas mais parecidas com app, sem afetar desktop nem navegador mobile comum. */
.shortcut-context-note,
.shortcut-only-title {
  display: none;
}

@media (max-width: 820px) {
  html.agro-standalone-mode body {
    background: linear-gradient(180deg, #f4fbf7 0%, #ffffff 100%);
  }

  html.agro-standalone-mode .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(0, 82, 51, 0.08);
  }

  html.agro-standalone-mode .internal-header-top {
    min-height: 74px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  html.agro-standalone-mode .internal-header-top .brand img {
    width: 168px;
    max-height: 58px;
  }

  html.agro-standalone-mode .internal-primary-nav .header-button {
    min-width: 74px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    font-size: 13px;
  }

  html.agro-standalone-mode .header-subnav {
    display: none;
  }

  html.agro-standalone-mode .site-footer-modern {
    display: none;
  }

  html.agro-standalone-mode .wrapper.p-t-m {
    width: min(100% - 22px, 620px);
    padding-top: 14px;
  }

  html.agro-standalone-mode .profile-dashboard {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  html.agro-standalone-mode .profile-nav {
    width: 100%;
    float: none;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0, 82, 51, 0.08);
    overflow: hidden;
  }

  html.agro-standalone-mode .profile-nav .title {
    display: flex;
  }

  html.agro-standalone-mode .profile-nav ul,
  html.agro-standalone-mode .profile-nav .menu-account {
    display: none;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
    background: #ffffff;
  }

  html.agro-standalone-mode .profile-nav li {
    border: 0;
  }

  html.agro-standalone-mode .profile-nav a {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    background: #eef9f3;
    color: var(--internal-green-900);
    font-size: 15px;
    font-weight: 900;
  }

  html.agro-standalone-mode .profile-nav li.is-active a {
    background: var(--internal-green-700);
    color: #fff;
    box-shadow: none;
  }

  html.agro-standalone-mode .profile-list {
    width: 100%;
    margin: 14px 0 0;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(0, 122, 77, 0.12);
    background: #fff;
    box-shadow: 0 16px 36px rgba(0, 82, 51, 0.08);
  }

  html.agro-standalone-mode .title-large {
    font-size: 27px;
    line-height: 1.15;
  }

  html.agro-standalone-mode .standard-title {
    display: none;
  }

  html.agro-standalone-mode .shortcut-only-title {
    display: block;
  }

  html.agro-standalone-mode .shortcut-context-note {
    display: block;
    margin: 12px 0 18px;
    padding: 14px 16px;
    border-left: 5px solid var(--internal-green-700);
    border-radius: 16px;
    background: #eef9f3;
    color: var(--internal-green-900);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
  }

  html.agro-standalone-mode .product-list-top-action {
    margin: 18px auto 22px !important;
  }

  html.agro-standalone-mode .product-list-top-action .button,
  html.agro-standalone-mode .button.button-orange,
  html.agro-standalone-mode .button.button-green,
  html.agro-standalone-mode .button.button-green-light {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    white-space: normal;
    text-align: center;
    line-height: 1.18;
  }

  html.agro-standalone-mode .catalog-list li {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 16px 14px;
  }

  html.agro-standalone-mode .catalog-list.catalog-header:not(.product-catalog-header) {
    display: none;
  }

  html.agro-standalone-mode .product-catalog-header > li {
    gap: 6px;
    padding: 8px 10px;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-search {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    width: 100% !important;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-search input {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 34px !important;
    font-size: 15px !important;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-search button {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    min-height: 34px !important;
    margin-left: 0 !important;
    padding: 0 8px !important;
    border-radius: 10px !important;
  }

  html.agro-standalone-mode .catalog-list li p {
    font-size: 17px;
    font-weight: 800;
    color: var(--internal-green-900);
  }

  html.agro-standalone-mode .catalog-list .button,
  html.agro-standalone-mode .button-add-product,
  html.agro-standalone-mode .button-remove-product {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
  }

  html.agro-standalone-mode .form fieldset,
  html.agro-standalone-mode .accounts-register .form-register fieldset,
  html.agro-standalone-mode .form-search fieldset {
    padding: 18px;
    border-radius: 18px;
  }

  html.agro-standalone-mode .form .field,
  html.agro-standalone-mode .form .field.size-100,
  html.agro-standalone-mode .form .field.size-200,
  html.agro-standalone-mode .form .field.size-320,
  html.agro-standalone-mode .form .pull-left {
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
  }

  html.agro-standalone-mode .form input,
  html.agro-standalone-mode .form select,
  html.agro-standalone-mode .form textarea {
    width: 100% !important;
    min-height: 46px;
    border-radius: 12px;
  }

  html.agro-standalone-mode .form-search .text-center {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
}


/* Ajustes de proporcao dos botoes nas listas de produtos */
.product-list-top-action .button.button-orange {
  max-width: 360px;
  min-height: 52px;
  font-size: 14px;
  padding: 0 18px;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}

.catalog-list .button-remove-product {
  min-width: 0;
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 12px;
}

@media (max-width: 620px) {
  .product-list-top-action {
    margin-top: 28px !important;
    margin-bottom: 28px !important;
  }

  .product-list-top-action .button.button-orange {
    width: min(330px, 88%) !important;
    min-height: 50px !important;
    font-size: 14px !important;
  }

  .catalog-list .button-remove-product {
    min-width: 0;
    width: auto;
    min-height: 36px;
    font-size: 12px;
    padding: 0 12px;
  }
}

/* Botao sair compacto no cabecalho */
.header-actions .button,
.header-actions .button-green,
.site-header .button[href*="logout"],
.site-header a[href*="logout"],
.header a[href*="logout"] {
  min-width: 0;
  width: auto;
  min-height: 38px;
  padding: 0 22px;
}

@media (max-width: 620px) {
  .header-actions .button,
  .header-actions .button-green,
  .site-header .button[href*="logout"],
  .site-header a[href*="logout"],
  .header a[href*="logout"] {
    min-height: 34px;
    padding: 0 16px;
    font-size: 13px;
  }
}


/* Ajustes finais mobile: cabecalho e remover proporcional */
@media (max-width: 620px) {
  body:not(.home-page) header,
  body:not(.home-page) .site-header,
  body:not(.home-page) .main-header {
    position: relative;
    min-height: 168px;
  }

  body:not(.home-page) header .logo img,
  body:not(.home-page) .site-header .logo img,
  body:not(.home-page) .main-header .logo img,
  body:not(.home-page) header img[alt*="Agro"],
  body:not(.home-page) .site-header img[alt*="Agro"] {
    max-width: 310px !important;
    width: 76vw !important;
    height: auto !important;
  }

  body:not(.home-page) header a[href*="logout"],
  body:not(.home-page) .site-header a[href*="logout"],
  body:not(.home-page) .main-header a[href*="logout"] {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 34px !important;
    padding: 0 16px !important;
    border-radius: 10px !important;
    font-size: 13px !important;
  }

  .catalog-list form,
  .catalog-list li form,
  .product-list form,
  .product-list li form {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .catalog-list .button-remove-product,
  .product-list .button-remove-product,
  button.button-remove-product {
    display: inline-flex !important;
    width: auto !important;
    max-width: none !important;
    min-width: 112px !important;
    min-height: 40px !important;
    padding: 0 18px !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    flex: 0 0 auto !important;
  }
}


/* Ajuste cabecalho mobile igual area de uso */
@media (max-width: 620px) {
  body:not(.home-page) header,
  body:not(.home-page) .site-header,
  body:not(.home-page) .main-header {
    position: relative !important;
    min-height: 138px !important;
    padding: 26px 42px 20px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }

  body:not(.home-page) header .logo,
  body:not(.home-page) .site-header .logo,
  body:not(.home-page) .main-header .logo {
    margin: 0 !important;
    display: block !important;
    text-align: left !important;
  }

  body:not(.home-page) header .logo img,
  body:not(.home-page) .site-header .logo img,
  body:not(.home-page) .main-header .logo img,
  body:not(.home-page) header img[alt*="Agro"],
  body:not(.home-page) .site-header img[alt*="Agro"] {
    max-width: 350px !important;
    width: 48vw !important;
    min-width: 260px !important;
    height: auto !important;
    margin: 0 !important;
  }

  body:not(.home-page) header a[href*="logout"],
  body:not(.home-page) .site-header a[href*="logout"],
  body:not(.home-page) .main-header a[href*="logout"] {
    position: absolute !important;
    top: 38px !important;
    right: 42px !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 0 26px !important;
    border-radius: 18px !important;
    font-size: 15px !important;
  }
}


/* Ajuste logo tela inicial do atalho sem login */
@media (max-width: 620px) {
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .shortcut-entry-logo,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .home-logo,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .brand-logo,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) header .logo,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .site-header .logo {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    margin: 26px 0 28px !important;
    padding-left: 42px !important;
  }

  html.agro-standalone-mode body.home-page:not(.user-authenticated) .shortcut-entry-logo img,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .home-logo img,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .brand-logo img,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) header .logo img,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) .site-header .logo img,
  html.agro-standalone-mode body.home-page:not(.user-authenticated) img[alt*="Agro"] {
    width: 48vw !important;
    min-width: 260px !important;
    max-width: 350px !important;
    height: auto !important;
    margin: 0 !important;
  }
}


/* Ajuste cabecalho standalone em telas de login e internas */
@media (max-width: 820px) {
  html.agro-standalone-mode .site-header {
    position: relative !important;
    min-height: 152px !important;
    padding: 28px 42px 22px !important;
    display: block !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  html.agro-standalone-mode .site-header .internal-header-top,
  html.agro-standalone-mode .site-header .container {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }

  html.agro-standalone-mode .site-header .brand,
  html.agro-standalone-mode .site-header .logo {
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
    display: block !important;
  }

  html.agro-standalone-mode .site-header .brand img,
  html.agro-standalone-mode .site-header .logo img,
  html.agro-standalone-mode .site-header img[alt*="Agro"] {
    width: 48vw !important;
    min-width: 260px !important;
    max-width: 350px !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
  }

  html.agro-standalone-mode .site-header .header-actions,
  html.agro-standalone-mode .site-header .internal-primary-nav {
    margin-left: auto !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
  }

  html.agro-standalone-mode .site-header a[href*="logout"],
  html.agro-standalone-mode .site-header .header-button[href*="logout"] {
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 48px !important;
    padding: 0 26px !important;
    border-radius: 18px !important;
    font-size: 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}


/* Correcao fina cabecalho standalone login */
@media (max-width: 820px) {
  html.agro-standalone-mode .site-header {
    min-height: 112px !important;
    padding: 24px 18px 18px !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  html.agro-standalone-mode .site-header .internal-header-top,
  html.agro-standalone-mode .site-header .container {
    width: 100% !important;
    max-width: 520px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 14px !important;
  }

  html.agro-standalone-mode .site-header .brand,
  html.agro-standalone-mode .site-header .logo {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  html.agro-standalone-mode .site-header .brand img,
  html.agro-standalone-mode .site-header .logo img,
  html.agro-standalone-mode .site-header img[alt*="Agro"] {
    width: min(190px, 58vw) !important;
    min-width: 0 !important;
    max-width: 190px !important;
    height: auto !important;
    margin: 0 !important;
  }

  html.agro-standalone-mode .site-header .header-actions,
  html.agro-standalone-mode .site-header .internal-primary-nav {
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  html.agro-standalone-mode .site-header a[href*="logout"],
  html.agro-standalone-mode .site-header .header-button[href*="logout"] {
    position: static !important;
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }
}


/* Ajuste definitivo cabecalho atalho login */
@media (max-width: 820px) {
  html.agro-standalone-mode .site-header {
    position: relative !important;
    min-height: 118px !important;
    padding: 28px 18px 18px !important;
    display: block !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  html.agro-standalone-mode .site-header .internal-header-top {
    position: relative !important;
    width: 100% !important;
    max-width: 520px !important;
    min-height: 74px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;
  }

  html.agro-standalone-mode .site-header .brand {
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
  }

  html.agro-standalone-mode .site-header .brand img {
    display: block !important;
    width: 190px !important;
    min-width: 0 !important;
    max-width: 52vw !important;
    height: auto !important;
    margin: 0 !important;
  }

  html.agro-standalone-mode .site-header .internal-primary-nav {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  html.agro-standalone-mode .site-header .internal-primary-nav .header-button,
  html.agro-standalone-mode .site-header .internal-primary-nav a[href*="logout"] {
    width: auto !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}


/* Trava final botao sair atalho topo direito */
@media (max-width: 820px) {
  html.agro-standalone-mode .site-header {
    position: relative !important;
  }

  html.agro-standalone-mode .site-header .internal-primary-nav {
    position: static !important;
    display: block !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.agro-standalone-mode .site-header .internal-primary-nav .header-button[href*="logout"],
  html.agro-standalone-mode .site-header a.header-button[href*="logout"],
  html.agro-standalone-mode .site-header a[href*="logout"] {
    position: absolute !important;
    top: 28px !important;
    right: 18px !important;
    left: auto !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 14px !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    z-index: 50 !important;
  }
}


/* Modo atalho: menu completo somente na tela principal da conta. */
@media (max-width: 820px) {
  html.agro-standalone-mode .profile-dashboard-home .profile-nav {
    display: block !important;
  }

  html.agro-standalone-mode .profile-dashboard:not(.profile-dashboard-home) .profile-nav {
    display: none !important;
  }

  html.agro-standalone-mode .profile-dashboard .profile-list {
    width: 100% !important;
    margin: 0 !important;
  }

  html.agro-standalone-mode .profile-dashboard {
    display: block !important;
  }
}

.account-success-message {
  margin: 16px 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 122, 77, 0.24);
  border-radius: 12px;
  background: #eef9f3;
  color: #005233;
  font-weight: 800;
  line-height: 1.35;
}


/* Botao superior da etapa obrigatoria de produtos. */
.product-list-continuation-top {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.product-list-continuation-top p {
  width: 100%;
  margin: 0;
}

.product-list-continuation-top .button {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Mantem a acao de continuidade legivel quando WebViews aplicam ampliacao de texto. */
.product-list-continuation .button {
  box-sizing: border-box;
  width: min(420px, 100%) !important;
  height: auto !important;
  min-height: 50px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 12px 18px !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-align: center;
}

@media (max-width: 420px) {
  .product-list-continuation .button {
    width: 100% !important;
    min-height: 48px !important;
    padding: 11px 12px !important;
    font-size: 14px !important;
  }
}

.product-progressive-pagination {
  display: none !important;
}

.product-progressive-status {
  min-height: 46px;
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(0, 122, 77, 0.12);
  border-radius: 10px;
  background: #f8fcfa;
  color: var(--internal-muted);
  font-size: 14px;
  line-height: 1.35;
}

.product-progressive-status .button {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.password-change-action {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 122, 77, 0.12);
}

.password-change-action .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  max-width: 100%;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.2;
  white-space: normal;
  text-align: center;
}

.password-change-success {
  padding: 26px 22px;
  text-align: center;
}

.password-change-success p {
  margin: 0;
  color: var(--internal-green-900);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 620px) {
  .password-change-action {
    margin-top: 28px;
    padding-top: 18px;
  }

  .password-change-action .button {
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    font-size: 12px;
  }

  .password-change-success {
    padding: 22px 16px;
  }

  .password-change-success p {
    font-size: 18px;
  }
}

/* Mobile browser: keep internal pages proportional to the compact home header. */
.registration-progress-title {
  display: block;
  margin: 0;
  padding: 14px 16px !important;
  border-left: 5px solid var(--internal-green-700);
  border-radius: 14px;
  background: #eef9f3 !important;
  color: var(--internal-green-900) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: left;
  text-transform: none;
}

@media (max-width: 620px) {
  html:not(.agro-standalone-mode) body:not(.home-page) .site-header {
    min-height: 0 !important;
    padding: 0 !important;
  }

  html:not(.agro-standalone-mode) body:not(.home-page) .site-header .internal-header-top {
    width: calc(100% - 28px) !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 10px 0 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  html:not(.agro-standalone-mode) body:not(.home-page) .site-header .brand {
    display: block !important;
    margin: 0 auto !important;
  }

  html:not(.agro-standalone-mode) body:not(.home-page) .site-header .brand img {
    width: 190px !important;
    min-width: 0 !important;
    max-width: 68vw !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  .registration-progress-title {
    min-height: 0;
    padding: 12px 14px !important;
    font-size: 14px !important;
    text-align: left;
  }

  .product-catalog-header > li {
    display: block !important;
    padding: 9px 10px !important;
  }

  .product-catalog-header .product-catalog-title {
    display: block;
    margin: 0 0 7px;
    font-size: 17px;
    line-height: 1.2;
  }

  .product-catalog-header .product-catalog-search {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 40px !important;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
  }

  .product-catalog-header .product-catalog-search input {
    width: 100% !important;
    min-width: 0 !important;
    height: 40px !important;
    padding: 0 12px !important;
    border: 1px solid rgba(0, 75, 54, 0.2) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--ink) !important;
    font-size: 16px !important;
  }

  .product-catalog-header .product-catalog-search button.button {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* The installed shortcut uses the same compact search composition. */
  html.agro-standalone-mode .product-catalog-header > li {
    display: block !important;
    padding: 9px 10px !important;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-title {
    display: block;
    margin: 0 0 7px;
    font-size: 17px;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-search {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 40px !important;
    gap: 7px !important;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-search input,
  html.agro-standalone-mode .product-catalog-header .product-catalog-search button.button {
    height: 40px !important;
    min-height: 40px !important;
  }

  html.agro-standalone-mode .product-catalog-header .product-catalog-search button.button {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Mobile account pages: reveal content first and keep account navigation optional. */
  .profile-nav .toggle-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }

  .profile-nav .toggle-account:hover,
  .profile-nav .toggle-account:focus,
  .profile-nav .toggle-account.active {
    background: linear-gradient(135deg, var(--internal-green-700), #0a9b61) !important;
    color: #fff !important;
  }

  .profile-nav .toggle-account:hover span,
  .profile-nav .toggle-account:focus span,
  .profile-nav .toggle-account.active span {
    color: #fff !important;
  }

  html:not(.agro-standalone-mode) body:not(.home-page) .site-header .internal-header-top {
    position: relative !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding-top: 34px !important;
  }

  html:not(.agro-standalone-mode) body:not(.home-page) .site-header .internal-primary-nav {
    position: absolute !important;
    top: 2px !important;
    right: 0 !important;
    width: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    margin: 0 !important;
  }

  html:not(.agro-standalone-mode) body:not(.home-page) .site-header .internal-primary-nav .header-button {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    min-width: 78px !important;
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 14px !important;
  }

  /* The account landing page exposes its menu; task pages remain compact. */
  .profile-dashboard-home .profile-nav .menu-account {
    display: block;
  }

  html.agro-standalone-mode .profile-dashboard-home .profile-nav .menu-account {
    display: grid;
  }
}
