/* ---------------------------------------------------------------------
   Feedspoke - styling rebuilt to match the pixel-level mockups
   (login, brand catalog, brand detail, product detail). Colors,
   spacing, and type all live here as CSS custom properties.
   ------------------------------------------------------------------- */

:root {
  --bg: #F5F6F8;
  --surface: #FFFFFF;
  --surface-sunken: #FAFBFC;
  --border: #E3E6EB;
  --border-strong: #CDD3DC;

  --text-primary: #1A1E27;
  --text-secondary: #5C6472;
  --text-tertiary: #8A93A3;

  --accent: #2E5AA8;
  --accent-hover: #244A8C;
  --accent-soft: #EAF0FA;

  --success: #1E8A5F;
  --success-soft: #E7F5EE;
  --warning: #B0741B;
  --warning-soft: #FBF1E1;
  --danger: #B0392E;
  --danger-soft: #FBEAE8;

  --focus-ring: #2E5AA8;
  --shadow-sm: 0 1px 2px rgba(20,25,35,0.06);
  --shadow-md: 0 4px 16px rgba(20,25,35,0.08);
  --shadow-lg: 0 12px 32px rgba(20,25,35,0.10);

  --chart-1: #2E5AA8;
  --chart-2: #6B4FA0;
  --chart-3: #1E8A5F;
  --chart-4: #B0741B;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Keeps the footer pinned to the bottom of the screen on short pages
   (e.g. a group with one brand) while still flowing after the content
   normally on long pages - the header/content/footer stack fills at
   least the full viewport height, and the content area (<main>) is the
   one piece that grows to take up whatever space is left over. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.tabular { font-variant-numeric: tabular-nums; }

h1, h2, h3 { margin: 0; }
p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 var(--space-6);
  height: 56px;
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.topbar-right { display: flex; align-items: center; gap: var(--space-4); }

.beta-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 4px;
}

.account {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: var(--space-4);
  border-left: 1px solid var(--border);
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  flex: none;
}

.account__signout {
  color: var(--text-tertiary);
  font-size: 12px;
  margin-left: var(--space-2);
}

/* ---------- Page shell ---------- */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 64px;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn:hover { border-color: var(--text-tertiary); text-decoration: none; }

.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  flex: none;
  font-family: inherit;
}

.icon-btn:hover { background: var(--surface-sunken); color: var(--text-primary); }

/* A small label that only appears on hover/focus, for an icon-only
   button whose action isn't obvious from the icon alone (e.g. the
   plain download arrow for "Export as CSV"). */
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  background: var(--text-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 30;
}
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; }

/* The floating "not built yet" note shown by showComingSoon() in
   base.html - positioned relative to whichever button it's placed on. */
.coming-soon-note {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--text-primary);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 30;
}

/* ---------- Cards / panels (generic) ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.panel-title { font-size: 13px; font-weight: 600; margin: 0 0 2px; }
.panel-sub { font-size: 12px; color: var(--text-tertiary); margin: 0 0 16px; }

/* ---------------------------------------------------------------------
   Login screen
   ------------------------------------------------------------------- */

.login-screen {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background-image:
    radial-gradient(circle at 18% 12%, var(--accent-soft), transparent 40%),
    radial-gradient(circle at 84% 88%, var(--accent-soft), transparent 42%);
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.login-brandrow { display: flex; align-items: center; gap: 9px; }
.login-brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 15px; }
.login-brand-word { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }

.login-card {
  width: 100%;
  box-shadow: var(--shadow-lg);
  padding: 30px 30px 26px;
}

.login-card__head { text-align: center; margin-bottom: 20px; }
.login-card__title { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.login-card__subtitle { margin: 0; font-size: 13px; color: var(--text-secondary); }

.beta-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.35;
}

.beta-banner svg { flex: none; }

.login-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.01em; }

.field input {
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.field input::placeholder { color: var(--text-tertiary); }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--surface); }
.field input.err { border-color: var(--danger); }
.field input.err:focus { box-shadow: 0 0 0 3px var(--danger-soft); }

