/* admin.css — shared chrome + components for the Communities admin mockups.
   Colors/radii/shadows come from gozo-tokens.css variables. */

/* Avatar palette muted for dark: white-opacity + orange-tinted variants.
   Hierarchy comes from opacity, never new hues (DS 2.0). */
:root {
  --av-teal: var(--gozo-teal);
  --av-green: var(--gozo-text-muted);
  --av-tan: var(--gozo-teal-hover);
  --av-purple: var(--gozo-text-muted);
  --av-orange: var(--gozo-teal);
  --av-blue: var(--gozo-text-muted);
  --av-rose: var(--gozo-teal-hover);
  --av-gold: var(--gozo-teal-hover);
  --gozo-teal-ink: var(--gozo-teal);
}

html, body { margin: 0; padding: 0; }
body.gozo { background: var(--gozo-bg); font-size: 14px; }
.gozo a { text-decoration: none; color: inherit; }
.gozo h1, .gozo h2, .gozo h3, .gozo h4, .gozo p { margin: 0; }
.gozo svg { flex-shrink: 0; }

/* ─── Desktop shell ─────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--gozo-card); border-right: 1px solid var(--gozo-border);
  padding: 24px 16px 16px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--gozo-teal);
  display: grid; place-items: center; color: var(--gozo-text-on-teal); font-weight: 700; font-size: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.logo-word { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: var(--gozo-teal); }
.logo-test {
  background: var(--gozo-test); color: var(--gozo-text-on-teal); font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 5px; letter-spacing: 0.5px;
}
.sidebar-search { margin: 0 8px; display: flex; align-items: center; gap: 10px;
  background: var(--gozo-bg); border-radius: var(--r-md); padding: 10px 14px;
  color: var(--gozo-text-soft); font-size: 14px; }

.sidenav { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.sidenav-group-label { font-size: 13px; font-weight: 700; color: var(--gozo-text-muted); padding: 4px 12px; margin-bottom: 4px; }
.sidenav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 10px; color: var(--gozo-text); font-weight: 500; font-size: 14px; cursor: pointer;
}
.sidenav-item svg { color: var(--gozo-text-muted); }
.sidenav-item .caret { margin-left: auto; color: var(--gozo-text-soft); }
.sidenav-item span { flex: 1; }
.sidenav-item.active { background: var(--gozo-teal-soft-2); color: var(--gozo-teal-ink); font-weight: 700; }
.sidenav-item.active svg { color: var(--gozo-teal-ink); }
.sidenav-sub { padding-left: 36px; display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.sidenav-sub a { padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500; color: var(--gozo-text-muted); }
.sidenav-sub a.active { background: var(--gozo-teal-soft); color: var(--gozo-teal-ink); font-weight: 700; }
.sidebar-footer { padding: 0 12px; font-size: 12px; color: var(--gozo-text-soft); line-height: 1.4; }
.version-pill {
  margin-top: 8px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--gozo-bg); padding: 3px 10px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; color: var(--gozo-text-muted);
}
.version-pill .dot { width: 6px; height: 6px; background: var(--gozo-success); border-radius: 50%; }

.main { display: flex; flex-direction: column; min-width: 0; }
.index-link { margin: 16px 24px 0; font-size: 13px; font-weight: 700; color: var(--gozo-text-muted); }
.index-link:hover { color: var(--gozo-teal-ink); }
.topbar {
  background: var(--gozo-card); border-radius: 14px; margin: 16px 24px 24px; padding: 20px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: var(--sh-card);
}
.topbar-title { font-size: 22px; font-weight: 700; }
.topbar-subtitle { font-size: 13px; color: var(--gozo-text-muted); margin-top: 4px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.userchip { display: flex; align-items: center; gap: 10px; }
.userchip .caret { color: var(--gozo-text-soft); }
.userchip-name { font-size: 14px; font-weight: 700; }
.userchip-mail { font-size: 12px; color: var(--gozo-text-muted); }
.avatar-wrap { position: relative; }
.online-dot {
  position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gozo-success); border: 2px solid var(--gozo-card);
}

.event-strip {
  margin: 0 24px 20px; padding: 10px 28px; background: var(--gozo-teal-ghost); border: 1px solid var(--gozo-border);
  display: flex; align-items: center; justify-content: space-between; border-radius: var(--r-sm);
  color: var(--gozo-teal); font-weight: 700;
}
.event-strip .left { display: flex; align-items: center; gap: 10px; }
.event-strip .change { font-size: 13px; cursor: pointer; }

.content { flex: 1; padding: 0 24px 32px; }

/* ─── Avatars ───────────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.avatar.s40 { width: 40px; height: 40px; font-size: 16px; }
.avatar.s42 { width: 42px; height: 42px; font-size: 17px; }
.avc-teal   { background: var(--gozo-teal-soft);        color: var(--gozo-teal); }
.avc-green  { background: rgba(15,23,42,0.05);       color: var(--gozo-text-muted); }
.avc-tan    { background: rgba(15,23,42,0.05);         color: var(--gozo-teal-hover); }
.avc-purple { background: rgba(15,23,42,0.04);       color: var(--gozo-text-muted); }
.avc-orange { background: var(--gozo-teal-soft);        color: var(--gozo-teal); }
.avc-blue   { background: rgba(15,23,42,0.05);       color: var(--gozo-text-muted); }
.avc-rose   { background: rgba(15,23,42,0.05);         color: var(--gozo-teal-hover); }

/* ─── Pills ─────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.success { background: var(--gozo-success-bg); color: var(--gozo-success-text); }
.pill.warning { background: var(--gozo-warning-bg); color: var(--gozo-warning-text); }
.pill.danger  { background: var(--gozo-danger-bg);  color: var(--gozo-danger-text); }
.pill.info    { background: var(--gozo-info-bg);    color: var(--gozo-info); }
.pill.neutral { background: rgba(15,23,42,0.05); color: var(--gozo-text-muted); }
.pill.purple  { background: var(--gozo-purple-bg);  color: var(--gozo-purple); }
.pill.teal    { background: var(--gozo-teal-soft);  color: var(--gozo-teal-ink); }

/* ─── Icon tiles ────────────────────────────────────────────────── */
.itile { border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; }
.itile.s36 { width: 36px; height: 36px; }
.itile.s40 { width: 40px; height: 40px; }
.itile.s44 { width: 44px; height: 44px; border-radius: var(--r-md); }
.itile.teal    { background: var(--gozo-teal-soft);  color: var(--gozo-teal); }
.itile.info    { background: var(--gozo-info-bg);    color: var(--gozo-info); }
.itile.warning { background: var(--gozo-warning-bg); color: var(--gozo-warning-text); }
.itile.purple  { background: var(--gozo-purple-bg);  color: var(--gozo-purple); }
.itile.success { background: var(--gozo-success-bg); color: var(--gozo-success); }
.itile.danger  { background: var(--gozo-danger-bg);  color: var(--gozo-danger); }
/* soft tints, muted for dark */
.itile.t-teal   { background: var(--gozo-teal-soft);   color: var(--gozo-teal); }
.itile.t-green  { background: rgba(15,23,42,0.05);  color: var(--gozo-text-muted); }
.itile.t-tan    { background: rgba(15,23,42,0.05);    color: var(--gozo-teal-hover); }
.itile.t-purple { background: rgba(15,23,42,0.04);  color: var(--gozo-text-muted); }
.itile.t-orange { background: var(--gozo-teal-soft);   color: var(--gozo-teal); }
.itile.t-blue   { background: rgba(15,23,42,0.05);  color: var(--gozo-text-muted); }
.itile.t-info   { background: var(--gozo-info-bg);     color: var(--gozo-info); }
.itile.t-warn   { background: var(--gozo-warning-bg);  color: var(--gozo-warning); }
.itile.t-danger { background: var(--gozo-danger-bg);   color: var(--gozo-danger); }
.itile.t-muted  { background: rgba(15,23,42,0.04);  color: var(--gozo-text-muted); }
.itile.on-dark  { background: rgba(15,23,42,0.07); color: var(--gozo-text); }

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r-md); border: none;
  font-weight: 700; font-size: 14px; background: var(--gozo-teal); color: var(--gozo-text-on-teal); cursor: pointer;
}
.btn:hover { background: var(--gozo-teal-hover); }
.btn.sm { height: 36px; padding: 0 16px; border-radius: 10px; font-size: 13px; }
.btn.md { height: 40px; padding: 0 18px; border-radius: 10px; font-size: 13px; }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 16px; border-radius: var(--r-md);
  background: var(--gozo-card); border: 1px solid var(--gozo-border);
  font-weight: 700; font-size: 14px; color: var(--gozo-text); cursor: pointer;
}
.btn-secondary:hover { background: var(--gozo-bg); }
.btn-secondary.sm { height: 36px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.btn-secondary.md { height: 40px; padding: 0 14px; border-radius: 10px; font-size: 13px; }
.btn-secondary.strong { border-color: var(--gozo-border-strong); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 10px; background: transparent;
  color: var(--gozo-teal); border: 1.5px solid var(--gozo-teal);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.btn-ghost:hover { background: var(--gozo-teal-soft); }
.btn-on-dark {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(15,23,42,0.07);
  border: none; color: var(--gozo-text); padding: 10px 16px; border-radius: 10px;
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.icon-btn { width: 32px; height: 32px; background: transparent; border: none; border-radius: var(--r-sm);
  display: inline-grid; place-items: center; color: var(--gozo-text-muted); cursor: pointer; }
.count-badge { background: var(--gozo-teal-soft); color: var(--gozo-teal); padding: 1px 7px; border-radius: var(--r-pill); font-size: 11px; }

/* ─── Cards / stats ─────────────────────────────────────────────── */
.gz-card { box-sizing: border-box; }
.card-pad { padding: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.stat-card .top { display: flex; align-items: center; justify-content: space-between; }
.stat-card .top .more { color: var(--gozo-text-soft); }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.stat-label { font-size: 13px; color: var(--gozo-text-muted); }
.stat-delta { font-size: 12px; color: var(--gozo-success-text); font-weight: 700; }

.card-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-h h3 { font-size: 16px; }
.link-teal { color: var(--gozo-teal); font-size: 13px; font-weight: 700; cursor: pointer; }

.hero-dark {
  background: #F8FAFC; /* slate-50 — flat sketch surface (was dark hero) */
  color: var(--gozo-text); border: 1px solid var(--gozo-border); border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
}
.hero-kpi-label { font-size: 11px; color: var(--gozo-teal); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.hero-divided { border-left: 1px solid var(--gozo-border); padding-left: 24px; }

/* ─── Tables ────────────────────────────────────────────────────── */
.tbl { padding: 0; overflow: hidden; }
.tbl-head {
  display: grid; padding: 14px 22px; border-bottom: 1px solid var(--gozo-divider);
  font-size: 12px; font-weight: 700; color: var(--gozo-text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tbl-row { display: grid; padding: 16px 22px; border-bottom: 1px solid var(--gozo-divider); align-items: center; }
.tbl-row:last-of-type { border-bottom: none; }
.tr-right { text-align: right; }
.cell-main { font-weight: 700; font-size: 15px; }
.cell-sub { font-size: 12px; color: var(--gozo-text-muted); margin-top: 2px; }
.cell-entity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.muted { color: var(--gozo-text-muted); }
.soft { color: var(--gozo-text-soft); }
.empty-dash { color: var(--gozo-text-soft); font-weight: 500; }

/* ─── Tabs ──────────────────────────────────────────────────────── */
.tabbar {
  display: flex; gap: 4px; background: var(--gozo-card); border-radius: 14px; padding: 6px;
  margin-bottom: 20px; border: 1px solid var(--gozo-border); overflow-x: auto;
}
.tab {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px;
  color: var(--gozo-text-muted); font-weight: 700; font-size: 14px; white-space: nowrap;
}
.tab[aria-current="page"] { background: var(--gozo-teal-soft); color: var(--gozo-teal-ink); }
.tab-badge { background: var(--gozo-border); color: var(--gozo-text-muted); padding: 1px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; }
.tab[aria-current="page"] .tab-badge { background: var(--gozo-teal); color: var(--gozo-text-on-teal); }

/* ─── Toggles ───────────────────────────────────────────────────── */
.toggle { width: 44px; height: 26px; border-radius: var(--r-pill); background: var(--gozo-border-strong); position: relative; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; }
.toggle.on { background: var(--gozo-teal); }
.toggle.on::after { left: 21px; }
.toggle.sm { width: 36px; height: 22px; }
.toggle.sm::after { top: 2px; left: 2px; width: 18px; height: 18px; }
.toggle.sm.on::after { left: 16px; }

/* ─── Misc shared bits ──────────────────────────────────────────── */
.row { display: flex; align-items: center; }
.grow { flex: 1; min-width: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--gozo-divider); }
.list-row:last-of-type { border-bottom: none; }
.kv-row { display: flex; justify-content: space-between; font-size: 13px; }
.chip-pick {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill);
  border: 1.5px solid var(--gozo-border); background: var(--gozo-card);
  color: var(--gozo-text-muted); font-weight: 700; font-size: 13px;
}
.chip-pick.on { border-color: var(--gozo-teal); background: var(--gozo-teal-soft); color: var(--gozo-teal-ink); }
.filter-pill { padding: 8px 14px; border-radius: var(--r-pill); background: transparent; border: none;
  color: var(--gozo-text-muted); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.filter-pill.active { background: var(--gozo-teal-soft); color: var(--gozo-teal-ink); }
.searchbox { display: flex; align-items: center; gap: 10px; color: var(--gozo-text-soft); font-size: 13px; }
.share-track { height: 6px; background: var(--gozo-bg); border-radius: 3px; overflow: hidden; }
.share-fill { height: 100%; background: var(--gozo-teal); }
.flow-chart, .bar-chart { width: 100%; height: 180px; display: block; }
.donut { width: 100%; height: 180px; display: block; }
.heatmap { width: 100%; height: auto; display: block; }

/* Color utilities for standalone icons/text */
.c-teal { color: var(--gozo-teal); }
.c-teal-ink { color: var(--gozo-teal-ink); }
.c-soft { color: var(--gozo-text-soft); }
.c-muted { color: var(--gozo-text-muted); }
.c-info { color: var(--gozo-info); }
.c-danger { color: var(--gozo-danger); }
.c-success { color: var(--gozo-success-text); }
.c-text { color: var(--gozo-text); }

/* ─── Hub page ──────────────────────────────────────────────────── */
.hub { max-width: 1080px; margin: 0 auto; padding: 48px 24px 64px; }
.hub-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hub h1 { font-size: 28px; font-weight: 700; }
.hub-sub { color: var(--gozo-text-muted); margin: 6px 0 28px; }
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hub-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--gozo-card); box-shadow: var(--sh-card); }
.hub-card:hover { box-shadow: var(--sh-card-hover); }
.hub-card .num { font-size: 12px; font-weight: 700; color: var(--gozo-text-soft); letter-spacing: 0.5px; }
.hub-card h2 { font-size: 16px; font-weight: 700; }
.hub-card p { font-size: 13px; color: var(--gozo-text-muted); line-height: 1.45; }
