/* ═══════════════════════════════════════════════════════════
   NETRO Health shared.css — AI-enabled Digital Public Health
   Design: Dark sidebar · Light content · Health accent colors
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: #f1f5f8; color: #1e293b;
  display: flex; height: 100vh; overflow: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

:root {
  --accent:     #0ea5e9;
  --accent-l:   #0284c7;
  --accent-dim: rgba(14,165,233,.10);
  --health:     #10b981;
  --health-dim: rgba(16,185,129,.10);
  --sidebar-bg: #0f172a;
  --sidebar-w:  240px;
  --surface:    #ffffff;
  --surface-2:  #f8fafc;
  --border:     #e2e8f0;
  --border-2:   #cbd5e1;
  --text-1:     #0f172a;
  --text-2:     #334155;
  --text-3:     #64748b;
  --text-4:     #94a3b8;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);
  --radius: 10px; --radius-sm: 6px; --radius-lg: 14px;
  --transition: 0.18s ease;
}

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); min-width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex; flex-direction: column; height: 100vh;
  overflow: hidden; transition: width var(--transition), min-width var(--transition);
  position: relative; z-index: 100;
  border-right: 1px solid rgba(255,255,255,.06);
}
.sidebar.closed { width: 0; min-width: 0; }
.sb-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.07); flex-shrink: 0;
}
.sb-head{
  /* padding:0 16px; */
  height:var(--topbar);
  display:flex;
  align-items:center;
  gap:10px;
  border-bottom:1px solid var(--border);
  background-color:#fff;
}

