/* =========================================
   LAYOUT: topbar + sidebar
   Sizes taken from mi.argentina.gob.ar (72px bar, 40px pill items,
   16px labels; brand red only on the active item). Loaded after styles.css;
   remove its <link> in templates/includes/styles.php to revert.
   ========================================= */

:root {
  --layout-topbar: 72px;
  --layout-sidebar: 250px;
  --layout-texto-nav: #2b2623;
}

/* ---------- Topbar ---------- */

.main-header {
  height: var(--layout-topbar);
  border-radius: 0 0 8px 8px;
}

@media (min-width: 768px) {
  .header-content {
    padding: 0 24px;
  }
}

.brand-icon {
  height: 40px;
  width: auto;
}

/* ---------- Sidebar ---------- */

.sidebar {
  top: var(--layout-topbar);
  width: var(--layout-sidebar);
  height: calc(100vh - var(--layout-topbar));
  padding: 24px 0;
}

.sidebar .nav-item {
  padding: 0 15px;
  margin-bottom: 6px;
}

.sidebar .nav-link {
  min-height: 40px;
  padding: 8px 16px 8px 18px;
  border-radius: 20px;
  color: var(--layout-texto-nav);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

/* Neutral icons: the brand red is reserved for the current page */
.sidebar .nav-link .nav-icono {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  color: #6b625c;
  transition: color 0.15s ease;
}

.sidebar .nav-link:hover {
  background-color: #f3f1ef;
  color: var(--layout-texto-nav);
}

.sidebar .nav-link.active,
.sidebar .nav-link.active:hover {
  background: rgba(196, 68, 42, 0.1);
  color: var(--primary-blue);
  font-weight: 600;
}

.sidebar .nav-link.active .nav-icono {
  color: var(--primary-blue);
}

.sidebar .nav-link:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

/* ---------- Content offset ---------- */

.main-content {
  margin-top: var(--layout-topbar);
  min-height: calc(100vh - var(--layout-topbar));
}

@media (min-width: 768px) {
  .main-content {
    margin-left: var(--layout-sidebar);
  }
}

/* ---------- Lucide icons (local sprite, see lucide_icon()) ---------- */

.lucide-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.sidebar .nav-link.active .nav-icono {
  stroke-width: 2.25;
}

.mobile-menu-btn .lucide-icon,
.bell-btn .lucide-icon {
  width: 22px;
  height: 22px;
}

.user-btn .lucide-icon {
  width: 18px;
  height: 18px;
}

.verification-badge .lucide-icon {
  width: 16px;
  height: 16px;
}

/* ---------- Sidebar groups (only shown on long menus) ---------- */

.sidebar-grupo {
  padding: 18px 33px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #857b74;
}

.sidebar-nav > .sidebar-grupo:first-child {
  padding-top: 0;
}

/* Closed off-canvas menu must not be reachable with Tab */
@media (max-width: 767.98px) {
  .sidebar {
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .sidebar.show {
    visibility: visible;
    transition: transform 0.25s ease, visibility 0s;
  }
}
