:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#202d48;background:#f3f6fb;font-synthesis:none;--navy:#253266;--blue:#3565ed;--muted:#6c7a90;--line:#e2e8f1}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button,a{touch-action:manipulation}button{cursor:pointer}a{color:var(--blue)}button,.button{border:0;background:var(--blue);color:white;border-radius:10px;padding:11px 16px;font-size:14px;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none}button:hover,.button:hover{filter:brightness(.95)}button:disabled{opacity:.6;cursor:wait}.secondary{background:#edf2fb;color:var(--navy)}.plain{background:transparent;color:var(--muted);padding:8px}.danger{color:#af3042;background:#fff0f2}.brand{font-size:23px;font-weight:850;letter-spacing:-1px;color:var(--navy)}.brand span{color:#00a3d8}.brand small{display:block;font-size:9px;letter-spacing:2px;color:var(--muted);margin-top:5px}.sidebar{position:fixed;inset:0 auto 0 0;width:238px;padding:35px 23px;background:white;border-right:1px solid var(--line);display:flex;flex-direction:column;gap:30px}.sidebar nav{display:grid;gap:7px}.sidebar nav button{justify-content:start;background:transparent;color:var(--muted);padding:14px;text-align:left}.sidebar nav button.active{background:#edf2ff;color:var(--blue)}.sidebar footer{margin-top:auto;font-size:12px;line-height:1.7;color:var(--muted)}.sidebar footer button{width:100%;margin-top:8px}.workspace{margin-left:238px;padding:32px 42px;max-width:1650px}.topbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:35px}.topbar p{font-size:13px;color:var(--muted);margin:0 0 7px}h1{font-size:29px;letter-spacing:-1px;margin:0}h2{font-size:19px;letter-spacing:-.4px;margin:0 0 8px}h3{font-size:16px;margin:0 0 12px}p{line-height:1.6}.muted{color:var(--muted);font-size:13px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:26px}.stat{padding:23px;background:white;border:1px solid var(--line);border-radius:16px}.stat small{font-size:12px;color:var(--muted)}.stat strong{display:block;font-size:29px;letter-spacing:-1px;margin:10px 0 4px}.stat em{font-style:normal;font-size:11px;color:var(--muted)}.stat.highlight{background:var(--navy);color:white;border-color:var(--navy)}.stat.highlight small,.stat.highlight em{color:#d0dbf5}.grid{display:grid;grid-template-columns:1.35fr 1fr;gap:22px}.card{background:white;border:1px solid var(--line);border-radius:16px;padding:25px;margin-bottom:22px}.card-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:18px}.card-head h2{margin:0}.pills{display:flex;gap:5px;flex-wrap:wrap}.pills button{padding:7px 12px;font-size:12px;background:#f1f4fa;color:var(--muted)}.pills button.selected{background:var(--blue);color:white}.row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid #eef1f6}.row:last-child{border-bottom:0}.row b{font-size:14px}.row p{margin:4px 0 0;color:var(--muted);font-size:12px}.row .right{text-align:right;flex-shrink:0}.avatar{width:39px;height:39px;flex-shrink:0;border-radius:12px;background:#edf2ff;color:var(--blue);display:grid;place-items:center;font-weight:700}.person{display:flex;align-items:center;gap:13px}.badge{display:inline-block;font-size:11px;font-weight:650;border-radius:6px;padding:5px 8px;background:#eef2f7;color:#62718a}.badge.Ativo{background:#e6f6ef;color:#19825a}.badge.Proposta{background:#fff5dc;color:#a77610}.badge.Cancelado{background:#ffebed;color:#b54254}.badge.Suspenso{background:#f0ebfc;color:#7953bd}.notice{padding:14px 17px;background:#edf5ff;border-radius:10px;color:#355580;font-size:13px;line-height:1.6;margin-bottom:20px}.notice.warning{background:#fff6e3;color:#895d1d}.toolbar{display:flex;gap:12px;margin-bottom:20px}.toolbar input{flex:1}.toolbar select{width:210px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d6deeb;border-radius:8px;color:#263451;background:white;min-height:43px}textarea{resize:vertical;min-height:90px}label{font-size:12px;font-weight:650;display:block;margin-bottom:6px}label.check{display:flex;gap:10px;align-items:start;font-size:13px;line-height:1.6}label.check input{width:19px;min-height:19px;margin-top:2px;flex-shrink:0}table{width:100%;border-collapse:collapse;text-align:left;font-size:13px}th{font-size:10px;letter-spacing:.7px;text-transform:uppercase;color:var(--muted);padding:12px 10px;border-bottom:1px solid var(--line)}td{padding:17px 10px;border-bottom:1px solid #eef1f6}td small{display:block;margin-top:4px;color:var(--muted)}.table-wrap{overflow:auto}.table-wrap button{padding:7px 10px;font-size:12px}.empty{padding:35px 15px;text-align:center;color:var(--muted);font-size:14px}.empty strong{display:block;color:var(--navy);margin-bottom:8px}.login{max-width:430px;margin:12vh auto;background:white;padding:38px;border:1px solid var(--line);border-radius:20px;box-shadow:0 20px 70px #2532660c}.login .brand{margin-bottom:34px}.login label{margin-top:18px}.login button{width:100%;margin-top:24px}.login h1{font-size:25px}.login p{color:var(--muted);font-size:14px}dialog{width:min(780px,calc(100% - 24px));max-height:90vh;border:0;border-radius:18px;padding:28px;color:#202d48;box-shadow:0 30px 100px #14204b33}dialog::backdrop{background:#14204b77;backdrop-filter:blur(3px)}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}.full{grid-column:1/-1}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px;padding-top:20px;border-top:1px solid var(--line)}.detail-head{display:flex;justify-content:space-between;gap:15px;align-items:center}.detail-info{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:25px}.detail-info small{color:var(--muted);font-size:11px;display:block;margin-bottom:5px}.detail-info span{font-size:13px;overflow-wrap:anywhere}.timeline{border-left:2px solid #e7edf7;padding-left:17px;margin:17px 0}.timeline p{font-size:13px;white-space:pre-wrap}.timeline small{color:var(--muted);font-size:11px}.contract-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.contract{border:1px solid var(--line);border-radius:12px;padding:20px}.contract .amount{font-size:24px;font-weight:750;margin:16px 0 3px}.contract dl{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:12px}.contract dt{color:var(--muted);font-size:10px;margin-bottom:3px}.contract dd{margin:0}.actions{display:flex;gap:8px;flex-wrap:wrap}.actions button{font-size:12px}.error{color:#b0354b;font-size:13px;line-height:1.6;margin-top:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:20;background:#253266;color:white;border-radius:10px;padding:13px 22px;box-shadow:0 6px 30px #14204b33;display:none;max-width:90%;font-size:13px}#toast.visible{display:block}.section-label{font-size:10px;letter-spacing:1px;color:var(--muted);text-transform:uppercase;margin:20px 0 8px}.pdf-text{max-height:200px;overflow:auto;background:#f4f7fb;white-space:pre-wrap;padding:15px;font-size:12px}.mobile-brand{display:none}@media(min-width:1500px){.workspace{margin-right:auto}}@media(max-width:1100px){.workspace{padding:25px}.sidebar{width:200px}.workspace{margin-left:200px}.stats{grid-template-columns:repeat(2,1fr)}.grid{grid-template-columns:1fr}.contract-grid{grid-template-columns:1fr}}@media(max-width:700px){.sidebar{position:sticky;top:0;width:100%;height:auto;padding:12px 16px;z-index:5;gap:13px;border-bottom:1px solid var(--line)}.sidebar .brand{font-size:19px}.sidebar .brand small{display:none}.sidebar nav{display:flex;gap:5px}.sidebar nav button{font-size:12px;padding:9px 11px}.sidebar footer{display:none}.workspace{margin-left:0;padding:22px 16px 40px}.topbar{margin-bottom:23px;align-items:start}.topbar h1{font-size:24px}.topbar button{padding:10px;font-size:12px}.stats{gap:10px}.stat{padding:17px}.stat strong{font-size:25px}.card{padding:18px}.card-head{flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.detail-info{grid-template-columns:1fr 1fr}.detail-head{align-items:start;flex-direction:column}.toolbar{flex-wrap:wrap}.toolbar input,.toolbar select{width:100%;flex:auto}.login{margin:5vh 15px}.row{gap:8px}.row .right{max-width:110px}.topbar .actions{justify-content:end}dialog{padding:20px}.contract dl{gap:15px}.desktop-only{display:none}}

