/* =========================
   APP SHELL (Topbar + Sidebar)
   ========================= */

:root{
  --bg0:#071a2b;
  --bg1:#0a2340;
  --panel:#0d2b4a;
  --panel2:#0b2440;
  --stroke:rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.14);

  --text:#eaf3ff;
  --muted:rgba(234,243,255,.75);

  --primary:#46b6ff;
  --primary2:#2e8fff;

  --radius:16px;
  --shadow: 0 18px 60px rgba(0,0,0,.35);

  --sidebar-w:74px;
  --topbar-h:66px;

  --gap:16px;
  --gap-lg:22px;
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 40% -10%, rgba(70,182,255,.22), transparent 55%),
    radial-gradient(900px 600px at 110% 20%, rgba(46,143,255,.18), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden; /* evita scroll lateral global */
}

/* ============ SIDEBAR ============ */
.lite-sidebar{
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(10,35,64,.92), rgba(7,26,43,.92));
  border-right: 1px solid var(--stroke);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
  z-index: 1000;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding: 10px 8px;
  gap: 10px;
}

.lite-sidebar__top,
.lite-sidebar__bottom{ width:100%; display:flex; justify-content:center; }

.lite-logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.lite-logo__mark{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .5px;
}

.lite-nav{
  width: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 8px;
  padding: 4px 0;
  overflow: auto;
}
.lite-nav::-webkit-scrollbar{ width: 0; height: 0; }

.lite-nav__item{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(234,243,255,.80);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.lite-nav__item:hover{
  background: rgba(255,255,255,.07);
  border-color: var(--stroke);
  transform: translateY(-1px);
}
.lite-nav__item.is-active{
  background: linear-gradient(180deg, rgba(70,182,255,.20), rgba(46,143,255,.12));
  border-color: rgba(70,182,255,.35);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(46,143,255,.18);
}

.lite-nav__item--mini{
  width: 42px;
  height: 42px;
}

/* ============ TOPBAR ============ */
.topbar{
  position: fixed;
  top: 0;
  left: var(--sidebar-w);   /* crucial: começa depois da sidebar */
  right: 0;
  height: var(--topbar-h);
  z-index: 1100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(8,28,47,.92), rgba(10,35,64,.86));
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}

.topbar-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 220px;
}
.brand-mark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  font-weight: 800;
}
.brand-text{
  font-weight: 700;
  opacity: .95;
  letter-spacing: .2px;
}

/* Tabs central */
.top-tabs{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
}

.tab-button{
  appearance:none;
  border: 0;
  background: transparent;
  color: rgba(234,243,255,.86);
  padding: 8px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 700;
  letter-spacing: .2px;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}
.tab-button:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.tab-button.active{
  background: linear-gradient(180deg, rgba(70,182,255,.30), rgba(46,143,255,.18));
  color: #fff;
  box-shadow: 0 10px 24px rgba(46,143,255,.16);
}

.topbar-right{
  min-width: 240px;
  display:flex;
  justify-content:flex-end;
}
.topbar-user-info{
  text-align:right;
  line-height: 1.1;
}
.topbar-user-name{ font-weight: 800; }
.topbar-user-email{ font-size: 12px; color: var(--muted); }

/* ============ MAIN AREA (conteúdo) ============ */
/* Use essa classe no container principal do app (ex.: <main class="app-main">) */
.app-main{
  padding-top: calc(var(--topbar-h) + var(--gap-lg));
  padding-left: calc(var(--sidebar-w) + var(--gap-lg));
  padding-right: var(--gap-lg);
  padding-bottom: 30px;
  min-height: 100vh;
}

/* Um “container” de largura boa p/ telas grandes */
.app-container{
  max-width: 1320px;
  margin: 0 auto;
}

/* Títulos tipo Radiology Assistant */
.page-title{
  font-size: 34px;
  letter-spacing: .2px;
  margin: 6px 0 10px;
}
.page-subtitle{
  color: var(--muted);
  margin: 0 0 18px;
}

/* ============ ENSINO (grid tipo radiologyassistant) ============ */
.ra-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.ra-card{
  background: linear-gradient(180deg, rgba(13,43,74,.85), rgba(11,36,64,.80));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.ra-card:hover{
  transform: translateY(-2px);
  border-color: rgba(70,182,255,.25);
}
.ra-thumb{
  width:100%;
  aspect-ratio: 16/10;
  background: rgba(255,255,255,.06);
  display:block;
  object-fit: cover;
}
.ra-card-body{
  padding: 12px 12px 14px;
}
.ra-badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  background: rgba(255,70,70,.16);
  border: 1px solid rgba(255,70,70,.24);
  margin-bottom: 10px;
}
.ra-title{
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}
.ra-meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* ============ “TEMA” BASE p/ conteúdo do laudo antigo ============ */
/* Isso deixa seus inputs/tabelas com cara de app mesmo sem refatorar tudo agora */
.app-main input,
.app-main select,
.app-main textarea{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  outline: none;
}
.app-main input::placeholder{ color: rgba(234,243,255,.55); }
.app-main input:focus,
.app-main select:focus,
.app-main textarea:focus{
  border-color: rgba(70,182,255,.40);
  box-shadow: 0 0 0 4px rgba(70,182,255,.12);
}

.app-main h1, .app-main h2, .app-main h3{
  margin: 12px 0 10px;
}

/* Containers em forma de “card” */
.card{
  background: linear-gradient(180deg, rgba(13,43,74,.85), rgba(11,36,64,.78));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* Tabelas largas: NÃO estourar o body */
.table-wrap{
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.table-wrap table{
  width: 100%;
  min-width: 920px;  /* ajuste conforme sua planilha */
  border-collapse: collapse;
}
.table-wrap th, .table-wrap td{
  padding: 10px;
  border-bottom: 1px solid var(--stroke);
}
.table-wrap th{
  text-align:left;
  font-weight: 900;
  background: rgba(255,255,255,.05);
}

/* ============ RESPONSIVO ============ */
@media (max-width: 980px){
  :root{
    --sidebar-w: 64px;
    --topbar-h: 62px;
  }
  .topbar-left{ min-width: 160px; }
  .topbar-right{ min-width: 180px; }
  .page-title{ font-size: 28px; }
}

@media (max-width: 720px){
  .topbar{
    padding: 0 10px;
  }
  .brand-text{ display:none; }
  .topbar-right{ display:none; } /* opcional */
  .app-main{
    padding-left: calc(var(--sidebar-w) + 12px);
    padding-right: 12px;
  }
}
/* ===============================
   HUB LAUDO – IFRAME FULL
================================ */

/* view principal do laudo */
.view-laudo{
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0; /* ESSENCIAL para flex */
}

/* container que segura o iframe */
.laudo-frame{
  flex: 1;
  min-height: 0;     /* ESSENCIAL */
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

/* iframe ocupa TUDO */
.laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
#view{
  overflow: hidden;
}

.laudo-frame iframe{
  overflow: auto;
}
/* =========================
   APP SHELL (Topbar + Sidebar)
   ========================= */

:root{
  --bg0:#071a2b;
  --bg1:#0a2340;
  --panel:#0d2b4a;
  --panel2:#0b2440;
  --stroke:rgba(255,255,255,.10);
  --stroke2:rgba(255,255,255,.14);

  --text:#eaf3ff;
  --muted:rgba(234,243,255,.75);

  --primary:#46b6ff;
  --primary2:#2e8fff;

  --radius:16px;
  --shadow: 0 18px 60px rgba(0,0,0,.35);

  --sidebar-w:74px;
  --topbar-h:66px;

  --gap:16px;
  --gap-lg:22px;
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 40% -10%, rgba(70,182,255,.22), transparent 55%),
    radial-gradient(900px 600px at 110% 20%, rgba(46,143,255,.18), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x: hidden; /* evita scroll lateral global */
}

/* ============ SIDEBAR ============ */
.lite-sidebar{
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(10,35,64,.92), rgba(7,26,43,.92));
  border-right: 1px solid var(--stroke);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset;
  z-index: 1000;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding: 10px 8px;
  gap: 10px;
}

.lite-sidebar__top,
.lite-sidebar__bottom{ width:100%; display:flex; justify-content:center; }

.lite-logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.lite-logo__mark{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .5px;
}

.lite-nav{
  width: 100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 8px;
  padding: 4px 0;
  overflow: auto;
}
.lite-nav::-webkit-scrollbar{ width: 0; height: 0; }

.lite-nav__item{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(234,243,255,.80);
  display:grid;
  place-items:center;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.lite-nav__item:hover{
  background: rgba(255,255,255,.07);
  border-color: var(--stroke);
  transform: translateY(-1px);
}
.lite-nav__item.is-active{
  background: linear-gradient(180deg, rgba(70,182,255,.20), rgba(46,143,255,.12));
  border-color: rgba(70,182,255,.35);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(46,143,255,.18);
}

.lite-nav__item--mini{
  width: 42px;
  height: 42px;
}

/* ============ TOPBAR ============ */
.topbar{
  position: fixed;
  top: 0;
  left: var(--sidebar-w);   /* crucial: começa depois da sidebar */
  right: 0;
  height: var(--topbar-h);
  z-index: 1100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 0 18px;
  background: linear-gradient(180deg, rgba(8,28,47,.92), rgba(10,35,64,.86));
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}

.topbar-left{
  display:flex;
  align-items:center;
  gap: 10px;
  min-width: 220px;
}
.brand-mark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display:grid;
  place-items:center;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  font-weight: 800;
}
.brand-text{
  font-weight: 700;
  opacity: .95;
  letter-spacing: .2px;
}

/* Tabs central */
.top-tabs{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
}

.tab-button{
  appearance:none;
  border: 0;
  background: transparent;
  color: rgba(234,243,255,.86);
  padding: 8px 14px;
  border-radius: 999px;
  cursor:pointer;
  font-weight: 700;
  letter-spacing: .2px;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}
.tab-button:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-1px);
}
.tab-button.active{
  background: linear-gradient(180deg, rgba(70,182,255,.30), rgba(46,143,255,.18));
  color: #fff;
  box-shadow: 0 10px 24px rgba(46,143,255,.16);
}

