:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0d2a32;
  background: #f3f7f5;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #f3f7f5; }
button, a { -webkit-tap-highlight-color: transparent; font: inherit; }
.portal-shell { min-height: 100vh; overflow-x: hidden; }

/* v1.4 — cabeçalho recomposto e totalmente responsivo */
.hero {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  padding: 24px clamp(18px, 5.8vw, 88px) 22px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(90deg, rgba(2,31,26,.78) 0%, rgba(2,31,26,.44) 42%, rgba(2,31,26,.10) 72%, rgba(2,31,26,.02) 100%),
    url('assets/hero-soft.jpg') center 51% / cover no-repeat;
}
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(to top, rgba(15,73,39,.24), transparent);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 66vw);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.28);
}
.hero-kicker {
  display: block;
  margin-bottom: 4px;
  font-size: clamp(10px, .9vw, 14px);
  font-weight: 800;
  letter-spacing: .24em;
}
.hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 47px);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 800;
}
.hero-copy p {
  margin: 7px 0 0;
  max-width: 610px;
  font-size: clamp(13px, 1.25vw, 20px);
  line-height: 1.2;
  font-weight: 450;
}
.hero-logo {
  position: absolute;
  z-index: 3;
  top: 13px;
  right: clamp(190px, 17vw, 260px);
  width: clamp(90px, 8.4vw, 126px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(255,255,255,.18));
}
.current-user {
  position: absolute;
  top: 12px;
  right: clamp(14px, 4vw, 62px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 13px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 5px 18px rgba(0,0,0,.13);
  backdrop-filter: blur(8px);
}
.user-avatar {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e9f4ed;
  color: #207d3b;
  font-size: 11px;
  font-weight: 800;
}
.user-copy { min-width: 0; display: flex; flex-direction: column; }
.user-copy strong { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.user-copy small { font-size: 8.5px; color: #68776f; font-weight: 800; }
.current-user button { border: 0; background: transparent; color: #9a4a31; font-weight: 800; font-size: 10px; cursor: pointer; padding: 6px; }

.modules {
  padding: 16px clamp(16px, 6.2vw, 88px) 24px;
  background: radial-gradient(circle at top left, #fbfdfc 0%, #f4f8f6 65%, #eef4f1 100%);
}
.modules-heading { margin-bottom: 14px; }
.modules-heading h2 { margin: 0; font-size: clamp(28px, 2.3vw, 38px); line-height: 1; letter-spacing: -.04em; }
.modules-heading p { margin: 5px 0 0; color: #69759a; font-size: clamp(13px, 1.15vw, 17px); }
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(80%, 1010px);
}
.module-card {
  position: relative;
  min-width: 0;
  min-height: 110px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px 42px 17px 17px;
  border: 1px solid #dce8e2;
  background: #fff;
  color: #17383c;
  text-decoration: none;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(32,64,57,.08);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.module-card:hover, .module-card:focus-visible { transform: translateY(-2px); border-color: #b9d5c6; box-shadow: 0 9px 24px rgba(32,64,57,.13); outline: none; }
.module-card:focus-visible { box-shadow: 0 0 0 4px rgba(42,138,67,.18), 0 9px 24px rgba(32,64,57,.13); }
.module-card[hidden] { display: none !important; }
.module-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eaf4ee;
  color: #2f7d4a;
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
}
.module-content { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.module-content strong { font-size: 17px; line-height: 1.1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.module-content small { color: #74817b; font-size: 12px; line-height: 1.25; overflow-wrap: anywhere; }
.module-arrow { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 26px; color: #7a9b8b; font-weight: 300; }
.module-empty { padding: 22px; border: 1px dashed #cbdad3; border-radius: 14px; color: #6d7d75; background: #fff; max-width: 720px; }

.portal-values {
  margin: 0 clamp(16px, 4vw, 58px) 18px;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  background: rgba(255,255,255,.94);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(32,64,57,.04);
}
.value-item { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 4px 16px; border-right: 1px solid #dce5e1; }
.value-item:last-child { border-right: 0; }
.value-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: #eaf8ed; color: #1f9a3a; font-size: 16px; font-weight: 900; letter-spacing: -3px; }
.value-item > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.value-item strong { font-size: 12px; line-height: 1.15; }
.value-item small { color: #69759a; font-size: 11px; line-height: 1.25; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #102c31; color: #fff; padding: 11px 16px; border-radius: 999px; font-weight: 700; box-shadow: 0 10px 28px rgba(0,0,0,.22); transition: .2s ease; z-index: 10; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.page-loading { min-height: 100vh; display: grid; place-items: center; font-weight: 700; color: #48645b; }
.page-loading[hidden] { display: none; }

@media (max-width: 900px) {
  .hero { min-height: 152px; padding: 22px 20px 18px; }
  .hero-copy { width: min(620px, 72vw); }
  .hero-copy h1 { font-size: clamp(25px, 4vw, 38px); }
  .hero-logo { right: 178px; width: 92px; }
  .current-user { right: 14px; }
  .modules { padding: 15px 16px 20px; }
  .module-grid { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .portal-values { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; padding: 8px 10px; }
  .value-item { border-right: 0; }
  .value-item:nth-child(odd) { border-right: 1px solid #dce5e1; }
  .value-item:nth-child(-n+2) { border-bottom: 1px solid #dce5e1; }
}

/* Smartphone: cabeçalho recomposto + cards em duas colunas */
@media (max-width: 620px) {
  .hero {
    min-height: 172px;
    padding: 68px 12px 14px;
    align-items: flex-end;
    background-position: 59% center;
  }
  .hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4,38,31,.16), rgba(4,38,31,.70));
    z-index: 1;
  }
  .hero-copy { width: 100%; z-index: 2; }
  .hero-kicker { font-size: 8.5px; letter-spacing: .18em; margin-bottom: 3px; }
  .hero-copy h1 { font-size: clamp(19px, 7vw, 28px); line-height: 1.03; max-width: 95%; }
  .hero-copy p { margin-top: 5px; max-width: 95%; font-size: 10.5px; line-height: 1.18; }
  .hero-logo { top: 9px; left: 11px; right: auto; width: 76px; z-index: 4; }
  .current-user { top: 8px; right: 8px; max-width: calc(100% - 100px); gap: 5px; padding: 4px 5px; border-radius: 10px; }
  .user-avatar { width: 27px; height: 27px; flex-basis: 27px; font-size: 9px; }
  .user-copy strong { max-width: 76px; font-size: 9.5px; }
  .user-copy small { font-size: 7px; }
  .current-user button { font-size: 8.5px; padding: 4px; }

  .modules { padding: 13px 10px 16px; }
  .modules-heading { margin-bottom: 10px; }
  .modules-heading h2 { font-size: 24px; }
  .modules-heading p { font-size: 11.5px; line-height: 1.25; }
  .module-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; width: 100%; }
  .module-card { min-height: 116px; padding: 10px 8px 25px; border-radius: 13px; gap: 7px; align-items: flex-start; flex-direction: column; }
  .module-icon { width: 34px; height: 34px; flex-basis: 34px; border-radius: 9px; font-size: 16px; }
  .module-content { width: 100%; gap: 2px; }
  .module-content strong { font-size: clamp(11.5px, 4vw, 14px); line-height: 1.05; }
  .module-content small { font-size: clamp(8px, 2.8vw, 10px); line-height: 1.15; }
  .module-arrow { right: 8px; bottom: 4px; top: auto; transform: none; font-size: 19px; }

  .portal-values { margin: 0 10px 12px; grid-template-columns: repeat(2, minmax(0,1fr)); padding: 6px; border-radius: 13px; }
  .value-item { gap: 7px; padding: 7px 6px; }
  .value-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; }
  .value-item strong { font-size: 9px; }
  .value-item small { font-size: 8px; line-height: 1.18; }
}

@media (max-width: 340px) {
  .hero { min-height: 166px; padding-top: 64px; }
  .hero-copy h1 { font-size: 18px; }
  .hero-copy p { font-size: 9.5px; }
  .module-card { min-height: 112px; padding-inline: 7px; }
  .module-content strong { font-size: 11px; }
  .module-content small { font-size: 7.7px; }
  .portal-values { grid-template-columns: 1fr; }
  .value-item, .value-item:nth-child(odd), .value-item:nth-child(-n+2) { border-right: 0; border-bottom: 1px solid #dce5e1; }
  .value-item:last-child { border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.auth-body { margin:0; min-height:100vh; background:#eef4f1; }
.auth-shell { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.45fr) minmax(360px,.75fr); }
.auth-visual { background-image:linear-gradient(90deg,rgba(5,49,36,.12),rgba(5,49,36,.02)),url('assets/hero.png'); background-size:cover; background-position:center; }
.auth-panel { display:flex; flex-direction:column; justify-content:center; padding:clamp(32px,6vw,84px); background:#fff; }
.auth-brand { font-size:30px; font-weight:800; font-style:italic; color:#2b9b38; letter-spacing:-1.3px; margin-bottom:30px; }
.auth-brand span { color:#f16a1b; }
.auth-kicker { margin:0 0 8px; color:#2d7a47; text-transform:uppercase; letter-spacing:.13em; font-size:11px; font-weight:900; }
.auth-panel h1 { margin:0; font-size:clamp(32px,4vw,48px); letter-spacing:-.04em; color:#113238; }
.auth-intro { color:#718079; max-width:440px; line-height:1.45; margin:10px 0 26px; }
.auth-form { display:grid; gap:15px; max-width:440px; }
.auth-form label { display:grid; gap:6px; font-size:12px; font-weight:800; color:#36534a; }
.auth-form input { width:100%; border:1px solid #d5e1db; border-radius:11px; padding:13px 14px; font:inherit; outline:none; }
.auth-form input:focus { border-color:#51a369; box-shadow:0 0 0 3px rgba(54,143,77,.12); }
.primary-button { border:0; border-radius:11px; padding:13px 16px; background:#23833e; color:white; font-weight:800; cursor:pointer; }
.primary-button:disabled { opacity:.65; cursor:wait; }
.auth-message { min-height:18px; margin:0; color:#ae3728; font-size:12px; font-weight:700; }
.internal-use { margin-top:28px; color:#8b9892; font-size:11px; font-weight:600; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns:1fr; }
  .auth-visual { min-height:210px; }
  .auth-panel { min-height:calc(100vh - 210px); padding:32px 24px; justify-content:flex-start; }
  .auth-brand { margin-bottom:22px; }
}
@media (max-width: 620px) {
  .auth-visual { min-height:150px; }
  .auth-panel { min-height:calc(100vh - 150px); padding:26px 20px; }
}

/* v1.3 — login padronizado com Amaryllis e Terra Viva Clima */
.login-page{
  min-height:100vh;
  margin:0;
  display:grid;
  place-items:center;
  padding:20px;
  background:radial-gradient(circle at 50% 45%,#fff 0,#f5f9f5 48%,#eef4ef 100%);
  color:#183121;
}
.login-page .login-card{
  width:min(342px,100%);
  padding:28px 24px 24px;
  border-radius:12px;
  border:1px solid #dfe8e1;
  border-top:4px solid #f45a00;
  box-shadow:0 12px 34px rgba(31,75,48,.10);
  background:#fff;
}
.login-page .login-logo{
  display:block;
  width:124px;
  height:62px;
  object-fit:contain;
  object-position:right center;
  margin:0 0 10px auto;
}
.login-page .login-eyebrow{
  color:#f45a00;
  font-size:.82rem;
  line-height:1.2;
  font-weight:800;
  margin:0 0 6px;
}
.login-page .login-card h1{
  margin:0 0 5px;
  font-size:21px;
  line-height:1.15;
  color:#155f35;
  letter-spacing:0;
}
.login-page .login-subtitle{
  font-size:13px;
  line-height:1.35;
  color:#40554a;
  margin:0 0 20px;
}
.login-page .login-form label{
  display:block;
  margin:12px 0 5px;
  color:#183425;
  font-size:12px;
  font-weight:750;
}
.login-page .login-form input{
  display:block;
  width:100%;
  margin-top:5px;
  padding:9px 10px;
  border-radius:7px;
  border:1px solid #aebfb3;
  background:#edf3f7;
  color:#183121;
  outline:none;
  font:inherit;
}
.login-page .login-form input:focus{
  border-color:#4eaa00;
  box-shadow:0 0 0 3px rgba(78,170,0,.10);
}
.login-page .login-button{
  width:100%;
  border:0;
  border-radius:7px;
  padding:9px 12px;
  margin-top:12px;
  font-weight:700;
  background:#1f682f;
  color:#fff;
  cursor:pointer;
}
.login-page .login-button:disabled{opacity:.65;cursor:wait}
.login-page .login-message{
  min-height:18px;
  margin:9px 0 0;
  color:#a33;
  font-size:12px;
  font-weight:700;
}
.login-page .internal-use-note{
  margin-top:10px;
  text-align:center;
  color:#f45a00;
  font-size:.69rem;
  font-weight:800;
  letter-spacing:.01em;
}
.login-page .login-footer{
  margin-top:24px;
  padding-top:12px;
  border-top:1px solid #dce5de;
  color:#63746b;
  font-size:10px;
}
@media(max-width:420px){
  .login-page{padding:14px}
  .login-page .login-card{padding:24px 20px 21px}
}


/* v1.5 — correções finais do cabeçalho móvel e card único de diferenciais */
.portal-values{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0;
  padding:10px 16px;
}
.value-item{
  min-height:64px;
  border-right:0;
  border-bottom:1px solid #dce5e1;
  padding:10px 14px;
}
.value-item:nth-child(odd){border-right:1px solid #dce5e1;}
.value-item:nth-child(n+3){border-bottom:0;}

@media (max-width:620px){
  .hero{
    min-height:188px;
    padding:72px 16px 16px;
    align-items:flex-end;
    background-position:58% center;
  }
  .hero::before{
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(180deg,rgba(4,38,31,.10) 0%,rgba(4,38,31,.28) 38%,rgba(4,38,31,.78) 100%);
    z-index:1;
  }
  .hero-copy{
    width:100%;
    max-width:none;
    z-index:2;
  }
  .hero-kicker{
    font-size:9px;
    letter-spacing:.17em;
    margin-bottom:5px;
  }
  .hero-copy h1{
    font-size:clamp(23px,7.2vw,31px);
    line-height:1.02;
    max-width:100%;
    letter-spacing:-.035em;
  }
  .hero-copy p{
    margin-top:6px;
    max-width:94%;
    font-size:11px;
    line-height:1.22;
  }
  .hero-logo{
    top:10px;
    left:14px;
    right:auto;
    width:82px !important;
    height:auto !important;
    object-fit:contain;
    z-index:4;
  }
  .current-user{
    top:9px;
    right:10px;
    max-width:210px;
    gap:6px;
    padding:5px 7px;
    border-radius:12px;
  }
  .user-avatar{width:30px;height:30px;flex-basis:30px;font-size:10px;}
  .user-copy{min-width:0;max-width:92px;}
  .user-copy strong{max-width:92px;font-size:11px;}
  .user-copy small{font-size:7.5px;}
  .current-user button{font-size:9px;padding:5px 4px;}

  .portal-values{
    margin:0 10px 14px;
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:6px;
    border-radius:14px;
  }
  .value-item{
    min-height:76px;
    gap:8px;
    padding:8px 7px;
  }
  .value-item:nth-child(odd){border-right:1px solid #dce5e1;}
  .value-item:nth-child(-n+2){border-bottom:1px solid #dce5e1;}
  .value-item:nth-child(n+3){border-bottom:0;}
  .value-icon{width:31px;height:31px;flex-basis:31px;font-size:11px;}
  .value-item strong{font-size:9.5px;line-height:1.15;}
  .value-item small{font-size:8px;line-height:1.2;}
}

@media (max-width:340px){
  .hero{min-height:184px;padding:70px 12px 14px;}
  .hero-logo{width:72px !important;left:10px;}
  .current-user{right:7px;max-width:190px;}
  .hero-copy h1{font-size:21px;}
  .hero-copy p{font-size:10px;}
  .portal-values{grid-template-columns:repeat(2,minmax(0,1fr));}
  .value-item,.value-item:nth-child(odd),.value-item:nth-child(-n+2){
    border-bottom:1px solid #dce5e1;
  }
  .value-item:nth-child(odd){border-right:1px solid #dce5e1;}
  .value-item:nth-child(n+3){border-bottom:0;}
}

/* v1.17 — módulos em preparação, Comercial, Administração discreta e cabeçalho desktop ampliado */
.module-card.is-preparing {
  opacity: .48;
  filter: saturate(.55);
  cursor: default;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(32,64,57,.045);
}
.module-card.is-preparing .module-icon {
  background: #eef2ef;
  color: #78847e;
}
.module-card.is-preparing .module-content em {
  margin-top: 3px;
  color: #8b9690;
  font-size: 10px;
  line-height: 1;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.admin-action-row {
  width: min(80%, 1010px);
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}
.admin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(235,112,31,.24);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: #e56f24;
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease;
}
.admin-link:hover,
.admin-link:focus-visible {
  background: #fff8f3;
  border-color: rgba(229,111,36,.48);
  outline: none;
}
.admin-link[hidden] { display: none !important; }

/* Aumento solicitado apenas para visualização em PC. */
@media (min-width: 901px) {
  .hero-logo {
    width: clamp(117px, 10.92vw, 164px);
    right: clamp(248px, 22vw, 338px);
  }
  .current-user {
    max-width: 286px;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 17px;
  }
  .user-avatar {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
  .user-copy strong {
    max-width: 143px;
    font-size: 15.5px;
  }
  .user-copy small { font-size: 11px; }
  .current-user button {
    font-size: 13px;
    padding: 8px;
  }
}

@media (max-width: 900px) {
  .admin-action-row { width: 100%; }
}

@media (max-width: 620px) {
  .module-card.is-preparing .module-content em { font-size: 7.5px; }
  .admin-action-row { padding-top: 8px; }
  .admin-link { min-height: 28px; font-size: 10px; padding: 5px 9px; }
}


/* v1.18 — ações secundárias discretas e remoção do rodapé institucional */
.secondary-action-row {
  width: min(80%, 1010px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
}
.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #dce8e2;
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: #17383c;
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  box-shadow: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.secondary-link:hover,
.secondary-link:focus-visible {
  background: #fff;
  border-color: #b9d5c6;
  transform: translateY(-1px);
  outline: none;
}
.secondary-link[hidden] { display: none !important; }

.admin-link { color: #17383c; border-color: #dce8e2; }
.admin-link:hover, .admin-link:focus-visible { background: #fff; border-color: #b9d5c6; }

@media (max-width: 900px) {
  .secondary-action-row { width: 100%; }
}

@media (max-width: 620px) {
  .secondary-action-row { padding-top: 8px; gap: 8px; }
  .secondary-link { min-height: 28px; font-size: 10px; padding: 5px 9px; }
}


/* v1.23 — redefinição de senha padronizada com a tela de login */
.login-page .password-card{
  width:min(100%,390px);
}
.login-page .password-rule-note{
  margin-top:2px;
  text-align:center;
  font-size:11px;
  color:#6b7972;
}
@media (max-width:620px){
  .login-page .password-card{width:min(100%,360px)}
}


/* v1.26 — critérios de senha com validação visual em tempo real */
.password-criteria{
  margin:4px 0 2px;
  padding:12px 13px;
  border:1px solid #dce7df;
  border-radius:10px;
  background:#f8fbf8;
}
.password-criteria-title{
  margin-bottom:8px;
  font-size:12px;
  font-weight:800;
  color:#294432;
}
.password-rule{
  display:flex;
  align-items:center;
  gap:7px;
  margin:5px 0;
  font-size:12px;
  line-height:1.25;
  color:#78847d;
  transition:color .15s ease;
}
.password-rule .rule-icon{
  width:17px;
  flex:0 0 17px;
  text-align:center;
  font-weight:900;
}
.password-rule.is-valid{
  color:#157a35;
  font-weight:700;
}
.password-rule.is-valid .rule-icon{
  color:#157a35;
}
.password-rule.is-pending .rule-icon{
  color:#a5afa9;
}
.login-button:disabled{
  opacity:.55;
  cursor:not-allowed;
}


/* v1.30 — Portal alinhado ao padrão dos painéis Terra Viva */
:root {
  --tv-green: #4eaa00;
  --tv-green-dark: #1b5c31;
  --tv-orange: #f45a00;
  --tv-header-bg: #f4f4f1;
  --tv-page-bg: #eef2ee;
  --tv-border: #d9e1d9;
  --tv-text: #163c26;
}
body {
  background: var(--tv-page-bg);
  color: var(--tv-text);
}
.hero {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: auto;
  padding: 18px clamp(18px, 4vw, 56px) 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "copy logo"
    "copy user";
  column-gap: 20px;
  row-gap: 10px;
  align-items: start;
  background: var(--tv-header-bg);
  border-bottom: 3px solid var(--tv-orange);
  box-shadow: 0 3px 12px rgba(20, 54, 33, .08);
  overflow: visible;
}
.hero::before,
.hero::after {
  display: none !important;
}
.hero-copy {
  grid-area: copy;
  width: auto;
  max-width: 920px;
  color: var(--tv-text);
  text-shadow: none;
}
.hero-kicker {
  margin-bottom: 6px;
  color: var(--tv-green-dark);
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .22em;
}
.hero-copy h1 {
  margin: 0;
  color: var(--tv-green-dark);
  font-size: clamp(26px, 2.8vw, 42px);
  line-height: 1.05;
  letter-spacing: -.03em;
  font-weight: 800;
}
.hero-copy p {
  margin: 7px 0 0;
  max-width: 920px;
  color: var(--tv-orange);
  font-size: clamp(12px, 1.05vw, 14px);
  line-height: 1.32;
  font-weight: 700;
}
.hero-logo {
  grid-area: logo;
  position: static;
  width: clamp(118px, 10vw, 170px) !important;
  height: auto !important;
  justify-self: end;
  align-self: start;
  filter: none;
}
.current-user {
  grid-area: user;
  position: static;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 260px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid var(--tv-border);
  box-shadow: 0 2px 10px rgba(17, 52, 31, .06);
  backdrop-filter: none;
}
.user-avatar {
  background: #e8f3e1;
  color: var(--tv-green-dark);
}
.user-copy strong {
  color: #173126;
}
.user-copy small {
  color: #617166;
}
.current-user button {
  color: #9e4c25;
}
.modules {
  padding: 22px clamp(16px, 5vw, 56px) 28px;
  background: linear-gradient(180deg, #f3f5f1 0%, #eef2ee 100%);
}
.modules-heading h2 {
  color: #0f3e54;
}
.modules-heading p {
  color: #6d77a0;
}
.module-grid,
.secondary-action-row {
  width: min(100%, 1010px);
}
.module-card {
  border: 1px solid #d7e1da;
  box-shadow: 0 4px 14px rgba(32,64,57,.06);
}
.module-card:hover,
.module-card:focus-visible {
  border-color: rgba(244,90,0,.28);
  box-shadow: 0 8px 22px rgba(32,64,57,.10);
}
.module-icon {
  background: #eef5ea;
  color: var(--tv-green-dark);
}
.module-arrow {
  color: #e67a33;
}
.secondary-link {
  border-color: #d7e1da;
  background: rgba(255,255,255,.72);
}
.secondary-link:hover,
.secondary-link:focus-visible {
  border-color: rgba(244,90,0,.26);
  background: #ffffff;
}

@media (max-width: 900px) {
  .hero {
    padding: 16px 16px 13px;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hero-copy h1 {
    font-size: clamp(24px, 4vw, 34px);
  }
  .hero-copy p {
    font-size: 12px;
  }
  .hero-logo {
    width: 130px !important;
  }
  .current-user {
    max-width: 235px;
  }
  .modules {
    padding: 18px 16px 24px;
  }
}

@media (max-width: 620px) {
  .hero {
    padding: 10px 12px 12px;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "copy copy"
      "logo user";
    column-gap: 10px;
    row-gap: 10px;
  }
  .hero-kicker {
    font-size: 9px;
    letter-spacing: .18em;
    margin-bottom: 4px;
  }
  .hero-copy h1 {
    font-size: 21px;
    line-height: 1.08;
  }
  .hero-copy p {
    margin-top: 6px;
    font-size: 10px;
    line-height: 1.28;
    max-width: 100%;
  }
  .hero-logo {
    width: 96px !important;
    justify-self: start;
  }
  .current-user {
    justify-self: end;
    max-width: 190px;
    gap: 6px;
    padding: 6px 7px;
    border-radius: 11px;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 10px;
  }
  .user-copy strong {
    max-width: 80px;
    font-size: 10px;
  }
  .user-copy small {
    font-size: 7px;
  }
  .current-user button {
    font-size: 8.5px;
    padding: 4px;
  }
}

@media (max-width: 360px) {
  .hero-copy h1 {
    font-size: 19px;
  }
  .hero-copy p {
    font-size: 9.3px;
  }
  .hero-logo {
    width: 88px !important;
  }
  .current-user {
    max-width: 170px;
  }
}


/* v1.31 — refinamentos do cabeçalho e cards dos módulos */
.hero {
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "copy user logo";
  column-gap: 16px;
  align-items: center;
}
.hero-copy {
  max-width: 760px;
}
.hero-copy p {
  max-width: 560px;
  color: var(--tv-orange);
  font-size: clamp(11.5px, 1vw, 13px);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0;
}
.hero-logo {
  justify-self: end;
  align-self: center;
}
.current-user {
  justify-self: end;
  align-self: center;
  margin-right: 0;
}
.user-copy strong {
  font-weight: 700;
}
.module-grid {
  gap: 16px;
}
.module-card {
  min-height: 116px;
  padding: 16px 40px 16px 16px;
  border: 1px solid #d5dfd7;
  border-top: 3px solid var(--tv-orange);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(24, 56, 37, .06);
}
.module-card:hover,
.module-card:focus-visible {
  transform: translateY(-1px);
  border-color: #d2ddd5;
  border-top-color: var(--tv-orange);
  box-shadow: 0 6px 16px rgba(24, 56, 37, .10);
}
.module-card.is-preparing {
  border-top-color: #cfd7d1;
  background: #fbfcfb;
  box-shadow: 0 1px 6px rgba(24, 56, 37, .04);
}
.module-card.is-preparing .module-icon {
  background: #f1f3f1;
}
.module-icon {
  border-radius: 10px;
  background: #edf5e8;
  color: var(--tv-green-dark);
}
.module-content strong {
  color: #173a2a;
  font-size: 18px;
  font-weight: 700;
}
.module-content small {
  color: #5f6f67;
  font-size: 12px;
}
.module-arrow {
  right: 14px;
  font-size: 24px;
  color: #df7a35;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "copy user logo";
    column-gap: 12px;
  }
  .hero-copy {
    max-width: 100%;
  }
  .hero-copy p {
    max-width: 460px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "copy copy copy"
      "user logo logo";
    column-gap: 8px;
    row-gap: 8px;
    align-items: end;
  }
  .hero-copy p {
    max-width: 100%;
    font-size: 9.7px;
    line-height: 1.3;
  }
  .current-user {
    justify-self: start;
    max-width: 176px;
  }
  .hero-logo {
    justify-self: end;
  }
  .module-grid {
    gap: 10px;
  }
  .module-card {
    min-height: 118px;
    padding: 10px 8px 24px;
    border-radius: 10px;
    border-top-width: 3px;
  }
  .module-content strong {
    font-size: 12.5px;
  }
  .module-content small {
    font-size: 9px;
  }
}


/* v1.32 — cabeçalho com logotipo à esquerda e ajuste fino da missão */
.hero {
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo copy user";
  column-gap: 18px;
  align-items: center;
}
.hero-logo {
  grid-area: logo;
  justify-self: start;
  align-self: center;
  width: clamp(138px, 11.5vw, 185px) !important;
  max-width: 100%;
}
.hero-copy {
  grid-area: copy;
  align-self: center;
  max-width: 820px;
}
.hero-copy h1 {
  margin-bottom: 8px;
}
.hero-copy p {
  max-width: 760px;
  font-size: clamp(11.5px, 1vw, 13px);
  line-height: 1.34;
  font-weight: 400;
}
.current-user {
  grid-area: user;
  justify-self: end;
  align-self: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo copy user";
    column-gap: 12px;
  }
  .hero-logo {
    width: 122px !important;
  }
  .hero-copy p {
    max-width: 620px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .hero {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo user"
      "copy copy";
    column-gap: 10px;
    row-gap: 8px;
    align-items: center;
  }
  .hero-logo {
    width: 108px !important;
    justify-self: start;
  }
  .current-user {
    justify-self: end;
    max-width: 176px;
  }
  .hero-copy {
    max-width: 100%;
  }
  .hero-copy h1 {
    margin-bottom: 6px;
  }
  .hero-copy p {
    max-width: 100%;
    font-size: 9.8px;
    line-height: 1.32;
  }
}

@media (max-width: 360px) {
  .hero-logo {
    width: 98px !important;
  }
  .hero-copy p {
    font-size: 9.2px;
  }
}


/* v1.33 — identificação discreta de versão/data no rodapé */
.app-version-footer {
  padding: 10px 24px 14px;
  color: #7b887f;
  font-size: 10px;
  line-height: 1.2;
  text-align: left;
}
@media (max-width: 620px) {
  .app-version-footer {
    padding: 8px 14px 12px;
    font-size: 9px;
  }
}

/* v1.37 — cabeçalho do Portal alinhado ao padrão visual do Terra Viva Clima */
.hero {
  min-height: 130px;
  padding: 22px 48px 20px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "copy user logo";
  column-gap: 18px;
  row-gap: 0;
  align-items: center;
  background: #ffffff;
  border-bottom: 5px solid var(--tv-orange);
  box-shadow: none;
}
.hero-copy {
  grid-area: copy;
  width: auto;
  max-width: none;
  align-self: center;
}
.hero-kicker {
  margin: 0 0 7px;
  color: #155f35;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .22em;
}
.hero-copy h1 {
  margin: 0;
  color: #155f35;
  font-size: clamp(30px, 2.55vw, 38px);
  line-height: 1.04;
  letter-spacing: -.025em;
  font-weight: 800;
}
.hero-copy p {
  margin: 8px 0 0;
  max-width: 760px;
  color: #24382e;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}
.current-user {
  grid-area: user;
  position: static;
  justify-self: end;
  align-self: center;
  margin: 0;
  max-width: 240px;
  padding: 7px 10px;
  border-radius: 13px;
  background: #ffffff;
  border: 1px solid #d8e0da;
  box-shadow: 0 3px 10px rgba(17, 52, 31, .08);
}
.hero-logo {
  grid-area: logo;
  position: static;
  justify-self: end;
  align-self: center;
  width: clamp(155px, 12vw, 190px) !important;
  height: auto !important;
  filter: none;
}

@media (max-width: 900px) {
  .hero {
    min-height: 122px;
    padding: 18px 24px 16px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "copy user logo";
    column-gap: 12px;
  }
  .hero-copy h1 { font-size: 30px; }
  .hero-copy p { max-width: 540px; font-size: 11px; }
  .hero-logo { width: 138px !important; }
  .current-user { max-width: 205px; padding: 6px 8px; }
}

@media (max-width: 620px) {
  .hero {
    min-height: auto;
    padding: 12px 12px 11px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy copy"
      "user logo";
    column-gap: 10px;
    row-gap: 10px;
    align-items: center;
    border-bottom-width: 4px;
  }
  .hero-kicker { margin-bottom: 5px; font-size: 8.5px; }
  .hero-copy h1 { font-size: 23px; }
  .hero-copy p {
    margin-top: 5px;
    max-width: 100%;
    font-size: 9.8px;
    line-height: 1.28;
  }
  .current-user {
    justify-self: start;
    max-width: 190px;
  }
  .hero-logo {
    justify-self: end;
    width: 108px !important;
  }
}

@media (max-width: 360px) {
  .hero-copy h1 { font-size: 21px; }
  .hero-copy p { font-size: 9.2px; }
  .hero-logo { width: 98px !important; }
  .current-user { max-width: 174px; }
}


/* v1.38 — papel de parede e módulos centralizados em cada tela */
body.portal-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  background: #c8c3ae;
}
.portal-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('assets/portal-wallpaper.jpg') center center / cover no-repeat;
}
.portal-page .portal-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
.portal-page .portal-shell[hidden] { display: none; }
.portal-page .modules {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 4vh, 48px) clamp(12px, 4vw, 56px);
  background: transparent;
}
.portal-page .modules-heading {
  width: min(100%, 1010px);
  text-align: center;
  margin-bottom: 20px;
}
.portal-page .modules-heading h2,
.portal-page .modules-heading p {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.85), 0 2px 12px rgba(0,0,0,.55);
}
.portal-page .module-grid {
  width: min(100%, 1010px);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.portal-page .module-card {
  flex: 0 0 calc((100% - 32px) / 3);
  background: rgba(255,255,255,.96);
  box-shadow: 0 4px 18px rgba(0,0,0,.16);
}
.portal-page .module-card.is-preparing {
  opacity: 1;
  background: rgba(255,255,255,.72);
  border-color: rgba(255,255,255,.65);
  border-top-color: #bfcbbf;
}
.portal-page .secondary-action-row {
  margin-inline: auto;
  width: min(100%, 1010px);
}
.portal-page .secondary-link { background: rgba(255,255,255,.94); }
.portal-page .module-empty { width: min(100%, 1010px); }
.portal-page .app-version-footer {
  flex: none;
  color: #fff;
  background: rgba(15,38,24,.55);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.portal-page .page-loading { color: #fff; text-shadow: 0 1px 4px #24382e; }
@media (max-width: 900px) {
  .portal-page .module-grid { max-width: 700px; gap: 12px; }
  .portal-page .module-card { flex-basis: calc((100% - 12px) / 2); }
  .portal-page .modules-heading,
  .portal-page .secondary-action-row { max-width: 700px; }
}
@media (max-width: 620px) {
  .portal-page .modules { padding: 24px 12px; }
  .portal-page .module-grid { max-width: 480px; gap: 10px; }
  .portal-page .module-card { flex-basis: calc((100% - 10px) / 2); }
  .portal-page .modules-heading,
  .portal-page .secondary-action-row { max-width: 480px; }
  .portal-page .modules-heading { margin-bottom: 16px; }
}

/* v1.39 — título dos módulos alinhado ao cabeçalho */
.portal-page { --portal-gutter: 48px; }
.portal-page .hero { padding-inline: var(--portal-gutter); }
.portal-page .modules {
  justify-content: flex-start;
  padding: 18px var(--portal-gutter) 28px;
}
.portal-page .modules-heading {
  width: 100%;
  max-width: none;
  text-align: left;
  margin-bottom: 20px;
}
.portal-page .modules-content {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 12px;
}
@media (max-width: 900px) {
  .portal-page { --portal-gutter: 24px; }
}
@media (max-width: 620px) {
  .portal-page { --portal-gutter: 12px; }
  .portal-page .modules { padding-block: 14px 24px; }
  .portal-page .modules-heading { margin-bottom: 16px; }
}

.portal-page .modules-heading h2,
.portal-page .modules-heading p {
  color: #163c26;
  text-shadow: none;
}

/* Portal Amaryllis */
.portal-page .amaryllis-grid .module-card { flex-basis: calc((100% - 16px) / 2); }
.module-card[aria-disabled="true"] { opacity: .72; cursor: default; }
.module-card[aria-disabled="true"]:hover { transform: none; }
.access-status { color: #886546; font-size: 11px; font-style: normal; }
@media (max-width: 620px) { .portal-page .amaryllis-grid .module-card { flex-basis: calc((100% - 10px) / 2); } .access-status { font-size: 9px; } }

/* v1.41 — cards sem permissão visíveis, mas inativos */
.portal-page .module-card.is-access-restricted {
  opacity: .50;
  background: rgba(235, 239, 236, .89);
  border-top-color: #9faea4;
  filter: grayscale(.68);
  cursor: not-allowed;
  box-shadow: none;
}
.portal-page .module-card.is-access-restricted:hover,
.portal-page .module-card.is-access-restricted:focus-visible {
  transform: none;
  background: rgba(235, 239, 236, .89);
  border-top-color: #9faea4;
  box-shadow: none;
}
.portal-page .module-card.is-access-restricted::after {
  content: 'Acesso não liberado';
  position: absolute;
  bottom: 8px;
  left: 16px;
  color: #43564b;
  font-size: 10px;
  font-weight: 700;
}
.portal-page .module-card.is-access-restricted .module-arrow { opacity: .35; }

/* v1.42 — cards em preparação com o mesmo esmaecimento dos sem acesso */
.portal-page .module-card.is-preparing {
  opacity: .50;
  background: rgba(235, 239, 236, .89);
  border-top-color: #9faea4;
  filter: grayscale(.68);
  cursor: not-allowed;
  box-shadow: none;
}
.portal-page .module-card.is-preparing:hover,
.portal-page .module-card.is-preparing:focus-visible {
  transform: none;
  background: rgba(235, 239, 236, .89);
  border-top-color: #9faea4;
  box-shadow: none;
}

/* v1.47 — Base de Conhecimento e terceira linha (Assistente Amaryllis · Comercial · Administração) */
.portal-page .portal-last-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  padding-top: 16px;
}
.portal-page .portal-last-row #assistant-link { grid-column: 1; grid-row: 1; justify-self: start; }
.portal-page .portal-last-row #comercial-card { grid-column: 2; grid-row: 1; }
.portal-page .portal-last-row #admin-link { grid-column: 3; grid-row: 1; justify-self: end; }
@media (max-width: 900px) {
  .portal-page .portal-last-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
  .portal-page .portal-last-row #comercial-card { grid-column: 1; grid-row: 1; }
  .portal-page .portal-last-row #assistant-link { grid-column: 1; grid-row: 2; }
  .portal-page .portal-last-row #admin-link { grid-column: 2; grid-row: 2; }
}
@media (max-width: 620px) {
  .portal-page .portal-last-row { gap: 10px; padding-top: 10px; }
}
