/* OdiHub V128.2 - telas redesenhadas: Pacientes, formularios no celular,
   Acompanhamento de proteses e Pedido de compra. Carregado por ultimo no base.html. */

/* =============== PACIENTES =============== */
html body #oc-main .ocpx-top{align-items:flex-end}
html body #oc-main .ocpx-top .va{display:flex;gap:8px;flex-wrap:wrap}
html body #oc-main .ocpx-top #ocpNovoBtn{display:inline-flex;align-items:center;gap:6px}
html body #oc-main .ocpx-list{padding:16px!important}
html body #oc-main#oc-main .v124-patient-search input#v124PatientSearch{min-height:46px!important;border-radius:12px!important;padding-left:40px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%237B9396' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center!important;font-size:15px!important}
html body #oc-main .v124-patient-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr))!important;gap:12px!important;margin-top:10px}
html body #oc-main .v124-patient-card{background:#fff!important;border:1px solid #E2EBEB!important;border-radius:16px!important;padding:14px!important;box-shadow:none!important;display:flex;flex-direction:column;gap:8px}
html body #oc-main .v124-patient-card:hover{border-color:#BFDEDB!important;box-shadow:0 6px 18px rgba(4,36,42,.06)!important;transform:none!important}
html body #oc-main .ocpx-ch{display:flex;align-items:center;gap:12px}
html body #oc-main .ocpx-av{flex:0 0 42px;width:42px;height:42px;border-radius:14px;display:grid;place-items:center;font-weight:800;font-size:15px;color:#075E64;background:#E3F4F2}
html body #oc-main .v124-patient-card h3{margin:0!important;font-size:15.5px!important;line-height:1.25;color:#0B2A2E}
html body #oc-main .ocpx-last{display:block;color:#7B9396;font-size:12px;margin-top:2px}
html body #oc-main .v124-patient-card>.vs{font-size:12.5px!important;color:#5F777B!important;line-height:1.45}
html body #oc-main .v124-patient-stats{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;margin:2px 0!important}
html body #oc-main .v124-stat{display:flex!important;flex-direction:column;gap:1px;background:#F5F9F9!important;border:1px solid #EAF1F1!important;border-radius:10px!important;padding:6px 8px!important;font-size:12px!important;color:#0B2A2E!important;min-width:0}
html body #oc-main .v124-stat em{font-style:normal;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:#7B9396}
html body #oc-main .v124-stat b{font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #oc-main .v124-stat.wide{grid-column:1/-1}
html body #oc-main .v124-patient-card .va{display:flex;gap:6px;flex-wrap:wrap;margin-top:auto}