.topbar-right{
  min-width: 240px;
  display:flex;
  justify-content:flex-end;
}
.topbar-user-info{
  text-align:right;
  line-height: 1.1;
}
.topbar-user-name{ font-weight: 800; }
.topbar-user-email{ font-size: 12px; color: var(--muted); }

/* ============ MAIN AREA (conteúdo) ============ */
/* Use essa classe no container principal do app (ex.: <main class="app-main">) */
.app-main{
  padding-top: calc(var(--topbar-h) + var(--gap-lg));
  padding-left: calc(var(--sidebar-w) + var(--gap-lg));
  padding-right: var(--gap-lg);
  padding-bottom: 30px;
  min-height: 100vh;
}

/* Um “container” de largura boa p/ telas grandes */
.app-container{
  max-width: 1320px;
  margin: 0 auto;
}

/* Títulos tipo Radiology Assistant */
.page-title{
  font-size: 34px;
  letter-spacing: .2px;
  margin: 6px 0 10px;
}
.page-subtitle{
  color: var(--muted);
  margin: 0 0 18px;
}

/* ============ ENSINO (grid tipo radiologyassistant) ============ */
.ra-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}
.ra-card{
  background: linear-gradient(180deg, rgba(13,43,74,.85), rgba(11,36,64,.80));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.ra-card:hover{
  transform: translateY(-2px);
  border-color: rgba(70,182,255,.25);
}
.ra-thumb{
  width:100%;
  aspect-ratio: 16/10;
  background: rgba(255,255,255,.06);
  display:block;
  object-fit: cover;
}
.ra-card-body{
  padding: 12px 12px 14px;
}
.ra-badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  background: rgba(255,70,70,.16);
  border: 1px solid rgba(255,70,70,.24);
  margin-bottom: 10px;
}
.ra-title{
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}
.ra-meta{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* ============ “TEMA” BASE p/ conteúdo do laudo antigo ============ */
/* Isso deixa seus inputs/tabelas com cara de app mesmo sem refatorar tudo agora */
.app-main input,
.app-main select,
.app-main textarea{
  background: rgba(255,255,255,.06);
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  outline: none;
}
.app-main input::placeholder{ color: rgba(234,243,255,.55); }
.app-main input:focus,
.app-main select:focus,
.app-main textarea:focus{
  border-color: rgba(70,182,255,.40);
  box-shadow: 0 0 0 4px rgba(70,182,255,.12);
}

.app-main h1, .app-main h2, .app-main h3{
  margin: 12px 0 10px;
}

/* Containers em forma de “card” */
.card{
  background: linear-gradient(180deg, rgba(13,43,74,.85), rgba(11,36,64,.78));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

/* Tabelas largas: NÃO estourar o body */
.table-wrap{
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.04);
}
.table-wrap table{
  width: 100%;
  min-width: 920px;  /* ajuste conforme sua planilha */
  border-collapse: collapse;
}
.table-wrap th, .table-wrap td{
  padding: 10px;
  border-bottom: 1px solid var(--stroke);
}
.table-wrap th{
  text-align:left;
  font-weight: 900;
  background: rgba(255,255,255,.05);
}

/* ============ RESPONSIVO ============ */
@media (max-width: 980px){
  :root{
    --sidebar-w: 64px;
    --topbar-h: 62px;
  }
  .topbar-left{ min-width: 160px; }
  .topbar-right{ min-width: 180px; }
  .page-title{ font-size: 28px; }
}

@media (max-width: 720px){
  .topbar{
    padding: 0 10px;
  }
  .brand-text{ display:none; }
  .topbar-right{ display:none; } /* opcional */
  .app-main{
    padding-left: calc(var(--sidebar-w) + 12px);
    padding-right: 12px;
  }
}
/* ===============================
   HUB LAUDO – IFRAME FULL
================================ */

/* view principal do laudo */
.view-laudo{
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0; /* ESSENCIAL para flex */
}

/* container que segura o iframe */
.laudo-frame{
  flex: 1;
  min-height: 0;     /* ESSENCIAL */
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
}

/* iframe ocupa TUDO */
.laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
#view{
  overflow: hidden;
}

