@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --brand-blue: #0E2E9B;
  --brand-navy: #000928;
  --brand-lavender: #F2F5FF;
  --brand-green: #00965E;
  --brand-gray-200: #E2E6F2;
  --brand-gray-400: #98A2C0;
  --brand-gray-600: #5C6584;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body {
  background: var(--brand-lavender);
  color: var(--brand-navy);
  min-height: 100vh;
  overflow-x: hidden;
}

/* LAYOUT SHELL (Padrão Portal do Colaborador Objetiva) */
.portal-shell {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--brand-lavender);
}

/* SIDEBAR PORTAL (w-[252px], Fundo #000928) */
.portal-sidebar {
  width: 252px;
  background-color: var(--brand-navy);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  flex-shrink: 0;
  z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.portal-sidebar .brand-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  padding: 6px 4px;
}

.portal-sidebar .brand-logo-container img {
  height: 52px;
  max-height: 56px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.portal-sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

/* Scroll discreto da sidebar (idêntico ao PORTAL) */
.sidebar-nav-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.sidebar-nav-scroll::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.35);
}

/* Itens de Navegação (Padrão PORTAL NavLink) */
.portal-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.15s ease;
  position: relative;
}

.portal-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.portal-nav-item.active {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.portal-nav-item .indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ffffff;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.portal-nav-item.active .indicator-dot {
  opacity: 1;
}

.portal-nav-item i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.portal-nav-group-title {
  padding: 16px 12px 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.4);
}

/* Rodapé da Sidebar */
.portal-user-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 4px;
  padding-right: 4px;
}

.portal-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(14, 46, 155, 0.4);
}

/* ÁREA DE CONTEÚDO PRINCIPAL (PORTAL) */
.portal-main {
  flex: 1;
  min-width: 0;
  background-color: var(--brand-lavender);
  height: 100vh;
  overflow-y: auto;
  padding: 28px 36px 48px 36px;
}

/* TABS / SEÇÕES DE PÁGINAS */
.tab-content {
  display: block;
  animation: portalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-content.hidden {
  display: none !important;
}

@keyframes portalFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CARDS DO PORTAL (rounded-xl2 = 14px, shadow-card) */
.portal-card {
  background-color: #ffffff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 16px rgba(13, 20, 51, 0.06);
  border: 1px solid rgba(226, 230, 242, 0.7);
  transition: box-shadow 0.2s, transform 0.2s;
}

.portal-card:hover {
  box-shadow: 0 8px 24px rgba(13, 20, 51, 0.09);
}

.portal-kpi-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-gray-600);
}

.portal-kpi-value {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-navy);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.portal-kpi-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--brand-gray-600);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* TABELAS DO PORTAL */
.portal-table-container {
  background-color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(13, 20, 51, 0.06);
  border: 1px solid rgba(226, 230, 242, 0.7);
  overflow: hidden;
}

.portal-table-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--brand-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.portal-table thead th {
  background-color: #F8FAFC;
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-gray-600);
  border-bottom: 1px solid var(--brand-gray-200);
}

.portal-table tbody tr {
  border-bottom: 1px solid rgba(226, 230, 242, 0.6);
  transition: background-color 0.15s;
}

.portal-table tbody tr:hover {
  background-color: rgba(242, 245, 255, 0.65);
}

.portal-table tbody td {
  padding: 13px 18px;
  color: var(--brand-navy);
}

/* BOTÕES DO PORTAL */
.portal-btn-primary {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(14, 46, 155, 0.2);
  transition: background-color 0.15s, transform 0.1s;
}

.portal-btn-primary:hover {
  background-color: #0b247b;
}

.portal-btn-accent {
  background-color: var(--brand-green);
  color: #ffffff;
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 150, 94, 0.2);
  transition: background-color 0.15s;
}

.portal-btn-accent:hover {
  background-color: #007a4c;
}

.portal-btn-secondary {
  background-color: #ffffff;
  color: var(--brand-navy);
  font-weight: 500;
  font-size: 12px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--brand-gray-200);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background-color 0.15s, border-color 0.15s;
}

.portal-btn-secondary:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
}

