/* Sidebar groups and the new section shells. Loaded after style.css. */
.primary-nav > .nav-item[hidden]{display:none!important}
/* A group's display:grid below would otherwise override [hidden], showing a module the host hides. */
.nav-group[hidden]{display:none!important}

/* --- collapsible sidebar group -------------------------------------------- */
.nav-group{display:grid;gap:4px}
.nav-group-toggle .nav-caret{margin-left:auto;display:grid;place-items:center;color:#7a879b;transition:transform .18s}
.nav-group.open .nav-group-toggle .nav-caret{transform:rotate(180deg)}
.nav-group-toggle.holds-active{color:#091d42;font-weight:600}
.nav-sub{display:none;gap:4px;margin-left:11px;padding-left:11px;border-left:1px solid #d5e0eb}
.nav-group.open .nav-sub{display:grid}
.nav-sub .nav-item{padding:9px 12px;border-radius:10px;font-weight:500}

/* Collapsed rail: there is no room for an indented list, so flatten the group and drop
   the header, which would otherwise be an unlabelled icon that folds the rail's only links. */
.sidebar.collapsed .nav-group-toggle{display:none}
.sidebar.collapsed .nav-sub{display:grid;margin-left:0;padding-left:0;border-left:0}

/* --- overdue alerts -------------------------------------------------------- */
/* The reference layout sets `.primary-nav small{display:none}` for every nav item, so the
   count has to opt back in explicitly rather than inherit the blue notification style. */
.primary-nav .nav-count{display:inline-grid;place-items:center;margin-left:auto;min-width:20px;height:20px;
  padding:0 6px;border-radius:999px;background:#e23b52;color:#fff;font-size:11px;font-weight:600;line-height:1}
.primary-nav .nav-item.active .nav-count{box-shadow:0 0 0 2px #091d42}
.primary-nav .nav-count[hidden]{display:none}
/* The rail has no room for a label, and the group it sits in is already flattened. */
.sidebar.collapsed .primary-nav .nav-count{display:none}
/* Matches the nav count: an outlined red pill, not the bare tint the base rule gives. */
.pill.danger{border-color:rgba(226,59,82,.45)}

/* --- shared shell pieces --------------------------------------------------- */
.badge.ok{background:#e4f8ed;color:#0b8a46}
.badge.ok:before{background:#0caf51}
.badge.wait{background:#fff4e0;color:#a2600c}
.badge.wait:before{background:#e8961f}
.platform-card{padding:20px;display:grid;gap:14px;justify-items:start}
.platform-card .section-title{width:100%;margin:0}
.shell-notice{display:grid;gap:4px;justify-items:center}
.shell-notice strong{display:inline-flex;align-items:center;gap:8px}
.shell-notice p{margin:0;font-size:13px}

/* --- AI campaign create ---------------------------------------------------- */
.campaign-platforms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}

/* --- whatsapp bulk sender -------------------------------------------------- */
.bulk-stats{grid-template-columns:repeat(3,1fr);border-bottom:0}
.bulk-stats-card{margin-bottom:18px}

/* --- report generation ----------------------------------------------------- */
.report-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:22px}
.report-card{padding:20px;display:flex;align-items:center;justify-content:space-between;gap:16px;min-width:0}
.report-card h2{display:flex;align-items:center;gap:9px;font-size:15px;margin:0}
.report-card p{margin:4px 0 0;font-size:12px}
.report-card .btn{flex-shrink:0}

@media(max-width:860px){
  .campaign-platforms,.report-grid{grid-template-columns:minmax(0,1fr)}
  .bulk-stats{grid-template-columns:minmax(0,1fr)}
  .bulk-stats .stat{border-right:0;border-bottom:1px solid #e7edf4}
  .bulk-stats .stat:last-child{border-bottom:0}
  .report-card{flex-direction:column;align-items:flex-start}
}
