/* V9 additions: login and real-time chat, compatible with V7's green design */
.auth-shell{max-width:440px;margin:auto;padding:8px 3px 3px;display:flex;flex-direction:column;gap:16px;color:#173d33}
.auth-shell h2{font-size:30px;line-height:1.14;letter-spacing:-.045em;margin:0;color:#153d32}
.auth-shell>p{color:#66766e;margin:0;line-height:1.6;font-size:14px}
.auth-symbol{height:52px;width:52px;border-radius:17px;display:grid;place-items:center;background:#e5f1db;color:#236447;font-size:26px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;padding:5px;gap:5px;background:#f2f4ef;border-radius:13px}
.auth-tabs button{background:none;border:0;border-radius:10px;padding:11px 9px;font-weight:700;cursor:pointer;color:#65786d}
.auth-tabs button.active{background:#fff;color:#155039;box-shadow:0 2px 7px #163c2619}
.auth-form{display:flex;flex-direction:column;gap:14px}
.auth-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;color:#29443a}
.auth-form input{width:100%;border:1px solid #dbe4d9;background:#fff;border-radius:12px;min-height:46px;padding:12px 13px;font-size:15px;color:#15392e;outline:none}
.auth-form input:focus{border-color:#419d6d;box-shadow:0 0 0 3px #2f9f6a1b}
.auth-form .btn,.auth-shell>.btn{justify-content:center;min-height:46px}
.auth-inline{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:#6b786e}
.auth-inline button{border:0;background:none;padding:0;color:#13613e;font-weight:700;cursor:pointer}
.auth-feedback{font-size:13px;color:#8e3c25;line-height:1.5;margin:0;min-height:4px}
.auth-small{font-size:12px;color:#5e7767;line-height:1.5;margin:0}
.auth-notice{background:#eff6e9;padding:13px 15px;border:1px solid #d7e8ce;border-radius:12px;color:#45634c;font-size:13px;line-height:1.55}
.field-help{font-size:12px;color:#5f7765;margin:-8px 0 12px;line-height:1.5}
.detail-aside .btn-chat-light{background:#eff7ed;color:#174e37;border:1px solid #b8d4c0;margin-top:10px;width:100%;justify-content:center}
.detail-aside .btn-chat-light:hover{background:#dbebd9}
.detail-aside>.btn-green{width:100%;justify-content:center;text-align:center}
.detail-aside small{display:block;color:#698273;margin-top:10px;font-size:12px;line-height:1.5}
.inbox-page{max-width:1240px;padding-top:45px;padding-bottom:72px}
.inbox-heading{display:flex;justify-content:space-between;align-items:center;gap:22px;margin-bottom:28px}
.inbox-heading h1{margin:8px 0 6px;color:#173e31;font-size:39px;letter-spacing:-.045em}
.inbox-heading p{margin:0;color:#677e70}
.inbox-lock{padding:10px 15px;border-radius:50px;background:#eaf3e7;color:#286b4b;white-space:nowrap;font-size:12px;font-weight:700}
.inbox-layout{display:grid;grid-template-columns:320px minmax(0,1fr);min-height:580px;height:min(72vh,730px);border:1px solid #dbe7dc;box-shadow:0 25px 65px #14402b0d;border-radius:20px;overflow:hidden;background:white}
.inbox-sidebar{border-right:1px solid #e2ebe3;overflow:auto;min-width:0;background:#fbfdfb}
.inbox-sidebar-head{height:86px;padding:25px 22px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e6ede7}
.inbox-sidebar-head h2{font-size:18px;letter-spacing:-.03em;margin:0;color:#244437}
.inbox-sidebar-head span{background:#e3f1e5;border-radius:20px;padding:4px 9px;font-size:12px;color:#206044;font-weight:800}
.thread-list{padding:10px;display:flex;flex-direction:column;gap:5px}
.thread-item{display:flex;align-items:center;text-align:left;width:100%;gap:12px;border:0;background:transparent;padding:12px;border-radius:12px;cursor:pointer;color:#214233}
.thread-item:hover,.thread-item.selected{background:#e9f5e9}
.thread-avatar,.chat-person-icon{flex:none;width:43px;height:43px;display:grid;place-items:center;border-radius:14px;background:#d9ead8;color:#276f50;font-size:13px;font-weight:800}
.thread-copy{display:flex;flex-direction:column;gap:4px;min-width:0}
.thread-copy strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread-copy small{color:#718376;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:215px;font-size:12px}
.thread-empty{padding:35px 14px;text-align:center;color:#7b8b80;font-size:13px;line-height:1.75}
.chat-panel{display:flex;flex-direction:column;min-width:0;overflow:hidden}
.chat-head{display:flex;align-items:center;gap:12px;min-height:86px;padding:15px 23px;border-bottom:1px solid #e6ede7}
.chat-head>div:last-child{display:flex;flex-direction:column;gap:5px}
.chat-head strong{font-size:16px;color:#1e4635}
.chat-head small{color:#758b7d;font-size:12px}
.chat-messages{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:12px;padding:26px 28px;background:linear-gradient(125deg,#fcfdfb,#f5faf5)}
.chat-intro{margin:auto;max-width:360px;text-align:center;color:#819184;line-height:1.6;font-size:14px}
.chat-intro-symbol{display:block;font-size:28px;color:#438b60;margin-bottom:15px}
.chat-intro strong{display:block;color:#26503b;font-size:18px;line-height:1.35}
.chat-intro p{margin-top:8px}
.bubble-line{display:flex;justify-content:flex-start}
.bubble-line.own{justify-content:flex-end}
.chat-bubble{white-space:pre-wrap;overflow-wrap:anywhere;border-radius:17px 17px 17px 5px;padding:12px 15px;max-width:min(82%,500px);background:#fff;border:1px solid #e4eae3;color:#2b4937;font-size:14px;line-height:1.55;box-shadow:0 3px 9px #12371e06}
.own .chat-bubble{border-color:#286948;background:#286948;color:white;border-radius:17px 17px 5px 17px}
.chat-compose{display:flex;gap:12px;padding:17px 23px;border-top:1px solid #e2ebe3;background:white}
.chat-compose input{min-width:0;flex:1;border:1px solid #e0e8df;padding:13px 16px;border-radius:12px;outline:none;background:#f8faf7;font-size:14px}
.chat-compose input:focus{border-color:#38885d;background:white}
.chat-compose button{background:#276947;color:#fff;border:0;border-radius:12px;padding:0 23px;font-weight:800;cursor:pointer;min-height:46px}
.chat-compose button:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:840px){.inbox-layout{grid-template-columns:250px minmax(0,1fr)}.inbox-page{padding-top:30px}.inbox-heading h1{font-size:32px}}
@media(max-width:620px){.inbox-page{padding:24px 13px 55px}.inbox-heading{align-items:flex-start;flex-direction:column;margin-bottom:18px}.inbox-lock{display:none}.inbox-layout{display:flex;flex-direction:column;height:min(78vh,770px);min-height:550px;border-radius:16px}.inbox-sidebar{height:155px;min-height:155px;overflow:auto;border-right:0;border-bottom:1px solid #e2ebe3}.inbox-sidebar-head{height:44px;padding:9px 14px}.thread-list{display:flex;flex-direction:row;overflow-x:auto;gap:6px;padding:7px}.thread-item{width:185px;min-width:185px;padding:8px;gap:8px}.thread-avatar{width:33px;height:33px;border-radius:10px}.thread-copy small{max-width:125px}.thread-empty{padding:15px}.chat-head{min-height:63px;padding:10px 14px}.chat-person-icon{width:37px;height:37px}.chat-messages{padding:16px 13px}.chat-compose{padding:10px;gap:8px}.chat-compose button{padding:0 15px}.chat-compose input{padding:10px 12px}}


/* V42 · Correção crítica do modal de autenticação */
.modal:has(.auth-shell){
  width:min(480px,100%);
  max-height:min(92vh,calc(100dvh - 24px));
  padding:0;
  overflow:hidden;
  border-radius:28px;
  box-shadow:0 28px 90px rgba(9,31,27,.24);
}
#modalBody:has(.auth-shell){padding:0!important;min-width:0}
.auth-shell{max-width:none;margin:0;padding:28px;gap:18px;min-width:0;background:#fff}
.auth-shell .overline{display:block;margin-top:2px}
.auth-shell h2{font-size:clamp(34px,4vw,50px);line-height:1.02;letter-spacing:-.06em;margin:0;color:#153d32}
.auth-shell>p{font-size:15px;line-height:1.72;color:#64766d}
.auth-symbol{height:56px;width:56px;border-radius:18px;background:linear-gradient(180deg,#eaf4de,#dceccf);color:#205f42;font-size:24px;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.auth-tabs{padding:6px;gap:6px;background:#eef3ee;border:1px solid #e5ece4;border-radius:16px}
.auth-tabs button{min-height:47px;border-radius:12px;padding:12px 10px;font-size:15px;transition:all .18s ease}
.auth-tabs button.active{background:#fff;color:#155039;box-shadow:0 8px 18px rgba(22,60,38,.08)}
.auth-form{gap:12px}
.auth-form label{gap:7px;font-size:13px}
.auth-form input{min-height:52px;padding:0 15px;border-radius:14px;font-size:16px}
.auth-form input::placeholder{color:#8a958f}
.auth-form .btn,.auth-shell>.btn{min-height:52px;border-radius:14px;font-size:15px}
.auth-small{font-size:12px;line-height:1.6}
.auth-inline{padding-top:6px;border-top:1px solid #edf2ee}
.auth-inline span{line-height:1.5}
.auth-feedback{min-height:20px}
.v34-auth-policy{margin:2px 0 2px!important}
@media (max-width:900px){
  .modal-backdrop:has(.auth-shell){align-items:center!important;padding:12px!important}
  .modal:has(.auth-shell){width:min(460px,100%);max-height:calc(100dvh - 24px);border-radius:24px}
  .auth-shell{padding:22px 18px calc(20px + env(safe-area-inset-bottom));gap:14px}
  .auth-shell h2{font-size:clamp(28px,9vw,42px)}
  .auth-shell>p{font-size:14px;line-height:1.65}
  .auth-tabs button{min-height:44px;font-size:14px}
  .auth-form input{min-height:50px;font-size:16px}
  .auth-form .btn,.auth-shell>.btn{min-height:50px}
  .auth-inline{flex-direction:column;align-items:flex-start}
}
@media (max-height:720px){
  .modal:has(.auth-shell){max-height:calc(100dvh - 16px)}
  .auth-shell{padding:18px 16px 16px;gap:12px}
  .auth-shell h2{font-size:clamp(28px,7vw,38px)}
  .auth-form{gap:10px}
}