/* folha "Novo paciente" (janela no computador, tela cheia no celular) */
.ocpx-sheet{position:fixed;inset:0;z-index:10040;background:rgba(4,36,42,.55);display:flex;align-items:flex-start;justify-content:center;padding:4vh 16px;overflow:auto}
.ocpx-sheet[hidden]{display:none}
html.ocpx-lock,html.ocpx-lock body{overflow:hidden}
.ocpx-sheet .ocpx-panel{width:min(860px,100%);margin:0!important;border-radius:20px!important;padding:18px 20px!important;box-shadow:0 30px 70px rgba(0,0,0,.3)!important;background:#fff!important}
.ocpx-ph{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px}
.ocpx-ph h3{margin:0!important;font-size:19px!important}
html body .ocpx-sheet button.ocpx-x{width:40px;height:40px;min-height:40px;border-radius:12px;border:0;background:#EEF4F4!important;color:#37565A!important;font-size:24px;line-height:1;padding:0;box-shadow:none}
.ocpx-sheet .ocp-act{display:flex;justify-content:flex-end;gap:8px}

/* =============== FORMULARIOS NO CELULAR: todos os campos do mesmo tamanho =============== */
@media (max-width:850px), (pointer:coarse) and (max-height:500px){
 html body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]),
 html body select{box-sizing:border-box!important;height:48px!important;min-height:48px!important;font-size:16px!important;line-height:1.2!important;border-radius:12px!important;padding:0 14px!important;width:100%;max-width:100%}
 html body input[type=date],html body input[type=time],html body input[type=month],html body input[type=datetime-local]{-webkit-appearance:none!important;appearance:none!important;display:block!important;text-align:left!important;background-color:#fff}
 html body input::-webkit-date-and-time-value{text-align:left;margin:0}
 html body input[type=date]::-webkit-calendar-picker-indicator,html body input[type=time]::-webkit-calendar-picker-indicator,html body input[type=month]::-webkit-calendar-picker-indicator{opacity:.6}
 html body select{-webkit-appearance:none!important;appearance:none!important;padding-right:38px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235F777B' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center!important}
 html body textarea{font-size:16px!important;border-radius:12px!important;padding:12px 14px!important;min-height:96px}
 html body #oc-main label{font-size:13px}
 /* Pacientes no celular */
 html body #oc-main .ocpx-top .va{width:100%;display:grid;grid-template-columns:1fr 1.3fr}
 html body #oc-main .ocpx-top .va .vb{justify-content:center;min-height:46px}
 html body #oc-main .ocpx-list{padding:12px!important}
 html body #oc-main .v124-patient-grid{grid-template-columns:1fr!important}
 .ocpx-sheet{padding:0;align-items:stretch}
 .ocpx-sheet .ocpx-panel{border-radius:0!important;min-height:100%;padding:calc(12px + env(safe-area-inset-top)) 14px calc(20px + env(safe-area-inset-bottom))!important;box-shadow:none!important}
 .ocpx-ph{position:sticky;top:0;background:#fff;z-index:2;padding:6px 0 10px;border-bottom:1px solid #EEF3F3;margin-bottom:12px}
 html body .ocp-form section{padding:12px!important;border-radius:14px!important}
 html body .ocp-row{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 html body .ocp-f{min-width:0}
 html body .ocp-f.w2,html body .ocp-f.s{grid-column:auto!important}
 .ocpx-sheet .ocp-act{position:sticky;bottom:0;background:#fff;padding:10px 0 4px;display:grid;grid-template-columns:1fr 2fr}
 .ocpx-sheet .ocp-act .vb{min-height:50px;justify-content:center}
}

html body .ocpx-sheet .ocp-act button.vb:not(.alt){background:#0B7F86!important;color:#fff!important;border:1px solid #0B7F86!important}
html body .ocpx-sheet .ocp-act button.vb.alt{background:#fff!important;color:#075E64!important;border:1px solid #CFE2E1!important}
.ocpx-sheet .ocp-form section{min-width:0;overflow:hidden}

/* =============== ACOMPANHAMENTO DE PROTESES =============== */
html body #oc-main .psx .ocq-head{background:#fff!important;border:1px solid #E2EBEB!important;border-left:1px solid #E2EBEB!important;border-radius:18px!important;box-shadow:none!important;padding:18px 20px!important}
html body #oc-main .psx .ocq-head h1{font-size:24px!important;letter-spacing:-.02em}
html body #oc-main .psx .ps-kpis{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:10px!important;margin:14px 0 6px!important}
html body #oc-main .psx .ps-kpi{position:relative;background:#fff!important;border:1px solid #E2EBEB!important;border-radius:16px!important;padding:14px 14px 12px!important;box-shadow:none!important;transition:border-color .15s,box-shadow .15s,transform .15s;--k:#0B7F86;--kb:#E3F4F2;overflow:hidden}
html body #oc-main .psx .ps-kpi:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--k)}
html body #oc-main .psx .ps-kpi.late{--k:#D23B4B;--kb:#FDE8EA}
html body #oc-main .psx .ps-kpi.refacao{--k:#E08A1E;--kb:#FEF1DE}
html body #oc-main .psx .ps-kpi.clinic{--k:#2C7BD8;--kb:#E5F0FC}
html body #oc-main .psx .ps-kpi.done{--k:#17795A;--kb:#E3F5EC}
html body #oc-main .psx .ps-kpi.cancel{--k:#7B8A93;--kb:#EEF1F3}
html body #oc-main .psx .ps-kpi:hover{border-color:#C9DCDB!important;box-shadow:0 6px 18px rgba(4,36,42,.07)!important;transform:translateY(-1px)}
html body #oc-main .psx .ps-kpi.active{border-color:var(--k)!important;box-shadow:0 0 0 2px var(--kb)!important}
html body #oc-main .psx .ps-kpi-top{display:flex!important;flex-direction:column;align-items:flex-start!important;gap:10px!important}
html body #oc-main .psx .ps-kpi .ico{width:34px!important;height:34px!important;border-radius:10px!important;display:grid!important;place-items:center;background:var(--kb)!important;color:var(--k)!important;border:0!important;box-shadow:none!important;font-size:0!important}
html body #oc-main .psx .ps-kpi .ico svg{width:19px;height:19px}
html body #oc-main .psx .ps-kpi .num{font-size:26px!important;font-weight:800!important;line-height:1;color:#0B2A2E!important}
html body #oc-main .psx .ps-kpi.late .num{color:#C22F40!important}
html body #oc-main .psx .ps-kpi .lbl{font-size:12.5px!important;font-weight:700!important;color:#4E6A6D!important;margin-top:4px}
html body #oc-main .psx .ps-kpi .sub{font-size:11px;color:#8AA0A2;margin-top:1px}
html body #oc-main .psx .ps-results{font-size:12px;color:#6B8387;display:flex;gap:10px;flex-wrap:wrap;justify-content:space-between;margin:6px 2px 12px}
html body #oc-main .psx .ps-filterbox{background:#fff!important;border:1px solid #E2EBEB!important;border-radius:16px!important;box-shadow:none!important}
/* quadro: colunas lado a lado, rolagem horizontal quando faltar espaco */
html body #oc-main .psx .ocq{display:grid!important;grid-auto-flow:column;grid-template-columns:none!important;grid-auto-columns:minmax(200px,1fr);overflow-x:auto;padding-bottom:8px;scroll-snap-type:x proximity}
html body #oc-main .psx .ocq-col{background:#EEF4F4!important;border:1px solid #E2EBEB;border-radius:18px!important;padding:10px!important;scroll-snap-align:start;max-height:78vh;overflow-y:auto}
html body #oc-main .psx .ocq-ch{position:sticky;top:-10px;background:#EEF4F4;z-index:1;padding:4px 4px 10px;font-size:13px;font-weight:800;color:#0B2A2E}
html body #oc-main .psx .ocq-ch b{background:#fff;border:1px solid #E2EBEB;border-radius:99px;min-width:26px;height:22px;display:inline-grid;place-items:center;font-size:11.5px;padding:0 7px}
html body #oc-main .psx .ocq-card{border-radius:14px!important;border:1px solid #E2EBEB!important;box-shadow:0 1px 2px rgba(4,36,42,.04)!important;transition:box-shadow .15s,border-color .15s}
html body #oc-main .psx .ocq-card:hover{border-color:#C9DCDB!important;box-shadow:0 6px 16px rgba(4,36,42,.08)!important}
html body #oc-main .psx .ocq-card.overdue{border-left:3px solid #D23B4B!important}
html body #oc-main .psx .ocq-card.soon{border-left:3px solid #E08A1E!important}
html body #oc-main .psx .ocq-steps i{height:5px!important;border-radius:99px!important}
@media(max-width:1200px){html body #oc-main .psx .ps-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}}
@media (max-width:850px), (pointer:coarse) and (max-height:500px){
 html body #oc-main .psx .ocq-head{padding:14px!important}
 html body #oc-main .psx .ocq-head h1{font-size:20px!important}
 html body #oc-main .psx .ocq-head p{font-size:12.5px}
 html body #oc-main .psx .ps-kpis{display:flex!important;overflow-x:auto;gap:8px!important;margin:12px -12px 4px!important;padding:2px 12px 6px;scroll-snap-type:x mandatory;scrollbar-width:none}
 html body #oc-main .psx .ps-kpis::-webkit-scrollbar{display:none}
 html body #oc-main .psx .ps-kpi{flex:0 0 150px;scroll-snap-align:start;padding:10px 12px!important}
 html body #oc-main .psx .ps-kpi-top{flex-direction:row!important;align-items:center!important;gap:10px!important}
 html body #oc-main .psx .ps-kpi .num{font-size:22px!important}
 html body #oc-main .psx .ps-results span{display:none}
 html body #oc-main .psx .ps-filters{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 html body #oc-main .psx .ps-filters .wide{grid-column:1/-1}
 html body #oc-main .psx .ocq{grid-auto-columns:86%;margin:0 -12px;padding:0 12px 10px}
 html body #oc-main .psx .ocq-col{max-height:none}
}
/* V133 — metas em anéis (modelo A) */
.ocg2-goals.ocm-grid,.ocm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,440px),1fr));gap:16px}
.ocm-card{display:flex;align-items:center;gap:20px;background:#fff;border:1px solid #E3EAEC;border-radius:16px;padding:18px 22px;min-width:0}
.ocm-anel{width:140px;height:140px;flex:none}.ocm-pc{font:700 27px Inter,system-ui,sans-serif;fill:#14262A}.ocm-pl{font:500 11px Inter,system-ui,sans-serif;fill:#8A9A9E}
.ocm-tx{flex:1;min-width:0}.ocm-h{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.ocm-h strong{font-size:15px;color:#14262A;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ocm-st{flex:none;white-space:nowrap;font-size:11.5px;font-weight:700;border-radius:99px;padding:4px 10px;background:#EEF3F4;color:#5B6E73}
.ocm-st.ok,.ocm-st.pace{background:#E2F5EE;color:#11724B}.ocm-st.warn{background:#FDF1E4;color:#9A5A17}.ocm-st.late{background:#FBE9E7;color:#A5352B}.ocm-st.soon{background:#E8F0FB;color:#2B5DA8}
.ocm-v{font-size:26px;font-weight:800;color:#14262A;margin-top:8px;letter-spacing:-.3px}.ocm-de{font-size:13px;color:#5B6E73;margin-top:2px}
.ocm-g{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px;margin-top:14px}.ocm-g small{display:block;font-size:10.5px;letter-spacing:.07em;text-transform:uppercase;color:#8A9A9E;font-weight:700}
.ocm-g b{font-size:14.5px;color:#14262A}.ocm-g b.falta{color:#C9483C}.ocm-g b.ok{color:#11724B}
.ocm-comp{padding:14px 16px;gap:16px}.ocm-comp .ocm-anel{width:112px;height:112px}.ocm-comp .ocm-v{font-size:21px}
@media(max-width:560px){.ocm-card{flex-direction:column;align-items:stretch;text-align:left}.ocm-anel{align-self:center}}
.ocd-metas{margin:0 0 16px}.ocd-metas .ocm-card{border-color:#EDF2F3;background:#FBFDFD}
/* V133 — permissões: perfis prontos e interruptores (modelo B) */
.ocpf{margin:4px 0 6px;font-family:Inter,"Segoe UI",system-ui,sans-serif}
.ocpf-t{font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:#7D9094;font-weight:800;margin:8px 0 10px}.ocpf-t small{text-transform:none;letter-spacing:0;font-weight:500;color:#8A9A9E;margin-left:6px;font-size:12px}
.ocpf-g{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
html body button.ocpf-c{all:unset;box-sizing:border-box;cursor:pointer;display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:14px;border:1px solid #DCE8E8;border-radius:14px;background:#fff;min-height:128px;transition:border-color .15s,box-shadow .15s}
html body button.ocpf-c:hover{border-color:#9FD9D2}html body button.ocpf-c.on{border:2px solid #14B8AA;padding:13px;background:#F2FBFA}
.ocpf-i{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:#E4F4F2;color:#0B8A84;margin-bottom:6px}.ocpf-c.on .ocpf-i{background:#14B8AA;color:#fff}.ocpf-i svg{width:19px;height:19px}
.ocpf-c b{font-size:14.5px;color:#14262A}.ocpf-c small{font-size:12.5px;color:#5B6E73;line-height:1.35}.ocpf-c em{font-style:normal;font-size:11.5px;color:#8A9A9E;margin-top:auto;padding-top:4px}
.ocpt .oc-permission-item{align-items:center!important;justify-content:space-between;flex-direction:row-reverse;background:#F8FBFB!important;border-color:#E6EEEF!important;color:#14262A!important;font-weight:500}
.ocpt .oc-permission-item input[type=checkbox]{-webkit-appearance:none;appearance:none;width:36px!important;height:20px!important;min-height:20px!important;border-radius:99px;background:#CBD6D8;position:relative;cursor:pointer;flex:0 0 36px!important;margin:0!important;transition:background .15s;border:0!important;box-shadow:none!important}
.ocpt .oc-permission-item input[type=checkbox]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s}
.ocpt .oc-permission-item input[type=checkbox]:checked{background:#14B8AA}.ocpt .oc-permission-item input[type=checkbox]:checked:after{left:18px}
.ocpt .oc-permission-item:has(input:checked){background:#F2FBFA!important;border-color:#BFE8E2!important}
@media (max-width:760px){.ocpf-g{grid-template-columns:1fr 1fr}}
html body button.ocpf-c{text-align:left!important;align-items:flex-start!important}
html body button.ocpf-c.on{border:2px solid #14B8AA!important;padding:13px!important;background:#F2FBFA!important;box-shadow:0 6px 18px -10px rgba(20,184,170,.6)!important}
html body .ocpt .oc-permission-item{display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important}
html body .ocpt .oc-permission-item>span{flex:1 1 auto;order:1}
html body .ocpt .oc-permission-item input[type=checkbox]{order:2;align-self:center!important;margin:0 0 0 auto!important}
html body:not(#_a):not(#_b):not(#_c):not(#_d) button.ocpf-c{border:1px solid #DCE8E8!important;background:#fff!important;padding:14px!important;height:auto!important;min-height:128px!important;border-radius:14px!important;box-shadow:none!important;color:#14262A!important}
html body:not(#_a):not(#_b):not(#_c):not(#_d) button.ocpf-c.on{border:2px solid #14B8AA!important;padding:13px!important;background:#F2FBFA!important;box-shadow:0 6px 18px -10px rgba(20,184,170,.6)!important}
/* V133 — ícones de traço no lugar de emojis */
svg.oc-i{width:1.15em;height:1.15em;vertical-align:-.2em;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none;display:inline-block}
.ap-sec .ic svg.oc-i{width:44px;height:44px}.mc-icon svg.oc-i,.ph-icon svg.oc-i{width:22px;height:22px}