/* Logo oficial Planmedd: acesso e área interna. */
.brand img{display:block;width:100%;height:auto;object-fit:contain}.login .brand{max-width:270px;margin:0 auto 28px;text-align:center}.login .brand small{margin-top:8px}.sidebar .brand{width:100%;text-align:center}.sidebar .brand small{font-size:8px;letter-spacing:1.5px;margin-top:6px}@media(max-width:700px){.sidebar .brand{width:132px;margin:auto}.sidebar{gap:8px;padding-top:7px;padding-bottom:8px}.login .brand{max-width:245px}}

.password-field{position:relative}.password-field input{padding-right:86px}.password-field .password-toggle{position:absolute;right:4px;top:4px;bottom:4px;width:76px;min-height:0;margin:0;padding:4px 8px;font-size:12px;background:#edf2fb;color:#253266;border-radius:6px}
/* Luzes suaves apenas nas telas de acesso. */
body:has(.login){min-height:100vh;isolation:isolate;background:#f1f6fc}
body:has(.login)::before,body:has(.login)::after{content:"";position:fixed;z-index:-1;pointer-events:none;border-radius:50%;width:min(72vw,850px);height:min(72vw,850px);filter:blur(32px);will-change:transform}
body:has(.login)::before{left:-20%;top:-35%;background:radial-gradient(circle,rgba(0,174,239,.24),rgba(53,101,237,.10) 44%,transparent 70%);animation:planmedd-glow 22s ease-in-out infinite alternate}
body:has(.login)::after{right:-18%;bottom:-38%;background:radial-gradient(circle,rgba(53,101,237,.20),rgba(0,190,220,.10) 45%,transparent 70%);animation:planmedd-glow 27s ease-in-out infinite alternate-reverse}
body:has(.login) .login{background:rgba(255,255,255,.95);box-shadow:0 24px 80px rgba(37,50,102,.09);border-color:rgba(203,220,243,.8)}
@keyframes planmedd-glow{0%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(12vw,9vh,0) scale(1.08)}100%{transform:translate3d(20vw,17vh,0) scale(.94)}}
@media(max-width:700px){body:has(.login)::before,body:has(.login)::after{width:110vw;height:110vw;filter:blur(20px)}body:has(.login)::before{top:-15%;left:-45%}body:has(.login)::after{bottom:-10%;right:-45%}}
@media(prefers-reduced-motion:reduce){body:has(.login)::before,body:has(.login)::after{animation:none;will-change:auto}}
.animated-background{display:none}body:has(.login) #app{display:flow-root}body:has(.login) .animated-background{display:block;position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:-1;background:linear-gradient(125deg,#e9f7ff,#edf0fc,#daf5fc,#f3f7ff);background-size:300% 300%;animation:planmedd-waves 12s ease-in-out infinite}
.animated-background i{position:absolute;display:block;border:1px solid rgba(0,160,220,.2);border-radius:50%;background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.55),rgba(0,170,230,.08) 60%,rgba(53,101,237,.13));box-shadow:inset 0 0 35px rgba(255,255,255,.45);width:180px;height:180px;left:8%;top:18%;animation:planmedd-float 9s ease-in-out infinite alternate}
.animated-background i:nth-child(2){width:320px;height:320px;left:74%;top:50%;animation-duration:13s;animation-delay:-4s}.animated-background i:nth-child(3){width:75px;height:75px;left:24%;top:72%;animation-duration:7s;animation-delay:-3s}.animated-background i:nth-child(4){width:125px;height:125px;left:80%;top:12%;animation-duration:10s;animation-delay:-7s}.animated-background i:nth-child(5){width:45px;height:45px;left:66%;top:82%;animation-duration:6s;animation-delay:-2s}.animated-background i:nth-child(6){width:380px;height:380px;left:-12%;top:66%;animation-duration:15s;animation-delay:-5s}
body:has(.login)::before,body:has(.login)::after{z-index:-1;animation-duration:10s;opacity:.8}
@keyframes planmedd-waves{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
@keyframes planmedd-float{from{transform:translate3d(-18px,28px,0) scale(.95)}to{transform:translate3d(40px,-55px,0) scale(1.08)}}
@media(max-width:700px){.animated-background i{opacity:.55}.animated-background i:nth-child(2){left:65%}.animated-background i:nth-child(6){left:-60%}}
@media(prefers-reduced-motion:reduce){body:has(.login) .animated-background,.animated-background i{animation:none}}

.pdf-import-start{padding:18px;background:#eef5ff;border:1px solid #d5e4fa;border-radius:12px;margin-bottom:23px}.pdf-import-start h3{margin-bottom:7px}.pdf-import-start p{margin:7px 0 12px}.pdf-import-start input[type=file]{background:white}.pdf-import-start #pdf-review:empty{display:none}

.pdf-review-form input:placeholder-shown{border-color:#e2b361;background:#fffcf6}.pdf-review-form .notice p{margin:5px 0}.pdf-review-form input:required:invalid,.pdf-review-form select:has(option:first-child:checked){border-color:#e2b361;background:#fffcf6}

.pdf-ocr{border:1px solid #d6e3f5;background:#f5f9ff;padding:13px 15px;border-radius:10px;margin:15px 0}.pdf-ocr summary{cursor:pointer;font-size:13px;font-weight:650;color:#253266}.pdf-ocr .actions{margin-top:12px}.pdf-ocr input{background:white}.pdf-ocr #pdf-ocr-status{margin:10px 0 0}.pdf-ocr[open]{margin-bottom:20px}
