/* ============================================================
   SECTION 1: Reset & typography
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

h1, h2, h3 {
  font-weight: 600;
  color: var(--text);
  margin: 0 0 var(--space-sm);
}
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }

p { margin: 0 0 var(--space-sm); }

a {
  color: inherit;
  text-decoration: none;
}

svg {
  overflow: visible;
}


/* ============================================================
   SECTION 2: CSS variables (:root)
   ============================================================ */
:root {
  /* Block-1 base tokens (cascade fallbacks for bypass-body elements) */
  --bg: #000000;
  --panel: var(--social-bg);
  --panel-soft: #0a0a0a;
  --hover: rgba(255, 255, 255, 0.08);
  --pill: 999px;
  --code-bg: var(--panel);
  --accent-bg: rgba(29, 155, 240, 0.1);
  --accent-border: rgba(29, 155, 240, 0.5);
  --shadow: rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
  --danger: #f44336;
  --success: #4caf50;
  --warning: #ff9800;
  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;
  --radius: 8px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Block-2 token overrides (cascade-true, second block wins) */
  --lime: #d8fb35;
  --lime-soft: #c9ef32;
  --text: rgba(248, 252, 250, 0.96);
  --muted: rgba(235, 244, 240, 0.74);
  --soft-text: rgba(234, 244, 239, 0.56);
  --main-bg: rgba(33, 80, 74, 0.26);
  --main-bg-2: rgba(19, 54, 53, 0.18);
  --border: rgba(19, 54, 53, 0.78);
  --column-bg: rgba(25, 46, 48, 0.14);
  --column-bg-2: rgba(22, 58, 57, 0.10);
  --inner-card-bg: rgba(255, 255, 255, 0.05);
  --social-bg: rgba(22, 24, 28, 0.5);
  --stroke: rgba(255, 255, 255, 0.16);
  --stroke-soft: rgba(255, 255, 255, 0.11);
  --stroke-strong: rgba(255, 255, 255, 0.20);
  --shadow-main: 0 24px 60px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.14);
  --glow-lime: 0 0 20px rgba(216, 251, 53, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 15px;

  /* GX edit tokens */
  --gx-shell-width: var(--shell-width, 1360px);
  --gx-shell-gutter: 88px;
  --gx-left-width: 280px;
  --gx-right-width: 380px;
  --gx-shell-gap: 24px;

  --gx-accent: var(--lime);
  --gx-accent-soft: var(--lime-soft);
  --gx-text: var(--text);
  --gx-dark-text: rgba(33, 80, 74, 0.9);
  --gx-muted: var(--lime);
  --accent: var(--gx-muted);
  --gx-glass-main-bg: var(--main-bg);
  --gx-glass-main-bg-2: var(--main-bg-2);
  --gx-glass-column-bg: var(--column-bg);
  --gx-glass-column-bg-2: var(--column-bg-2);
  --gx-glass-card-bg: var(--inner-card-bg);

  --gx-radius-shell: var(--radius-xl);
  --gx-radius-card: var(--radius-lg);
  --gx-radius-control: var(--radius-md);

  /* Non-token cascade-fallback declarations preserved from block 1 */
  font: 16px/1.5 var(--sans);
  color: var(--text);
  background: var(--bg);
}


/* ============================================================
   SECTION 3: Layout: three-column shell + responsive @media
   ============================================================ */
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  padding-bottom: 70px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(rgba(4, 14, 15, 0.60), rgba(4, 14, 15, 0.66)),
    radial-gradient(circle at 68% 8%, rgba(222, 241, 170, 0.14), transparent 18%),
    radial-gradient(circle at 62% 24%, rgba(136, 192, 122, 0.10), transparent 20%),
    radial-gradient(circle at 16% 16%, rgba(92, 167, 123, 0.08), transparent 16%),
    url("../assets/dreamy_misty_forest_ambiance.png") center center / cover no-repeat fixed;
  overflow-x: hidden;
}

.page,
.gx-shell {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100vw - 88px));
  margin: auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.page {
  padding-top: 44px;
}