.err-msg { font-size: 12px; color: var(--danger); margin-top: 2px; display: none; }
.err-msg.show { display: block; }

.btn-signin {
  margin-top: 6px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 10px 14px;
  cursor: pointer;
}

.btn-signin:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-signin[disabled] { opacity: 0.65; cursor: default; }

.footer-note { font-size: 12px; color: var(--text-tertiary); text-align: center; }

/* ---------- Empty / placeholder states ---------- */

.product-table__empty {
  text-align: center;
  color: var(--text-secondary);
  padding: var(--space-7);
}

.group-section__empty { color: var(--text-secondary); font-size: 13px; }

/* ---------------------------------------------------------------------
   Dashboard: group sidebar + main panel
   ------------------------------------------------------------------- */

.dashboard-layout {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 64px;
}

.group-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: calc(22px + 56px);
}

.group-sidebar__search-wrap { margin-bottom: var(--space-3); max-width: none; }

.group-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.group-sidebar__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.group-sidebar__item:hover { background: var(--surface-sunken); text-decoration: none; color: var(--text-primary); }

.group-sidebar__item--active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.group-sidebar__item-count { font-size: 11px; color: var(--text-tertiary); }
.group-sidebar__item--active .group-sidebar__item-count { color: var(--accent); }

.group-main-panel { flex: 1; min-width: 0; }

.group-section__header { margin-bottom: var(--space-4); }

.group-section__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.page-title { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 2px; }
.page-sub { margin: 0; color: var(--text-secondary); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.brand-website-link { display: inline-block; margin-top: 4px; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.brand-website-link:hover { text-decoration: underline; }

/* ---------- Summary pills ---------- */

.summary-strip { display: flex; gap: 10px; flex-wrap: wrap; margin: var(--space-4) 0 var(--space-5); }

.summary-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 14px;
  min-width: 104px;
  box-shadow: var(--shadow-sm);
}

.summary-pill .num { font-family: "IBM Plex Mono", monospace; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.summary-pill .lbl { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.03em; }

/* ---------- Brand cards (dashboard) ---------- */

.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.brand-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
  color: var(--text-primary);
  cursor: pointer;
}

.brand-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.brand-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.brand-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }

.brand-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.chart-color-1 { background: var(--chart-1); }
.chart-color-2 { background: var(--chart-2); }
.chart-color-3 { background: var(--chart-3); }
.chart-color-4 { background: var(--chart-4); }

.brand-stats { display: flex; gap: 18px; }
.brand-stat .num { font-family: "IBM Plex Mono", monospace; font-size: 17px; font-weight: 600; line-height: 1.1; }
.brand-stat .lbl { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.brand-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}



/* ---------------------------------------------------------------------
   Brand detail: breadcrumb, header, charts, product table
   ------------------------------------------------------------------- */

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-tertiary); margin-bottom: 14px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-tertiary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .current { color: var(--text-secondary); font-weight: 500; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 8px; flex-wrap: wrap; }
.head-left { display: flex; align-items: center; gap: 12px; }

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  flex: none;
}

.charts-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; margin-bottom: 26px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.bar-row:last-child { margin-bottom: 0; }
.bar-label { width: 112px; flex: none; font-size: 12.5px; color: var(--text-secondary); text-align: right; }
.bar-track { flex: 1; height: 9px; background: var(--surface-sunken); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; }
.bar-val { width: 40px; flex: none; font-size: 12px; text-align: right; }

.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 18px; }
.doc-item { display: flex; flex-direction: column; gap: 6px; }
.doc-item-top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; }
.doc-item-top .name { color: var(--text-secondary); }
.doc-item-top .pct { font-weight: 600; }
.doc-track { height: 7px; background: var(--surface-sunken); border-radius: 4px; overflow: hidden; }
.doc-fill { height: 100%; border-radius: 4px; background: var(--success); }
.doc-fill.mid { background: var(--warning); }
.doc-fill.low { background: var(--danger); }

