:root {
  --bg-dark: #0f172a;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-surface: #f8fafc;
  --bg-white: #ffffff;
  --accent: #0f766e;
  --accent-hover: #0b5e59;
  --accent-light: rgba(15, 118, 110, .14);
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-dark: #0f172a;
  --border: #e2e8f0;
  --shadow: 0 8px 30px rgba(15, 23, 42, .08);
  --radius: 12px;
  --sidebar-w: 224px;
  --sidebar-collapsed-w: 72px;
  --topbar-h: 56px;
  --transition: .25s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 14px; }
body { 
  font-family: var(--font); 
  color: var(--text-dark); 
  background: var(--bg-surface); 
  -webkit-font-smoothing: antialiased; 
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
img { max-width: 100%; }

/* Contenedores estructurales de la App */
.app-layout { display: flex; min-height: 100vh; overflow-x: hidden; }

.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-w);
  min-width: 0;
  padding-top: var(--topbar-h);
  transition: margin-left var(--transition);
}

.app-content { flex: 1; overflow-y: auto; background: var(--bg-surface); }

/* Animaciones e indicadores de Carga globales */
.loading-overlay {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 80px; color: var(--text-secondary);
}
.dots { display: flex; gap: 6px; }
.dots span {
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent);
  animation: bounce 1.4s ease-in-out infinite;
}
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes bounce { 0%,80%,100%{transform:scale(0)} 40%{transform:scale(1)} }

@media (max-width: 768px) {
  .app-main { margin-left: 0 !important; }
}