.glass-main,
.gx-glass-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    linear-gradient(180deg, var(--main-bg), var(--main-bg-2));
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    var(--shadow-main);
  backdrop-filter: blur(26px) saturate(145%);
  backdrop-filter: blur(34px) saturate(95%);
  -webkit-backdrop-filter: blur(26px) saturate(95%);
}

.glass-column,
.gx-glass-column {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
    linear-gradient(180deg, var(--column-bg), var(--column-bg-2));
  border: 1px solid rgba(255, 255, 255, 0.17);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    inset 0 -1px 0 rgba(255, 255, 255, 0.025),
    0 18px 48px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(8px) saturate(115%);
  -webkit-backdrop-filter: blur(8px) saturate(115%);
}

.sidebar,
.gx-sidebar {
  border-radius: var(--radius-xl);
  padding: 24px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.logo-wrap,
.gx-logo-wrap {
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-box,
.gx-logo-box {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -8px 18px rgba(255, 255, 255, 0.02);
}

.logo-mark,
.gx-logo-mark {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  position: relative;
  background: var(--lime);
  box-shadow: var(--glow-lime);
  color: rgb(255, 149, 0);
  font-weight: 900;
  font-size: 25px;
  padding: 15px 5px 5px 5px;
}

.main,
.gx-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.topbar,
.gx-topbar {
  border-radius: 28px;
  padding: 26px 34px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-box,
.gx-search-box {
  width: min(460px, 62%);
  height: 82px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  color: rgba(255, 255, 255, 0.70);
  font-size: 19px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-box svg,
.gx-search-box svg {
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  width: 26px;
  height: 26px;
  stroke-width: 2.1;
}

.topbar-right,
.gx-topbar-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  color: rgba(255, 255, 255, 0.90);
}

.user-chip,
.gx-user-chip {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-chip .avatar,
.user-chip .gx-avatar,
.gx-user-chip .avatar {
  width: 56px;
  height: 56px;
}

.count-badge {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: #173229;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--glow-lime);
}

.feed-panel,
.gx-view-panel {
  border-radius: 26px;
  overflow: hidden;
}

.right-view-container,
.gx-right-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#gx-right-column {
  padding-top: 163px;
}

.view-shell,
.gx-view-shell {
  border-radius: 26px;
  overflow: hidden;
  min-height: 680px;
}

.main-view-container,
.gx-main-view {
  min-height: 570px;
  padding: 22px;
}

.main-modal-container,
.gx-main-modal,
.right-modal-container,
.gx-right-modal {
  min-height: 0;
}

.template-library {
  display: none;
}

@media (max-width: 1220px) {
  .page,
  .gx-shell {
    grid-template-columns: 1fr;
    width: min(960px, calc(100vw - 40px));
  }

  .sidebar,
  .gx-sidebar {
    min-height: auto;
  }

  .profile-card,
  .gx-profile-card {
    margin-top: 12px;
  }

  .topbar,
  .gx-topbar {
    min-height: auto;
    padding: 20px;
    gap: 18px;
    flex-wrap: wrap;
  }

  .search-box,
  .gx-search-box {
    width: 100%;
  }
}

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

  .profile-cover {
    height: 150px;
  }

  .avatar-large {
    width: 96px;
    height: 96px;
    font-size: 28px;
  }

  .profile-avatar-row {
    margin-top: -48px;
  }
}


/* ============================================================
   SECTION 4: Tabs (canonical) + per-view extensions
   ============================================================ */
.tabs,
.gx-tabs {
  height: 110px;
  padding: 0 30px;
  display: flex;
  align-items: end;
  gap: 72px;
}

.tab {
  position: relative;
  height: 74px;
  display: flex;
  align-items: center;
  color: rgba(244, 250, 247, 0.75);
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
}

.tab.active {
  color: #ffffff;
  font-weight: 800;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: -2px;
  bottom: 0;
  width: 100px;
  height: 4px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(216, 251, 53, 0.30);
}

.nav-sub-tabs {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  margin-bottom: var(--space-sm);
  padding-bottom: 24px;
  margin-top: 24px;
}

.sub-tab {
  position: relative;
  height: 34px;
  display: flex;
  align-items: center;
  color: rgba(244, 250, 247, 0.75);
  font-size: 13px;
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.sub-tab:hover,
.sub-tab.active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.lb-timeframes {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.sub-tab-btn,
.gx-button {
  padding: var(--space-xs) var(--space-sm);
  background: var(--social-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
}

.sub-tab-btn.active {
  background: var(--accent);
  color: var(--gx-dark-text);
  border-color: var(--accent);
  font-weight: 500;
}

.gx-button-light {
  background: rgba(255, 255, 255, .16);
  font-size: 14px;
}

.gx-button-light:hover {
  background: rgba(255, 255, 255, 0.315);
}


/* ============================================================
   SECTION 5: Buttons & icon-buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { border-color: var(--accent-border); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

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

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-small { padding: var(--space-xs) var(--space-sm); font-size: 13px; }

button {
  appearance: auto;
  text-rendering: auto;
  color: unset;
  letter-spacing: unset;
  word-spacing: unset;
  line-height: unset;
  text-transform: unset;
  text-indent: unset;
  text-shadow: unset;
  display: unset;
  text-align: unset;
  cursor: unset;
  box-sizing: unset;
  background-color: unset;
  margin: unset;
  padding-block: unset;
  padding-inline: unset;
  border-width: unset;
  border-style: unset;
  border-color: unset;
  border-image: unset;
}

.button-primary:hover {
  background: var(--accent-hover);
}

.icon-button {
  background: unset;
  appearance: auto;
  text-rendering: auto;
  color: var(--gx-muted);
  letter-spacing: normal;
  word-spacing: normal;
  line-height: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  display: grid;
  text-align: center;
  cursor: default;
  box-sizing: border-box;
  margin: 0;
  padding-block: 1px;
  padding-inline: 6px;
  border-width: 0;
  border-style: outset;
  border-color: buttonborder;
  border-image: initial;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
}

.icon-button:hover {
  background: var(--hover);
  cursor: pointer;
}

.create-btn,
.gx-primary-button {
  margin-top: 18px;
  height: 62px;
  width: 100%;
  border-radius: 18px;
  border: 0;
  background: linear-gradient(180deg, #e4ff49 0%, #c7f229 100%);
  color: #122c26;
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: default;
  box-shadow:
    0 10px 28px rgba(199, 242, 41, 0.24),
    0 0 22px rgba(216, 251, 53, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.create-btn svg,
.gx-primary-button svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.avatar-upload-button {
  padding: 4px;
}


/* ============================================================
   SECTION 6: Forms & inputs
   ============================================================ */
.form-group {
  margin-bottom: var(--space-md);
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
input[type="text"],
input[type="number"],
input[type="email"],
input[type="date"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}


/* ============================================================
   SECTION 7: Modals (overlay, content, close)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal-content {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--space-lg);
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
}
.btn-close-modal {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: start center;
  padding-top: 5vh;
  background: rgba(2, 13, 12, 0.46);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-overlay.active {
  display: grid;
}

.modal-form-stack {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.modal-field {
  display: grid;
  gap: 6px;
}

.modal-label {
  color: var(--muted);
  font-size: 13px;
}

.modal-input,
.modal-textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  outline: none;
}

.modal-textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.modal-input:focus,
.modal-textarea:focus {
  border-color: var(--accent);
}

.transaction-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

body.modal-open {
  /* Do not change overflow or padding here.
     The global html scrollbar is permanent, so modal open/close cannot shift layout. */
}


/* ============================================================
   SECTION 8: Cards (feed-item, member-card, leaderboard-row, glass-card)
   ============================================================ */
.glass-card,
.gx-glass-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)),
    rgba(10, 36, 38, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.17);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02),
    0 16px 36px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(34px) saturate(160%);
  -webkit-backdrop-filter: blur(34px) saturate(160%);
}

.white-glass-card,
.gx-glass-white {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card,
.gx-card {
  border-radius: 24px;
  padding: 28px 30px;
}

.card-title-row,
.gx-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-title,
.gx-card-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.1px;
}

.card-link,
.gx-card-link {
  color: var(--lime);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.location,
.gx-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.location svg,
.gx-card-meta svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.weather,
.gx-card-metric {
  min-height: 286px;
}

.weather-main,
.gx-metric-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0 24px;
}

.weather-art {
  position: relative;
  width: 110px;
  height: 82px;
  flex: 0 0 auto;
}

.sun {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  right: 14px;
  top: 3px;
  background: #f0e640;
  box-shadow: 0 0 22px rgba(240, 230, 64, 0.35);
}

.sun-ray {
  position: absolute;
  width: 6px;
  height: 18px;
  border-radius: 999px;
  background: #f0e640;
  right: 38px;
  top: -12px;
  transform-origin: 3px 42px;
}

.sun-ray.r2 { transform: rotate(45deg); }
.sun-ray.r3 { transform: rotate(90deg); }
.sun-ray.r4 { transform: rotate(135deg); }
.sun-ray.r5 { transform: rotate(180deg); }

.cloud {
  position: absolute;
  left: 4px;
  bottom: 6px;
  width: 70px;
  height: 30px;
  border-radius: 999px;
  background: #eef2f2;
  box-shadow:
    16px -14px 0 0 #eef2f2,
    36px -6px 0 -2px #eef2f2;
}

.weather-temp {
  text-align: left;
  min-width: 130px;
}

.temp {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}

.condition {
  margin-top: 8px;
  color: var(--muted);
  font-size: 17px;
}

.card-divider,
.gx-card-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.10);
  margin: 2px 0 18px;
}