/* BADGES DO PORTAL */
.portal-badge-blue {
  background-color: rgba(14, 46, 155, 0.1);
  color: var(--brand-blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.portal-badge-green {
  background-color: rgba(0, 150, 94, 0.12);
  color: var(--brand-green);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.portal-badge-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: #B45309;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* MODAL DO PORTAL (Processo 360º) */
.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 9, 40, 0.75);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.portal-modal-card {
  background-color: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 1024px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 9, 40, 0.35);
  border: 1px solid var(--brand-gray-200);
  overflow: hidden;
  animation: portalModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes portalModalPop {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* SCROLLBAR GERAL */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--brand-lavender);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-blue);
}

/* RESPONSIVIDADE MOBILE (PORTAL) */
@media (max-width: 1024px) {
  .portal-shell {
    flex-direction: column;
  }
  .portal-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 16px;
  }
  .portal-main {
    padding: 20px 16px;
    height: auto;
  }
}

/* SUB-ABAS DO MODAL DE DETALHES DO PROCESSO */
.modal-sub-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  outline: none !important;
  transition: all 0.15s ease-in-out;
  background-color: #F8FAFC;
  color: var(--brand-gray-600);
  user-select: none;
}

.modal-sub-tab:hover:not(.active) {
  background-color: #E2E6F2;
  color: var(--brand-navy);
}

.modal-sub-tab.active {
  background-color: var(--brand-blue) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(14, 46, 155, 0.25);
  border-color: var(--brand-blue) !important;
}

.modal-sub-tab.active i,
.modal-sub-tab.active span {
  color: #FFFFFF !important;
}

.modal-sub-tab:focus,
.modal-sub-tab:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(14, 46, 155, 0.25);
}

/* ========================================================= */
/* MODO TV / APRESENTAÇÃO EM SALA DE REUNIÃO                */
/* Tipografia ampliada, alto contraste e proporção para TV  */
/* ========================================================= */
body.tv-presentation-mode {
  font-size: 112%;
  background-color: #000928;
}

body.tv-presentation-mode .portal-shell {
  width: 100vw;
  max-width: 100vw;
  background-color: #EEF2FF;
}

body.tv-presentation-mode .portal-sidebar {
  width: 280px;
  padding: 28px 22px;
}

body.tv-presentation-mode .portal-main {
  padding: 36px 48px;
  max-width: 100%;
}

body.tv-presentation-mode .portal-card {
  box-shadow: 0 10px 30px rgba(0, 9, 40, 0.12);
  border-width: 1.5px;
  border-color: #CBD5E1;
}

body.tv-presentation-mode #kpi-trt-valor-total,
body.tv-presentation-mode #kpi-trt-valor-medio,
body.tv-presentation-mode #kpi-trt-rito-ordinario,
body.tv-presentation-mode #kpi-trt-advogados-total {
  font-size: 2.3rem !important;
  line-height: 1.1;
  font-weight: 900;
}

body.tv-presentation-mode .portal-table th {
  padding: 14px 18px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.tv-presentation-mode .portal-table td {
  padding: 14px 18px;
  font-size: 13.5px;
}

/* ========================================================= */
/* RESPONSIVIDADE PARA TELAS GRANDES (1080p, 1440p, 4K)      */
/* ========================================================= */
@media (min-width: 1600px) {
  .portal-main {
    max-width: 100%;
    padding: 34px 44px;
  }
  .portal-sidebar {
    width: 270px;
  }
}

@media (min-width: 1920px) {
  html {
    font-size: 16.5px;
  }
  .portal-main {
    padding: 38px 52px;
  }
  .portal-sidebar {
    width: 285px;
  }
}

@media (min-width: 2560px) {
  html {
    font-size: 18px;
  }
  .portal-main {
    padding: 48px 64px;
  }
  .portal-sidebar {
    width: 320px;
  }
}

/* ========================================================= */
/* REGRAS DE IMPRESSÃO / EXPORTAÇÃO EM PDF                    */
/* ========================================================= */
@media print {
  .portal-sidebar,
  header,
  #btn-modo-tv,
  .portal-btn-primary,
  button {
    display: none !important;
  }
  .portal-shell {
    display: block !important;
    background: #ffffff !important;
    width: 100% !important;
  }
  .portal-main {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .portal-card {
    border: 1px solid #d1d5db !important;
    box-shadow: none !important;
    break-inside: avoid;
    margin-bottom: 20px;
  }
}