.laudo-frame iframe{
  overflow: auto;
}
.app-main{
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-h));
  padding-top: calc(var(--topbar-h) + var(--gap-lg));
  padding-left: calc(var(--sidebar-w) + var(--gap-lg));
  padding-right: var(--gap-lg);
  padding-bottom: 16px;
}
.view-laudo{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.laudo-frame{
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.app-main{
  display: flex;
  flex-direction: column;

  height: 100vh;               /* ocupa a tela */
  padding-top: var(--topbar-h);
  padding-left: var(--sidebar-w);
  padding-right: 16px;
  padding-bottom: 16px;

  overflow: hidden;            /* scroll só dentro */
}
.app-main{
  display: flex;
  flex-direction: column;

  height: 100vh;               /* ocupa a tela */
  padding-top: var(--topbar-h);
  padding-left: var(--sidebar-w);
  padding-right: 16px;
  padding-bottom: 16px;

  overflow: hidden;            /* scroll só dentro */
}
#view{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.view-laudo{
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.laudo-frame{
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* Quando estiver na view Laudo, NÃO limite largura */
.view-laudo{
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Faz o iframe ocupar o máximo possível */
.laudo-frame{
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}

.laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.app-main{
  position: relative;
  display: flex;
  flex-direction: column;

  /* altura visível real do app */
  height: 100vh;

  /* espaço para topbar + sidebar */
  padding-top: var(--topbar-h);
  padding-left: var(--sidebar-w);
  padding-right: 16px;
  padding-bottom: 16px;

  overflow: hidden;
}
/* esconda todas */
[data-view]{ display: none; }

/* ensino: block normal */
#viewEnsino.is-active{ display: block; }

/* laudo: flex (pra esticar iframe) */
#viewLaudo.is-active{
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.laudo-frame{
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
}
.laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* ===============================
   LAUDO – COLADO NA TOPBAR E SIDEBAR
================================ */

#viewLaudo.is-active{
  position: fixed;
  top: var(--topbar-h);        /* encosta na topbar */
  left: var(--sidebar-w);     /* encosta na sidebar */
  right: 0;                   /* encosta à direita */
  bottom: 0;                  /* encosta embaixo */

  display: flex;
  flex-direction: column;
  min-height: 0;
  width: auto;
  padding: 0;                 /* REMOVE qualquer padding */
  margin: 0;
}

/* iframe ocupa absolutamente tudo */
#viewLaudo.is-active .laudo-frame{
  flex: 1;
  min-height: 0;
  width: 100%;
  border-radius: 0;           /* opcional: remove borda arredondada */
  overflow: hidden;
  background: #fff;
}

#viewLaudo.is-active .laudo-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
/* ===========================
   LITE SIDEBAR (estilo Laudite)
=========================== */

.lite-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 56px;
  background: #0b2a3a;
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1200;
}

.lite-sidebar__top,
.lite-sidebar__bottom {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.lite-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lite-logo__mark {
  font-weight: 800;
  font-size: 18px;
  color: #e6f6ff;
  letter-spacing: 0.2px;
}

.lite-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  align-items: center;
}

.lite-nav__divider {
  width: 28px;
  height: 1px;
  background: rgba(255,255,255,0.14);
  margin: 6px 0;
}

.lite-nav__item {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(230,246,255,0.78);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.lite-nav__item i {
  font-size: 16px;
  line-height: 1;
}

.lite-nav__item:hover {
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
  color: #e6f6ff;
}

.lite-nav__item.is-active {
  background: rgba(34,197,94,0.18);
  border-color: rgba(34,197,94,0.35);
  color: #e6f6ff;
}

/* mini item */
.lite-nav__item--mini {
  width: 38px;
  height: 38px;
  border-radius: 13px;
}

/* Espaço para o conteúdo não ficar por baixo da sidebar */
body {
  padding-left: 56px; /* mesma largura do aside */
}

/* Responsivo: em telas estreitas, reduz um pouco */
@media (max-width: 520px) {
  .lite-sidebar { width: 52px; }
  body { padding-left: 52px; }
  .lite-nav__item { width: 38px; height: 38px; border-radius: 13px; }
  .lite-logo { width: 38px; height: 38px; border-radius: 12px; }
}
/* =========================
   DRAWER À ESQUERDA - ESTILO LAUDITE
========================= */

:root{
  --lite-sidebar-w: 64px; /* ajuste se sua sidebar tiver outra largura */
  --lite-border: rgba(15, 23, 42, 0.12);
  --lite-text: #0f172a;
  --lite-muted: rgba(15, 23, 42, 0.62);
  --lite-bg: #ffffff;
  --lite-soft: rgba(248, 250, 252, 0.95);
  --lite-shadow: 0 18px 40px rgba(2,6,23,.18);
  --lite-accent: #10b6c7;
}

/* Overlay */
.lite-overlay{
  position: fixed;
  inset: 0;
  background: rgba(2, 10, 23, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 9998;
}
.lite-overlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

/* Drawer base */
.lite-drawer{
  position: fixed;
  top: 0;
  height: 100dvh;
  width: clamp(280px, 22vw, 340px); /* Laudite é mais estreito */
  background: var(--lite-bg);
  box-shadow: var(--lite-shadow);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0 14px 14px 0;
  border: 1px solid var(--lite-border);
}

/* Esquerda: encosta na sidebar */
.lite-drawer--left{
  left: var(--lite-sidebar-w);
  transform: translateX(-110%);
  transition: transform 220ms ease;
  border-left: none;
}

/* Abrir */
.lite-drawer.is-open{
  transform: translateX(0);
}

/* Inner */
.lite-drawer__inner{
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Responsivo (retrato) */
@media (max-width: 900px){
  :root{ --lite-sidebar-w: 58px; }
  .lite-drawer{ width: min(86vw, 360px); }
}
@media (max-width: 520px){
  :root{ --lite-sidebar-w: 0px; } /* no mobile, drawer vira full */
  .lite-drawer--left{
    left: 0;
    width: 100vw;
    border-radius: 0;
    border: none;
  }
}

/* =========================
   Header do drawer (Laudite-like)
========================= */
.drawer-head{
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,.92));
  border-bottom: 1px solid var(--lite-border);
}

.drawer-title{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.drawer-h3{
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--lite-text);
}

.drawer-pin{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--lite-border);
  background: var(--lite-soft);
  color: var(--lite-text);
  cursor: pointer;
}

.drawer-actions{
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.drawer-pill{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--lite-border);
  background: #fff;
  color: var(--lite-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.drawer-icon{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--lite-border);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--lite-text);
}

.drawer-icon--primary{
  background: var(--lite-accent);
  border-color: rgba(16,182,199,.35);
  color: #fff;
}

/* Busca */
.drawer-search{
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--lite-border);
  background: var(--lite-soft);
}
.drawer-search i{ color: var(--lite-muted); font-size: 13px; }
.drawer-search input{
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12.5px;
  color: var(--lite-text);
}

/* Corpo scrollável */
.drawer-body{
  padding: 10px 10px 14px;
  overflow: auto;
  min-height: 0;
}

/* Seções */
.drawer-section{
  margin-top: 10px;
  border: 1px solid var(--lite-border);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.section-toggle{
  width: 100%;
  padding: 9px 10px;
  background: rgba(241,245,249,.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .3px;
  color: rgba(15,23,42,.78);
}
.section-content{ padding: 10px; }

.drawer-empty{
  padding: 12px;
  border-radius: 12px;
  background: var(--lite-soft);
  border: 1px dashed rgba(15,23,42,.18);
  color: var(--lite-muted);
  font-size: 12.5px;
}
/* Evita qualquer faixa branca/scroll lateral quando o drawer está fechado */
html, body{
  overflow-x: hidden;
}

/* Drawer fechado: some de verdade (não “vaza” fundo/borda) */
.lite-drawer{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Drawer aberto */
.lite-drawer.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Overlay fechado */
.lite-overlay{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Overlay aberto */
.lite-overlay.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Se você estiver usando border no drawer, não deixe ele “aparecer” fechado */
.lite-drawer--left{
  border-left: none;
}
/* ===== Drawer/Overlay (estilo Laudite) ===== */
#liteOverlay{
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 20, .55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}
#liteOverlay.is-open{
  opacity: 1;
  pointer-events: auto;
}

#liteDrawer{
  position: fixed;
  top: 12px;
  left: 70px;              /* deixa a sidebar visível */
  height: calc(100vh - 24px);
  width: 360px;
  max-width: calc(100vw - 90px);
  transform: translateX(-16px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  z-index: 9999;
}
#liteDrawer.is-open{
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#liteDrawerInner,
.drawer-shell{
  height: 100%;
}

.drawer-shell{
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.drawer-head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.drawer-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.drawer-h3{
  margin:0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.drawer-pin,
.drawer-close{
  border: 1px solid rgba(15, 23, 42, .12);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  cursor: pointer;
  color:#0f172a;
}

.drawer-actions{
  margin-top: 10px;
  display:flex;
  align-items:center;
  gap: 8px;
}

.drawer-pill{
  flex: 1;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #f8fafc;
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 600;
  cursor: pointer;
}

.drawer-icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #fff;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.drawer-icon--primary{
  background: #0ea5e9;
  color: #fff;
  border-color: rgba(14,165,233,.35);
}

.drawer-body{
  padding: 12px;
  overflow: auto;
}

.drawer-search{
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}
.drawer-search input{
  border: none;
  outline: none;
  width: 100%;
  font-size: 13px;
}

.drawer-section{
  margin-top: 12px;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 14px;
  overflow:hidden;
  background: #fff;
}

.section-toggle{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: none;
  cursor:pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .02em;
  color:#334155;
}

.section-content{
  padding: 10px;
}

.drawer-empty{
  color:#64748b;
  font-size: 13px;
  padding: 10px 4px;
}

.drawer-mask-item{
  width: 100%;
  display:flex;
  align-items:center;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, .10);
  background: #fff;
  border-radius: 12px;
  padding: 10px 10px;
  cursor:pointer;
  margin-bottom: 8px;
  text-align: left;
}
.drawer-mask-item:hover{
  background: #f8fafc;
}
.drawer-mask-item.is-active{
  border-color: rgba(14,165,233,.45);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

.drawer-mask-title{
  font-size: 13px;
  color:#0f172a;
  font-weight: 650;
}
#liteOverlay{
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 20, .22); /* BEM mais leve */
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 9998;
}
#liteOverlay.is-open{
  opacity: 1;
  pointer-events: auto;
}
.drawer-mask-row{
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.drawer-mask-item{
  flex: 1;
  margin-bottom: 0; /* agora quem controla o espaçamento é a row */
}

.drawer-mask-actions{
  display:flex;
  gap: 6px;
}

.drawer-mask-action{
  width: 38px;
  min-width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, .12);
  background: #fff;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}

.drawer-mask-action:hover{
  background: #f8fafc;
}

.drawer-mask-action.danger{
  border-color: rgba(239, 68, 68, .28);
  color: #ef4444;
}
.drawer-mask-action.danger:hover{
  background: rgba(239, 68, 68, .07);
}
.lite-nav__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: invert(32%) sepia(36%) saturate(720%) hue-rotate(160deg);
}