.weather-stats,
.gx-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-label {
  color: var(--soft-text);
  font-size: 14px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.good-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(216, 251, 53, 0.18);
  color: #efffcb;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(216, 251, 53, 0.08);
}

.activity,
.gx-card-chart {
  min-height: 338px;
}

.bars,
.gx-chart-bars {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  height: 130px;
  padding-top: 10px;
  margin-top: 6px;
}

.gx-chart-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.bar,
.gx-chart-bar {
  width: 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e0ff4d 0%, #b8e01a 100%);
  box-shadow: 0 0 16px rgba(216, 251, 53, 0.14);
  height: var(--h);
}

.gx-chart-label {
  font-size: 13px;
  color: rgba(245, 250, 248, 0.78);
}

.gx-chart-tooltip {
  position: absolute;
  left: 42%;
  top: 0;
  transform: translateX(-50%);
  width: 56px;
  height: 52px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}

.metrics,
.gx-mini-metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.trends,
.gx-card-list {
  min-height: 224px;
}

.trend-list,
.gx-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.show-more,
.gx-show-more {
  margin-top: 12px;
  color: var(--lime);
  font-size: 15px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  background: var(--accent-bg);
  color: var(--accent);
  margin: 2px;
}

.jail-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--danger);
  color: #fff;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}


