:root{
    --modern-blue:#2368c4;
    --modern-blue-soft:#eaf3ff;
    --modern-teal:#0ca6a0;
    --modern-green:#249542;
    --modern-bg:#f5f7fa;
    --modern-card:#fff;
    --modern-text:#182230;
    --modern-muted:#697586;
    --modern-line:#e3e8ef;
    --modern-shadow:0 8px 28px rgba(34,52,74,.08);
}

html{background:var(--modern-bg)}
body{background:var(--modern-bg);color:var(--modern-text)}

/* Estrutura principal inspirada na referência: trilho lateral claro e topo limpo. */
.sidebar{
    inset:0 auto 0 0!important;
    width:92px!important;
    padding:18px 10px!important;
    transform:none!important;
    background:#fff!important;
    color:var(--modern-text)!important;
    border-right:1px solid var(--modern-line);
    box-shadow:4px 0 20px rgba(35,55,80,.04)!important;
    overflow-y:auto;
}
.brand{justify-content:center;height:54px;color:var(--modern-text)!important}
.brand img{width:46px;height:46px;border-radius:14px!important;border:1px solid #dce5ef;background:#fff}
.brand>span{display:none}
.sidebar nav{display:flex!important;flex-direction:column;gap:8px!important;margin-top:28px!important}
.sidebar nav a{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
    min-height:66px;padding:8px 4px!important;border:0!important;border-radius:12px!important;
    color:#717b88!important;text-align:center;font-size:11px!important;font-weight:650;line-height:1.15;
}
.sidebar nav a:hover,.sidebar nav a.active{background:var(--modern-blue-soft)!important;color:#175da9!important}
.nav-icon{display:grid;place-items:center;width:27px;height:27px;font-size:23px;line-height:1;color:currentColor}
.nav-label{display:block;max-width:76px}
.side-foot{display:none!important}
.menu-trigger{display:none!important}

.app-main{margin-left:92px!important;padding:0 30px 34px!important;min-height:100vh}
.topbar{
    position:sticky;top:0;z-index:15;margin:0 -30px 28px!important;padding:15px 30px;
    min-height:76px;background:rgba(255,255,255,.96);border-bottom:1px solid var(--modern-line);
    box-shadow:0 3px 14px rgba(35,55,80,.04);backdrop-filter:blur(12px);
}
.topbar>div:first-child{display:flex;align-items:center;gap:15px}
.topbar>div:first-child .eyebrow{display:grid;place-items:center;width:42px;height:42px;border-radius:50%!important;background:#5474d8;color:#fff;font-size:0;letter-spacing:0}
.topbar>div:first-child .eyebrow::after{content:'VV';font-size:12px;font-weight:850}
.topbar h1{margin:0!important;font-size:22px!important;font-weight:700;color:#111827}
.topbar-actions{gap:14px}
.notification-link{width:42px;height:42px;padding:0!important;justify-content:center;border-radius:50%!important;font-size:0!important;background:#fff8e8!important;border-color:#f2dfba!important}
.notification-link::before{content:'♢';font-size:25px;color:#b87918}
.notification-link b{position:absolute;margin:-30px 0 0 27px}
.operator-menu summary{min-width:210px;border-radius:10px!important;border-color:var(--modern-line);box-shadow:none}
.operator-dropdown{border-radius:12px!important;border-color:var(--modern-line);box-shadow:var(--modern-shadow)}

/* Superfícies e controles: claros, arejados e com arredondamento moderado. */
.panel,.metrics article,.queue-metrics article,.reception-column,.reception-card,.reception-statusbar,
.reception-patient-card,.current-service-bar,.work-order,.detail-hero,.encounter-head,.patient-flow-bar,
.profile-notice,.patient-card,.module-card,.pharmacy-tabs,.clinical-workspace-hero,.clinical-stat,
.exam-workspace-hero,.exam-metric,.display-history,.display-featured-call{
    border-radius:14px!important;border-color:var(--modern-line)!important;box-shadow:var(--modern-shadow)!important;
}
.panel,.metrics article,.queue-metrics article,.reception-card,.reception-patient-card,.patient-card{background:var(--modern-card)}
.metrics{gap:14px}
.metrics article{padding:19px 20px}
.metrics strong{color:#303846;font-weight:650}
.panel{padding:22px}
.btn,button,input,select,textarea,.badge,.status-tag,.priority-pill,.completion-badge,
.encounter-nav a,.record-tabs button,.pharmacy-tab,.reception-tabs a{
    border-radius:8px!important;
}
.btn{min-height:40px;box-shadow:none}
.btn.primary{background:var(--modern-green)!important;border-color:var(--modern-green)!important}
.btn.primary:hover{background:#1d7f37!important}
input,select,textarea{border-color:#d8dee7!important;background:#fff!important}
input:focus,select:focus,textarea:focus{border-color:#68a5e8!important;outline:3px solid #dcecff!important}
.eyebrow{color:#1773b9}
table thead{background:#fafbfc}
th{color:#697586}
.flash{border-radius:9px!important}

/* Acesso e página inicial seguem a mesma família visual. */
.auth-main{background:linear-gradient(145deg,#edf4fb,#f8fafc)!important}
.auth-card{border:1px solid var(--modern-line);border-radius:18px!important;box-shadow:0 24px 70px rgba(40,63,91,.14)!important}
.auth-brand{background:#f5f9fd!important}
.home-shell,.home-action{border-radius:16px!important}

@media(max-width:900px){
    .menu-trigger{display:grid!important;top:15px;left:15px}
    .sidebar{width:min(290px,86vw)!important;padding:72px 16px 18px!important;transform:translateX(calc(-100% - 18px))!important}
    .menu-trigger:hover+.sidebar,.menu-trigger:focus-visible+.sidebar,.sidebar:hover,.sidebar:focus-within,body.sidebar-pinned .sidebar{transform:translateX(0)!important}
    .brand{justify-content:flex-start;padding-left:8px}.brand>span{display:inline}
    .sidebar nav a{min-height:48px;flex-direction:row;justify-content:flex-start;gap:12px;padding:10px 12px!important;text-align:left;font-size:14px!important}
    .nav-label{max-width:none}
    .app-main{margin-left:0!important;padding:76px 18px 24px!important}
    .topbar{position:relative;margin:-76px -18px 24px!important;padding:14px 18px 14px 76px;min-height:68px}
    .topbar>div:first-child .eyebrow{display:none}
    .operator-menu summary{min-width:auto}
}
@media(max-width:560px){
    .topbar h1{font-size:19px!important}.notification-link{display:flex!important}.panel{padding:17px}
}

/* Refinamentos após validação visual. */
.brand img{width:58px!important;height:58px!important;padding:7px;object-fit:contain!important;border:0!important;border-radius:14px!important;background:#f7fafc!important}
.topbar>div:first-child .eyebrow{display:none!important}.topbar>div:first-child .eyebrow::after{content:none!important}.topbar>div:first-child{gap:0!important}
.notification-link::before{content:'🔔'!important;font-size:20px!important;line-height:1}
.notification-link{position:relative;background:#fff8e8!important}.notification-link b{position:absolute!important;top:-5px;right:-5px;margin:0!important}

.pharmacy-layout.catalog-full{display:block!important}.catalog-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.pharmacy-drawer{width:min(560px,96vw);height:100vh;max-height:100vh;margin:0 0 0 auto;padding:0;border:0;background:transparent}
.pharmacy-drawer::backdrop{background:#12263d70;backdrop-filter:blur(2px)}
.pharmacy-drawer-shell{height:100%;padding:26px;background:#fff;box-shadow:-18px 0 55px rgba(25,45,70,.22);overflow:auto}
.pharmacy-drawer-shell>header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid var(--modern-line)}
.pharmacy-drawer-shell h2{margin:4px 0 0}.drawer-close{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--modern-line);background:#f7f9fb;font-size:25px;cursor:pointer}

.verum-home{background:linear-gradient(145deg,#eef4fa,#f8fafc)!important;color:var(--modern-text)!important}
.verum-home main{padding:34px!important}.home-shell{width:min(1180px,100%)!important;padding:34px 38px 38px;background:#fff;border:1px solid var(--modern-line);border-radius:18px!important;box-shadow:0 24px 70px rgba(35,55,80,.12)}
.home-shell header{padding-bottom:24px;border-bottom:1px solid var(--modern-line)}
.home-shell header img{width:78px!important;height:62px!important;padding:5px;object-fit:contain!important;border:0!important;background:#f7fafc!important}
.home-shell header span{color:#142033!important;font-size:23px!important}.home-shell header b{color:var(--modern-teal)!important}.home-shell header small{color:var(--modern-muted)!important}
.home-intro{margin:45px 0 28px!important}.home-intro .eyebrow{color:var(--modern-blue)!important}.home-intro h1{color:#111827!important;font-size:clamp(36px,5vw,58px)!important}.home-intro p{color:var(--modern-muted)!important}
.home-actions{gap:14px!important}.home-action{min-height:120px!important;border:1px solid var(--modern-line)!important;border-radius:14px!important;background:#fff!important;color:var(--modern-text)!important;box-shadow:0 8px 24px rgba(35,55,80,.06)}
.home-action:hover,.home-action:focus{background:#f8fbff!important;border-color:#b9d6f6!important}.home-action.primary{background:#edf7ff!important;border-color:#aed1f5!important}
.home-action>span{border-radius:10px!important;background:#edf3fb!important;color:var(--modern-blue)!important}.home-action.primary>span{background:#dff3f1!important;color:#087e7a!important}.home-shell footer{color:var(--modern-muted)!important}
@media(max-width:680px){.verum-home main{padding:14px!important}.home-shell{padding:24px 18px!important}.home-intro{margin:32px 0 22px!important}}

/* Atendimento clínico: anamnese livre e ações sob demanda. */
.encounter-grid.encounter-grid-single{grid-template-columns:minmax(0,1fr)!important}
.encounter-action-bar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;padding:16px 18px;border:1px solid var(--modern-line);border-radius:14px;background:#fff;box-shadow:var(--modern-shadow)}
.encounter-action-bar>div:first-child{display:grid;gap:4px}.encounter-action-bar>div:first-child strong{font-size:18px}.encounter-action-bar>div:last-child{display:flex;gap:9px;flex-wrap:wrap}
.clinical-drawer .form-stack{padding:0!important;border:0!important;box-shadow:none!important}
@media(max-width:680px){.encounter-action-bar{align-items:stretch;flex-direction:column}.encounter-action-bar>div:last-child,.encounter-action-bar .btn{width:100%}}

/* Tons leves inspirados em controles segmentados: cor como orientação, não como bloco. */
:root{--modern-action-bg:#eaf3ff;--modern-action-border:#cddff4;--modern-action-text:#2467ad;--modern-action-hover:#deecfc;--modern-title-bg:#f0f6fb;--modern-title-border:#dbe7f1}
.btn.primary,button.btn.primary,.card-actions .btn.primary,.clinic-actions .btn.primary,.presence-actions .btn.primary,.reception-hero .btn.primary,.reception-statusbar .btn.primary,.reception-patient-card .btn.primary,.encounter-action-bar .btn.primary{background:var(--modern-action-bg)!important;border-color:var(--modern-action-border)!important;color:var(--modern-action-text)!important;box-shadow:none!important}
.btn.primary:hover,.btn.primary:focus,button.btn.primary:hover,button.btn.primary:focus{background:var(--modern-action-hover)!important;border-color:#aecbee!important;color:#185895!important}
.btn.primary:focus-visible,button.btn.primary:focus-visible{outline:3px solid #dcecff!important;outline-offset:2px}
.encounter-head,.detail-hero,.clinic-hero,.exam-hero{background:var(--modern-title-bg)!important;border:1px solid var(--modern-title-border)!important;color:var(--modern-text)!important}
.encounter-head a,.detail-hero a{color:var(--modern-action-text)!important}
.encounter-head p,.detail-hero p,.clinic-hero p,.exam-hero p{color:var(--modern-muted)!important}
.clinic-presence,.exam-shift{background:#fff!important;border:1px solid var(--modern-title-border);color:#526577!important}
.pharmacy-tabs a.active{background:var(--modern-action-bg)!important;color:var(--modern-action-text)!important;box-shadow:none!important;border:1px solid var(--modern-action-border)!important}
.pharmacy-tabs a.active span{background:#dbeaff!important;color:var(--modern-action-text)!important}
.reception-tabs a.active,.exam-filters a.active{background:#edf5ff!important;border-color:#cddff4!important;color:var(--modern-action-text)!important}

/* Sobre o Verum Vet. */
.about-hero{display:flex;align-items:center;gap:18px;margin-bottom:18px;padding:22px 24px;border:1px solid var(--modern-title-border);background:var(--modern-title-bg)}
.about-hero h2{margin:3px 0 5px;font-size:30px}.about-hero p{max-width:780px;margin:0;color:var(--modern-muted);line-height:1.55}
.about-mark{display:grid;place-items:center;flex:0 0 72px;width:72px;height:72px;border:1px solid var(--modern-line);background:#fff}.about-mark img{width:58px;height:58px;object-fit:contain}
.about-grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.75fr);gap:18px;align-items:start}.about-side{display:grid;gap:18px}.about-card p{color:var(--modern-muted);line-height:1.65}.about-card>.btn{margin-top:8px}.about-card>small{display:block;margin-top:9px;color:var(--modern-muted)}
.about-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:24px 0 0}.about-facts div{padding:14px;border:1px solid var(--modern-line);background:#f8fafc}.about-facts dt{color:var(--modern-muted);font-size:12px;font-weight:750}.about-facts dd{margin:5px 0 0;font-weight:700}
@media(max-width:850px){.about-grid{grid-template-columns:1fr}.about-facts{grid-template-columns:1fr}.about-hero{align-items:flex-start}.about-mark{flex-basis:58px;width:58px;height:58px}.about-mark img{width:46px;height:46px}}
.room-admin.points-full{display:block!important}.point-drawer .form-stack{padding:0!important;border:0!important;box-shadow:none!important}

/* Topo: perfil sem moldura e sino vetorial perfeitamente centralizado. */
.operator-menu>summary{min-width:210px!important;padding:5px 4px 5px 5px!important;border:0!important;background:transparent!important;box-shadow:none!important}
.operator-menu>summary:hover,.operator-menu>summary:focus-visible{background:#f5f8fb!important}
.notification-link{display:grid!important;place-items:center!important;padding:0!important;line-height:1!important}
.notification-link::before{content:''!important;display:block;width:21px;height:21px;transform:translateY(2px);background:#9a6900;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