/* efeito hover igual botão médico */
.lite-nav__item:hover .lite-nav__icon {
  filter: invert(20%) sepia(80%) saturate(900%) hue-rotate(170deg);
}
.drawer-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:10px;
  background: rgba(0, 0, 0, 0.06)
}
.drawer-chip:hover{
  background: rgba(255,255,255,.10);
}
.drawer-badge{
  margin-left:auto;
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  background: rgba(34,197,94,.15);
  border:1px solid rgba(34,197,94,.35);
}
.drawer-lock{
  opacity:.7;
  padding:6px 8px;
}
.drawer-foot{
  margin-top: 12px;
}
/* =========================
   ATALHOS (drawer)
========================= */

.tk-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.tk-toolbar .drawer-search{
  flex:1;
  margin:0;
}

.tk-minbtn{
  border:1px solid rgba(15,23,42,.15);
  background:#fff;
  height:34px;
  width:34px;
  border-radius:10px;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.tk-minbtn:hover{ background:#f8fafc; }

.tk-group{
  border:1px solid rgba(15,23,42,.10);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  margin-bottom:10px;
}

.tk-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  cursor:pointer;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
  user-select:none;
}

.tk-head .left{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.tk-badge{
  font-size:11px;
  font-weight:700;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(2,132,199,.20);
  color:#0369a1;
  background:rgba(2,132,199,.08);
}

.tk-head strong{
  font-size:13px;
  color:#0f172a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tk-count{
  font-size:12px;
  color:#64748b;
}

.tk-body{
  padding:10px 12px 12px;
}

.tk-group.is-collapsed .tk-body{
  display:none;
}

.tk-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.tk-item{
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  border-radius:10px;
  padding:7px 9px;
  font-size:12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-height:34px;
  transition:.15s ease;
}

.tk-item:hover{
  background:#f8fafc;
  border-color:rgba(2,132,199,.25);
}

.tk-item code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.tk-mini{
  font-size:11px;
  color:#64748b;
}

/* modo compacto (minimizar) */
.lite-drawer.is-mini .tk-grid{
  grid-template-columns:1fr;
}
.lite-drawer.is-mini .tk-mini{
  display:none;
}
/* ===== ATALHOS: títulos mais escuros ===== */
.tk-head{
  color:#0f172a !important;
}

.tk-head strong{
  color:#0f172a !important;
  font-weight:700 !important;
}

.tk-count{
  color:#334155 !important;
  font-weight:600 !important;
}

/* Se você ainda usa títulos antigos tipo "Tokens VE Masculino" */
.tk-head,
.tk-group-title,
.tk-group > .tk-head{
  opacity:1 !important;
  filter:none !important;
}
/* ===== MODO MINI DO DRAWER ===== */
.lite-drawer.is-mini{
  width: 260px !important; /* ajuste se quiser menor */
}

.lite-drawer.is-mini .drawer-search{
  display:none;            /* some com a busca */
}

.lite-drawer.is-mini .tk-mini{
  display:none;            /* some "inserir" */
}

.lite-drawer.is-mini .tk-grid{
  grid-template-columns: 1fr !important; /* 1 coluna */
}

.lite-drawer.is-mini .tk-count{
  display:none;            /* some contador */
}

.lite-drawer.is-mini .tk-badge{
  display:none;            /* some badge VE/VD/AE */
}

.lite-drawer.is-mini .tk-head strong{
  font-size: 12px;
}

/* opcional: reduzir padding */
.lite-drawer.is-mini .tk-body{
  padding: 8px 10px 10px;
}
.tk-head{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  background:#f8fafc;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
  color:#0f172a; /* bem visível */
}

.tk-head i{
  opacity:.7;
}
.ra-card {
  text-decoration: none;
  color: inherit;
  display: block; /* ou flex, dependendo do seu layout */
}
.app-main{
  padding-left: var(--sidebar-w);
  padding-top: 18px;
}

.app-container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 18px 56px;
}

/* =========================
   CABEÇALHO DA VIEW
   ========================= */
.page-title{
  margin: 22px 0 6px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -.4px;
}
.page-subtitle{
  margin: 0 0 18px;
  color: var(--text-2);
  font-size: 14px;
}

/* Um “header card” suave para dar cara de produto */
section[data-view="ensino"]{
  position: relative;
}
section[data-view="ensino"]::before{
  content:"";
  position:absolute;
  inset: 88px 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  opacity: .9;
}

/* =========================
   GRID DE CARDS
   ========================= */
.ra-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* Card */
.ra-card{
  border-radius: var(--radius-xl);
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow-soft);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
  position: relative;
  min-height: 320px;
}

.ra-card:hover{
  transform: translateY(-4px);
  border-color: rgba(34,195,198,.28);
  box-shadow: var(--shadow);
}

/* Thumb com “capa médica” */
.ra-thumb{
  width: 100%;
  height: 190px;
  object-fit: cover;
  display:block;
  filter: saturate(1.05) contrast(1.02);
}

/* Overlay no topo da imagem para dar profundidade */
.ra-card::after{
  content:"";
  position:absolute;
  inset: 0 0 auto 0;
  height: 190px;
  background: linear-gradient(180deg, rgba(0,0,0,.32), rgba(0,0,0,.05) 55%, rgba(0,0,0,0));
  pointer-events:none;
}

.ra-card-body{
  padding: 14px 16px 16px;
  position: relative;
}

.ra-title{
  margin: 10px 0 6px;
  font-size: 18px;
  letter-spacing: -.2px;
  line-height: 1.2;
}

.ra-meta{
  color: var(--text-2);
  font-size: 13px;
}

/* Badge */
.ra-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .5px;
  color: rgba(255,255,255,.92);
  background: linear-gradient(135deg, rgba(34,195,198,.28), rgba(120,170,255,.16));
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 22px rgba(0,0,0,.20);
}

/* “Etiqueta” sutil (um detalhe que dá cara de produto) */
.ra-card-body::before{
  content:"";
  position:absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(34,195,198,.28), transparent);
  opacity: .45;
}
/* =========================
   RESPONSIVO
   ========================= */
@media (max-width: 1100px){
  .ra-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .topbar-left, .topbar-right{ min-width: 180px; }
}
@media (max-width: 720px){
  :root{ --sidebar-w: 66px; }
  .topbar{
    padding-left: calc(14px + var(--sidebar-w));
  }
  .ra-grid{ grid-template-columns: 1fr; }
  .page-title{ font-size: 28px; }
  .tab-button{ padding: 9px 12px; }
}
/* =========================
   FIX: NÃO CORTAR TOPO (layout único)
   Cole no FINAL do CSS
   ========================= */

html, body { height: 100%; }
body{
  margin: 0;
  padding-left: 0 !important;   /* remove aquele padding-left:56px */
}

/* Sidebar fixa */
.lite-sidebar{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 1000;
}

/* Topbar fixa (começa após sidebar) */
.topbar{
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  z-index: 1100;
}

/* Área principal: empurra conteúdo para NÃO ficar atrás da topbar */
.app-main{
  position: relative;
  min-height: 100vh;
  height: auto !important;
  overflow: visible !important; /* muito importante */
  padding-top: calc(var(--topbar-h) + 18px) !important;
  padding-left: calc(var(--sidebar-w) + 18px) !important;
  padding-right: 18px !important;
  padding-bottom: 28px !important;
}

/* Não esconda conteúdo por overflow no view */
#view{
  overflow: visible !important;
}

/* Container */
.app-container{
  max-width: 1320px;
  margin: 0 auto;
}
/* ===========================
   HUB ENSINO — VISUAL MAIS CLARO
   + esconder painel lateral
   =========================== */

/* Paleta clara e base */
:root{
  --bg: #f6f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --stroke: rgba(15, 23, 42, .10);
  --shadow: 0 12px 30px rgba(15, 23, 42, .08);
  --shadow-hover: 0 16px 40px rgba(15, 23, 42, .12);
  --radius: 16px;
}

