:root { --navy:#173b5b; --blue:#2b6a8d; --mist:#eef5f8; --line:#d6e1e8; --ink:#16222e; --muted:#657583; --green:#257447; --red:#a7352c; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); font-family:Segoe UI, Arial, sans-serif; background:linear-gradient(135deg,#edf4f7,#f9fbfc); }
.login-screen{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:20px;background:linear-gradient(135deg,#173b5bee,#0d2539ee)}.login-card{width:min(420px,100%);padding:30px;background:white;border-radius:18px;box-shadow:0 20px 80px #0005}.login-card h1{font-size:2rem}.login-card>p:not(.eyebrow){color:var(--muted);line-height:1.5}.login-message{min-height:20px;margin:14px 0 0;color:var(--red);font-size:.9rem;font-weight:700}
.app-shell { max-width:920px; margin:0 auto; min-height:100vh; padding:48px 24px; }
header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:10px; }.header-actions{display:flex;gap:10px;align-items:center}
.tabs{display:flex;gap:8px;margin:24px 0 16px;padding-bottom:10px;border-bottom:1px solid var(--line)}.tab{border:0;border-radius:8px;padding:9px 12px;background:transparent;color:var(--muted);font-weight:800}.tab:hover{background:var(--mist);color:var(--navy)}.tab.active{background:var(--navy);color:white}.tab[data-page="solar"].active,.tab[data-page="purchases"].active{background:#e5ad12;color:#493400}.solar-page,.purchases-page{padding-top:5px}.solar-header{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin:8px 0 18px}.solar-header .eyebrow{color:#a67500}.solar-header h2{margin:0;color:#765400;font-size:1.45rem}.solar-header p:not(.eyebrow){margin:7px 0 0;color:var(--muted)}.solar-header .primary{background:#d79f00;color:#392900;box-shadow:0 3px 10px #a878002e}.solar-header .primary:hover{background:#bb8900}.solar-summary{margin-bottom:0;border-color:#ead89d;background:#fffaf0}.solar-summary span{color:#a67500}.solar-task{grid-template-columns:1fr auto;border-left:4px solid #e5ad12}.purchase-task{border-left-color:#d79f00}.kit-items{margin:8px 0 0;padding:9px 10px;background:#fffaf0;border-radius:8px;color:#4a5964;font-size:.9rem;white-space:pre-wrap}.solar-status{display:inline-block;padding:4px 8px;border-radius:99px;font-size:.76rem;font-weight:800}.solar-status.scheduled,.purchase-status.needed{background:#fff1bd;color:#805c00}.solar-status.waiting,.purchase-status.ordered{background:#fff4d0;color:#806112}.solar-status.done,.purchase-status.received{background:#e4f2ea;color:var(--green)}
.eyebrow { margin:0 0 6px; color:var(--blue); font-size:.74rem; font-weight:800; letter-spacing:.13em; }
h1 { margin:0; font-size:2.2rem; color:var(--navy); } .date { margin:8px 0 0; color:var(--muted); }
button, select, input, textarea { font:inherit; } button { cursor:pointer; }
.primary { border:0; border-radius:10px; padding:12px 17px; color:white; background:var(--navy); font-weight:700; box-shadow:0 3px 10px #173b5b2e; } .primary:hover{background:#0f2d47}.full{width:100%;margin-top:8px}.google{border:1px solid #b6cbd9;border-radius:10px;padding:11px 14px;color:var(--navy);background:white;font-weight:700}.google.connected{border-color:#94c9a8;background:#e4f2ea;color:var(--green)}.google-status{margin:0 0 22px;color:var(--muted);font-size:.9rem}.google-status.connected{color:var(--green);font-weight:700}.voice{border:1px solid #b6cbd9;border-radius:10px;padding:11px 14px;color:var(--navy);background:white;font-weight:700}.voice.listening{background:#fde8e7;border-color:#efb5ae;color:var(--red);animation:pulse 1s infinite}.voice-hint{min-height:20px;margin:14px 2px;color:var(--blue);font-size:.9rem;font-weight:600}@keyframes pulse{50%{transform:scale(1.02)}}
.mobile-access{margin:-8px 0 20px;padding:10px 12px;border-radius:10px;background:#e8f3f8;color:var(--blue);font-size:.86rem;line-height:1.45}.mobile-access a{color:var(--navy);font-weight:800;overflow-wrap:anywhere}
.summary { display:grid; grid-template-columns:repeat(3,1fr); overflow:hidden; margin-bottom:18px; background:white; border:1px solid var(--line); border-radius:14px; }
.summary div { padding:16px 20px; border-right:1px solid var(--line); } .summary div:last-child{border:0}.summary span { display:block; color:var(--navy); font-size:1.6rem; font-weight:800; }.summary small{color:var(--muted)}
.crm-summary{margin:18px 0;background:#f7fbfd;border:1px solid var(--line);border-radius:14px;padding:17px}.crm-heading{display:flex;align-items:center;justify-content:space-between;gap:14px}.crm-heading .eyebrow{margin-bottom:3px}.crm-heading h2{margin:0;color:var(--navy);font-size:1.05rem}.follow-up-count{padding:6px 9px;border-radius:99px;background:#fff4d0;color:#806112;font-size:.78rem;font-weight:700}.pipeline{display:grid;grid-template-columns:repeat(4,1fr);margin-top:14px}.pipeline div{padding:5px 14px;border-right:1px solid var(--line)}.pipeline div:first-child{padding-left:0}.pipeline div:last-child{border:0}.pipeline span{display:block;color:var(--blue);font-size:1.25rem;font-weight:800}.pipeline small{color:var(--muted);font-size:.78rem}
.follow-up-panel{margin-top:17px;padding-top:15px;border-top:1px solid var(--line);display:grid;grid-template-columns:190px 1fr;gap:15px}.follow-up-panel h3{margin:0;color:var(--navy);font-size:.92rem}.follow-up-panel p{margin:4px 0 0;color:var(--muted);font-size:.8rem}.follow-up-list{display:grid;gap:6px}.follow-up-item{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 10px;border-radius:8px;background:white;font-size:.84rem}.follow-up-item strong{color:var(--navy)}.follow-up-item span{color:var(--muted)}.follow-up-date{font-weight:700;color:#806112!important}.follow-up-empty{color:var(--green);font-size:.84rem;font-weight:700;padding:8px 0}
.toolbar { display:flex; justify-content:space-between; align-items:center; margin:18px 0; } .toolbar label{font-weight:600;color:var(--muted)} select{margin-left:8px;padding:8px;border:1px solid var(--line);border-radius:8px;background:white}.text-button{border:0;background:transparent;color:var(--blue);font-weight:700}
.list { display:grid; gap:10px; }.task { display:grid; grid-template-columns:28px 1fr auto; gap:14px; align-items:start; padding:16px; background:white; border:1px solid var(--line); border-radius:12px; }.task.done{opacity:.68}.task.done h3{text-decoration:line-through}.task input[type="checkbox"]{width:19px;height:19px;accent-color:var(--green);margin-top:3px}.task h3{margin:0;font-size:1rem}.meta{margin:5px 0;color:var(--muted);font-size:.9rem}.notes{margin:8px 0 0;color:#4a5964;font-size:.92rem;white-space:pre-wrap}.tag{display:inline-block;margin-left:6px;padding:3px 7px;border-radius:99px;font-size:.72rem;font-weight:700}.alta{background:#fde8e7;color:var(--red)}.média{background:#fff4d0;color:#806112}.baixa{background:#e4f2ea;color:var(--green)}.actions{display:flex;gap:8px}.icon-button{border:0;background:var(--mist);color:var(--navy);border-radius:7px;padding:7px 9px;font-size:.8rem;font-weight:700}.empty{padding:36px;text-align:center;color:var(--muted);background:white;border:1px dashed var(--line);border-radius:12px}
.crm-meta{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}.crm-chip{border-radius:99px;background:#e8f3f8;color:var(--blue);padding:4px 8px;font-size:.76rem;font-weight:700}.crm-chip.stage-negociação{background:#fff4d0;color:#806112}.crm-chip.stage-confirmado{background:#e4f2ea;color:var(--green)}.crm-chip.stage-perdido{background:#f0f1f2;color:var(--muted)}.history-preview{margin:8px 0 0;padding-left:9px;border-left:3px solid var(--line);color:#4a5964;font-size:.84rem;white-space:pre-wrap}
.history-content{max-height:380px;overflow:auto;white-space:pre-wrap;line-height:1.55;color:#40515d;background:var(--mist);padding:13px;border-radius:9px}.history-content.empty-history{color:var(--muted);font-style:italic}
.attachments{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}.attachment-link,.attachment-draft{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border-radius:8px;background:var(--mist);color:var(--navy);font-size:.8rem;font-weight:700;text-decoration:none}.attachment-link:hover{background:#dcecf3}.attachment-field{margin-top:16px;padding-top:3px;border-top:1px solid var(--line)}.attachment-help{margin:6px 0 0;color:var(--muted);font-size:.78rem;line-height:1.35}.attachment-draft-list{display:grid;gap:6px;margin-top:10px}.attachment-draft{justify-content:space-between;background:#f7fbfd}.remove-attachment{border:0;background:transparent;color:var(--red);font-size:.78rem;font-weight:800;cursor:pointer}
.quote-field{margin-top:16px;padding-top:3px;border-top:1px solid var(--line)}.quote-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.quote-heading label{margin:13px 0 0!important}.quote-heading .text-button{padding:6px 0;margin-top:8px}.field-help{display:block;margin-top:5px;color:var(--muted);font-size:.76rem;font-weight:400;line-height:1.35}
dialog{width:min(520px,calc(100% - 28px));border:0;border-radius:15px;box-shadow:0 20px 60px #10223555;padding:0}dialog::backdrop{background:#10223577}form{padding:24px}.dialog-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.dialog-title h2{margin:0;color:var(--navy)}.dialog-copy,.help{color:var(--muted);font-size:.9rem;line-height:1.45}.help{margin:14px 0 0;background:var(--mist);padding:10px;border-radius:8px}.close{border:0;background:transparent;font-size:1.8rem;color:var(--muted)}.crm-fields{margin-top:20px;padding-top:4px;border-top:1px solid var(--line)}.form-section{margin:13px 0 2px;color:var(--blue);font-size:.83rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}form label{display:block;margin:13px 0 0;color:#40515d;font-size:.88rem;font-weight:700}form input,form select,textarea{width:100%;margin:6px 0 0;padding:10px;border:1px solid var(--line);border-radius:8px;color:var(--ink)}form select{margin-left:0}textarea{min-height:75px;resize:vertical}.two-columns{display:grid;grid-template-columns:1fr 1fr;gap:13px}
@media(max-width:600px){body{background:#f7fafb}.app-shell{padding:20px 12px 36px}header,.solar-header{align-items:flex-start;flex-direction:column;gap:16px}.header-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}.header-actions button{width:100%;min-height:46px;padding:10px 8px;font-size:.84rem}.header-actions .primary{grid-column:1/-1}h1{font-size:1.85rem}.tabs{overflow-x:auto;margin:20px 0 14px;padding-bottom:8px;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tab{flex:0 0 auto;min-height:42px}.primary{min-height:46px}.solar-header .primary{width:100%}.toolbar{align-items:stretch;gap:10px;flex-direction:column}.toolbar label{display:grid;gap:5px}.toolbar select{width:100%;margin:0;min-height:44px}.toolbar .text-button{align-self:flex-start;min-height:40px;padding:7px 0}.task{grid-template-columns:25px minmax(0,1fr);gap:10px;padding:14px}.solar-task{grid-template-columns:1fr}.task h3{font-size:.98rem}.actions{grid-column:2;justify-content:stretch;display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.solar-task .actions{grid-column:1}.icon-button{min-height:40px;padding:8px 7px}.summary div{padding:13px 9px}.summary span{font-size:1.35rem}.summary small{font-size:.74rem}.crm-summary{padding:14px}.crm-heading{align-items:flex-start;flex-direction:column}.pipeline{grid-template-columns:repeat(2,1fr);gap:10px}.pipeline div{padding-left:0;border:0}.follow-up-panel{grid-template-columns:1fr}.follow-up-item{align-items:flex-start;flex-direction:column;gap:3px}.two-columns{grid-template-columns:1fr}.quote-heading{align-items:flex-start;flex-direction:column;gap:0}dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);overflow:auto}form{padding:18px 16px;padding-bottom:max(18px,env(safe-area-inset-bottom))}.dialog-title{margin-bottom:14px}.dialog-title h2{font-size:1.25rem}.close{min-width:42px;min-height:42px}.attachment-link,.attachment-draft{max-width:100%;overflow-wrap:anywhere}.empty{padding:28px 16px}}
