:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#e8eef8;background:#0c1119}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(circle at 15% 10%,#192334,#0c1119 50%)}button,input,select{font:inherit}.hidden{display:none!important}
.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(360px,1fr) minmax(380px,540px);align-items:center;gap:54px;max-width:1240px;margin:0 auto;padding:48px}.brand-panel{text-align:center}.main-logo{width:min(430px,72vw);border-radius:28px;box-shadow:0 22px 70px #0008}.brand-panel h1{font-size:clamp(30px,4vw,52px);line-height:1.05;margin:26px 0 8px}.subtitle{color:#9fb0c8;font-size:18px}.login-card{background:#151d29;border:1px solid #26364a;border-radius:24px;padding:34px 38px;box-shadow:0 24px 80px #0008}.choose-title{text-align:center;font-size:16px;letter-spacing:.11em;margin:0 0 18px;color:#dbe7f7}.systems-grid{display:grid;grid-template-columns:1fr 24px 1fr;align-items:start;gap:8px;margin-bottom:18px}.system-divider{text-align:center;color:#546b88;padding-top:65px}.system-col{text-align:center;min-width:0}.system-name{font-size:14px;font-weight:700;color:#c7d3e2;margin-bottom:8px}.system-button{width:100%;padding:0;border:1px solid #40536d;background:#0e151f;border-radius:14px;overflow:hidden;transition:.16s ease}.system-button .logo-frame{display:flex;width:100%;height:102px;align-items:center;justify-content:center;background:#fff;padding:10px}.system-button img{display:block;max-width:100%;max-height:82px;object-fit:contain}.system-button.selected{outline:3px solid #5ba7ff;box-shadow:0 0 0 5px #5ba7ff22}.system-button.disabled{filter:grayscale(1);opacity:.25;cursor:not-allowed}.system-button.authorized{filter:none;opacity:1}.system-hint{font-size:10px;letter-spacing:.08em;margin-top:7px;color:#ffaaaa;white-space:nowrap}.system-hint.ok{color:#7ee0a3}.system-hint.invisible{visibility:hidden}.auth-download{display:inline-block;margin-top:8px;font-size:10px;color:#83baff;text-decoration:none}.auth-download:hover{text-decoration:underline}label{display:block;margin:16px 0;color:#c7d3e2;font-weight:600}input,select{display:block;width:100%;margin-top:7px;padding:12px 13px;border-radius:9px;border:1px solid #34465e;background:#0e151f;color:#fff;outline:none}input:focus,select:focus{border-color:#5ba7ff}button{border:0;border-radius:9px;padding:11px 17px;cursor:pointer;background:#2b66c3;color:#fff;font-weight:700}button:disabled{opacity:.5;cursor:not-allowed}.login-card>button[type=submit]{width:100%;margin-top:8px}.secondary{background:#273140}.error{min-height:22px;margin-top:12px;color:#ff8c8c;font-size:13px}
.panel{min-height:100vh;padding:18px 22px}.sheet-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:12px}.header-brand{display:flex;align-items:center;gap:13px}.header-brand img{width:58px;height:58px;object-fit:cover;border-radius:12px}.header-brand h1{font-size:20px;margin:0 0 4px}#status-line{color:#95a7bd;font-size:12px}.sheet-actions{display:flex;align-items:center;gap:8px;flex:1;justify-content:flex-end}.sheet-actions #busca{width:min(520px,45vw);margin:0}.message{min-height:22px;color:#9fb0c8;font-size:12px;margin:4px 0 10px}.sheet{display:flex;flex-direction:column;gap:8px}.record{border:1px solid #26364a;border-radius:10px;background:#121a25;overflow:hidden;box-shadow:0 3px 12px #0003}.record-row{display:grid;gap:0;border-bottom:1px solid #202d3e}.record-row:last-child{border-bottom:0}.record-row.top{grid-template-columns:1.15fr 1fr .72fr .88fr 2.05fr 1.2fr .92fr .48fr .82fr}.record-row.bottom{grid-template-columns:1.5fr 1.45fr 1.2fr 1.35fr 1.25fr 1fr 42px}.cell{position:relative;min-width:0;border-right:1px solid #202d3e;background:#121a25}.cell:last-child{border-right:0}.cell label{position:absolute;top:4px;left:8px;margin:0;color:#7690ad;font-size:8px;letter-spacing:.06em;text-transform:uppercase;pointer-events:none}.cell input,.cell select{margin:0;border:0;border-radius:0;background:transparent;padding:19px 8px 7px;font-size:12px;min-height:48px}.cell input:focus,.cell select:focus{background:#172536;box-shadow:inset 0 0 0 1px #5ba7ff}.cell.cpf.invalid input{background:#471b24;color:#ffd7dc}.delete-cell{display:flex;align-items:center;justify-content:center}.delete-btn{width:28px;height:28px;padding:0;border-radius:50%;background:#a52531;font-size:17px;line-height:1}.saving{box-shadow:inset 3px 0 #f3c969}.conflict{animation:flashConflict .9s ease}@keyframes flashConflict{50%{background:#69343a}}.new-record{border-style:dashed}.empty-state{padding:40px;text-align:center;color:#8093aa;border:1px dashed #304158;border-radius:12px}
@media(max-width:1000px){.login-shell{grid-template-columns:1fr;padding:24px;gap:28px}.main-logo{width:min(290px,70vw)}.sheet-header{align-items:flex-start;flex-direction:column}.sheet-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}.sheet-actions #busca{width:100%}.record{overflow-x:auto}.record-row.top{min-width:1180px}.record-row.bottom{min-width:1050px}}

/* V1.8.5 - classificacao e detalhe cadastral */
.sort-tools{display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.sort-label{font-size:9px;letter-spacing:.08em;color:#758aa4;font-weight:700}
.sort-btn{background:#1b2736;border:1px solid #31445c;color:#afc0d5;padding:8px 9px;font-size:9px;border-radius:7px;white-space:nowrap}
.sort-btn:hover{background:#24364b}
.sort-btn.active{background:#285b9d;border-color:#5ba7ff;color:#fff}
.record{cursor:default}
.patient-detail{margin:-2px 10px 8px;border:1px solid #2a3c53;border-top:0;border-radius:0 0 10px 10px;background:#0f1722;padding:12px 14px;box-shadow:0 5px 14px #0003}
.detail-message{font-size:11px;color:#9fb0c8;text-align:center;padding:10px;letter-spacing:.04em}
.detail-grid{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px 14px}
.detail-item{min-width:0;padding:6px 8px;border-left:2px solid #2e619c;background:#121d2a;border-radius:4px}
.detail-item span{display:block;font-size:8px;letter-spacing:.07em;color:#7890ac;margin-bottom:3px}
.detail-item strong{display:block;font-size:11px;color:#e6edf7;font-weight:600;word-break:break-word}
@media(max-width:1200px){.sort-tools{width:100%;order:3}.detail-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}}
@media(max-width:650px){.detail-grid{grid-template-columns:1fr}}
