/* ════════════════════════════════════════════════
   LAYOUT  –  navbar, app-layout, sidebar, content
════════════════════════════════════════════════ */

/* ── Navbar ─────────────────────────────────── */
.navbar {
  height: var(--h-nav);
  background: rgba(13, 21, 37, .97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 6px;
  flex-shrink: 0;
  z-index: 400;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 18px;
  border-right: 1px solid var(--clr-border);
  margin-right: 2px;
}

.navbar__brand-icon {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
  box-shadow: 0 0 16px rgba(99, 102, 241, .45);
  flex-shrink: 0;
}

.navbar__brand-name { font-size: 13px; font-weight: 800; letter-spacing: .3px; }
.navbar__brand-sub  { font-size: 10px; font-weight: 400; color: var(--clr-sub); margin-top: 1px; }

/* Centre title – fills remaining space between brand and actions */
.navbar__title {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 13.5px; font-weight: 600; color: var(--clr-text);
  letter-spacing: .1px;
}

.navbar__actions { display: flex; align-items: center; gap: 7px; }

/* ── App root layout ─────────────────────────── */
.app-layout { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  width: var(--w-side);
  background: var(--clr-surface);
  border-right: 1px solid var(--clr-border);
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow-y: auto;
}

.sidebar__header {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--clr-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}

.sidebar__header-left {
  display: flex; align-items: center; gap: 8px;
}

.sidebar__title {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--clr-sub);
  display: flex; align-items: center; gap: 6px;
}

.sidebar__body { flex: 1; padding: 11px; display: flex; flex-direction: column; gap: 9px; }

.sidebar__footer {
  padding: 11px;
  border-top: 1px solid var(--clr-border);
  display: flex; flex-direction: column; gap: 6px;
}

/* ── Filter group ────────────────────────────── */
.filter-group { display: flex; flex-direction: column; gap: 3px; }

.filter-group__label {
  font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--clr-dim);
}

.filter-group__select {
  width: 100%;
  padding: 7px 26px 7px 9px;
  background: var(--clr-raised);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text); font-size: 12px;
  font-family: 'Quicksand', sans-serif;
  outline: none; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%234d607e'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
}
.filter-group__select:focus  { border-color: var(--clr-blue); box-shadow: 0 0 0 3px rgba(79,145,247,.12); }
.filter-group__select option { background: var(--clr-raised); color: var(--clr-text); }

/* Light theme: swap the chevron arrow colour to a darker shade */
[data-theme="light"] .filter-group__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M0 0l4 5 4-5z' fill='%233d5270'/%3E%3C/svg%3E");
}

/* ── Content area ────────────────────────────── */
.content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.content__header {
  height: 46px; padding: 0 16px;
  border-bottom: 1px solid var(--clr-border);
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; background: var(--clr-surface);
}

.content__title {
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}

.content__meta {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; color: var(--clr-sub);
}
.content__meta span { display: flex; align-items: center; gap: 4px; }

/* ── Dashboard body (scrollable) ─────────────── */
.dash-body {
  flex: 1;
  overflow-y: auto; overflow-x: hidden;
  padding: var(--gap);
  display: flex; flex-direction: column; gap: var(--gap);
}

/* Prevent flex from squashing fixed-height sections (map, charts, table).
   Without this, flex-shrink:1 (default) compresses everything to fit the
   viewport and the table disappears below the fold. */
.dash-body > * { flex-shrink: 0; }

/* ── Section label divider ───────────────────── */
.section-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--clr-dim);
  display: flex; align-items: center; gap: 7px;
  margin-bottom: -2px;
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--clr-border); }