/* Fundo geral mais “clean” */
body{
  background: radial-gradient(1200px 600px at 20% -10%, rgba(99,102,241,.10), transparent 55%),
              radial-gradient(900px 500px at 90% 0%, rgba(34,197,94,.08), transparent 55%),
              var(--bg);
  color: var(--text);
}

/* Topbar mais leve */
.topbar{
  background: rgba(255,255,255,.80);
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
}

/* Container com largura mais elegante */
.app-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 18px 34px;
}

/* Títulos */
.page-title{
  font-size: 28px;
  letter-spacing: -0.3px;
  margin: 6px 0 6px;
}
.page-subtitle{
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 14.5px;
}

/* Grid responsivo dos cards */
.ra-grid{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 1100px){
  .ra-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px){
  .ra-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px){
  .ra-grid{ grid-template-columns: 1fr; }
}

/* Card mais premium */
.ra-card{
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: pointer;
}

.ra-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(99,102,241,.25);
}

.ra-thumb{
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  filter: saturate(1.02) contrast(1.02);
}

.ra-card-body{
  padding: 12px 12px 14px;
}

.ra-title{
  font-size: 14.5px;
  line-height: 1.25;
  margin: 0 0 6px;
  font-weight: 700;
}

.ra-meta{
  font-size: 12.5px;
  color: var(--muted);
}

/* Badge “NOVO” mais discreta */
.ra-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.10);
  color: #166534;
  margin-bottom: 8px;
}

/* ===========================
   ESCONDER SIDEBAR NO HUB ENSINO
   =========================== */

/* Quando estiver na rota "ensino": sidebar some */
body.route-ensino .lite-sidebar{
  display: none !important;
}

/* E o conteúdo não precisa reservar espaço dela */
body.route-ensino .app-main{
  padding-left: 0 !important; /* caso seu layout use padding para compensar a sidebar */
}

/* Se você usa margin/translate também, garanta */
body.route-ensino .app-container{
  margin-left: 0 !important;
}

/* (Opcional) manter a sidebar para Hub Laudo normalmente */
body.route-laudo .lite-sidebar{
  display: flex; /* ou block, conforme seu CSS atual */
}
/* =========================================================
   HUB ENSINO — FIX LAYOUT + TEMA MÉDICO PREMIUM (SÓ ENSINO)
   Cole no FINAL do CSS
   ========================================================= */

/* 1) ENSINO: mantém identidade dark (combina com o site) */
body.route-ensino{
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 35% -10%, rgba(70,182,255,.18), transparent 55%),
    radial-gradient(900px 600px at 110% 20%, rgba(46,143,255,.14), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* 2) ENSINO: some sidebar */
body.route-ensino .lite-sidebar{ display:none !important; }

/* 3) ENSINO: TOPBAR tem que ocupar 100% (corrige o “torto”) */
body.route-ensino .topbar{
  left: 0 !important;      /* antes estava var(--sidebar-w) */
  right: 0 !important;
  width: 100% !important;
  background: linear-gradient(180deg, rgba(8,28,47,.94), rgba(10,35,64,.90));
  border-bottom: 1px solid var(--stroke);
}

/* 4) ENSINO: conteúdo também começa do zero (sem reservar espaço da sidebar) */
body.route-ensino .app-main{
  padding-left: var(--gap-lg) !important;
  padding-right: var(--gap-lg) !important;
  padding-top: calc(var(--topbar-h) + var(--gap-lg)) !important;
}

/* 5) ENSINO: centraliza melhor as tabs (evita “puxar” pro lado) */
body.route-ensino .topbar-left,
body.route-ensino .topbar-right{
  min-width: 0 !important;
  flex: 1 1 0;
}
body.route-ensino .top-tabs{
  flex: 0 0 auto;
  margin: 0 auto;
}

/* 6) ENSINO: container mais “retinho” e com largura elegante */
body.route-ensino .app-container{
  max-width: 1320px;
  margin: 0 auto;
}

/* 7) ENSINO: títulos mais médicos/fortes */
body.route-ensino .page-title{
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -.6px;
  margin: 10px 0 8px;
}
body.route-ensino .page-subtitle{
  color: var(--muted);
  margin: 0 0 18px;
}

/* 8) ENSINO: GRID mais harmônico (cards iguais, bem espaçados) */
body.route-ensino .ra-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

/* 9) ENSINO: cards premium (sem branco “estourado”) */
body.route-ensino .ra-card{
  background: linear-gradient(180deg, rgba(13,43,74,.86), rgba(11,36,64,.80));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.30);
  overflow: hidden;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
body.route-ensino .ra-card:hover{
  transform: translateY(-4px);
  border-color: rgba(70,182,255,.28);
  box-shadow: 0 22px 70px rgba(0,0,0,.38);
}

/* 10) ENSINO: imagem com recorte padronizado + “overlay” médico */
body.route-ensino .ra-thumb{
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: rgba(255,255,255,.06);
  filter: saturate(1.05) contrast(1.03);
}
body.route-ensino .ra-card{
  position: relative;
}
body.route-ensino .ra-card::after{
  content:"";
  position:absolute;
  inset: 0 0 auto 0;
  height: 170px;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.06) 55%, rgba(0,0,0,0));
  pointer-events:none;
}

/* 11) ENSINO: tipografia do card */
body.route-ensino .ra-card-body{
  padding: 14px 14px 16px;
}
body.route-ensino .ra-title{
  margin: 6px 0 6px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -.2px;
  line-height: 1.25;
}
body.route-ensino .ra-meta{
  color: rgba(234,243,255,.70);
  font-size: 13px;
}

/* 12) ENSINO: badge mais “hospitalar” */
body.route-ensino .ra-badge{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .4px;
  background: rgba(34,197,94,.14);
  border: 1px solid rgba(34,197,94,.28);
  color: rgba(234,243,255,.95);
  box-shadow: 0 10px 22px rgba(0,0,0,.22);
}

/* 13) Responsivo */
@media (max-width: 980px){
  body.route-ensino .page-title{ font-size: 30px; }
  body.route-ensino .app-main{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
@media (max-width: 560px){
  body.route-ensino .ra-grid{ grid-template-columns: 1fr; }
  body.route-ensino .topbar-right{ display:none; } /* opcional */
}
/* =========================================================
   HUB ENSINO — MEDICAL CLEAN (SÓ ENSINO)
   - Fundo claro clínico
   - Cards alinhados e responsivos
   - Container preenchendo e centralizado
   ========================================================= */

body.route-ensino{
  /* Paleta médica: branco clínico + azul hospitalar sutil */
  --ens-bg: #f4f8fb;
  --ens-surface: #ffffff;
  --ens-text: #0f172a;
  --ens-muted: #5b6b7f;
  --ens-stroke: rgba(15, 23, 42, .10);
  --ens-accent: #0ea5e9; /* azul hospitalar */
  --ens-accent-2: #2563eb;
  --ens-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  --ens-shadow-hover: 0 16px 42px rgba(15, 23, 42, .14);
  --ens-radius: 18px;

  color: var(--ens-text);
  background:
    radial-gradient(1100px 520px at 12% -10%, rgba(14,165,233,.12), transparent 55%),
    radial-gradient(900px 520px at 92% 0%, rgba(37,99,235,.08), transparent 55%),
    var(--ens-bg);
}

/* Sidebar não aparece no Ensino */
body.route-ensino .lite-sidebar{ display:none !important; }

/* Topbar no Ensino: ocupa a largura toda e fica “clean” */
body.route-ensino .topbar{
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;

  background: rgba(255,255,255,.82) !important;
  border-bottom: 1px solid var(--ens-stroke) !important;
  backdrop-filter: blur(12px);
}

/* Textos da topbar no ensino (mantém legível) */
body.route-ensino .brand-text,
body.route-ensino .topbar-user-name,
body.route-ensino .topbar-user-email{
  color: var(--ens-text) !important;
}
body.route-ensino .topbar-user-email{ opacity: .75; }

/* Tabs no estilo médico */
body.route-ensino .top-tabs{
  background: rgba(15,23,42,.04) !important;
  border: 1px solid rgba(15,23,42,.08) !important;
}
body.route-ensino .tab-button{
  color: rgba(15,23,42,.72) !important;
}
body.route-ensino .tab-button.active{
  background: linear-gradient(180deg, rgba(14,165,233,.18), rgba(37,99,235,.10)) !important;
  color: var(--ens-text) !important;
  border: 1px solid rgba(14,165,233,.20);
  box-shadow: 0 10px 24px rgba(15,23,42,.10);
}

/* Conteúdo do ensino não pode “herdar” offset da sidebar */
body.route-ensino .app-main{
  padding-left: 20px !important;
  padding-right: 20px !important;
  padding-top: calc(var(--topbar-h) + 18px) !important;
  padding-bottom: 28px !important;

  /* garante que não fique “coluna” torta */
  min-height: calc(100vh - var(--topbar-h));
}

/* Container: preenche e centraliza, sem “vazio estranho” */
body.route-ensino .app-container{
  max-width: 1320px !important;
  width: 100% !important;
  margin: 0 auto !important;
}

/* Header da página */
body.route-ensino .page-title{
  margin: 14px 0 6px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.6px;
  color: var(--ens-text);
}
body.route-ensino .page-subtitle{
  margin: 0 0 18px;
  color: var(--ens-muted);
  font-size: 14.5px;
}

/* GRID: deixa os cards alinhados e com tamanho bom */
body.route-ensino .ra-grid{
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 18px !important;
  align-items: stretch;
}

/* CARD: corrige aparência + remove “escuro” e melhora layout */
body.route-ensino .ra-card{
  background: var(--ens-surface) !important;
  border: 1px solid var(--ens-stroke) !important;
  border-radius: var(--ens-radius) !important;
  overflow: hidden;
  box-shadow: var(--ens-shadow);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  min-height: 310px;

  /* garante que o conteúdo fique consistente */
  display: flex;
  flex-direction: column;
}

body.route-ensino .ra-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--ens-shadow-hover);
  border-color: rgba(14,165,233,.28) !important;
}

