/* ============================================================
   MDLab — estrutura Viho: cabeçalho fixo, menu lateral e widgets
   (KPI, boas-vindas, cartões quadrados, tabela, linha do tempo).
   As cores assentam nas variáveis já existentes em style.css,
   por isso acompanham os temas claro e escuro.
   ============================================================ */
:root{
  --vh-primary:var(--marca-orange);
  --vh-primary-dark:color-mix(in srgb,var(--vh-primary) 78%,#000);
  --vh-primary-tint:color-mix(in srgb,var(--vh-primary) 10%,transparent);
  --vh-primary-tint2:color-mix(in srgb,var(--vh-primary) 18%,transparent);
  --vh-bg:var(--fundo); --vh-surface:var(--branco); --vh-surface-2:var(--branco-2);
  --vh-border:var(--linha); --vh-heading:var(--tinta); --vh-text:var(--tinta); --vh-muted:var(--cinza);
  --vh-success:var(--verde); --vh-warning:#D97706; --vh-danger:var(--vermelho);
  --vh-header-h:82px; --vh-side-w:290px; --vh-gutter:30px; --vh-off:0px;
  --vh-shadow-header:0 0 20px rgba(25,124,207,.08);
  --vh-shadow-card:0 0 11px 5px rgba(113,113,113,.06);
}
html[data-theme="dark"]{--vh-shadow-header:0 0 20px rgba(0,0,0,.35);--vh-shadow-card:0 0 11px 5px rgba(0,0,0,.18)}

/* ---------- Cabeçalho ---------- */
.vh-header{position:fixed;top:0;left:var(--vh-off);right:var(--vh-off);height:var(--vh-header-h);z-index:120;display:flex;align-items:stretch;background:var(--vh-surface);box-shadow:var(--vh-shadow-header)}
.vh-header-left{width:var(--vh-side-w);flex-shrink:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 22px 0 30px;border-right:1px solid var(--vh-border);transition:width .3s}
.vh-logo{display:inline-flex;align-items:center}
.vh-logo img{height:44px;width:auto;display:block}
html[data-theme="dark"] .vh-logo .logo-light,html[data-theme="light"] .vh-logo .logo-dark{display:none}
.vh-header-mid{flex:1;min-width:0;display:flex;align-items:center;padding:0 26px}
.vh-header-ctx{font-size:13.5px;font-weight:500;letter-spacing:.3px;color:var(--vh-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vh-header-right{display:flex;align-items:center;gap:8px;padding:0 26px 0 10px;flex-shrink:0}
.vh-icon-btn{position:relative;width:40px;height:40px;display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;border-radius:6px;color:var(--vh-text);cursor:pointer;transition:background .2s,color .2s}
.vh-icon-btn:hover{background:var(--vh-primary-tint);color:var(--vh-primary)}
.vh-icon-btn:focus-visible,.vh-logout:focus-visible,.vh-nav-item:focus-visible{outline:2px solid var(--vh-primary);outline-offset:2px}
.vh-icon-btn svg,.vh-logout svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html[data-theme="dark"] #temaBtn .ico-lua,html[data-theme="light"] #temaBtn .ico-sol{display:none}
.vh-logout{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:5px;background:var(--vh-primary-tint);color:var(--vh-primary-dark);font-size:14px;font-weight:600;white-space:nowrap;transition:background .2s,color .2s}
html[data-theme="dark"] .vh-logout{color:var(--link)}
.vh-logout:hover{background:var(--vh-primary);color:#fff;text-decoration:none}
.vh-logout svg{width:16px;height:16px}

/* ---------- Menu lateral ---------- */
.vh-sidebar{position:fixed;z-index:100;top:var(--vh-header-h);left:var(--vh-off);bottom:0;width:var(--vh-side-w);display:flex;flex-direction:column;background:var(--vh-surface);border-right:1px solid var(--vh-border);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;transition:transform .3s,opacity .3s}
.vh-profile{display:flex;flex-direction:column;align-items:center;padding:28px 24px 22px;margin-bottom:14px;text-align:center;border-bottom:1px solid var(--vh-border)}
.vh-avatar{width:76px;height:76px;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--vh-primary-tint2);color:var(--vh-primary);font-size:26px;font-weight:700;box-shadow:0 0 0 4px var(--vh-surface),0 0 0 5px color-mix(in srgb,var(--vh-primary) 30%,transparent)}
.vh-avatar img{width:100%;height:100%;object-fit:cover}
.vh-profile-nome{margin-top:16px;font-size:14px;font-weight:600;line-height:1.35;color:var(--vh-heading);overflow-wrap:anywhere}
.vh-profile-papel{margin-top:6px;padding:2px 10px;border-radius:10px;font-size:11.5px;font-weight:600;background:var(--vh-primary-tint);color:var(--vh-primary-dark)}
html[data-theme="dark"] .vh-profile-papel{color:var(--link)}
.vh-nav{flex:1;padding:0 20px 24px}
.vh-nav-titulo{padding:0 4px 10px;margin:14px 0 10px;border-bottom:1px solid var(--vh-border);font-size:14px;font-weight:700;color:var(--vh-heading)}
.vh-nav-item{display:flex;align-items:center;gap:14px;padding:10px 15px;margin:2px 0;border-radius:10px;font-size:14px;font-weight:500;line-height:1.35;color:var(--vh-text);transition:background .3s,color .3s}
.vh-nav-item svg{width:18px;height:18px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-nav-item:hover{background:var(--vh-primary-tint);color:var(--vh-primary-dark);text-decoration:none}
html[data-theme="dark"] .vh-nav-item:hover{background:rgba(255,255,255,.05);color:#fff}
.vh-nav-item.active,.vh-nav-item.active:hover{background:var(--vh-primary);color:#fff;font-weight:600}
.vh-overlay{display:none}

/* ---------- Corpo ---------- */
body.vh{background:var(--vh-bg)}
.vh-main{margin-left:calc(var(--vh-off) + var(--vh-side-w));margin-right:var(--vh-off);padding-top:var(--vh-header-h);min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;transition:margin-left .3s}
.vh-main>.conteudo{flex:1 0 auto;width:auto!important;max-width:none!important;margin:var(--vh-gutter)!important;padding:0!important;min-width:0}
.vh-footer{margin-top:auto;padding:15px var(--vh-gutter);background:var(--vh-surface);border-top:1px solid var(--vh-border);font-size:13.5px;font-weight:500;color:var(--vh-muted)}
html[data-collapsed="1"] .vh-sidebar{transform:translateX(-100%);opacity:0;pointer-events:none}
html[data-collapsed="1"] .vh-main{margin-left:var(--vh-off)}

@media(max-width:991px){
  :root{--vh-header-h:66px;--vh-gutter:16px}
  .vh-header-left{width:auto;border-right:0;padding:0 6px 0 16px}
  .vh-logo img{height:34px}
  .vh-header-mid{padding:0}
  .vh-header-ctx{display:none}
  .vh-header-right{padding-right:12px}
  :root{--vh-off:0px!important}
  .vh-main,html[data-collapsed="1"] .vh-main{margin-left:0;margin-right:0}
  .vh-sidebar,html[data-collapsed="1"] .vh-sidebar{width:min(290px,84vw);transform:translateX(-100%);opacity:1;pointer-events:auto;box-shadow:none}
  body.vh-aberto .vh-sidebar{transform:none;box-shadow:0 0 40px rgba(0,0,0,.25)}
  body.vh-aberto .vh-overlay{display:block;position:fixed;inset:var(--vh-header-h) 0 0 0;z-index:90;background:rgba(20,24,32,.45)}
}
@media(max-width:991px){.vh-so-desktop{display:none!important}.vh-cz-links{display:none!important}}
@media(max-width:520px){.vh-logout span{display:none}.vh-logout{padding:0 12px}.vh-header-right{gap:2px}.vh-icon-btn{width:36px}}
@media(prefers-reduced-motion:reduce){.vh-sidebar,.vh-main,.vh-header-left{transition:none}}

/* ---------- Cabeçalho de página ---------- */
.vh-pagehead{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-bottom:26px}
.vh-pagehead h1{margin:0;font-size:24px;font-weight:600;line-height:1.3;letter-spacing:0;color:var(--vh-heading)}
.vh-crumb{display:flex;align-items:center;flex-wrap:wrap;margin:6px 0 0;padding:0;list-style:none;font-size:13px;font-weight:500;letter-spacing:.6px;color:var(--vh-muted)}
.vh-crumb li{display:inline-flex;align-items:center}
.vh-crumb li+li::before{content:"/";padding:0 8px;opacity:.7}
.vh-crumb a{display:inline-flex;color:var(--vh-primary)}
.vh-crumb svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:0 20px;border:1px solid var(--vh-primary);border-radius:5px;background:var(--vh-primary);color:#fff!important;font-size:14px;font-weight:600;cursor:pointer;transition:background .2s,border-color .2s}
.vh-btn:hover{background:var(--vh-primary-dark);border-color:var(--vh-primary-dark);text-decoration:none}
.vh-btn.claro{background:#fff;border-color:#fff;color:var(--vh-primary-dark)!important}
.vh-btn.claro:hover{background:rgba(255,255,255,.88)}

/* ---------- Grelha e cartões ---------- */
.vh-row{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:30px;margin-bottom:30px}
.vh-col-4{grid-column:span 4}.vh-col-5{grid-column:span 5}.vh-col-7{grid-column:span 7}.vh-col-8{grid-column:span 8}
.vh-card{background:var(--vh-surface);border:1px solid var(--vh-border);border-radius:0;box-shadow:var(--vh-shadow-card);min-width:0}
.vh-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:26px 28px 0}
.vh-card-head h2{margin:0;font-size:16px;font-weight:600;letter-spacing:0;color:var(--vh-heading)}
.vh-card-head a{font-size:13px;font-weight:600;color:var(--vh-primary-dark);white-space:nowrap}
html[data-theme="dark"] .vh-card-head a{color:var(--link)}
.vh-card-body{padding:20px 28px 26px}
.vh-conta{display:inline-block;min-width:22px;margin-left:8px;padding:1px 7px;border-radius:10px;background:var(--vh-danger);color:#fff;font-size:11.5px;font-weight:700;text-align:center;vertical-align:1px}

/* Boas-vindas */
.vh-welcome{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-height:100%;padding:38px 30px;color:#fff;background:linear-gradient(135deg,var(--marca-red),var(--marca-orange));border:0;box-shadow:var(--vh-shadow-card)}
.vh-welcome::before,.vh-welcome::after{content:"";position:absolute;border-radius:50%;border:22px solid rgba(255,255,255,.09)}
.vh-welcome::before{width:210px;height:210px;right:-70px;bottom:-80px}
.vh-welcome::after{width:120px;height:120px;left:-40px;top:-40px;border-width:16px}
.vh-welcome>*{position:relative;z-index:1}
.vh-welcome h2{margin:0 0 10px;font-size:24px;font-weight:700;letter-spacing:0;color:#fff;overflow-wrap:anywhere}
.vh-welcome p{margin:0;max-width:360px;font-size:14.5px;font-weight:500;line-height:1.7;color:#fff}
.vh-welcome .vh-btn{margin-top:20px}

/* KPI */
.vh-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:30px;height:100%}
.vh-kpi{position:relative;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px 16px 20px;background:var(--vh-surface);border:1px solid var(--vh-border);box-shadow:var(--vh-shadow-card);color:var(--vh-text)!important;transition:transform .2s,box-shadow .2s}
.vh-kpi::after{content:"";position:absolute;right:-28px;top:-28px;width:96px;height:96px;border-radius:50%;border:14px solid color-mix(in srgb,var(--accent,var(--vh-primary)) 8%,transparent)}
.vh-kpi:hover{transform:translateY(-3px);box-shadow:0 10px 22px rgba(25,124,207,.09);text-decoration:none}
.vh-kpi-ico{width:54px;height:54px;border-radius:50%;margin-bottom:14px;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--accent,var(--vh-primary)) 13%,transparent);color:var(--accent,var(--vh-primary))}
.vh-kpi-ico svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-kpi-val{font-size:26px;font-weight:700;line-height:1.15;color:var(--vh-heading);font-variant-numeric:tabular-nums;white-space:nowrap}
.vh-kpi-val small{font-size:14px;font-weight:600;color:var(--vh-muted)}
.vh-kpi-lbl{margin-top:6px;font-size:13px;font-weight:500;letter-spacing:.4px;line-height:1.4;color:var(--vh-muted)}

/* Tabela */
.vh-table-wrap{overflow-x:auto}
.vh-table{width:100%;border-collapse:collapse;font-size:13.5px}
.vh-table th{padding:10px 12px;text-align:left;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.6px;color:var(--vh-muted);border-bottom:1px solid var(--vh-border);white-space:nowrap}
.vh-table td{padding:14px 12px;border-bottom:1px solid var(--vh-border);vertical-align:middle}
.vh-table tr:last-child td{border-bottom:0}
.vh-table tbody tr:hover td{background:var(--vh-surface-2)}
.vh-table th:first-child,.vh-table td:first-child{padding-left:0}
.vh-table th:last-child,.vh-table td:last-child{padding-right:0}
.vh-person{display:flex;align-items:center;gap:12px;color:var(--vh-text)!important}
.vh-person:hover{text-decoration:none}
.vh-person:hover b{color:var(--vh-primary-dark)}
.vh-av{width:38px;height:38px;border-radius:50%;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;background:color-mix(in srgb,var(--accent,var(--vh-primary)) 14%,transparent);color:var(--accent,var(--vh-primary))}
.vh-person b{display:block;font-size:13.5px;font-weight:600;color:var(--vh-heading)}
.vh-person small{font-size:12px;color:var(--vh-muted)}
.vh-prog{display:flex;align-items:center;gap:10px;min-width:130px}
.vh-prog span:last-child{flex:0 0 auto;min-width:40px;text-align:right;font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}
.vh-bar{flex:1;height:6px;border-radius:3px;background:color-mix(in srgb,var(--vh-muted) 18%,transparent);overflow:hidden;min-width:50px}
.vh-bar>i{display:block;height:100%;border-radius:3px;background:var(--accent,var(--vh-primary))}
.vh-state{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;white-space:nowrap;color:var(--vh-muted)}
.vh-state i{width:8px;height:8px;border-radius:50%;background:currentColor}
.vh-state.on{color:var(--vh-success)}
.vh-state.on i{box-shadow:0 0 0 3px color-mix(in srgb,var(--vh-success) 20%,transparent)}

/* Linha do tempo */
.vh-timeline{list-style:none;margin:0;padding:0}
.vh-timeline li{position:relative;padding:0 0 18px}
.vh-timeline li:last-child{padding-bottom:0}
.vh-timeline li::before{content:"";position:absolute;left:17px;top:38px;bottom:2px;width:1px;background:var(--vh-border)}
.vh-timeline li:last-child::before{display:none}
.vh-timeline a{display:flex;gap:14px;color:var(--vh-text)}
.vh-timeline a:hover{text-decoration:none}
.vh-timeline a:hover .vh-tl-title{color:var(--vh-primary-dark)}
.vh-tl-ico{width:36px;height:36px;border-radius:50%;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--vh-warning) 14%,transparent);color:var(--vh-warning)}
.vh-tl-ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-tl-body{flex:1;min-width:0;padding-top:2px}
.vh-tl-title{display:block;font-size:13.5px;font-weight:600;color:var(--vh-heading)}
.vh-tl-sub{display:block;margin-top:2px;font-size:12px;color:var(--vh-muted)}
.vh-tl-time{padding-top:4px;font-size:12px;font-weight:600;color:var(--vh-warning);white-space:nowrap}
.vh-vazio{display:flex;flex-direction:column;align-items:center;gap:6px;padding:26px 10px;text-align:center;font-size:13.5px;color:var(--vh-muted)}
.vh-vazio .vh-kpi-ico{margin-bottom:6px}
.vh-vazio strong{font-size:15px;color:var(--vh-heading)}
.vh-vazio a{font-weight:600}

@media(max-width:1399px){.vh-col-4,.vh-col-5,.vh-col-7,.vh-col-8{grid-column:span 12}.vh-welcome{min-height:0}}
@media(max-width:767px){
  .vh-row{gap:16px;margin-bottom:16px}
  .vh-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .vh-kpi{padding:18px 10px 16px}.vh-kpi-val{font-size:22px}.vh-kpi-ico{width:44px;height:44px;margin-bottom:10px}
  .vh-card-head{padding:20px 18px 0}.vh-card-body{padding:16px 18px 20px}
  .vh-pagehead .vh-btn{width:100%}
  .vh-table .vh-so-largo{display:none}.vh-prog{min-width:0}.vh-prog .vh-bar{display:none}.vh-prog span:last-child{min-width:0;text-align:left}
  .vh-av{display:none}
}

/* ============================================================
   Ícones do cabeçalho: notificações
   ============================================================ */
.vh-icon-btn[aria-expanded="true"]{background:var(--vh-primary-tint);color:var(--vh-primary)}
.vh-icon-btn[hidden]{display:none}
.vh-badge{position:absolute;top:3px;right:1px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--vh-danger);color:#fff;font-size:10px;font-weight:700;line-height:18px;text-align:center;box-shadow:0 0 0 2px var(--vh-surface)}
html[data-theme="light"] .vh-badge,html[data-theme="light"] .vh-conta{background:#D22D3D}
.vh-drop-wrap{position:relative}
.vh-drop{position:absolute;top:calc(100% + 14px);right:-60px;z-index:130;width:330px;max-width:calc(100vw - 24px);background:var(--vh-surface);border:1px solid var(--vh-border);border-radius:6px;box-shadow:0 0 12px 3px rgba(25,124,207,.08),0 14px 30px rgba(17,23,39,.12);overflow:hidden}
.vh-drop[hidden]{display:none}
.vh-drop-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--vh-border);font-size:15px;font-weight:700;color:var(--vh-heading)}
.vh-drop-head span{padding:1px 9px;border-radius:10px;background:var(--vh-primary-tint);color:var(--vh-primary-dark);font-size:12px}
html[data-theme="dark"] .vh-drop-head span{color:var(--link)}
.vh-note{display:flex;gap:12px;padding:13px 20px;border-bottom:1px solid var(--vh-border);color:var(--vh-text)}
.vh-note:hover{background:var(--vh-surface-2);text-decoration:none}
.vh-note-ico{width:34px;height:34px;border-radius:50%;flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--vh-warning) 14%,transparent);color:var(--vh-warning)}
.vh-note-ico svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-note b{display:block;font-size:13.5px;font-weight:600;color:var(--vh-heading)}
.vh-note small{display:block;margin-top:2px;font-size:12px;color:var(--vh-muted)}
.vh-drop-vazio{margin:0;padding:22px 20px;font-size:13.5px;color:var(--vh-muted);text-align:center}
.vh-drop-foot{display:block;padding:12px 20px;text-align:center;font-size:13px;font-weight:600;color:var(--vh-primary-dark)}
html[data-theme="dark"] .vh-drop-foot{color:var(--link)}
.vh-drop-foot:hover{background:var(--vh-surface-2);text-decoration:none}
@media(max-width:520px){.vh-drop{position:fixed;top:calc(var(--vh-header-h) + 6px);right:12px;left:12px;width:auto}}

/* ============================================================
   Esquema "menu escuro" e cor de destaque escolhida
   ============================================================ */
html[data-scheme="dark-sidebar"] .vh-sidebar,html[data-scheme="dark-sidebar"] .vh-header-left{
  --vh-surface:#111727;--vh-border:color-mix(in srgb,var(--vh-primary) 22%,#1f2738);--vh-heading:rgba(255,255,255,.9);--vh-text:rgba(255,255,255,.74);--vh-muted:rgba(255,255,255,.5);
  background:#111727}
html[data-scheme="dark-sidebar"] .vh-logo .logo-light{display:none}
html[data-scheme="dark-sidebar"] .vh-logo .logo-dark{display:block}
html[data-scheme="dark-sidebar"] .vh-nav-item:hover{background:rgba(255,255,255,.06);color:#fff}
html[data-scheme="dark-sidebar"] .vh-nav-item.active{color:#fff}
html[data-scheme="dark-sidebar"] .vh-profile-papel{background:rgba(255,255,255,.08);color:color-mix(in srgb,var(--vh-primary) 60%,#fff)}
html[data-scheme="dark-sidebar"] .vh-header-left .vh-icon-btn:hover{background:rgba(255,255,255,.08);color:#fff}
html[data-cor]{--grad:linear-gradient(100deg,var(--marca-red),var(--marca-orange));--chip:color-mix(in srgb,var(--marca-orange) 10%,transparent)}
html[data-cor][data-theme="light"]{--link:color-mix(in srgb,var(--marca-orange) 72%,#000)}
html[data-cor][data-theme="dark"]{--link:color-mix(in srgb,var(--marca-orange) 62%,#fff)}

/* ============================================================
   Modos de layout: compacto, moderno e caixa
   ============================================================ */
@media(min-width:992px){
  html[data-layout="compact"]{--vh-side-w:150px}
  html[data-layout="compact"] .vh-header-left{padding:0 8px 0 14px;gap:4px}
  html[data-layout="compact"] .vh-logo img{height:25px}
  html[data-layout="compact"] .vh-nav{padding:0 12px 20px}
  html[data-layout="compact"] .vh-profile{padding:22px 8px 16px}
  html[data-layout="compact"] .vh-avatar{width:48px;height:48px;font-size:17px}
  html[data-layout="compact"] .vh-profile-nome,html[data-layout="compact"] .vh-profile-papel{display:none}
  html[data-layout="compact"] .vh-nav-titulo{text-align:center;font-size:11px;padding:0 0 6px;margin:10px 0 6px;text-transform:uppercase;letter-spacing:.6px;color:var(--vh-muted)}
  html[data-layout="compact"] .vh-nav-item{flex-direction:column;gap:4px;text-align:center;padding:8px 4px;font-size:11.5px;font-weight:600}
  html[data-layout="compact"] .vh-nav-item svg{width:40px;height:40px;padding:10px;border-radius:6px;background:color-mix(in srgb,var(--vh-muted) 10%,transparent)}
  html[data-layout="compact"] .vh-nav-item.active,html[data-layout="compact"] .vh-nav-item.active:hover{background:transparent;color:var(--vh-primary)}
  html[data-layout="compact"] .vh-nav-item.active svg{background:var(--vh-primary);color:#fff}
}
@media(min-width:1200px){
  html[data-layout="modern"]{--vh-off:0px}
  html[data-layout="modern"] body.vh{background:color-mix(in srgb,var(--vh-primary) 15%,var(--vh-bg))}
  html[data-layout="modern"] body.vh::before,html[data-layout="modern"] body.vh::after{content:"";position:fixed;left:0;right:0;height:30px;z-index:110;background:color-mix(in srgb,var(--vh-primary) 15%,var(--vh-bg))}
  html[data-layout="modern"] body.vh::before{top:0}
  html[data-layout="modern"] body.vh::after{bottom:0}
  html[data-layout="modern"] .vh-header{top:30px;left:30px;right:30px;border-radius:20px 20px 0 0}
  html[data-layout="modern"] .vh-header-left{border-top-left-radius:20px}
  html[data-layout="modern"] .vh-sidebar{top:calc(30px + var(--vh-header-h));left:30px;bottom:30px;border-bottom-left-radius:20px}
  html[data-layout="modern"] .vh-main{margin:0 30px 0 calc(30px + var(--vh-side-w));padding-top:calc(30px + var(--vh-header-h));padding-bottom:30px;background:transparent}
  html[data-layout="modern"] .vh-footer{border-radius:0 0 20px 0}
  html[data-layout="modern"][data-collapsed="1"] .vh-main{margin-left:30px}
  html[data-layout="modern"][data-collapsed="1"] .vh-footer{border-radius:0 0 20px 20px}
}
@media(min-width:1360px){
  html[data-boxed="1"]:not([data-layout="modern"]){--vh-off:calc((100vw - 1280px) / 2)}
  html[data-boxed="1"]:not([data-layout="modern"]) body.vh{background:color-mix(in srgb,var(--vh-primary) 7%,var(--vh-bg))}
  html[data-boxed="1"]:not([data-layout="modern"]) .vh-main{background:var(--vh-bg);box-shadow:0 0 0 1px var(--vh-border)}
}

/* ============================================================
   Personalizador
   ============================================================ */
.vh-cz-links{position:fixed;right:0;top:50%;transform:translateY(-50%);z-index:9000;display:flex;flex-direction:column;background:var(--vh-surface);border:1px solid var(--vh-border);border-right:0;border-radius:8px 0 0 8px;box-shadow:0 0 12px 3px rgba(25,124,207,.08);overflow:hidden;transition:right .3s}
.vh-cz-links button{width:46px;height:46px;border:0;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--vh-text);transition:background .2s,color .2s}
.vh-cz-links button+button{border-top:1px solid var(--vh-border)}
.vh-cz-links button:hover,.vh-cz-links button.on{background:var(--vh-primary-tint);color:var(--vh-primary)}
.vh-cz-links button:focus-visible{outline:2px solid var(--vh-primary);outline-offset:-2px}
.vh-cz-links svg,.vh-cz svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-cz-links.open{right:340px}
.vh-cz{position:fixed;top:0;right:0;bottom:0;z-index:9001;width:340px;max-width:100vw;display:flex;flex-direction:column;background:var(--vh-surface);border-left:1px solid var(--vh-border);box-shadow:-10px 0 30px rgba(17,23,39,.1);transform:translateX(100%);transition:transform .3s;color:var(--vh-text)}
.vh-cz[hidden]{display:none}
.vh-cz.open{transform:none}
.vh-cz-head{position:relative;padding:22px 56px 22px 24px;border-bottom:1px solid var(--vh-border)}
.vh-cz-head h2{margin:0;font-size:16px;font-weight:700;letter-spacing:0;color:var(--vh-heading)}
.vh-cz-head p{margin:2px 0 0;font-size:12.5px;line-height:1.4;color:var(--vh-muted)}
.vh-cz-close{position:absolute;top:16px;right:14px}
.vh-cz-tabs{display:flex;padding:0 16px;border-bottom:1px solid var(--vh-border)}
.vh-cz-tabs button{flex:1;padding:12px 6px;border:0;background:none;cursor:pointer;font:inherit;font-size:13px;font-weight:600;color:var(--vh-text);border-bottom:2px solid transparent;margin-bottom:-1px}
.vh-cz-tabs button.on{color:var(--vh-primary);border-bottom-color:var(--vh-primary)}
.vh-cz-tabs button:focus-visible,.vh-cz-opt:focus-visible,.vh-swatch:focus-visible,.vh-cz-reset:focus-visible{outline:2px solid var(--vh-primary);outline-offset:2px}
.vh-cz-body{flex:1;overflow-y:auto;padding:22px 24px 30px}
.vh-cz-pane{display:none}
.vh-cz-pane.on{display:block}
.vh-cz h3{margin:4px 0 12px;font-size:13px;font-weight:700;letter-spacing:0;color:var(--vh-heading)}
.vh-cz h3:not(:first-child){margin-top:24px}
.vh-cz-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.vh-cz-opt{border:1px solid var(--vh-border);border-radius:6px;padding:6px;background:var(--vh-surface);cursor:pointer;text-align:center;font:inherit;font-size:11.5px;font-weight:600;color:var(--vh-text);transition:border-color .2s,box-shadow .2s}
.vh-cz-opt:hover{border-color:color-mix(in srgb,var(--vh-primary) 45%,transparent)}
.vh-cz-opt.on{border-color:var(--vh-primary);box-shadow:0 0 0 3px var(--vh-primary-tint);color:var(--vh-primary)}
.vh-mini{display:block;height:54px;border-radius:4px;overflow:hidden;margin-bottom:6px;background:#F5F7FB;position:relative;border:1px solid #E6EDEF}
.vh-mini i{position:absolute;display:block}
.vh-mini .h{left:0;right:0;top:0;height:10px;background:#fff;border-bottom:1px solid #E6EDEF}
.vh-mini .s{left:0;top:10px;bottom:0;width:24px;background:#fff;border-right:1px solid #E6EDEF}
.vh-mini .b{left:30px;right:6px;top:16px;height:8px;background:#E6EDEF;border-radius:2px}
.vh-mini .b2{left:30px;right:26px;top:28px;height:18px;background:#fff;border:1px solid #E6EDEF}
.vh-mini.compact .s{width:12px}
.vh-mini.compact .b,.vh-mini.compact .b2{left:18px}
.vh-mini.modern{background:color-mix(in srgb,var(--vh-primary) 22%,#F5F7FB)}
.vh-mini.modern .h{left:5px;right:5px;top:5px;border-radius:3px 3px 0 0}
.vh-mini.modern .s{left:5px;top:15px;bottom:5px;border-radius:0 0 0 3px}
.vh-mini.boxed{background:#E9EDF2}
.vh-mini.boxed .h{left:12px;right:12px}
.vh-mini.boxed .s{left:12px}
.vh-mini.boxed .b{left:42px;right:18px}
.vh-mini.boxed .b2{left:42px;right:34px}
.vh-mini.ds .s{background:#111727;border-color:#111727}
.vh-mini.dk{background:#202938;border-color:#202938}
.vh-mini.dk .h,.vh-mini.dk .s{background:#111727;border-color:#111727}
.vh-mini.dk .b2{background:#111727;border-color:#2b3446}
.vh-mini .acc{background:var(--vh-primary)}
.vh-mini.dk .acc{background:#2b3446}
.vh-swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.vh-swatch{aspect-ratio:1;border-radius:50%;border:0;padding:0;cursor:pointer;background:linear-gradient(135deg,var(--c1) 0 50%,var(--c2) 50% 100%);box-shadow:0 0 0 1px rgba(0,0,0,.06);transition:transform .15s}
.vh-swatch:hover{transform:scale(1.08)}
.vh-swatch.on{box-shadow:0 0 0 2px var(--vh-surface),0 0 0 4px var(--c1)}
.vh-cz-custom{display:flex;align-items:center;gap:12px;margin-top:16px;font-size:13px;color:var(--vh-text);cursor:pointer}
.vh-cz-custom input[type="color"]{width:40px;height:32px;padding:0;border:1px solid var(--vh-border);border-radius:5px;background:none;cursor:pointer}
.vh-cz-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-top:1px solid var(--vh-border);border-bottom:1px solid var(--vh-border);font-size:13px;color:var(--vh-text);cursor:pointer}
.vh-switch{position:relative;width:44px;height:24px;display:inline-block;flex-shrink:0}
.vh-switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.vh-switch i{position:absolute;inset:0;border-radius:12px;background:color-mix(in srgb,var(--vh-muted) 28%,transparent);transition:background .2s}
.vh-switch i::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
.vh-switch input:checked+i{background:var(--vh-primary)}
.vh-switch input:checked+i::after{transform:translateX(20px)}
.vh-switch input:focus-visible+i{outline:2px solid var(--vh-primary);outline-offset:2px}
.vh-cz-foot{padding:16px 24px;border-top:1px solid var(--vh-border)}
.vh-cz-reset{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:36px;border:1px solid var(--vh-border);border-radius:5px;background:var(--vh-surface-2);color:var(--vh-text);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.vh-cz-reset:hover{border-color:var(--vh-primary);color:var(--vh-primary)}
.vh-cz-reset svg{width:16px;height:16px}
.vh-cz-backdrop{position:fixed;inset:0;z-index:8999;background:rgba(17,23,39,.25);opacity:0;pointer-events:none;transition:opacity .3s}
.vh-cz-backdrop.open{opacity:1;pointer-events:auto}
@media(prefers-reduced-motion:reduce){.vh-cz,.vh-cz-links,.vh-cz-backdrop{transition:none}}

/* ============================================================
   Componentes Viho adicionais: botões pequenos, filtros, etiquetas
   ============================================================ */
.vh-kpis.k-4{grid-template-columns:repeat(4,minmax(0,1fr))}
div.vh-kpi:hover{transform:none;box-shadow:var(--vh-shadow-card)}
.vh-card-sub{margin:3px 0 0;font-size:13px;color:var(--vh-muted)}
.vh-btn.sm{min-height:34px;padding:0 13px;font-size:13px}
.vh-btn.ghost{background:var(--vh-surface-2);border-color:var(--vh-border);color:var(--vh-text)!important}
.vh-btn.ghost:hover{background:var(--vh-primary-tint);border-color:var(--vh-primary);color:var(--vh-primary-dark)!important}
html[data-theme="dark"] .vh-btn.ghost:hover{color:var(--link)!important}
.vh-btn.perigo{background:transparent;border-color:transparent;color:var(--vh-danger)!important;padding:0 9px}
html[data-theme="light"] .vh-btn.perigo{color:#C0262D!important}
.vh-btn.perigo:hover{background:color-mix(in srgb,var(--vh-danger) 10%,transparent);border-color:color-mix(in srgb,var(--vh-danger) 35%,transparent)}
.vh-btn.perigo svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-btn:disabled{opacity:.45;cursor:not-allowed;pointer-events:none}
.vh-btn:focus-visible,.vh-chip-f:focus-visible{outline:2px solid var(--vh-primary);outline-offset:2px}
button.vh-btn{font-family:inherit}
.vh-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:22px}
.vh-chip-f{display:inline-flex;align-items:center;gap:10px;min-height:34px;padding:0 14px;border:1px solid var(--vh-border);border-radius:20px;background:var(--vh-surface);color:var(--vh-text);font:inherit;font-size:13px;font-weight:600;cursor:pointer;transition:background .2s,border-color .2s,color .2s}
.vh-chip-f b{font-weight:700;color:var(--vh-muted)}
.vh-chip-f:hover{border-color:var(--vh-primary)}
.vh-chip-f.on{background:var(--vh-primary-tint2);border-color:transparent;color:var(--vh-primary-dark)}
html[data-theme="dark"] .vh-chip-f.on{color:var(--link)}
.vh-chip-f.on b{color:inherit}
.vh-chip{display:inline-flex;align-items:center;gap:6px;padding:3px 11px;border-radius:20px;font-size:12px;font-weight:600;white-space:nowrap;background:color-mix(in srgb,var(--accent,var(--vh-primary)) 13%,transparent);color:color-mix(in srgb,var(--accent,var(--vh-primary)) 80%,var(--vh-heading))}
.vh-cel-sub{display:block;margin-top:5px;font-size:12px;color:var(--vh-muted)}
.vh-dir{text-align:right!important}
.vh-acoes{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:nowrap}
.vh-acoes form{margin:0}
.vh-form-link{margin:4px 0 0}
.vh-form-link button{border:0;background:none;padding:0;font:inherit;font-size:12px;font-weight:600;color:var(--vh-primary-dark);cursor:pointer}
html[data-theme="dark"] .vh-form-link button{color:var(--link)}
.vh-form-link button:hover{text-decoration:underline}
.vh-sem-resultados td{padding:26px 0!important;text-align:center;color:var(--vh-muted)}
.vh-table tr[hidden]{display:none}
@media(max-width:1500px){.vh-btn.perigo span{display:none}}
@media(max-width:1199px){.vh-kpis.k-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1100px){
  /* Tabela empilhada: cada linha passa a um bloco com rótulos */
  .vh-empilha thead{display:none}
  .vh-empilha,.vh-empilha tbody,.vh-empilha tr,.vh-empilha td{display:block;width:100%}
  .vh-empilha tr{padding:16px 0;border-bottom:1px solid var(--vh-border)}
  .vh-empilha tr:first-child{padding-top:0}
  .vh-empilha tr:last-child{border-bottom:0;padding-bottom:0}
  .vh-empilha td{padding:6px 0!important;border:0!important;text-align:left!important}
  .vh-empilha td[data-rotulo]:not(:first-child):not(:last-child){display:grid;grid-template-columns:150px minmax(0,1fr);align-items:center;column-gap:12px}
  .vh-empilha td[data-rotulo]:not(:first-child):not(:last-child)::before{content:attr(data-rotulo);grid-row:span 3;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.6px;color:var(--vh-muted)}
  .vh-empilha td[data-rotulo]:not(:first-child):not(:last-child)>*{grid-column:2;justify-self:start}
  .vh-empilha .vh-prog{width:100%;max-width:260px}
  .vh-empilha tbody tr:hover td{background:transparent}
  .vh-empilha .vh-acoes{justify-content:flex-start;flex-wrap:wrap;margin-top:6px}
  .vh-empilha .vh-av{display:inline-flex}
  .vh-empilha .vh-prog .vh-bar{display:block}
  .vh-btn.perigo span{display:inline}
}
@media(max-width:520px){.vh-empilha td[data-rotulo]:not(:first-child):not(:last-child){grid-template-columns:110px minmax(0,1fr)}}

/* ============================================================
   Páginas interiores: aproximação ao Viho (cartões retos, botões lisos, títulos)
   ============================================================ */
body.vh .conteudo>h1,body.vh .conteudo h1{font-size:24px;font-weight:600;letter-spacing:0}
body.vh .card{border-radius:0;border-color:var(--vh-border);box-shadow:var(--vh-shadow-card)}
body.vh .btn{border-radius:5px;background:var(--vh-primary);box-shadow:none}
body.vh .btn:hover{filter:none;background:var(--vh-primary-dark)}
body.vh .btn.secundario{background:var(--vh-primary-tint);color:var(--vh-primary-dark)}
html[data-theme="dark"] body.vh .btn.secundario{color:var(--link)}
body.vh .btn.secundario:hover{background:var(--vh-primary-tint2);opacity:1}

/* ============================================================
   Páginas de gestão (Grupos, Alunos, Notas, Pauta) em estilo Viho.
   A marcação funcional e os scripts mantêm-se; aqui muda só o aspeto.
   ============================================================ */
.vh-pagehead-acoes{display:flex;gap:10px;flex-wrap:wrap}
.vh-toolbar{padding:20px 28px;margin-bottom:22px}
.vh-campo-linha{display:flex;align-items:center;gap:14px;margin:0;flex-wrap:wrap}
.vh-campo-linha label{font-size:13px;font-weight:600;color:var(--vh-muted)}
.vh-campo-linha select{flex:1 1 260px;max-width:560px;width:auto;height:42px;padding:0 12px}

/* Formulários e tabelas base */
body.vh .conteudo input[type=text],body.vh .conteudo input[type=email],body.vh .conteudo input[type=password],body.vh .conteudo input[type=search],body.vh .conteudo select,body.vh .conteudo textarea{border-radius:5px}
body.vh .card h2{font-size:16px;font-weight:600;letter-spacing:0}
body.vh .card{padding:26px 28px}
body.vh .tabela{margin-top:0}
body.vh .tabela th{padding:10px 12px;font-size:12px;font-weight:600;letter-spacing:.6px;color:var(--vh-muted);border-bottom:1px solid var(--vh-border);white-space:nowrap}
body.vh .tabela td{padding:14px 12px;font-size:13.5px;border-bottom-color:var(--vh-border)}
body.vh .tabela tbody tr:hover>td{background:var(--vh-surface-2)}
body.vh .tabela tbody tr:last-child>td{border-bottom:0}
body.vh .tabela th:first-child,body.vh .tabela td:first-child{padding-left:0}
body.vh .tabela th:last-child,body.vh .tabela td:last-child{padding-right:0}
body.vh .nota-input{width:78px;height:38px;padding:0 8px;font-weight:600}
.pt-final{font-size:15px;font-weight:700;color:var(--vh-heading);font-variant-numeric:tabular-nums}
body.vh .mdl-bulk,body.vh .alunos-bulk{border-radius:5px;border-color:var(--vh-border)}

/* Grupos */
body.vh .groups-admin-page{display:block}
body.vh .groups-toolbar{gap:14px;padding:20px 28px;margin-bottom:22px;border-radius:0;border-color:var(--vh-border);background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
body.vh .groups-exercise-select>span{font-size:13px;font-weight:600;color:var(--vh-muted)}
body.vh .groups-exercise-select select,body.vh .groups-search input{height:42px;border-radius:5px;border-color:var(--linha-2);background:var(--fundo);font:inherit;font-size:14px}
body.vh .groups-search input{padding-left:38px}
body.vh .groups-search>span{left:13px;display:inline-flex;font-size:0}
body.vh .groups-search svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
body.vh .groups-filters{gap:8px;padding-top:4px}
body.vh .groups-filters button{display:inline-flex;align-items:center;gap:4px;min-height:34px;padding:0 14px;border:1px solid var(--vh-border);border-radius:20px;background:var(--vh-surface);color:var(--vh-text);font:inherit;font-size:13px;font-weight:600}
body.vh .groups-filters button b{font-weight:700;color:var(--vh-muted)}
body.vh .groups-filters button:hover{border-color:var(--vh-primary)}
body.vh .groups-filters button.active{background:var(--vh-primary-tint2);border-color:transparent;color:var(--vh-primary-dark)}
html[data-theme="dark"] body.vh .groups-filters button.active{color:var(--link)}
body.vh .groups-filters button.active b{color:inherit}
body.vh .groups-admin-page .mdl-bulk{margin-bottom:22px;background:var(--vh-surface)}
body.vh .groups-list-card{padding:12px 28px 14px;border-radius:0;border-color:var(--vh-border);background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
body.vh .groups-table-head{padding:12px 0;background:transparent;border-bottom-color:var(--vh-border);font-size:12px;font-weight:600;letter-spacing:.6px;color:var(--vh-muted)}
body.vh .group-row{min-height:74px;padding:0;border-bottom-color:var(--vh-border)}
body.vh .group-row:hover{background:var(--vh-surface-2)}
body.vh .group-main{gap:12px}
body.vh .group-avatar{flex:0 0 38px;height:38px;border-radius:50%;background:color-mix(in srgb,var(--vh-primary) 14%,transparent);color:var(--vh-primary);font-size:14px;font-weight:700}
body.vh .group-main strong{font-size:13.5px;font-weight:600;color:var(--vh-heading)}
body.vh .group-main small,body.vh .group-cell small{font-size:12px;color:var(--vh-muted)}
body.vh .group-cell>strong{font-size:13.5px;font-weight:600}
body.vh .group-status{display:inline-flex;align-items:center;gap:8px;padding:0;background:none;font-size:13px;font-weight:600;color:var(--vh-muted)}
body.vh .group-status::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
body.vh .group-status.submetido{color:var(--vh-success)}
body.vh .group-status.submetido::before{box-shadow:0 0 0 3px color-mix(in srgb,var(--vh-success) 20%,transparent)}
body.vh .eval-line strong{font-size:13.5px}
body.vh .eval-line span{font-size:12px;color:var(--vh-muted)}
body.vh .eval-progress{height:6px;border-radius:3px;background:color-mix(in srgb,var(--vh-muted) 18%,transparent)}
body.vh .eval-progress i{border-radius:3px;background:var(--vh-primary)}
body.vh .group-actions .btn{padding:8px 12px;font-size:13px;font-weight:600}
@media(max-width:820px){body.vh .groups-table-head{display:none}body.vh .group-row{padding:14px 0}}

/* Notas */
body.vh .nt-page{display:block}
.nt-intro{margin:0 0 22px;max-width:860px;font-size:13.5px;line-height:1.6;color:var(--vh-muted)}
body.vh .nt-barra{padding:20px 28px;margin-bottom:18px;border:1px solid var(--vh-border);background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
body.vh .nt-legenda{margin-bottom:22px;font-size:12.5px}
body.vh .nt-wrap{border-radius:0;border-color:var(--vh-border);box-shadow:var(--vh-shadow-card)}
body.vh .nt-tab th,body.vh .nt-tab td{border-bottom-color:var(--vh-border)}
body.vh .nt-tab thead th{font-size:12px;font-weight:600;letter-spacing:.3px}
body.vh .nt-tab .c-aluno{padding-left:28px}
body.vh .nt-tab .c-aluno strong{font-size:13.5px;font-weight:600;color:var(--vh-heading)}
body.vh .nt-tab .c-aluno small{font-size:12px}
body.vh .nt-tab .em-curso{background:var(--vh-success);border-radius:10px}
body.vh .nt-cel input[type=text]{border-radius:5px}
body.vh .nt-acoes{margin-top:0;padding:14px 28px;border-radius:0;border-color:var(--vh-border);border-top:0;box-shadow:var(--vh-shadow-card)}
body.vh .nt-info{margin-top:18px}

/* Alunos */
body.vh .aluno-criar-card,body.vh .alunos-lista-card{margin-bottom:30px}
body.vh .card{margin-bottom:30px}
body.vh .aluno-actions .link{min-height:34px;padding:0 12px;border-radius:5px;font-size:13px;font-weight:600;color:var(--vh-text)}
body.vh .aluno-actions .link:hover{text-decoration:none;border-color:var(--vh-primary)}
body.vh .aluno-actions .reset-action .link,body.vh .aluno-actions .password-action .link{border:1px solid var(--vh-border);background:var(--vh-surface-2)}
body.vh .aluno-actions .password-action input{height:34px;border-radius:5px;font-size:13px}
body.vh .aluno-actions .toggle-action .link{border:1px solid color-mix(in srgb,var(--vh-primary) 30%,transparent);background:var(--vh-primary-tint);color:var(--vh-primary-dark)}
html[data-theme="dark"] body.vh .aluno-actions .toggle-action .link{color:var(--link)}
body.vh .aluno-actions .delete-action .link{color:#C0262D;border-radius:5px}
html[data-theme="dark"] body.vh .aluno-actions .delete-action .link{color:var(--vermelho)}
body.vh .aluno-actions .delete-action .link:hover{color:#fff}
body.vh .alunos-bulk-delete{min-height:34px;border-radius:5px;font-size:13px}
body.vh .alunos-table .col-sel input,body.vh .mdl-sel{accent-color:var(--vh-primary)}
body.vh .alunos-table tr.selecionado td{background:var(--vh-primary-tint)}
body.vh .mdlab-file-upload{border-radius:5px}
body.vh .mdlab-file-icon{border-radius:50%;background:var(--vh-primary-tint2);color:var(--vh-primary);box-shadow:none}
body.vh .mdlab-file-upload:hover,body.vh .mdlab-file-upload.has-file{border-color:var(--vh-primary)}
body.vh .aluno-estado{font-size:13px}
body.vh .nota-input,body.vh .nt-barra input[type=search]{border:1px solid var(--linha-2);border-radius:5px;background:var(--fundo);color:var(--tinta);font:inherit}
body.vh .nota-input{text-align:center;font-weight:600}
body.vh .nt-barra input[type=search]{padding:0 13px;font-size:14px}
body.vh .nota-input:focus,body.vh .nt-barra input[type=search]:focus{outline:2px solid var(--vh-primary);outline-offset:1px;border-color:var(--vh-primary)}
@media(max-width:767px){
  .pt-tabela{min-width:720px}
  body.vh .tabela .vh-av{display:inline-flex}
  body.vh .card{padding:20px 18px}
  .vh-toolbar,body.vh .groups-toolbar,body.vh .nt-barra{padding:16px 18px}
  body.vh .groups-list-card{padding:6px 18px 10px}
  body.vh .groups-toolbar{grid-template-columns:1fr}
}

/* ---------- Notas: grelha dentro de um cartão Viho ---------- */
body.vh .nt-card{margin-bottom:0}
body.vh .nt-card .nt-barra{padding:20px 28px 0;margin:0;border:0;background:none;box-shadow:none}
.nt-busca{position:relative;flex:1 1 260px;display:block;max-width:420px}
.nt-busca svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;fill:none;stroke:var(--vh-muted);stroke-width:2;stroke-linecap:round;pointer-events:none}
body.vh .nt-busca input[type=search]{width:100%;height:42px;padding:0 13px 0 38px}
body.vh .nt-card .nt-barra form{margin-left:auto!important}
body.vh .nt-card .nt-legenda{gap:8px;margin:0;padding:16px 28px 20px;font-size:12px}
body.vh .nt-card .nt-legenda span{display:inline-flex;align-items:center;padding:4px 11px 4px 9px;border-radius:20px;background:var(--vh-surface-2);border:1px solid var(--vh-border);color:var(--vh-text);font-weight:500}
body.vh .nt-card .nt-legenda i{border-radius:50%;margin-right:7px;vertical-align:0}
body.vh .nt-card .nt-wrap{border:0;border-top:1px solid var(--vh-border);border-radius:0;box-shadow:none;background:var(--vh-surface)}
body.vh .nt-card .nt-tab{font-size:13.5px}
body.vh .nt-card .nt-tab th,body.vh .nt-card .nt-tab td{padding:12px 12px}
body.vh .nt-card .nt-tab thead th{background:var(--vh-surface);vertical-align:bottom;padding-top:14px;padding-bottom:12px;border-bottom:1px solid var(--vh-border);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.6px;color:var(--vh-muted)}
body.vh .nt-card .nt-tab thead th b{font-size:12px;font-weight:700;letter-spacing:.6px;color:var(--vh-heading)}
body.vh .nt-card .nt-tab thead th small{margin-top:2px;font-size:11.5px;font-weight:500;text-transform:none;letter-spacing:0}
body.vh .nt-card .nt-tab .c-aluno,body.vh .nt-card .nt-tab thead .c-aluno{background:var(--vh-surface);padding-left:28px;min-width:260px}
body.vh .nt-card .nt-tab tbody tr:hover td,body.vh .nt-card .nt-tab tbody tr:hover .c-aluno{background:var(--vh-surface-2)}
body.vh .nt-card .nt-tab .c-aluno small{display:block}
body.vh .nt-card .nt-tab .inativo{font-weight:600}
body.vh .nt-card .nt-tab td:last-child,body.vh .nt-card .nt-tab th:last-child{padding-right:28px}
body.vh .nt-card .nt-cel input[type=text]{width:66px;height:36px;border:1px solid var(--linha-2);background:var(--fundo);font-size:13.5px;font-variant-numeric:tabular-nums}
body.vh .nt-card .nt-cel.o-manual input[type=text]{border:2px solid var(--vh-primary)}
body.vh .nt-card .nt-repor{color:var(--vh-primary)}
body.vh .nt-card .nt-tab .c-media{font-size:15px;font-weight:700;color:var(--vh-heading);font-variant-numeric:tabular-nums}
body.vh .nt-card .nt-tab .c-media small{display:block;width:max-content;margin:4px auto 0;padding:1px 8px;border-radius:10px;background:color-mix(in srgb,var(--vh-warning) 14%,transparent);color:color-mix(in srgb,var(--vh-warning) 75%,var(--vh-heading));font-size:11px;font-weight:600}
body.vh .nt-card .nt-tab tfoot td{background:var(--vh-surface-2);border-top:1px solid var(--vh-border);font-size:13px;color:var(--vh-text)}
body.vh .nt-card .nt-tab tfoot .c-aluno{background:var(--vh-surface-2);font-weight:700;text-transform:uppercase;font-size:12px;letter-spacing:.6px;color:var(--vh-muted)}
body.vh .nt-card .nt-acoes{margin:0;padding:14px 28px;border:0;border-top:1px solid var(--vh-border);border-radius:0;box-shadow:0 -6px 16px rgba(17,23,39,.05);background:var(--vh-surface)}
body.vh .nt-card .nt-acoes span{font-size:13px}
@media(max-width:767px){
  body.vh .nt-card{padding:0}
  body.vh .nt-card .nt-barra,body.vh .nt-card .nt-legenda,body.vh .nt-card .nt-acoes{padding-left:18px;padding-right:18px}
  body.vh .nt-card .nt-tab .c-aluno,body.vh .nt-card .nt-tab thead .c-aluno{padding-left:18px;min-width:170px}
  body.vh .nt-card .nt-tab .vh-av{display:none!important}
  body.vh .nt-card .nt-barra form{margin-left:0!important;flex:1 1 100%}
  body.vh .nt-card .nt-barra select{width:100%}
}

/* ============================================================
   Conteúdo do exercício (docente: pré-visualização/teste · aluno · trabalho do grupo)
   A marcação dos módulos mantém-se; aqui passa a ter o aspeto Viho.
   ============================================================ */
.vh-seg{display:inline-flex;gap:2px;padding:3px;border:1px solid var(--vh-border);border-radius:5px;background:var(--vh-surface)}
.vh-seg a{display:inline-flex;align-items:center;min-height:32px;padding:0 14px;border-radius:4px;font-size:13px;font-weight:600;color:var(--vh-text)}
.vh-seg a:hover{background:var(--vh-primary-tint);text-decoration:none}
.vh-seg a.on{background:var(--vh-primary);color:#fff}
.vh-seg a:focus-visible{outline:2px solid var(--vh-primary);outline-offset:2px}
.vh-pagehead-acoes{align-items:center}

/* Resumo do exercício */
html body.vh .exercise-hero{align-items:center;gap:26px;padding:26px 28px;margin-bottom:22px;border:1px solid var(--vh-border);border-radius:0;background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
html body.vh .exercise-kicker{display:none}
html body.vh .exercise-hero h1{margin:0 0 10px;font-size:20px;font-weight:600;letter-spacing:0;line-height:1.3;color:var(--vh-heading)}
html body.vh .exercise-meta{gap:12px;flex-wrap:wrap;font-size:13px;color:var(--vh-muted)}
html body.vh .exercise-meta>span:first-child{padding:3px 11px;border-radius:20px;background:var(--vh-primary-tint);color:var(--vh-primary-dark);font-weight:600;font-size:12px}
html[data-theme="dark"] body.vh .exercise-meta>span:first-child{color:var(--link)}
html body.vh .exercise-state{display:inline-flex;align-items:center;gap:8px;padding:0;border-radius:0;background:none;font-size:13px;font-weight:600;color:var(--vh-muted)}
html body.vh .exercise-state::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
html body.vh .exercise-state.open{color:var(--vh-success)}
html body.vh .exercise-state.open::before{box-shadow:0 0 0 3px color-mix(in srgb,var(--vh-success) 20%,transparent)}
html body.vh .exercise-mode-card{display:flex;align-items:center;gap:14px;max-width:440px;padding:14px 18px;border:1px solid var(--vh-border);border-left:4px solid var(--vh-primary);border-radius:0;background:var(--vh-surface-2);box-shadow:none}
html body.vh .exercise-mode-card.is-test{border-left-color:var(--vh-success);background:color-mix(in srgb,var(--vh-success) 6%,var(--vh-surface))}
html body.vh .exercise-mode-icon{flex:0 0 36px;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:var(--vh-primary-tint2);color:var(--vh-primary);font-size:14px;font-weight:700;box-shadow:none}
html body.vh .exercise-mode-card.is-test .exercise-mode-icon{background:color-mix(in srgb,var(--vh-success) 14%,transparent);color:var(--vh-success)}
html body.vh .exercise-mode-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
html body.vh .exercise-mode-card strong{display:block;font-size:13.5px;font-weight:600;color:var(--vh-heading)}
html body.vh .exercise-mode-card small{display:block;margin-top:2px;font-size:12px;line-height:1.45;color:var(--vh-muted)}
html body.vh .exercise-description{margin-bottom:22px;padding:16px 20px;border:1px solid var(--vh-border);border-left:4px solid var(--vh-primary);border-radius:0;background:var(--vh-surface);box-shadow:var(--vh-shadow-card);font-size:13.5px;line-height:1.6;color:var(--vh-text)}

/* Área de trabalho: deixa de ser uma caixa; cada missão é um cartão */
html body.vh .exercise-workspace{border:0;border-radius:0;background:none;box-shadow:none;overflow:visible}
html body.vh .exercise-workspace-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:6px 0 16px;border:0;background:none}
html body.vh .exercise-workspace-label{margin:0 0 3px;font-size:12px;font-weight:600;letter-spacing:.6px;color:var(--vh-muted)}
html body.vh .exercise-workspace-head h2{margin:0;font-size:18px;font-weight:600;letter-spacing:0;color:var(--vh-heading)}
html body.vh .exercise-reset{min-height:34px;padding:0 13px;border:1px solid var(--vh-border);border-radius:5px;background:var(--vh-surface);color:var(--vh-text);font:inherit;font-size:13px;font-weight:600;cursor:pointer}
html body.vh .exercise-reset:hover{border-color:var(--vh-primary);color:var(--vh-primary-dark);background:var(--vh-primary-tint)}
html body.vh .exercise-preview-form,html body.vh .student-exercise-page .student-exercise-workspace .exercise-preview-form{padding:0!important;background:none;border:0}

/* Enunciado e missões */
html body.vh .brief{margin:0 0 22px;padding:16px 20px;border:1px solid var(--vh-border);border-left:4px solid var(--vh-warning);border-radius:0;background:var(--vh-surface);box-shadow:var(--vh-shadow-card);font-size:13.5px;line-height:1.65;color:var(--vh-text)}
html body.vh .missao{margin:0 0 22px;padding:26px 28px;border:1px solid var(--vh-border);border-radius:0;background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
html body.vh .missao>h3{gap:14px;margin:0 0 8px;font-size:16px;font-weight:600;letter-spacing:0;color:var(--vh-heading)}
html body.vh .missao .n{flex:0 0 36px;min-width:36px;height:36px;border-radius:50%;background:color-mix(in srgb,var(--accent,var(--vh-primary)) 14%,transparent);color:var(--accent,var(--vh-primary));font-size:14px;font-weight:700;box-shadow:none}
html body.vh .missao .obj{margin:0 0 18px;padding-left:50px;font-size:13px;line-height:1.55;color:var(--vh-muted)}
html body.vh .missao>h3+*:not(.obj){margin-top:18px}

/* Campos */
html body.vh .exercise-preview-form .campo>span,html body.vh .exercise-preview-form .campo-lbl,html body.vh .missao .campo>span,html body.vh .missao .campo-lbl{margin:0 0 7px;font-size:13px;font-weight:600;letter-spacing:0;color:var(--vh-text)}
html body.vh .missao input:not([type=checkbox]):not([type=radio]):not([type=file]),html body.vh .missao select,html body.vh .missao textarea{border:1px solid var(--linha-2);border-radius:5px;background:var(--vh-surface);color:var(--vh-text);font:inherit;font-size:14px;box-shadow:none}
html body.vh .missao input:not([type=checkbox]):not([type=radio]):not([type=file]),html body.vh .missao select{height:42px;padding:0 13px}
html body.vh .missao textarea{min-height:92px;padding:11px 13px;line-height:1.55}
html body.vh .missao input:disabled,html body.vh .missao textarea:disabled,html body.vh .missao select:disabled{background:var(--vh-surface-2);color:var(--vh-text);-webkit-text-fill-color:var(--vh-text);opacity:1;cursor:default}
html body.vh .missao input::placeholder,html body.vh .missao textarea::placeholder{color:var(--vh-muted);opacity:.75}
html body.vh .missao input:not([type=checkbox]):not([type=radio]):focus,html body.vh .missao select:focus,html body.vh .missao textarea:focus{outline:0;border-color:var(--vh-primary);box-shadow:0 0 0 3px var(--vh-primary-tint2)}

/* Opções (chips e cartões de escolha) */
html body.vh .missao .chip,html body.vh .missao .radio-card{min-height:38px;padding:0 16px;border:1px solid var(--vh-border);background:var(--vh-surface);color:var(--vh-text);font-size:13px;font-weight:600;box-shadow:none}
html body.vh .missao .chip{border-radius:20px}
html body.vh .missao .radio-card{border-radius:5px}
html body.vh .missao .chip:hover,html body.vh .missao .radio-card:hover{border-color:var(--vh-primary);background:var(--vh-primary-tint)}
html body.vh .missao .chip:has(input:checked),html body.vh .missao .radio-card:has(input:checked){border-color:var(--vh-primary);background:var(--vh-primary-tint2);color:var(--vh-primary-dark);box-shadow:none}
html[data-theme="dark"] body.vh .missao .chip:has(input:checked),html[data-theme="dark"] body.vh .missao .radio-card:has(input:checked){color:var(--link)}
html body.vh .missao .chip:has(input:checked)::before,html body.vh .missao .radio-card:has(input:checked)::before{background:var(--vh-primary);color:#fff}
html body.vh .exercise-preview-form.is-preview .chip:hover,html body.vh .exercise-preview-form.is-preview .radio-card:hover{border-color:var(--vh-border);background:var(--vh-surface)}

/* Fim do teste / barra de submissão / resumo do grupo */
html body.vh .exercise-test-footer,html body.vh .student-submit-bar{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 22px;padding:20px 28px;border:1px solid var(--vh-border);border-radius:0;background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
html body.vh .exercise-test-footer strong,html body.vh .student-submit-bar strong{display:block;font-size:14px;font-weight:600;color:var(--vh-heading)}
html body.vh .exercise-test-footer span,html body.vh .student-submit-bar span{display:block;margin-top:2px;font-size:13px;color:var(--vh-muted)}
html body.vh .student-group-summary,html body.vh .student-group-create,html body.vh .nota-card{border-radius:0;border-color:var(--vh-border);background:var(--vh-surface);box-shadow:var(--vh-shadow-card);margin-bottom:22px}
html body.vh .nbox{border-radius:5px}
html body.vh .exercise-test-toast{border-radius:5px}
html body.vh .admin-group-work{padding:0;border:0;background:none;box-shadow:none}
html body.vh .admin-group-work>h2{margin:6px 0 16px;font-size:18px}
@media(max-width:900px){html body.vh .exercise-mode-card{max-width:none}}
@media(max-width:767px){
  html body.vh .exercise-hero,html body.vh .missao{padding:20px 18px}
  html body.vh .missao .obj{padding-left:0}
  html body.vh .exercise-test-footer,html body.vh .student-submit-bar{flex-direction:column;align-items:stretch;padding:18px}
  .vh-pagehead-acoes,.vh-pagehead-acoes .vh-seg{width:100%}
  .vh-pagehead-acoes .vh-seg a{flex:1;justify-content:center}
  .vh-pagehead-acoes .vh-btn{flex:1}
}
/* Ajustes sobre os estilos próprios de cada módulo (impressos na página, por isso com !important) */
html body.vh .brief{background:var(--vh-surface)!important;border:1px solid var(--vh-border)!important;border-left:4px solid var(--vh-warning)!important;color:var(--vh-text)!important}
html body.vh .missao input:disabled,html body.vh .missao textarea:disabled,html body.vh .missao select:disabled{background:var(--vh-surface-2)!important}
html body.vh .poe-colunas{gap:22px;margin-bottom:22px}
html body.vh .poe-colunas>.missao{border-top:3px solid var(--poe-cor)!important}
html body.vh .poe-colunas .missao h3 .n{background:color-mix(in srgb,var(--poe-cor) 14%,transparent)!important;color:var(--poe-cor)}
html body.vh .arv-drivers .missao h3 .n{background:color-mix(in srgb,var(--arv-cor) 14%,transparent)!important;color:var(--arv-cor)}
html body.vh .lp-mockup{top:calc(var(--vh-header-h) + 20px);border-radius:0;border-color:var(--vh-border);background:var(--vh-surface);box-shadow:var(--vh-shadow-card)}
html body.vh .lp-mockup-cab{padding:16px 20px;font-size:13px;border-bottom-color:var(--vh-border)}
html body.vh .lp-mockup-cab strong{font-size:14px;font-weight:600;color:var(--vh-heading)}
html body.vh .lp-mockup-cab a{font-weight:600;color:var(--vh-primary-dark)}
html[data-theme="dark"] body.vh .lp-mockup-cab a{color:var(--link)}
html body.vh .missao .marca-box,html body.vh .missao .total-orc,html body.vh .missao .wf-drop,html body.vh .missao .geo-bloco,html body.vh .missao .arv-resultado{border-radius:5px}
html body.vh .exercise-mode-card{border:1px solid var(--vh-border)!important;border-left:4px solid var(--vh-primary)!important}
html body.vh .exercise-mode-card.is-test{border-left-color:var(--vh-success)!important}
@media(min-width:992px){html body.vh .exercise-workspace-head{padding-right:56px}}

/* ============================================================
   Fotografia de perfil (avatar do menu lateral + diálogo)
   ============================================================ */
.vh-avatar-btn{position:relative;display:block;padding:0;border:0;border-radius:50%;background:none;cursor:pointer;font:inherit}
.vh-avatar-btn:focus-visible{outline:2px solid var(--vh-primary);outline-offset:6px}
.vh-avatar-cam{position:absolute;right:-4px;bottom:-2px;width:28px;height:28px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--vh-primary);color:#fff;box-shadow:0 0 0 3px var(--vh-surface);transition:transform .2s}
.vh-avatar-cam svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.vh-avatar-btn:hover .vh-avatar-cam{transform:scale(1.1)}
.vh-avatar-btn:hover .vh-avatar{box-shadow:0 0 0 4px var(--vh-surface),0 0 0 6px var(--vh-primary)}
.vh-foto-dlg{width:min(460px,calc(100vw - 32px));padding:0;border:1px solid var(--vh-border);border-radius:6px;background:var(--vh-surface);color:var(--vh-text);box-shadow:0 20px 35px rgba(0,0,0,.21)}
.vh-foto-dlg::backdrop{background:rgba(17,23,39,.45)}
.vh-foto-cab{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 16px 18px 24px;border-bottom:1px solid var(--vh-border)}
.vh-foto-cab h2{margin:0;font-size:16px;font-weight:600;letter-spacing:0;color:var(--vh-heading)}
.vh-foto-corpo{display:flex;align-items:center;gap:22px;padding:26px 24px}
.vh-foto-previa{flex:0 0 96px;width:96px;height:96px;font-size:32px}
.vh-foto-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.vh-foto-escolher{cursor:pointer}
.vh-foto-input:focus-visible+.vh-foto-ajuda,.vh-foto-escolher:has(+.vh-foto-input:focus-visible){outline:2px solid var(--vh-primary);outline-offset:2px}
.vh-foto-ajuda{margin:12px 0 0;font-size:12.5px;line-height:1.5;color:var(--vh-muted);overflow-wrap:anywhere}
.vh-foto-ajuda.erro{color:#C0262D;font-weight:600}
html[data-theme="dark"] .vh-foto-ajuda.erro{color:var(--vermelho)}
.vh-foto-rodape{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:16px 24px;border-top:1px solid var(--vh-border);background:var(--vh-surface-2)}
.vh-foto-esp{flex:1}
@media(min-width:992px){html[data-layout="compact"] .vh-avatar-cam{width:22px;height:22px;right:-6px;bottom:-4px}html[data-layout="compact"] .vh-avatar-cam svg{width:11px;height:11px}}
@media(max-width:480px){.vh-foto-corpo{flex-direction:column;text-align:center}.vh-foto-rodape .vh-btn{flex:1}.vh-foto-esp{display:none}}

/* Avatar: a inicial fica por baixo e a fotografia por cima, para o círculo nunca aparecer vazio */
.vh-avatar{position:relative}
.vh-avatar img{position:absolute;inset:0}