/* ============================================================
   SECTION 9: Per-view: Profile (incl. migration block)
   ============================================================
   Profile view — migrated from harness_VALID.css
   Source: vanilla/harness_VALID.css 156-181, 184-202, 264, 412-448, 450-516, 519-600, 604-618, 620-815, 819-888, 1517-1598, 1708-1812, 1866, 1928-1973, 1978-2025, 2357-2371
   (156-181 added beyond originally-sanctioned ranges: required base .button, .button-primary, .icon-button rules consumed by profile/edit-profile markup; .avatar at 144-154 deliberately omitted to preserve target's gibs-themed .avatar definition.)
   Date: 2026-05-04
   ============================================================ */
.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}

.profile-card,
.gx-profile-card {
  /* margin-top: auto; */
  margin-top: 28px;
  border-radius: 18px;
  padding: 18px 16px 14px;
  /* min-height: 110px; */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.profile-top,
.gx-profile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar,
.gx-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid rgba(239, 245, 219, 0.86);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, #efd0a8 0 17%, transparent 17.5%),
    radial-gradient(circle at 50% 19%, #262117 0 16%, transparent 16.5%),
    radial-gradient(circle at 50% 58%, #243947 0 36%, transparent 36.5%),
    linear-gradient(180deg, #a4d5a0 0%, #224640 100%);
}

.avatar::after,
.gx-avatar::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  border: 2px solid rgba(27, 65, 61, 0.92);
  box-shadow: 0 0 12px rgba(216, 251, 53, 0.18);
}

.avatar.male,
.gx-avatar.male {
  background:
    radial-gradient(circle at 50% 38%, #efc79f 0 17%, transparent 17.5%),
    radial-gradient(circle at 50% 19%, #201810 0 16%, transparent 16.5%),
    radial-gradient(circle at 50% 58%, #233743 0 36%, transparent 36.5%),
    linear-gradient(180deg, #ccdda3 0%, #34544d 100%);
}

.profile-meta,
.gx-profile-meta {
  min-width: 0;
  flex: 1;
}

.profile-name,
.gx-profile-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.profile-handle,
.gx-profile-subtitle {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-arrow,
.gx-profile-action {
  color: var(--lime);
  font-size: 24px;
  line-height: 1;
  padding-left: 4px;
}

.profile-bottom,
.gx-profile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.online,
.gx-online {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online::before,
.gx-online::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px rgba(216, 251, 53, 0.24);
}

.dots,
.gx-dots {
  letter-spacing: 3px;
  font-weight: 700;
  font-size: 18px;
  transform: translateY(-2px);
}

/* PROFILE VIEW */

.profile-cover {
  height: 200px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(2, 14, 13, .56), rgba(255, 255, 255, .05)),
    radial-gradient(circle at 22% 18%, rgba(217, 255, 50, .26), transparent 32%),
    radial-gradient(circle at 78% 20%, rgba(103, 232, 214, .22), transparent 34%),
    linear-gradient(135deg, #153c3d, #0d1918);
}

.profile-info {
  padding: 0 16px 16px;
}

.profile-avatar-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: -64px;
  position: relative;
  z-index: 10;
}

.avatar-large {
  width: 128px;
  height: 128px;
  border: 4px solid var(--bg);
  font-size: 34px;
}

.profile-name {
  margin-top: 8px;
  font-size: 22px;
  font-weight: 800;
}

.profile-handle,
.profile-meta {
  color: var(--muted);
}

.profile-bio {
  margin-top: 12px;
}

.profile-action-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.profile-cover img,
.edit-profile-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.avatar.avatar-large,
.edit-profile-avatar {
  position: relative;
  overflow: hidden;
  height: 100px;
  width: 100px;
}

.avatar.avatar-large img,
.edit-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.profile-cover img:not([src]),
.profile-cover img[src=""],
.edit-profile-cover img:not([src]),
.edit-profile-cover img[src=""],
.avatar.avatar-large img:not([src]),
.avatar.avatar-large img[src=""],
.edit-profile-avatar img:not([src]),
.edit-profile-avatar img[src=""] {
  display: none;
}

#profile-view .profile-display-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

#profile-view .profile-display-name {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.profile-l3-badge {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00ba7c;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

#profile-view.is-verified-l3 .profile-l3-badge {
  display: inline-flex;
}

#profile-view .profile-name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  margin-top: 2px;
}

#profile-view .profile-username {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
}

#profile-view .profile-username::before {
  content: '@';
}

#profile-view .profile-bio {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

/* EDIT PROFILE MODAL */

.edit-profile-cover {
  position: relative;
  height: 120px;
  border-radius: var(--radius);
  background:
    linear-gradient(to top, rgba(2, 14, 13, .56), rgba(255, 255, 255, .05)),
    radial-gradient(circle at 22% 18%, rgba(217, 255, 50, .26), transparent 32%),
    radial-gradient(circle at 78% 20%, rgba(103, 232, 214, .22), transparent 34%),
    linear-gradient(135deg, #153c3d, #0d1918);
  overflow: hidden;
}

.edit-profile-cover-action {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.edit-profile-cover-action > * {
  pointer-events: none;
}

.edit-profile-cover-action:hover {
  background: rgba(255, 255, 255, .16);
}

.edit-profile-avatar-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -36px;
  padding: 0 12px 12px;
  position: relative;
  z-index: 2;
}

.edit-profile-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  z-index: 4;
}

.edit-profile-avatar {
  width: 72px;
  height: 72px;
  border: 4px solid var(--bg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel);
  background-size: cover;
  background-position: center;
  font-weight: 900;
  font-size: 22px;
}

.edit-profile-avatar-action {
  position: absolute;
  right: -4px;
  bottom: -4px;
  z-index: 4;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 3px solid var(--bg);
  border-radius: 50%;
  background: var(--social-bg);
  color: #0f1419;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.edit-profile-avatar-action:hover {
  background: rgba(255, 255, 255, .16);
}

/* PROFILE MEDIA EDIT FLOWS */

.media-flow-body {
  display: block;
  padding: 16px;
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.media-preview-banner {
  height: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: #050505;
  background-repeat: no-repeat;
  background-position: var(--crop-x, 50%) var(--crop-y, 50%);
  background-size: var(--crop-zoom, cover);
}

.media-preview-avatar-wrap {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 18px 0;
}

.media-preview-avatar {
  width: 216px;
  height: 216px;
  border-radius: 50%;
  border: 4px solid var(--border);
  display: grid;
  place-items: center;
  background-color: #050505;
  background-repeat: no-repeat;
  background-position: var(--crop-x, 50%) var(--crop-y, 50%);
  background-size: var(--crop-zoom, cover);
  font-size: 48px;
  font-weight: 900;
}

.media-preview-banner.is-empty,
.media-preview-avatar.is-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    radial-gradient(circle at 20% 20%, rgba(29, 155, 240, .20), transparent 30%),
    linear-gradient(135deg, #171b20, #090909);
}

.crop-frame {
  margin-top: 16px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13px;
}

.crop-controls {
  display: grid;
  gap: 12px;
  margin-top: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #000;
}

.crop-control {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.crop-control input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.crop-control.zoom-control {
  grid-template-columns: 28px minmax(0, 1fr) 28px;
}

.crop-control.position-control {
  grid-template-columns: 84px minmax(0, 1fr);
}

.crop-icon {
  width: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.media-picker-grid.avatar-picker-grid {
  display: none;
}

.media-upload-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 0 0;
}

.media-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.media-upload-meta {
  min-width: 0;
  color: var(--muted);
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 25px;
}

/* MEDIA FLOW REPAIR PASS */

.media-upload-row.media-upload-row-large {
  min-height: 168px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 24px 100px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
  text-align: center;
  z-index: 10;
}

.media-upload-row.media-upload-row-large .media-upload-meta {
  max-width: 360px;
  white-space: normal;
  line-height: 1.35;
}

.media-picker-grid[hidden] {
  display: none !important;
}

.media-edit-stage {
  display: grid;
  gap: 16px;
}

.media-error {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #f4212e;
  border-radius: var(--radius);
  background: rgba(244, 33, 46, 0.12);
  color: #f4212e;
  font-size: 14px;
  font-weight: 600;
}

.media-error[hidden] {
  display: none;
}


/* ============================================================
   SECTION 10: Per-view: Account (incl. migration block)
   ============================================================ */
#account-view .account-panel { display: none; }
#account-view .account-panel.active { display: block; }


/* ============================================================
   SECTION 11: Per-view: Inbox (incl. migration block)
   ============================================================
   Messages view — migrated from harness_VALID.css
   Source: vanilla/harness_VALID.css 1975-1976
   Date: 2026-05-04
   ============================================================ */
.tab.inbox-tab,
.tab.inbox-tab.active {
  border-bottom-color: transparent;
}


/* ============================================================
   SECTION 12: Per-view: Home / feed-list (incl. migration block)
   ============================================================
   Home view — feed-list styling — migrated from harness_VALID.css
   Source: vanilla/harness_VALID.css 264-294
   Date: 2026-05-04
   ============================================================ */
.feed-list {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}

.feed-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid rgba(232, 255, 248, 0.18);
  border-bottom: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.130), rgba(255, 255, 255, 0.070));
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  box-shadow: var(--inner-glow), 0 14px 38px rgba(0, 0, 0, 0.24);
}

.feed-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.feed-body {
  flex: 1;
  min-width: 0;
}

.feed-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.feed-author {
  font-weight: 800;
}

.feed-handle,
.feed-time {
  color: var(--muted);
}

.feed-text {
  margin: 2px 0 0;
}

.feed-actions {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.feed-actions span:hover {
  color: var(--accent);
}

.post,
.gx-content-card {
  border-radius: 20px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 16px 32px rgba(0, 0, 0, 0.10);
}

.post.large,
.gx-content-card.large {
  min-height: 450px;
}

.post-head,
.gx-content-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.post-avatar,
.gx-content-avatar {
  width: 54px;
  height: 54px;
}

.post-meta,
.gx-content-meta {
  min-width: 0;
  flex: 1;
}

.author-row,
.gx-content-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.author,
.gx-content-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.verified,
.gx-status-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--lime);
  color: #18372e;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(216, 251, 53, 0.18);
}