/* IMAGEM: padroniza, sem esticar */
body.route-ensino .ra-thumb{
  height: 160px !important;
  width: 100%;
  object-fit: cover;
  background: #eaf2f8;
}

/* CORPO do card */
body.route-ensino .ra-card-body{
  padding: 14px 14px 16px !important;
  flex: 1;
}

/* Badge “NOVO” */
body.route-ensino .ra-badge{
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .3px;

  background: rgba(14,165,233,.12);
  border: 1px solid rgba(14,165,233,.25);
  color: #075985;
  margin-bottom: 10px;
}

/* Título e meta: mais “médico” */
body.route-ensino .ra-title{
  margin: 0 0 6px !important;
  font-size: 15.5px !important;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.2px;
  color: var(--ens-text);
}
body.route-ensino .ra-meta{
  font-size: 13px !important;
  color: var(--ens-muted) !important;
}

/* Responsivo */
@media (max-width: 820px){
  body.route-ensino .app-main{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
@media (max-width: 520px){
  body.route-ensino .ra-grid{
    grid-template-columns: 1fr !important;
  }
  body.route-ensino .topbar-right{
    display: none; /* opcional pra caber bem */
  }
}
/* ===== Base visual mais "produto" ===== */
:root{
  --bg: #f4f7fb;
  --card: rgba(255,255,255,0.85);
  --card2: #ffffff;
  --stroke: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #169bd5; /* ajuste p/ sua cor */
  --shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
  --shadow2: 0 18px 50px rgba(2, 6, 23, 0.12);
  --r: 16px;
}

body{
  background: radial-gradient(1200px 600px at 30% 0%, rgba(22,155,213,0.10), transparent 55%),
              radial-gradient(900px 500px at 80% 20%, rgba(99,102,241,0.08), transparent 60%),
              var(--bg);
  color: var(--text);
}

/* Título de página com mais presença */
.page-title{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 14px;
}

/* ===== Grid responsivo melhor ===== */
.ra-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  align-items: stretch;
}

/* ===== Card premium ===== */
.ra-card{
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.ra-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow2);
  border-color: rgba(22,155,213,0.28);
}

.ra-thumb{
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

/* Gradiente para dar "acabamento" */
.ra-card::after{
  content:"";
  position:absolute;
  inset: 0 0 auto 0;
  height: 140px;
  background: linear-gradient(to bottom, rgba(2,6,23,0.00), rgba(2,6,23,0.35));
  pointer-events:none;
}

/* Corpo */
.ra-card-body{
  padding: 12px 12px 14px;
}

.ra-title{
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ra-meta{
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Badge "NOVO" mais bonito */
.ra-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(22,155,213,0.14);
  border: 1px solid rgba(22,155,213,0.22);
  color: #0b5e7a;
  margin-bottom: 8px;
}

/* ===== Sidebar ícones (melhor "feel") ===== */
.lite-nav__item{
  border: 1px solid transparent;
  transition: background .15s ease, transform .15s ease, border-color .15s ease;
}
.lite-nav__item:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}
.lite-nav__icon{
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.25));
}

/* ===== Pequeno acabamento no topo ===== */
.topbar{
  backdrop-filter: blur(10px);
  background: rgba(2, 18, 46, 0.78); /* ajuste p/ sua topbar */
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tab-button{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.06);
  transition: transform .15s ease, background .15s ease;
}
.tab-button:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.10);
}
/* ===== HERO ENSINO ===== */
.ensino-hero{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.08);
  backdrop-filter: blur(10px);
  margin: 10px 0 14px;
}

.ensino-hero__title{
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0;
}

.ensino-hero__subtitle{
  margin: 6px 0 12px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.ensino-tools{
  display: grid;
  gap: 10px;
}

.ensino-search{
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.9);
  overflow: hidden;
}

.ensino-search i{
  justify-self: center;
  color: #64748b;
  font-size: 14px;
}

.ensino-search input{
  border: 0;
  outline: none;
  padding: 12px 10px;
  font-size: 14px;
  background: transparent;
  color: #0f172a;
}

.ensino-clear{
  border: 0;
  background: transparent;
  cursor: pointer;
  height: 100%;
  color: #94a3b8;
  transition: background .15s ease, color .15s ease;
}
.ensino-clear:hover{
  background: rgba(2, 6, 23, 0.05);
  color: #475569;
}

/* Chips */
.ensino-filters{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip{
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.80);
  color: #0f172a;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
  user-select: none;
}

.chip:hover{
  transform: translateY(-1px);
  border-color: rgba(22,155,213,0.25);
}

.chip.is-active{
  background: rgba(22,155,213,0.14);
  border-color: rgba(22,155,213,0.30);
  color: #0b5e7a;
  font-weight: 800;
}

/* Right side */
.ensino-stats{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat{
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.85);
  padding: 10px 12px;
}

.stat__label{
  font-size: 11px;
  color: #64748b;
  margin-bottom: 6px;
}

.stat__value{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.ensino-sort{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.95);
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}

.ensino-hint{
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(22,155,213,0.35);
  background: rgba(22,155,213,0.08);
  color: #0b5e7a;
  font-size: 12px;
}

.ensino-hint i{
  opacity: 0.9;
}

/* Responsivo */
@media (max-width: 980px){
  .ensino-hero{
    grid-template-columns: 1fr;
  }
}
/* ==========================
   HUB LAUDO – UI PREMIUM
   (topo + painéis)
   ========================== */

:root{
  --panel-bg: #ffffff;
  --panel-br: rgba(15, 23, 42, 0.10);
  --panel-shadow: 0 14px 40px rgba(2, 6, 23, .10);
  --soft-shadow: 0 10px 26px rgba(2, 6, 23, .08);
  --title: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, .08);
  --focus: rgba(14, 165, 233, .55);
  --focus-ring: rgba(14, 165, 233, .18);
  --chip: rgba(14, 165, 233, .10);
}

/* Fundo geral (se quiser mais “software”) */
body{
  background: linear-gradient(180deg, rgba(2, 132, 199,.05), transparent 260px);
}

/* ==========================
   TOPO – dados do paciente
   ========================== */

/* Se você tiver um wrapper de topo, adicione essa classe nele.
   Caso não tenha, essas regras ainda ajudam inputs/selects no topo. */
.laudo-topbar,
.barra-superior,
.header-dados,
.top-dados{
  background: linear-gradient(90deg, rgba(14,165,233,.10), rgba(255,255,255,.96));
  border: 1px solid var(--panel-br);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: var(--soft-shadow);
}

