:root {
  --header-height: 60px;
  --sidebar-width: 260px;
  
  /* PALETA MÉDICA ORIGINAL (Recuperada) */
  --med-900: #0b2b2f;
  --med-800: #0f3a40;
  --med-700: #14515a;
  --med-100: #e7f3f5;
  
  --bg-color: #f6f8fb;
}

body {
  background-color: var(--bg-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* =========================================
   1. NAVBAR SUPERIOR (VERDE MEDICINA)
   ========================================= */

.app-header {
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1020;
  
  /* O GRADIENTE VERDE VOLTOU AQUI */
  background: linear-gradient(90deg, var(--med-900), var(--med-700));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  
  color: white; /* Garante texto branco */
}

/* Força os links e textos do Navbar a ficarem brancos */
.app-header .navbar, 
.app-header .nav-link, 
.app-header .navbar-brand,
.app-header i {
    color: #ffffff !important;
}

.app-header .dropdown-menu {
    color: #333 !important; /* Dropdown volta a ser escuro no fundo branco */
}
.app-header .dropdown-item {
    color: #333 !important;
}

/* =========================================
   2. ESTRUTURA GRID (SHELL)
   ========================================= */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: calc(100vh - var(--header-height));
  margin-top: 0;
}

.app-shell-guest {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--med-900), var(--med-700)); /* Fundo verde no login */
}

/* =========================================
   3. SIDEBAR (LATERAL)
   ========================================= */

.app-sidebar {
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  background: white;
  border-right: 1px solid #e5e7eb;
  overflow-y: auto;
}

/* Ajuste fino para o cabeçalho do sidebar não brigar com o navbar */
.sidebar-header {
  display: flex; /* Mantive flex para alinhar logo */
  height: 60px; /* Mesma altura do navbar se quiser alinhar visualmente */
  border-bottom: 1px solid #f0f0f0;
  display: none; /* Oculto pois o logo já deve estar no Navbar verde */
}

.app-content {
  padding: 2rem;
  width: 100%;
  overflow-x: hidden;
}

/* =========================================
   4. ESTILOS DOS ITENS DO MENU
   ========================================= */

.sidebar-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border-left: 4px solid transparent;
  cursor: pointer;
}

.sidebar-item:hover {
  background-color: var(--med-100);
  color: var(--med-900);
}

.sidebar-item.active {
  background-color: #f0fdfa;
  color: var(--med-700);
  border-left-color: var(--med-700);
  font-weight: 600;
}

.sidebar-icon {
  margin-right: 12px;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  color: #6c757d;
}

.sidebar-item.active .sidebar-icon {
  color: var(--med-700);
}

/* Submenus */
.sidebar-submenu {
  display: none;
  background-color: #fafafa;
  padding: 5px 0;
}

.sidebar-group.open .sidebar-submenu {
  display: block;
}

.sidebar-subitem {
  display: block;
  padding: 8px 20px 8px 56px;
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9rem;
}

.sidebar-subitem:hover {
  color: var(--med-700);
  background-color: #e9ecef;
}

.sidebar-subitem.active {
  color: var(--med-700);
  font-weight: bold;
}

.dropdown-arrow {
  margin-left: auto;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.sidebar-group.open .dropdown-arrow {
  transform: rotate(90deg);
}

/* =========================================
   5. TIMELINE E COMPONENTES
   ========================================= */

.fade-in {
  animation: fadeIn 0.4s ease-in-out;
}

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

.timeline {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid #e5e7eb;
  margin-left: 10px;
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-dot {
  position: absolute;
  left: -27px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--med-700);
}