/* LOGO */
.sb-logo{
  width:30px;
  height:30px;
  border-radius:8px;
  background:linear-gradient(135deg,#1a2744,#2563eb);
  display:flex;
  align-items:center;
  justify-content:center;
}
.sb-logo-img img{
  width:65%;
  height:65%;
  object-fit:contain;
  margin-left:20px;
}
.sb-logo svg { width: 16px; height: 16px; fill: white; }
.sb-brand { font-family: 'Space Grotesk', sans-serif; font-size: 15px; font-weight: 700; color: #f1f5f9; letter-spacing: -.3px; }
.sb-sub { font-size: 10px; color: #64748b; margin-top: 1px; }
.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 0 6px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.08) transparent; }
.sb-nav::-webkit-scrollbar { width: 4px; }
.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }
.sb-section-lbl { font-size: 9.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #475569; padding: 10px 16px 4px; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 8px 14px; margin: 1px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 500; color: #94a3b8; white-space: nowrap; transition: background var(--transition), color var(--transition); cursor: pointer; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #e2e8f0; }
.nav-item.active { background: rgba(14,165,233,.18); color: #7dd3fc; }
.nav-item.active .ni-icon { stroke: #7dd3fc; }
.ni-icon { width: 15px; height: 15px; flex-shrink: 0; stroke: #64748b; transition: stroke var(--transition); }
.nav-item:hover .ni-icon { stroke: #e2e8f0; }
.sb-footer { padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); flex-shrink: 0; }
.user-row { display: flex; align-items: center; gap: 9px; }
.user-ava { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #0c4a6e, #0ea5e9); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: white; flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 600; color: #e2e8f0; }
.user-role { font-size: 10px; color: #64748b; margin-top: 1px; }

/* MAIN */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; transition: all var(--transition); }
.topbar { display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 52px; background: var(--surface); border-bottom: 1px solid var(--border); flex-shrink: 0; box-shadow: 0 1px 0 var(--border); }
.tb-menu { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-3); transition: background var(--transition), color var(--transition); flex-shrink: 0; }
.tb-menu:hover { background: var(--surface-2); color: var(--text-1); }
.tb-title { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 700; color: var(--text-1); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-pill { display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px; background: rgba(14,165,233,.08); border: 1px solid rgba(14,165,233,.18); font-size: 11px; font-weight: 500; color: #0284c7; flex-shrink: 0; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .6; transform: scale(.85); } }
.tb-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.tb-time { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--text-3); }
.tb-btn { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 14px; transition: background var(--transition); }
.tb-btn:hover { background: var(--border); }
.content { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 3px; }
.page-animate { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* CARDS */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.is-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); transition: all var(--transition); }
.is-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.is-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.is-val { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 700; line-height: 1; }
.is-lbl { font-size: 10.5px; color: var(--text-3); margin-top: 2px; font-weight: 500; }
.dash-banner { background: linear-gradient(135deg, #0f172a 0%, #0c4a6e 55%, #0369a1 100%); border-radius: var(--radius-lg); padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: white; box-shadow: var(--shadow-md); }
.dash-banner h2 { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.dash-banner p { font-size: 12px; opacity: .75; line-height: 1.5; }
.dash-banner-right { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }
.db-pill { padding: 4px 10px; border-radius: 20px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.cult-btn { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: all var(--transition); cursor: pointer; }
.cult-btn:hover { box-shadow: var(--shadow-md); transform: translateX(2px); }
.cult-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cult-title { font-size: 12.5px; font-weight: 700; color: var(--text-1); }
.cult-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.fc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 15px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-sm); }
.fc-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fc-icon svg { width: 16px; height: 16px; fill: white; }
.fc-title { font-size: 12px; font-weight: 700; color: var(--text-1); }
.fc-sub { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

/* MAP */
.map-box { border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.map-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); }
.layer-panel { margin-bottom: 10px; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.layer-panel-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--text-3); margin-bottom: 7px; }
.layer-checks { display: flex; gap: 7px; flex-wrap: wrap; }
.layer-check { position: relative; display: flex; align-items: center; cursor: pointer; }
.layer-check input { position: absolute; opacity: 0; width: 0; }
.lc-content { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); font-size: 11.5px; font-weight: 500; color: var(--text-2); transition: all var(--transition); cursor: pointer; user-select: none; }
.lc-content:hover { border-color: var(--border-2); background: var(--surface-2); }
.lc-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lc-box { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid var(--border-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all var(--transition); }
.layer-check input:checked + .lc-content { background: rgba(14,165,233,.06); border-color: rgba(14,165,233,.3); color: var(--text-1); }
.layer-check input:checked + .lc-content .lc-box { background: var(--accent); border-color: var(--accent); }
.layer-check input:checked + .lc-content .lc-box::after { content: ''; display: block; width: 5px; height: 3px; border-left: 1.5px solid white; border-bottom: 1.5px solid white; transform: rotate(-45deg) translateY(-1px); }

/* TABS */
.tab-bar { display: flex; gap: 6px; padding: 3px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.tab-btn { padding: 7px 13px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--text-3); transition: all var(--transition); white-space: nowrap; display: flex; align-items: center; gap: 5px; }
.tab-btn:hover { background: var(--surface-2); color: var(--text-2); }
.tab-btn.active { background: var(--text-1); color: white; box-shadow: var(--shadow-sm); }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { text-align: left; padding: 8px 12px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.data-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.data-table tr:hover td { background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: none; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px; font-size: 10.5px; font-weight: 600; }
.badge-green  { background: rgba(16,185,129,.1);  color: #059669; }
.badge-red    { background: rgba(220,38,38,.1);   color: #b91c1c; }
.badge-orange { background: rgba(217,119,6,.1);   color: #b45309; }
.badge-blue   { background: rgba(14,165,233,.1);  color: #0284c7; }
.badge-purple { background: rgba(124,58,237,.1);  color: #6d28d9; }
.badge-cyan   { background: rgba(8,145,178,.1);   color: #0e7490; }
.badge-pink   { background: rgba(219,39,119,.1);  color: #be185d; }

/* FORM */
.form-input { width: 100%; padding: 8px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 13px; color: var(--text-1); background: var(--surface); transition: border-color var(--transition), box-shadow var(--transition); outline: none; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14,165,233,.12); }
.form-label { font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; display: block; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2394a3b8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: var(--radius-sm); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all var(--transition); border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: white; box-shadow: 0 2px 8px rgba(14,165,233,.3); }
.btn-primary:hover { background: #0284c7; box-shadow: 0 4px 12px rgba(14,165,233,.4); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-2); }
.btn-danger { background: #DC2626; color: white; }
.btn-danger:hover { background: #b91c1c; }

/* ALERTS */
.alert-strip { padding: 9px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.alert-strip.warning { background: rgba(217,119,6,.08); border: 1px solid rgba(217,119,6,.22); color: #92400e; }
.alert-strip.danger  { background: rgba(220,38,38,.07);  border: 1px solid rgba(220,38,38,.2);  color: #991b1b; }
.alert-strip.info    { background: rgba(14,165,233,.07);  border: 1px solid rgba(14,165,233,.2);  color: #0c4a6e; }
.alert-strip.success { background: rgba(16,185,129,.07);  border: 1px solid rgba(16,185,129,.2);  color: #065f46; }

/* UTILITY */
.divider { height: 1px; background: var(--border); margin: 12px 0; }
.text-muted { color: var(--text-3); } .text-sm { font-size: 11.5px; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.pg-header { display: flex; flex-direction: column; }
.main.full { }
@media (max-width: 900px) { .sidebar { width: 0; min-width: 0; } }

/* LEAFLET */
.leaflet-container { font-family: 'DM Sans', sans-serif !important; }
.leaflet-popup-content-wrapper { border-radius: 10px !important; box-shadow: var(--shadow-md) !important; font-size: 12px; }
.leaflet-tooltip { font-size: 11.5px; padding: 5px 10px; border-radius: 6px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.leaflet-control-zoom { border: 1px solid var(--border) !important; border-radius: 8px !important; overflow: hidden; }
.leaflet-control-zoom a { width: 28px !important; height: 28px !important; line-height: 28px !important; font-size: 16px !important; }