/* Inputs / selects do topo e do sistema inteiro */
input, select, textarea{
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, transform .05s ease;
}

input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

input[readonly]{
  background: rgba(2,6,23,.03);
}

/* ==========================
   PAINÉIS – VE/VD/AE/AD
   ========================== */

/* Seus painéis parecem ter classes como:
   .container-VEesquerdo, .containerVDdireito, .containerAE, .container-ADdireito
   Vamos dar “skin” neles. */

.container-VEesquerdo,
.containerVDdireito,
.containerAE,
.container-ADdireito{
  background: var(--panel-bg);
  border: 1px solid var(--panel-br);
  border-radius: 18px;
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

/* Cabeçalho dos painéis (onde aparece “VENTRÍCULO ESQUERDO” etc) */
.container-VEesquerdo .title,
.containerVDdireito .title,
.containerAE .title,
.container-ADdireito .title,
.container-VEesquerdo .panel-title,
.containerVDdireito .panel-title,
.containerAE .panel-title,
.container-ADdireito .panel-title{
  padding: 10px 14px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--title);
  background: linear-gradient(90deg, rgba(14,165,233,.12), rgba(255,255,255,0));
  border-bottom: 1px solid var(--line);
}

/* Se seus títulos são <th> em uma linha azul, estiliza também */
.container-VEesquerdo thead,
.containerVDdireito thead,
.containerAE thead,
.container-ADdireito thead{
  background: linear-gradient(90deg, rgba(14,165,233,.12), rgba(255,255,255,0));
}

/* Tabelas internas – mais clean */
.container-VEesquerdo table,
.containerVDdireito table,
.containerAE table,
.container-ADdireito table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

/* Linhas */
.container-VEesquerdo tbody tr,
.containerVDdireito tbody tr,
.containerAE tbody tr,
.container-ADdireito tbody tr{
  background: #fff;
}

.container-VEesquerdo tbody tr + tr td,
.containerVDdireito tbody tr + tr td,
.containerAE tbody tr + tr td,
.container-ADdireito tbody tr + tr td{
  border-top: 1px solid rgba(15,23,42,.06);
}

/* Células */
.container-VEesquerdo td,
.containerVDdireito td,
.containerAE td,
.container-ADdireito td{
  padding: 8px 10px;
  font-size: 12px;
  color: var(--title);
  vertical-align: middle;
}

/* Coluna “Medida” (texto) */
.container-VEesquerdo td:first-child,
.containerVDdireito td:first-child,
.containerAE td:first-child,
.container-ADdireito td:first-child{
  color: #0b1220;
  font-weight: 700;
}

/* Inputs dentro dos painéis */
.container-VEesquerdo input,
.containerVDdireito input,
.containerAE input,
.container-ADdireito input{
  width: 100%;
  height: 30px;
  border-radius: 10px;
  background: rgba(2,6,23,.03);
  font-size: 12px;
  padding: 0 8px;
}

/* Inputs de “auto” ficam ainda mais “sistema” */
.input-auto{
  background: rgba(2,6,23,.035) !important;
  border-color: rgba(15,23,42,.10) !important;
  font-weight: 800;
}

/* ==========================
   PLANILHA DE VOLUMES
   ========================== */

.container-planilha,
.planilhaVolumes,
.planilha-volumes,
.volume-table-wrap{
  background: var(--panel-bg);
  border: 1px solid var(--panel-br);
  border-radius: 18px;
  box-shadow: var(--panel-shadow);
  overflow: hidden;
}

/* Título da planilha */
.container-planilha .title,
.planilhaVolumes .title,
.planilha-volumes .title{
  padding: 10px 14px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--title);
  background: linear-gradient(90deg, rgba(14,165,233,.12), rgba(255,255,255,0));
  border-bottom: 1px solid var(--line);
}

/* Grid da planilha: cabeçalho */
.container-planilha thead,
.planilhaVolumes thead{
  background: rgba(14,165,233,.10);
}

/* Células planilha */
.container-planilha td,
.container-planilha th,
.planilhaVolumes td,
.planilhaVolumes th{
  border-color: rgba(15,23,42,.08);
  font-size: 12px;
}

/* Inputs da planilha */
.container-planilha input,
.planilhaVolumes input{
  height: 28px;
  border-radius: 10px;
  background: #fff;
}

/* ==========================
   Detalhes finos
   ========================== */

/* Menos “cara de tabela antiga”: cantos suaves na primeira/última linha */
.container-VEesquerdo table tr:first-child td:first-child,
.containerVDdireito table tr:first-child td:first-child,
.containerAE table tr:first-child td:first-child,
.container-ADdireito table tr:first-child td:first-child{
  border-top-left-radius: 14px;
}

.container-VEesquerdo table tr:first-child td:last-child,
.containerVDdireito table tr:first-child td:last-child,
.containerAE table tr:first-child td:last-child,
.container-ADdireito table tr:first-child td:last-child{
  border-top-right-radius: 14px;
}