.handle,
.gx-content-subtitle {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}

.menu,
.gx-menu {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 30px;
  line-height: 1;
  letter-spacing: 3px;
  transform: translateY(-6px);
}

.post-text,
.gx-content-text {
  margin-left: 68px;
  margin-top: -2px;
  color: rgba(247, 251, 249, 0.90);
  font-size: 15px;
  line-height: 1.6;
}

.hero-image,
.gx-media-frame {
  margin-top: 18px;
  border-radius: 18px;
  height: 258px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(180deg, rgba(241, 249, 255, 0.9) 0 23%, rgba(192, 227, 236, 0.85) 23% 40%, rgba(95, 140, 145, 0.9) 40% 42%, rgba(76, 121, 122, 0.92) 42% 100%);
}

.hero-image::before,
.gx-media-frame::before,
.hero-image::after,
.gx-media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
}

.hero-image::before,
.gx-media-frame::before {
  background:
    linear-gradient(31deg, transparent 0 33%, rgba(88, 121, 50, 0.95) 33.4% 49%, transparent 49.3%),
    linear-gradient(147deg, transparent 0 35%, rgba(105, 137, 74, 0.90) 35.4% 53%, transparent 53.3%),
    linear-gradient(151deg, transparent 0 54%, rgba(175, 205, 77, 0.98) 54.3% 75%, transparent 75.3%),
    linear-gradient(148deg, transparent 0 72%, rgba(196, 218, 132, 0.92) 72.2% 84%, transparent 84.2%);
  filter: blur(0.2px);
}

