/* ═══════════════════════════════════════════
   FRITITRUCK — Layout general y estructura
   ═══════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  font-size: 14px;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* ── App shell ─────────────────────────── */
#app { display: none; min-height: 100vh; }

/* ── Sidebar ─────────────────────────── */
.sidebar {
  width: 220px;
  background: #fff;
  border-right: 1px solid var(--gray-200);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.sidebar-logo {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-logo-icon {
  width: 34px; height: 34px;
  background: var(--green);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-logo span { font-size: 15px; font-weight: 700; color: var(--green); }

.sidebar-user { padding: 0.75rem 1rem; border-bottom: 1px solid var(--gray-100); }
.sidebar-user-name  { font-size: 13px; font-weight: 600; color: var(--gray-900); }
.sidebar-user-role  { font-size: 11px; color: var(--gray-400); text-transform: capitalize; }

nav { flex: 1; padding: 0.5rem 0; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 1rem;
  font-size: 13px; font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: 0;
  transition: all 0.12s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--gray-50); color: var(--gray-900); }
.nav-item.active {
  background: var(--green-light);
  color: var(--green);
  border-left-color: var(--green);
  font-weight: 600;
}
.nav-item .nav-icon { font-size: 17px; width: 20px; text-align: center; }

.sidebar-bottom { padding: 1rem; border-top: 1px solid var(--gray-100); }

/* ── Main content ─────────────────────── */
.main { margin-left: 220px; padding: 1.5rem; min-height: 100vh; }

.page        { display: none; }
.page.active { display: block; }

.page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-title    { font-size: 20px; font-weight: 700; color: var(--gray-900); }
.page-subtitle { font-size: 13px; color: var(--gray-400); margin-top: 2px; }

/* ── Tema toggle ─────────────────────── */
.theme-toggle {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--gray-600);
  display: flex; align-items: center; gap: 5px;
  transition: all 0.15s;
}
.theme-toggle:hover { border-color: var(--green); color: var(--green); }
