:root {
  --primary: #4A6741;
  --primary-dark: #3A5231;
  --primary-light: #eef3ed;
  --primary-glow: rgba(74, 103, 65, 0.15);
  --accent: #8FBC8F;
  --bg-main: #F8F7F4;
  --bg-card: #FFFFFF;
  --bg-sidebar: #2C3E2D;
  --sidebar-active: #415A43;
  --sidebar-hover: #354B37;
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-light: #DFE6E9;
  --success: #27AE60;
  --danger: #E74C3C;
  --warning: #F39C12;
  --info: #3498DB;
  --border-color: #E2E8F0;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Layout con Sidebar */
.app-container {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  z-index: 100;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
}

.sidebar-brand {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: white;
  padding: 2px;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}

.sidebar-menu {
  list-style: none;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-light);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-item a:hover {
  background-color: var(--sidebar-hover);
  color: white;
}

.sidebar-item.active a {
  background-color: var(--sidebar-active);
  color: white;
  font-weight: 600;
}

.sidebar-item i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
  opacity: 0.8;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  opacity: 0.7;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.main-content {
  flex-grow: 1;
  margin-left: 260px;
  padding: 40px;
  transition: var(--transition);
  max-width: calc(100% - 260px);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.header-title h1 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--bg-sidebar);
}

.header-title p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 8px 16px;
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Responsividad */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    max-width: 100%;
    padding: 24px;
  }
  .menu-toggle {
    display: block !important;
  }
}

.menu-toggle {
  display: none;
  background: white;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-primary);
}