.hero-image::after,
.gx-media-frame::after {
  background:
    linear-gradient(28deg, transparent 0 50%, rgba(43, 69, 51, 0.55) 50.3% 52.3%, transparent 52.6%),
    linear-gradient(148deg, transparent 0 58%, rgba(39, 66, 49, 0.40) 58.2% 60.2%, transparent 60.5%);
}

.hiker,
.gx-media-subject {
  position: absolute;
  left: 25%;
  bottom: 30px;
  width: 14px;
  height: 36px;
  background: #182f37;
  border-radius: 4px 4px 2px 2px;
  box-shadow:
    0 -12px 0 -3px #efc79f,
    5px 14px 0 -5px #182f37,
    -5px 14px 0 -5px #182f37,
    3px -2px 0 -4px #182f37,
    -3px -2px 0 -4px #182f37;
}

.post-actions,
.gx-action-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  margin-top: 16px;
  padding: 0 4px;
}

.action,
.gx-action-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(246, 251, 248, 0.88);
  font-size: 15px;
}

.action svg,
.gx-action-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action.like,
.gx-action-item.like {
  color: var(--lime);
  font-weight: 800;
}

.action.like svg,
.gx-action-item.like svg {
  fill: var(--lime);
  stroke: var(--lime);
}


/* ============================================================
   SECTION 13: Per-view: Promote / composer (incl. migration block)
   ============================================================
   Promote view — composer styling — migrated from harness_VALID.css
   Source: vanilla/harness_VALID.css 235-262, 2249-2259, 2305-2310
   Date: 2026-05-04
   ============================================================ */