/* Scroll bonito (quando precisar) */
*{
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,.25) transparent;
}
*::-webkit-scrollbar{ width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb{
  background: rgba(15,23,42,.20);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
/* ============================
   LITE SIDEBAR — TEMA CLARO
   ============================ */

:root{
  --sb-bg: #ffffff;
  --sb-border: rgba(15, 23, 42, 0.10);
  --sb-text: #0f172a;
  --sb-muted: #64748b;
  --sb-hover: rgba(15, 23, 42, 0.06);
  --sb-active-bg: rgba(14, 165, 233, 0.12);
  --sb-active-border: rgba(14, 165, 233, 0.35);
  --sb-active-text: #075985;
  --sb-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
}

/* Container */
.lite-sidebar{
  background: var(--sb-bg) !important;
  border-right: 1px solid var(--sb-border);
  box-shadow: var(--sb-shadow);
}

/* Topo e rodapé */
.lite-sidebar__top,
.lite-sidebar__bottom{
  padding: 12px 0;
}

/* Logo */
.lite-logo{
  background: #ffffff;
  border: 1px solid var(--sb-border);
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}
.lite-logo__mark{
  color: var(--sb-text);
}

/* Navegação */
.lite-nav{
  gap: 10px;
}

/* Botões */
.lite-nav__item{
  background: transparent;
  border: 1px solid transparent;
  color: var(--sb-muted);
  transition: 
    background .15s ease,
    border-color .15s ease,
    transform .12s ease,
    color .15s ease;
}

/* Ícones FontAwesome */
.lite-nav__item i{
  font-size: 16px;
  color: inherit;
}

/* Ícones IMG */
.lite-nav__icon{
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: grayscale(100%) brightness(0.6);
  transition: filter .15s ease;
}

/* Hover */
.lite-nav__item:hover{
  background: var(--sb-hover);
  border-color: var(--sb-border);
  transform: translateY(-1px);
  color: var(--sb-text);
}
.lite-nav__item:hover .lite-nav__icon{
  filter: none;
}

/* Ativo (rota ou painel) */
.lite-nav__item.is-active{
  background: var(--sb-active-bg);
  border-color: var(--sb-active-border);
  color: var(--sb-active-text);
  box-shadow: 0 6px 16px rgba(14,165,233,.18);
}
.lite-nav__item.is-active .lite-nav__icon{
  filter: none;
}

/* Botão pequeno (Ajuda) */
.lite-nav__item--mini{
  opacity: .85;
}
.lite-nav__item--mini:hover{
  opacity: 1;
}
/* ============================
   TOPBAR — TEMA CLARO MÉDICO
   ============================ */

:root{
  --tb-bg: rgba(255,255,255,.92);
  --tb-border: rgba(15, 23, 42, 0.10);
  --tb-text: #0f172a;
  --tb-muted: #64748b;
  --tb-hover: rgba(15, 23, 42, 0.06);

  --tb-active-bg: rgba(14, 165, 233, 0.14);
  --tb-active-border: rgba(14, 165, 233, 0.35);
  --tb-active-text: #075985;

  --tb-shadow: 0 8px 24px rgba(15, 23, 42, 0.10);
}

/* Container da topbar */
.topbar{
  background: var(--tb-bg) !important;
  border-bottom: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow);
  backdrop-filter: blur(12px);
}

/* Área esquerda e direita */
.topbar-left,
.topbar-right{
  color: var(--tb-text);
}

/* Nome do usuário */
.user-name{
  font-weight: 700;
  color: var(--tb-text);
}

/* ============================
   TABS (Hub Ensino / Hub Laudo)
   ============================ */

.top-tabs{
  background: rgba(15,23,42,.04);
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  padding: 6px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}

/* Botões */
.tab-button{
  background: transparent;
  border: 1px solid transparent;
  color: var(--tb-muted);
  font-weight: 700;
  transition: 
    background .15s ease,
    border-color .15s ease,
    color .15s ease,
    transform .12s ease;
}

/* Hover */
.tab-button:hover{
  background: var(--tb-hover);
  color: var(--tb-text);
  transform: translateY(-1px);
}

/* Ativo */
.tab-button.active{
  background: var(--tb-active-bg);
  border: 1px solid var(--tb-active-border);
  color: var(--tb-active-text);
  box-shadow: 0 6px 16px rgba(14,165,233,.18);
}
/* FUNDO GERAL DO APP */
.app-main {
  background: #f5f7fa; /* cinza clínico */
}
/* FUNDO GERAL DO APP */
.app-main {
  background: #f5f7fa; /* cinza clínico */
}
/* COLUNA DIREITA MAIS DEFINIDA */
.view-laudo {
  gap: 20px;
}

.view-laudo > *:last-child {
  border-left: 1px solid rgba(15,23,42,.08);
  padding-left: 20px;
}
/* BLOCOS / PAINÉIS */
.laudo-frame,
.container-planilha,
.container-VEesquerdo,
.containerVDdireito,
.containerAE,
.container-ADdireito,
.ecvht-wrap {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 12px;
  box-shadow: 
    0 1px 2px rgba(0,0,0,.04),
    0 8px 24px rgba(15,23,42,.06);
}
/* CABEÇALHOS DOS PAINÉIS */
.container-VEesquerdo h3,
.containerVDdireito h3,
.containerAE h3,
.container-ADdireito h3,
.ecvht-wrap h1 {
  background: linear-gradient(
    to bottom,
    #f8fafc,
    #eef2f7
  );
  border-bottom: 1px solid rgba(15,23,42,.08);
  padding: 10px 14px;
  border-radius: 10px 10px 0 0;
  font-weight: 700;
}
/* =========================
   SIDEBAR – CINZA ESCURO
   ========================= */

.lite-sidebar {
  background: #1f2933;
  border-right: 1px solid rgba(255,255,255,0.06);
  box-shadow: 4px 0 18px rgba(0,0,0,0.15);
}

/* Logo */
.lite-logo {
  background: #111827;
  color: #ffffff;
  border-radius: 10px;
}

/* Ícones padrão */
.lite-nav__item {
  color: #e5e7eb;
  background: transparent;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease, transform .1s ease;
}

/* Hover */
.lite-nav__item:hover {
  background: #2b3642;
  color: #ffffff;
  transform: translateX(2px);
}

/* Item ativo (Hub atual) */
.lite-nav__item.is-active {
  background: #374151;
  color: #ffffff;
  box-shadow: inset 3px 0 0 #ffffff;
}

/* Ícones FontAwesome */
.lite-nav__item i {
  font-size: 18px;
}

/* Ícones IMG (máscaras / laudos) */
.lite-nav__icon {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.lite-nav__item:hover .lite-nav__icon,
.lite-nav__item.is-active .lite-nav__icon {
  opacity: 1;
}

/* Parte inferior */
.lite-sidebar__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
}
/* =========================
   FUNDO GERAL DO APP
   ========================= */

body {
  background: #697ba1; /* cinza escuro médico */
}

/* área principal */
.app-main {
  background: #e7e7e9;
}
.app-container {
  background: transparent;
}
/* Painéis principais */
.laudo-frame,
.container-planilha,
.volume-table,
.container-VEesquerdo,
.containerVDdireito,
.containerAE,
.containerADdireito,
.ecvht-card,
.ra-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.lite-sidebar {
  background: #1f2933;
}

/* evita aquele quadrado estranho no topo */
.lite-sidebar__top {
  background: transparent;
}
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}
/* =========================================
   SIDEBAR – CINZA ESCURO (FIX FINAL)
   Cole no FINAL do app.css
   ========================================= */

:root{
  --sidebar-w: 72px;          /* mantém seu layout */
  --sb-bg: #0c0808;           /* cinza escuro */
  --sb-bg-2: #0c0808;         /* mais escuro */
  --sb-stroke: rgba(255,255,255,.10);
  --sb-hover: rgba(255,255,255,.08);
  --sb-active: rgba(14,165,233,.18);
  --sb-active-stroke: rgba(14,165,233,.35);
  --sb-icon: rgba(255,255,255,.82);
  --sb-icon-muted: rgba(255,255,255,.55);
}

/* Sidebar base */
.lite-sidebar{
  width: var(--sidebar-w) !important;
  background: linear-gradient(180deg, var(--sb-bg), var(--sb-bg-2)) !important;
  border-right: 1px solid var(--sb-stroke) !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04) inset !important;
  padding: 10px 8px !important;
  gap: 10px !important;
}

/* Topo/logo */
.lite-logo{
  background: rgba(141, 194, 185, 0.06) !important;
  border: 1px solid var(--sb-stroke) !important;
}
.lite-logo__mark{
  color: rgba(255,255,255,.92) !important;
}

/* Navegação (sem scroll aparecendo) */
.lite-nav{
  overflow: hidden !important;
}
.lite-nav__item{
  width: 44px !important;
  height: 44px !important;
  border-radius: 14px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  color: var(--sb-icon) !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: transform .12s ease, background .12s ease, border-color .12s ease !important;
}

/* Hover */
.lite-nav__item:hover{
  background: var(--sb-hover) !important;
  border-color: var(--sb-stroke) !important;
  transform: translateY(-1px) !important;
}

/* Ativo */
.lite-nav__item.is-active{
  background: var(--sb-active) !important;
  border-color: var(--sb-active-stroke) !important;
  box-shadow: 0 10px 28px rgba(14,165,233,.12) !important;
  color: rgba(255,255,255,.95) !important;
}

/* Ícones font-awesome */
.lite-nav__item i{
  font-size: 16px !important;
  line-height: 1 !important;
  color: currentColor !important;
}

/* Ícones IMG (os seus png) – NÃO usa invert maluco */
.lite-nav__icon{
  width: 20px !important;
  height: 20px !important;
  object-fit: contain !important;

  /* deixa o PNG “clarinho” sem mudar a arte */
  filter: brightness(0) invert(1) opacity(.85) !important;
}
.lite-nav__item:hover .lite-nav__icon{
  filter: brightness(0) invert(1) opacity(1) !important;
}

/* Botão mini */
.lite-nav__item--mini{
  width: 42px !important;
  height: 42px !important;
  border-radius: 13px !important;
  color: var(--sb-icon-muted) !important;
}
/* Login extremamente discreto */
.auth-link{
  background: none;
  border: none;
  padding: 0;

  font: inherit;
  color: inherit;

  opacity: .75;
  cursor: pointer;
}

.auth-link:hover{
  opacity: 1;
}

.auth-link:focus-visible{
  outline: none;
}
/* ===== Auth Dropdown (topbar) ===== */
.topbar-right { position: relative; }

.auth-dropdown{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.14);
  padding: 6px;
  display: none;
  z-index: 9999;
}

.auth-dd-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #0f172a;
  text-align: left;
}

.auth-dd-item:hover{
  background: rgba(2, 132, 199, 0.08);
}

.auth-dd-item--danger{
  color: #b91c1c;
}

.auth-dd-item--danger:hover{
  background: rgba(185, 28, 28, 0.08);
}
/* dropdown do botão auth */
.auth-menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
  padding: 6px;
  z-index: 9999;
}

.auth-menu__item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.auth-menu__item:hover{
  background: rgba(2, 132, 199, .08);
}

.auth-menu__item--danger:hover{
  background: rgba(220, 38, 38, .10);
}
/* ===== Hub Laudo bloqueado ===== */
.is-locked {
  opacity: 0.55;
  filter: grayscale(0.2);
  cursor: not-allowed;
}

.lock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  font-size: 12px;
  line-height: 1;
  opacity: 0.9;
}

.lite-nav__item.is-locked .lock-badge {
  margin-left: 0;
  margin-top: 6px;
  display: block;
}
