
:root{
  --bg:#07111f;
  --panel:#0d1b2d;
  --panel-2:#12243a;
  --panel-3:#0a1625;
  --text:#f4f8fc;
  --muted:#9bb0c5;
  --line:#223b58;
  --blue:#10a5e8;
  --blue2:#0878b7;
  --accent:#ffcc00;
  --user:#12395a;
  --assistant:#102337;
  --success:#2fd27c;
}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;font-family:Inter,Arial,Helvetica,sans-serif;background:#050b13;color:var(--text)}
body{overflow:hidden}
button,textarea{font:inherit}
button{cursor:pointer;-webkit-tap-highlight-color:transparent}
.hidden{display:none!important}

.wa-app{
  width:min(980px,100%);
  height:100dvh;
  margin:0 auto;
  background:linear-gradient(180deg,#081321 0%,#07101b 100%);
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto auto;
  box-shadow:0 0 38px rgba(0,0,0,.35);
  overflow:hidden;
  position:relative;
}
.wa-app::before{
  content:'';
  position:absolute;
  inset:76px 0 72px;
  background:
    radial-gradient(circle at 20% 10%, rgba(16,165,232,.06), transparent 30%),
    radial-gradient(circle at 85% 85%, rgba(255,204,0,.035), transparent 28%);
  pointer-events:none;
}

.wa-header{
  min-height:72px;
  background:linear-gradient(135deg,#0b2238,#0c2d49);
  color:#fff;
  display:flex;
  align-items:center;
  padding:calc(8px + env(safe-area-inset-top)) 12px 8px;
  gap:9px;
  border-bottom:1px solid #1f3a55;
  z-index:10;
}
.wa-back{display:none}
.wa-profile{display:flex;align-items:center;gap:11px;min-width:0;flex:1}
.wa-avatar{
  width:52px;height:52px;border-radius:16px;overflow:hidden;background:#fff;
  border:2px solid rgba(16,165,232,.75);flex:0 0 52px;
  box-shadow:0 0 16px rgba(16,165,232,.28)
}
.wa-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.wa-profile-text{min-width:0;display:flex;flex-direction:column}
.wa-profile-text strong{font-size:17px;line-height:1.15;letter-spacing:.01em}
.wa-profile-text span{font-size:12px;color:#b8ccdd;margin-top:4px}
.wa-online-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--success);margin-right:5px;box-shadow:0 0 7px rgba(47,210,124,.8)}
.wa-header-actions{display:flex;align-items:center;gap:3px}
.wa-header-actions button{
  width:42px;height:42px;border:1px solid #294764;background:#10263b;color:#dbe9f5;
  font-size:20px;border-radius:13px
}
.wa-header-actions button:hover{border-color:var(--blue);color:#fff}

.wa-chat{
  min-height:0;overflow-y:auto;padding:18px 14px 24px;z-index:2;position:relative;
  -webkit-overflow-scrolling:touch;
}
.wa-date-chip{
  width:max-content;margin:0 auto 15px;background:#10243a;color:#9eb4c8;
  font-size:11px;padding:6px 12px;border-radius:999px;border:1px solid #203b57
}
.msg{width:100%;display:flex;margin:7px 0}
.msg.assistant{justify-content:flex-start}
.msg.user{justify-content:flex-end}
.bubble{
  max-width:min(700px,79%);position:relative;padding:11px 13px 8px;
  border-radius:16px;background:var(--assistant);border:1px solid #203d5a;color:var(--text);
  box-shadow:0 7px 22px rgba(0,0,0,.12)
}
.msg.assistant .bubble{border-top-left-radius:5px}
.msg.user .bubble{
  background:linear-gradient(135deg,#123b5e,#164767);
  border-color:#235c82;border-top-right-radius:5px
}
.message-text{font-size:14.4px;line-height:1.48;white-space:pre-wrap;overflow-wrap:anywhere}
.message-meta{display:flex;justify-content:flex-end;align-items:center;gap:5px;min-height:13px;margin:5px 0 0 18px}
.time{font-size:10.5px;color:#8097ac}
.checks{font-size:13px;letter-spacing:-4px;color:#4abff2;padding-right:3px}

.wa-quick{
  display:flex;gap:8px;flex-wrap:wrap;padding:12px 0 3px 0
}
.wa-quick button{
  border:1px solid #294764;background:#0d1e31;color:#dceaf6;border-radius:999px;
  padding:9px 13px;font-size:12px;box-shadow:0 4px 14px rgba(0,0,0,.08)
}
.wa-quick button:hover{border-color:var(--blue);color:#fff}

.wa-typing{
  position:relative;z-index:3;padding:6px 16px;background:#081421;color:#93a8bb;font-size:11.5px
}
.wa-typing span{
  display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--blue);
  margin-right:2px;animation:pulse 1s infinite
}
.wa-typing span:nth-child(2){animation-delay:.15s}
.wa-typing span:nth-child(3){animation-delay:.3s}
@keyframes pulse{0%,80%,100%{opacity:.25}40%{opacity:1}}

.wa-bottom{
  z-index:5;position:relative;background:#0b1726;border-top:1px solid #1d344d;padding-bottom:env(safe-area-inset-bottom)
}
.wa-composer{display:flex;align-items:flex-end;gap:8px;padding:9px 10px}
.wa-pill{
  min-height:48px;flex:1;display:flex;align-items:flex-end;gap:2px;
  background:#0f2134;border:1px solid #27445f;border-radius:18px;padding:3px 7px
}
.wa-pill textarea{
  flex:1;resize:none;min-height:40px;max-height:130px;border:0;outline:0;background:transparent;
  color:#fff;padding:10px 7px 8px;line-height:1.4;font-size:15px
}
.wa-pill textarea::placeholder{color:#71889d}
.wa-pill button{
  width:36px;height:40px;flex:0 0 36px;border:0;background:transparent;color:#9db3c7;
  border-radius:11px;font-size:20px
}
.wa-pill button:hover{background:#16304a;color:#fff}
.wa-emoji{font-size:23px!important}
.wa-attach{font-size:24px!important;transform:rotate(-35deg)}
.wa-camera{font-size:18px!important}
.wa-mic{
  width:48px;height:48px;flex:0 0 48px;border-radius:15px;border:0;
  background:linear-gradient(135deg,var(--blue),var(--blue2));color:#fff;font-size:20px;
  display:grid;place-items:center;box-shadow:0 8px 20px rgba(16,165,232,.24)
}
.wa-mic.send-mode{background:linear-gradient(135deg,#16b7f5,#087fbf);font-size:22px}

.attachment-preview{padding:8px 10px 0}
.attachment-card{
  display:flex;align-items:center;gap:10px;background:#102236;border:1px solid #28445f;
  border-radius:14px;padding:9px 10px
}
.attachment-card img{width:56px;height:56px;object-fit:cover;border-radius:10px}
.attachment-info{min-width:0;flex:1}
.attachment-info strong{display:block;font-size:13px;color:#fff}
.attachment-info span{display:block;font-size:11px;color:#89a0b5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.remove-attachment{
  width:32px;height:32px;border:1px solid #34516b;border-radius:10px;background:#152a40;color:#dce9f4;font-size:19px
}
.chat-image{display:block;max-width:min(340px,100%);max-height:320px;object-fit:contain;border-radius:10px;margin-bottom:6px}
.chat-audio{width:min(300px,100%);margin:2px 0 4px}
.media-label{display:block;font-size:10.5px;color:#90a7ba;margin-bottom:5px}
.source-list{display:flex;flex-direction:column;gap:6px;margin-top:8px}
.source-card{
  display:block;background:#0a1a29;border:1px solid #264158;border-radius:9px;padding:8px 9px;
  font-size:11px;color:#b6c8d7;text-decoration:none
}
.source-card b{color:var(--accent)}

.record-sheet,.install-sheet{
  position:fixed;inset:0;z-index:200;background:rgba(1,7,12,.76);
  display:grid;place-items:center;padding:18px
}
.record-card,.install-card{
  width:min(390px,100%);background:#102337;color:#fff;border:1px solid #29445d;
  border-radius:20px;padding:23px;text-align:center;box-shadow:0 12px 34px rgba(0,0,0,.32)
}
.record-icon{
  width:70px;height:70px;border-radius:20px;display:grid;place-items:center;
  margin:0 auto 10px;background:#163852;font-size:31px
}
.record-timer{font-size:31px;font-weight:800;margin:11px 0;color:#19b8f2}
.record-card p,.install-card p{color:#9fb2c4;line-height:1.45}
.record-actions{display:flex;gap:8px;margin-top:14px}
.record-actions button{flex:1;height:43px;border-radius:12px;font-weight:700}
.secondary-action{border:1px solid #365069;background:#13283c;color:#fff}
.primary-action{border:0;background:#0fa6e5;color:#fff}
.close-sheet{float:right;border:1px solid #3a536c;background:#172c40;color:#fff;width:32px;height:32px;border-radius:10px;font-size:20px}

@media(max-width:620px){
  html,body{background:#07101b}
  .wa-app{width:100%;box-shadow:none}
  .wa-header{min-height:66px;padding-left:9px;padding-right:9px}
  .wa-avatar{width:46px;height:46px;flex-basis:46px;border-radius:14px}
  .wa-header-actions button{width:39px;height:39px}
  .wa-chat{padding:14px 10px 18px}
  .bubble{max-width:87%}
  .message-text{font-size:14px}
  .wa-quick{flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px;scrollbar-width:none}
  .wa-quick::-webkit-scrollbar{display:none}
  .wa-quick button{white-space:nowrap}
  .wa-composer{padding-left:8px;padding-right:8px;gap:7px}
}
@media(max-width:390px){
  .wa-profile-text strong{font-size:15px}
  .wa-profile-text span{font-size:11px}
  .wa-header-actions button:last-child{display:none}
  .bubble{max-width:90%}
}
@media(min-width:981px){
  body{padding:18px;background:#050a11}
  .wa-app{height:calc(100dvh - 36px);border-radius:18px;border:1px solid #1f354b}
}


/* ===== Orçamento em PDF ===== */
.quote-sheet{
  position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.74);
  display:grid;place-items:center;padding:14px
}
.quote-panel{
  width:min(820px,100%);max-height:min(94dvh,940px);background:#0d1b2d;
  border:1px solid #294760;border-radius:22px;color:#f5f9fc;
  display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;
  box-shadow:0 24px 70px rgba(0,0,0,.42);overflow:hidden
}
.quote-head{
  display:flex;align-items:center;gap:15px;padding:16px 18px;border-bottom:1px solid #233d56;
  background:linear-gradient(135deg,#10263c,#0d2134)
}
.quote-head>div{flex:1;min-width:0}
.quote-head strong{display:block;font-size:18px}
.quote-head span{display:block;color:#9fb3c5;font-size:12px;margin-top:4px}
.quote-head button{
  width:38px;height:38px;border:1px solid #35516b;background:#132a40;color:#fff;
  border-radius:12px;font-size:22px
}
.quote-scroll{min-height:0;overflow-y:auto;padding:16px}
.quote-section{
  background:#102236;border:1px solid #223f5b;border-radius:16px;padding:14px;margin-bottom:12px
}
.quote-section h3{font-size:14px;margin:0 0 12px;color:#fff}
.quote-section-title{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.quote-section-title h3{flex:1;margin:0}
.quote-grid{display:grid;gap:10px}
.quote-grid.two{grid-template-columns:1fr 1fr}
.quote-section label{display:block;font-size:11px;color:#9fb2c4}
.quote-section input,.quote-section select,.quote-section textarea{
  width:100%;margin-top:5px;border:1px solid #34516b;background:#0a1828;color:#fff;
  border-radius:10px;outline:none;padding:10px 11px;font-size:13px
}
.quote-section input:focus,.quote-section select:focus,.quote-section textarea:focus{
  border-color:#10a5e8;box-shadow:0 0 0 3px rgba(16,165,232,.08)
}
.quote-logo-row{display:flex;align-items:center;gap:12px;margin-top:12px}
.quote-logo-preview{
  width:82px;height:82px;flex:0 0 82px;border-radius:14px;background:#fff;color:#173049;
  border:1px solid #3a5c78;display:grid;place-items:center;font-size:11px;font-weight:900;overflow:hidden
}
.quote-logo-preview img{width:100%;height:100%;object-fit:contain;display:block}
.quote-logo-row strong{font-size:13px}.quote-logo-row p{font-size:11px;color:#90a6b8;margin:4px 0 8px}
.quote-small-btn{
  border:1px solid #365873;background:#142d44;color:#e9f5ff;border-radius:10px;
  padding:8px 10px;font-size:11px;font-weight:700
}
.quote-items{display:flex;flex-direction:column;gap:8px}
.quote-item{
  display:grid;grid-template-columns:minmax(180px,1fr) 70px 130px 38px;gap:7px;align-items:end
}
.quote-item label{margin:0}
.quote-remove{
  height:38px;border:1px solid #4c3b46;background:#321d27;color:#ffbec7;border-radius:10px;font-size:17px
}
.quote-total{
  display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:12px;
  background:#091725;border:1px solid #29445e;border-radius:12px
}
.quote-total span{font-size:12px;color:#a7b9c9}
.quote-total strong{font-size:20px;color:#ffcc00}
.quote-actions{
  display:flex;gap:8px;padding:12px 16px;border-top:1px solid #223d56;background:#0b1929
}
.quote-actions button{min-height:43px;border-radius:11px;padding:0 13px;font-size:12px;font-weight:800}
.quote-secondary{border:1px solid #36536d;background:#14283b;color:#fff}
.quote-primary{border:0;background:#10a5e8;color:#fff}
.quote-share{border:0;background:#25a85a;color:#fff;flex:1}
.quote-status{padding:8px 16px 12px;background:#0b1929;color:#b5c8d8;font-size:11px}
.quote-ready-card{
  display:block;margin-top:10px;padding:10px 11px;border:1px solid #24668b;background:#0b2940;
  border-radius:11px;color:#fff
}
.quote-ready-card strong{display:block;font-size:12px;margin-bottom:4px;color:#ffcc00}
.quote-ready-card button{
  margin-top:7px;border:0;background:#10a5e8;color:#fff;border-radius:9px;padding:8px 10px;font-weight:800;font-size:11px
}
@media(max-width:650px){
  .quote-sheet{padding:0;align-items:stretch}
  .quote-panel{max-height:100dvh;height:100dvh;border-radius:0;border:0}
  .quote-scroll{padding:10px}
  .quote-grid.two{grid-template-columns:1fr}
  .quote-item{grid-template-columns:1fr 64px 105px 36px}
  .quote-item .q-desc{grid-column:1 / -1}
  .quote-actions{padding:9px 10px calc(9px + env(safe-area-inset-bottom));flex-wrap:wrap}
  .quote-actions button{flex:1}
  .quote-share{flex-basis:100%!important}
}

.professor-card{margin-top:10px;padding:11px 12px;border:1px solid #276446;background:#0b2b20;border-radius:12px}.professor-card strong{display:block;color:#fff;font-size:13px}.professor-card span{display:block;color:#9fc9b5;font-size:11px;margin-top:3px}.professor-card a{display:inline-flex;align-items:center;justify-content:center;margin-top:9px;min-height:40px;padding:0 13px;background:#25D366;color:#08130d;text-decoration:none;font-size:12px;font-weight:900;border-radius:10px}