.composer {
  display: flex;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(232, 255, 248, 0.18);
  border-bottom: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.130), rgba(255, 255, 255, 0.070));
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  box-shadow: var(--inner-glow), 0 14px 38px rgba(0, 0, 0, 0.24);
}

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

.composer-placeholder {
  min-height: 56px;
  padding-top: 8px;
  color: var(--muted);
  font-size: 20px;
}

.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 51, 54, 0.7);
}

.composer-tools {
  display: flex;
  gap: 14px;
  color: var(--accent);
}

/* POST MODAL */

.post-modal {
  width: min(600px, calc(100vw - 24px));
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.72);
  overflow: hidden;
}

.post-modal-header {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.post-modal-body {
  display: flex;
  gap: 12px;
  padding: 8px 16px 16px;
}

.post-modal-main {
  flex: 1;
  min-width: 0;
}

.post-modal-audience {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  color: var(--accent);
  background: transparent;
  font-size: 13px;
  font-weight: 800;
}

.post-modal-input {
  min-height: 140px;
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1.45;
}

.post-modal-input::placeholder {
  color: var(--muted);
}

.post-modal-reply {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.post-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(47, 51, 54, 0.7);
}

.post-modal-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--accent);
  font-size: 18px;
}

.post-modal-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ============================================================
   SECTION 14: Per-view: Gibs, Network, etc.
   ============================================================ */