/* ---------- Toolbar ---------- */

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.product-filters-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.search {
  flex: 1 1 220px;
  max-width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 12px;
}

.search svg { color: var(--text-tertiary); flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 13px; color: var(--text-primary); font-family: inherit; }
.search input::placeholder { color: var(--text-tertiary); }

.filtersel {
  font-family: inherit;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 8px 30px 8px 12px;
  cursor: pointer;
  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='M1 1l4 4 4-4' stroke='%235C6472' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.spacer { flex: 1; }
.result-count { font-size: 12.5px; color: var(--text-tertiary); white-space: nowrap; }

/* ---------- Product table ---------- */

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 10px 14px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

thead th[hx-get] { cursor: pointer; user-select: none; }
thead th[hx-get]:hover { color: var(--text-secondary); }
.arrow { margin-left: 4px; opacity: 0.5; font-size: 10px; }

tbody tr.prow { border-bottom: 1px solid var(--border); cursor: pointer; }
tbody tr.prow:hover { background: var(--surface-sunken); }
tbody tr.prow.open { background: var(--surface-sunken); }
tbody td { padding: 11px 14px; vertical-align: middle; }

.pname { font-weight: 600; }
.pname-link { color: var(--accent); }
.pname-link:hover { text-decoration: underline; }

.pill { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--accent-soft); color: var(--accent); }
.pill-success { background: var(--success-soft); color: var(--success); }
.dash { color: var(--text-tertiary); }

.chev { width: 14px; height: 14px; color: var(--text-tertiary); transition: transform 0.12s ease; }
tr.prow.open .chev { transform: rotate(90deg); }

tr.expand-row td { padding: 0; border-bottom: 1px solid var(--border); }
.expand-inner { display: none; padding: 16px 20px 20px 46px; background: var(--surface-sunken); }
tr.expand-row.open .expand-inner { display: block; }

.img-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.img-card { width: 88px; text-align: center; }

.img-thumb {
  width: 88px;
  height: 88px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  position: relative;
  overflow: hidden;
}

.img-thumb.primary { border-color: var(--accent); border-width: 2px; }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.primary-tag {
  position: absolute;
  top: 3px;
  left: 3px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  z-index: 1;
}

/* ---------------------------------------------------------------------
   Product detail page
   ------------------------------------------------------------------- */

.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.head-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.head-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.tag { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; }
.tag-cat { background: var(--surface-sunken); border: 1px solid var(--border); color: var(--text-secondary); }
.tag-quickship { background: var(--success-soft); color: var(--success); }
.tag-new { background: var(--accent-soft); color: var(--accent); }

.layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

.gallery-main {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb-strip { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  cursor: pointer;
  flex: none;
  overflow: hidden;
}

.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: var(--accent); border-width: 2px; }
.thumb:hover { border-color: var(--accent); }

.section { margin-bottom: 26px; }
.section:last-child { margin-bottom: 0; }
.section-title { font-size: 13px; font-weight: 600; margin: 0 0 10px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-tertiary); }
.desc { font-size: 14px; color: var(--text-primary); margin: 0; max-width: 60ch; }

.resource-list { display: flex; flex-direction: column; gap: 8px; }

.resource-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.resource-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.resource-info { flex: 1; min-width: 0; }
.resource-name { font-weight: 600; font-size: 13px; }
.resource-meta { font-size: 11.5px; color: var(--text-tertiary); }
.document-list__primary-tag { font-size: 10.5px; color: var(--text-tertiary); font-weight: 600; }

.resource-view {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  flex: none;
}

.resource-view:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */

@media (max-width: 800px) {
  .charts-row { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .page, .dashboard-layout { padding: 18px 16px 48px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 640px; }
  .dashboard-layout { flex-direction: column; }
  .group-sidebar { width: 100%; position: static; }
}


/* ---------- Footer (every page) ---------- */

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

.app-footer__mark { height: 16px; width: auto; opacity: 0.85; }