.nav,
.gx-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.nav-item {
  height: 2.5rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 22px;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -8px 18px rgba(255, 255, 255, 0.02);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -8px 18px rgba(255, 255, 255, 0.02);
  color: var(--lime);
}

.nav-item svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active svg {
  color: var(--lime);
  fill: var(--lime);
  stroke: var(--lime);
}

/* Fix sidebar nav hover/click behavior */
.sidebar .nav .nav-item {
  cursor: pointer;
}

.sidebar .nav .icon-button .nav-item:hover {
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar .nav .nav-item.active:hover {
  background: rgba(255, 255, 255, 0.09);
}

/* Prevent old nav-btn CSS from wrecking glass sidebar */
.sidebar .nav .nav-item.nav-btn {
  width: auto;
  min-width: 0;
  height: 2.5rem;
  margin: 0;
  padding: 0 22px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: flex-start;
  text-align: left;
  text-decoration: none;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  box-shadow: none;
}

/* Restore glass active state even with nav-btn present */
.sidebar .nav .nav-item.nav-btn.active {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -8px 18px rgba(255, 255, 255, 0.02);
  color: #d8fb35;
}

#gibs-view .gibs-panel {
  display: none;
}

#gibs-view .gibs-panel.active {
  display: block;
}

.gibs-panel {
  display: none;
}

.gibs-panel.active {
  display: block;
}


/* ============================================================
   SECTION 15: Default-content convention
   ============================================================ */
.view {
  display: none;
}

.view.active {
  display: block;
}

[hidden] {
  display: none !important;
}

/* Default-content convention: any panel carrying data-default-text
   shows that text centered when its content is empty. */
[data-default-text]:empty::before {
  content: attr(data-default-text);
  display: block;
  padding: 32px;
  text-align: center;
  color: var(--muted, rgba(235, 244, 240, 0.74));
}


/* ============================================================
   SECTION 16: Animations (@keyframes)
   ============================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}


/* ============================================================
   SECTION 17: Utilities (.hidden, .muted, .destructive-btn, etc.)
   ============================================================ */
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text);
  font-size: 14px;
}

.loading {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text);
}

.shake { animation: shake 0.3s ease-in-out; }

#status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--accent);
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  transition: opacity 0.3s;
}
#status-bar.celebrate {
  animation: pulse 0.5s ease-in-out 3;
}
