/* TreeHub visual system derived from the supplied Treehub_V2.1 exports.
   Load after module styles and theme.css. Keep page-specific layouts and states. */
:root {
 --treehub-radius: 20px;
 --treehub-radius-lg: 24px;
 --treehub-radius-control: 12px;
 --treehub-page-width: 1280px;
 --treehub-page-gutter: clamp(16px, 2.5vw, 32px);
 --treehub-primary-ink: #102000;
 --treehub-space-section: 24px;
}
:root:not([data-theme="light"]) {
 --treehub-bg: #080b09;
 --treehub-surface: #101511;
 --treehub-surface-2: #151b16;
 --treehub-surface-3: #1b231c;
 --treehub-border: #273129;
 --treehub-text: #f4f6f3;
}
:root[data-theme="light"] { --treehub-primary-ink: #ffffff; }
body { background: var(--treehub-bg); }
/* Keep Bootstrap components on the same palette as the custom workspaces. */
body {
 --bs-body-color: var(--treehub-text);
 --bs-body-bg: var(--treehub-bg);
 --bs-secondary-color: var(--treehub-muted);
 --bs-border-color: var(--treehub-border);
 --bs-tertiary-bg: var(--treehub-surface-2);
}
.app-content { max-width: var(--treehub-page-width); margin-inline: auto; padding: 28px var(--treehub-page-gutter) 48px; }
.content-container-wide { width: 100%; }
.app-main > main { min-width: 0; }
:is(.page-heading,.setup-option-copy,.dashboard-heading > div,.community-heading > div,.opportunity-heading > div,.entity-heading > div) { min-width: 0; overflow-wrap: anywhere; }
:is(.treehub-card,.dashboard-panel,.community-panel,.opportunity-card,.entity-card,.event-card,.group-card,.pa-panel) { overflow-wrap: anywhere; }
.settings-links > .treehub-card { display: flex; min-width: 0; }
.settings-links .card-body { display: flex; gap: 8px; width: 100%; }
.settings-links .card-body > :is(h2,p) { width: 100%; margin: 0; }
.settings-links .card-body > p { flex-grow: 1; margin-bottom: auto; padding-bottom: 12px; }
.settings-links .card-body { flex-direction: column; align-items: flex-start; }
.settings-links .card-body > .btn { margin: 0; max-width: 100%; text-align: center; }
.skip-link { position: fixed; top: 8px; left: 16px; z-index: 1100; padding: 12px 18px; border-radius: 12px; background: var(--treehub-primary); color: var(--treehub-primary-ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); color: var(--treehub-primary-ink); }
html { scroll-padding-top: calc(var(--treehub-topbar-height) + 16px); }
:is(h1,h2,h3) { text-wrap: balance; }
.app-topbar { background: var(--treehub-topbar-bg); }
.sidebar-brand-mark { border-radius: 12px; }
.sidebar-nav-link { border-radius: var(--treehub-radius-control); min-height: 44px; font-size: 13px; }
.icon-btn { border-radius: var(--treehub-radius-control); width: 44px; height: 44px; flex-basis: 44px; }
.app-topbar .avatar { width: 44px; height: 44px; flex-basis: 44px; }
.page-title { font-size: clamp(26px, 3vw, 38px); line-height: 1.15; letter-spacing: -.04em; }
.page-description { font-size: 14px; line-height: 1.7; }
.treehub-card, .card, .stat-card { background: var(--treehub-surface); border-color: var(--treehub-border); border-radius: var(--treehub-radius); }
.btn { min-height: 44px; border-radius: var(--treehub-radius-control); font-size: 13px; padding: 10px 18px; }
.btn-treehub, .btn-primary, .btn-primary-treehub { background: var(--treehub-primary); border-color: var(--treehub-primary); color: var(--treehub-primary-ink); }
.btn-treehub:hover, .btn-primary:hover, .btn-primary-treehub:hover { background: var(--treehub-primary-hover); color: var(--treehub-primary-ink); }
.btn-outline-secondary { color: var(--treehub-text-soft); border-color: var(--treehub-border-strong); }
.btn-outline-secondary:hover { background: var(--treehub-surface-hover); border-color: var(--treehub-primary); color: var(--treehub-text); }
.form-control, .form-select { background-color: var(--treehub-input); color: var(--treehub-text); border-color: var(--treehub-border-strong); border-radius: var(--treehub-radius-control); min-height: 44px; }
.form-control:focus, .form-select:focus { background-color: var(--treehub-input); color: var(--treehub-text); border-color: var(--treehub-primary); box-shadow: 0 0 0 3px var(--treehub-primary-soft); }
input::placeholder, textarea::placeholder { color: var(--treehub-muted); opacity: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--treehub-primary); }
:focus-visible { outline: 2px solid var(--treehub-primary); outline-offset: 3px; }
:is(.dashboard-workspace,.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) {
 max-width: var(--treehub-page-width); margin-inline: auto; padding: 28px var(--treehub-page-gutter) 48px; min-width: 0; color: var(--treehub-text);
}
:is(.dashboard-heading,.community-heading,.opportunity-heading,.entity-heading,.events-heading,.groups-heading,.moderation-heading,.pa-heading) { gap: 18px; margin-bottom: 24px; }
:is(.dashboard-heading,.community-heading,.opportunity-heading,.entity-heading,.events-heading,.groups-heading,.moderation-heading,.pa-heading) h1 { font-size: clamp(28px, 3.5vw, 42px); line-height: 1.15; letter-spacing: -.045em; font-weight: 800; margin: 8px 0; }
:is(.dashboard-heading,.community-heading,.opportunity-heading,.entity-heading,.events-heading,.groups-heading,.moderation-heading,.pa-heading) p { font-size: 14px; color: var(--treehub-muted); line-height: 1.7; }
:is(.dashboard-eyebrow,.community-eyebrow,.opportunity-eyebrow,.entity-eyebrow,.events-eyebrow,.groups-eyebrow,.mod-eyebrow,.pa-eyebrow,.chat-eyebrow) { color: var(--treehub-primary); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
:is(.dashboard-panel,.dashboard-stat,.opportunity-panel,.opportunity-card,.entity-panel,.entity-card,.event-panel,.event-card,.group-panel,.group-card,.mod-panel,.mod-card,.pa-panel,.pa-stat,.community-panel) {
 background: var(--treehub-surface); color: var(--treehub-text); border-color: var(--treehub-border); border-radius: var(--treehub-radius); min-width: 0;
}
:is(.dashboard-panel,.opportunity-panel,.entity-panel,.event-panel,.group-panel,.mod-panel,.pa-panel,.community-panel) { padding: 24px; }
:is(.dashboard-panel,.opportunity-panel,.entity-panel,.event-panel,.group-panel,.mod-panel,.pa-panel,.community-panel) h2 { color: var(--treehub-text); font-size: 20px; letter-spacing: -.025em; }
:is(.dashboard-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) p { color: var(--treehub-muted); }
:is(.dashboard-row-title,.dashboard-stat strong,.dashboard-opportunity h3,.event-card h2,.group-card h2,.pa-stat strong) { color: var(--treehub-text); }
:is(.dashboard-stat strong,.pa-stat strong) { color: var(--treehub-primary); font-size: 36px; }
:is(.dashboard-row,.entity-member,.entity-invitation,.event-agenda-row,.group-discussion,.pa-row) { border-color: var(--treehub-border); }
:is(.dashboard-opportunity,.dashboard-action,.group-resource) { background: var(--treehub-primary-softer); border-color: var(--treehub-primary-border); border-radius: var(--treehub-radius-control); }
:is(.dashboard-badge,.opportunity-badge,.entity-badge,.mod-badge):not(.warning):not(.attention) { color: var(--treehub-primary); background: var(--treehub-primary-soft); border-radius: 999px; padding: 5px 10px; }
:is(.dashboard-muted,.opportunity-muted,.entity-muted,.pa-muted,.community-muted) { color: var(--treehub-muted); }
:is(.dashboard-workspace,.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) button {
 font-family: inherit; min-height: 44px; border-radius: var(--treehub-radius-control); font-size: 13px;
}
:is(.dashboard-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) button:where(:not([aria-pressed="true"]):not([type="submit"]):not(.opportunity-primary):not(.entity-primary):not(#mod-new)) {
 background: var(--treehub-surface-2); color: var(--treehub-text-soft); border-color: var(--treehub-border-strong);
}
:is(.community-workspace,.opportunity-workspace,.entity-workspace) :is(.community-primary,.opportunity-primary,.entity-primary),
:is(.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) button[type="submit"], #mod-new {
 background: var(--treehub-primary); color: var(--treehub-primary-ink); border-color: var(--treehub-primary); font-weight: 750;
}
:is(.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
 background: var(--treehub-input); color: var(--treehub-text); border-color: var(--treehub-border-strong); border-radius: var(--treehub-radius-control); min-height: 44px; min-width: 0; max-width: 100%;
}
:is(.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) dialog,
:is(.profile-dialog,.chat-dialog) { background: var(--treehub-surface); color: var(--treehub-text); border-color: var(--treehub-border-strong); border-radius: var(--treehub-radius-lg); box-shadow: var(--treehub-shadow-lg); }
:is(.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) dialog::backdrop,
:is(.profile-dialog,.chat-dialog)::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(4px); }
:is(.community-toolbar nav,.opportunity-tabs,.events-tabs,.groups-tabs,.mod-tabs,.pa-tabs) { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
:is(.community-toolbar nav,.opportunity-tabs,.events-tabs,.groups-tabs,.mod-tabs,.pa-tabs) button { border-radius: 0; background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--treehub-muted); padding: 10px 12px; }
:is(.community-toolbar nav,.opportunity-tabs,.events-tabs,.groups-tabs,.mod-tabs,.pa-tabs) :is(button.selected,button[aria-pressed="true"]) { color: var(--treehub-primary); background: transparent; border-bottom-color: var(--treehub-primary); }
.community-entry { border-color: var(--treehub-border); background: var(--treehub-surface); border-radius: var(--treehub-radius-lg); }
.community-author, .community-body { color: var(--treehub-text); }
.community-meta { color: var(--treehub-muted); }
.community-entry footer { border-color: var(--treehub-border); }
.community-entry footer .community-engagement-button { min-width: 44px; min-height: 44px; }
.community-social .community-entry header, .community-social .community-entry footer { background: var(--treehub-primary-soft); }
.community-workspace .community-aside .radio-widget { background: linear-gradient(145deg, var(--treehub-primary-soft), var(--treehub-surface)); }
.chat-list-panel, .chat-details-panel { background: var(--treehub-surface); }
.chat-conversation { border-radius: var(--treehub-radius-control); }
.chat-bubble { border-radius: 20px 20px 20px 5px; }
.chat-message.own .chat-bubble { border-radius: 20px 20px 5px 20px; }
.chat-compose-button, .chat-send { min-width: 44px; min-height: 44px; background: var(--treehub-primary); color: var(--treehub-primary-ink); }
.auth-card { background: var(--treehub-surface); border-radius: var(--treehub-radius-lg); padding: 28px; }
.auth-shell-single { grid-template-columns: minmax(0, 505px); }
.auth-card h1 { font-size: 28px; letter-spacing: -.04em; }
.auth-card h2 { font-size: 22px; letter-spacing: -.03em; }
.auth-card p { font-size: 13px; color: var(--treehub-muted); }
.auth-card input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .auth-card select { background: var(--treehub-input); color: var(--treehub-text); border: 1px solid var(--treehub-border-strong); border-radius: var(--treehub-radius-control); min-height: 46px; }
.auth-card button[type="submit"] { border: 1px solid var(--treehub-primary); background: var(--treehub-primary); color: var(--treehub-primary-ink); border-radius: var(--treehub-radius-control); min-height: 46px; padding: 12px 18px; font-weight: 750; }
.auth-card a { color: var(--treehub-primary); }
.auth-tab { min-height: 44px; font-size: 13px; }
.auth-tab.active { background: var(--treehub-primary); color: var(--treehub-primary-ink); }
.feature-card, .setup-option { border-radius: var(--treehub-radius); }
.settings-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.settings-links h2 { font-size: 20px; letter-spacing: -.025em; }
.settings-links p { font-size: 14px; }
.settings-links .card-body { padding: 24px; }
/* Equal grid gutters and card heights without changing feed/sidebar layouts. */
:is(.dashboard-grid,.community-grid,.opportunity-grid,.entity-grid,.events-grid,.groups-grid,.profile-grid,.mod-columns) { gap: var(--treehub-space-section); }
:is(.events-grid,.groups-grid) > :is(.event-card,.group-card) { margin-bottom: 0; display: flex; flex-direction: column; }
.group-card > button, .event-card > .events-actions { margin-top: auto; }
:is(.profile-header-actions,.profile-links,.profile-section-heading,.dashboard-panel > header,.entity-member,.opportunity-team-member) { flex-wrap: wrap; }
:is(.profile-header-actions button,.profile-text-button,.chat-icon-button,.chat-filters button,.dropdown-item,.dashboard-quick-links a,.opportunity-tabs a) { min-height: 44px; }
.chat-icon-button { min-width: 44px; }
.profile-links a { display: inline-flex; align-items: center; min-height: 44px; }
.profile-page-heading .page-title { font-size: clamp(28px, 3.5vw, 42px); }
/* The exported profile uses open sections rather than filled panels. */
.profile-design .profile-section.treehub-card { background: transparent; }
:is(.event-card,.group-card,.entity-card,.opportunity-card) h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.025em; }
:is(.groups-workspace,.events-workspace,.platform-admin) a { color: var(--treehub-primary); }
.platform-admin { --pa-green: var(--treehub-primary); }
.btn:disabled, button:disabled { cursor: not-allowed; }
dialog { overscroll-behavior: contain; max-height: calc(100dvh - 32px); }
dialog :is(header,footer) { flex-wrap: wrap; }
textarea { resize: vertical; }
.account-connection { max-width: 760px; }
.account-connection > .treehub-card { padding: clamp(20px, 4vw, 36px); }
.mobile-bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
.mobile-nav-link { border: 0; background: transparent; min-width: 0; cursor: pointer; }
@media (max-width: 1100px) {
 .entity-grid, .opportunity-grid, .mod-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
 :root { --treehub-topbar-height: 60px; }
 body { padding-bottom: calc(var(--treehub-mobile-nav-height) + env(safe-area-inset-bottom)); }
 body:has(.auth-page) { padding-bottom: 0; }
 .chat-workspace { height: calc(100dvh - var(--treehub-topbar-height) - var(--treehub-mobile-nav-height) - env(safe-area-inset-bottom)); }
 .mobile-bottom-nav { height: calc(var(--treehub-mobile-nav-height) + env(safe-area-inset-bottom)); }
 .mobile-nav-link { font-size: 10px; color: var(--treehub-muted); }
 .mobile-nav-link i { font-size: 20px; }
 .app-topbar { gap: 8px; }
 .app-topbar .topbar-title h1 { font-size: 15px; }
 .app-topbar .topbar-title p { display: none; }
 .app-topbar .topbar-actions { gap: 5px; }
}
@media (max-width: 600px) {
 .app-content { padding: 20px 16px 32px; }
 .settings-links { gap: 16px; }
 .settings-links .card-body { padding: 18px; }
 .topbar-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 :is(.profile-workspace,.chat-workspace,.chat-dialog,.auth-page,.setup-form) :is(input,textarea,select):not([type="checkbox"]):not([type="radio"]) { font-size: 16px; }
 :is(.dashboard-panel > header,.profile-links) { gap: 8px; }
 :is(.dashboard-workspace,.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin) { padding: 20px 16px calc(32px + env(safe-area-inset-bottom)); }
 :is(.dashboard-heading,.community-heading,.opportunity-heading,.entity-heading,.events-heading,.groups-heading,.moderation-heading,.pa-heading) { flex-direction: column; align-items: stretch; }
 :is(.dashboard-panel,.opportunity-panel,.entity-panel,.event-panel,.group-panel,.mod-panel,.pa-panel,.community-panel) { padding: 18px; }
 :is(.opportunity-toolbar,.opportunity-management,.mod-filters,.pa-filters) { flex-wrap: wrap; }
 :is(.opportunity-toolbar,.opportunity-management,.mod-filters,.pa-filters) > label { min-width: 0; width: 100%; }
 :is(.community-workspace,.opportunity-workspace,.entity-workspace,.events-workspace,.groups-workspace,.moderation-workspace,.platform-admin,.profile-workspace,.auth-card) :is(input,textarea,select):not([type="checkbox"]):not([type="radio"]) { font-size: 16px; }
 .page-header { flex-wrap: wrap; }
 .auth-shell { width: calc(100% - 32px); }
 .auth-card { padding: 24px 20px; }
 .topbar-actions > .icon-btn[title="Messages"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 .sidebar-nav-link, .app-sidebar { transition: none; }
}
/* Shared youth palette: electric lime, aqua and violet on neutral charcoal. */
:root:not([data-theme="light"]) {
 --treehub-primary:#91df0b; --treehub-primary-hover:#acf332; --treehub-primary-active:#7ac500;
 --treehub-primary-soft:rgba(145,223,11,.16); --treehub-primary-softer:rgba(145,223,11,.08); --treehub-primary-border:rgba(145,223,11,.34);
 --treehub-bg:#090c0e; --treehub-bg-secondary:#0d1114; --treehub-bg-tertiary:#11161a;
 --treehub-surface:#12171b; --treehub-surface-2:#171e23; --treehub-surface-3:#20292f; --treehub-surface-hover:#252f34;
 --treehub-input:#151c21; --treehub-border:#263138; --treehub-border-light:#33414a; --treehub-border-strong:#43535e;
 --treehub-text:#f5f8f7; --treehub-text-soft:#dce6e8; --treehub-muted:#98a9b5; --treehub-muted-2:#80939f; --treehub-subtle:#7d909c;
 --treehub-info:#34d8c7; --treehub-accent:#ba9aff; --treehub-warning:#ffc857; --treehub-social-band:#304f0e;
}
:root[data-theme="light"] {
 --treehub-primary:#387e08; --treehub-primary-hover:#2c6705; --treehub-primary-active:#245604;
 --treehub-primary-soft:#e8f7d7; --treehub-primary-softer:#f2fae9; --treehub-primary-border:#b2d98b;
 --treehub-info:#007f7b; --treehub-accent:#7542c4; --treehub-social-band:#daf0bd;
}
.app-sidebar{background:var(--treehub-bg-secondary)}
.sidebar-brand-mark{background:var(--treehub-primary);color:var(--treehub-primary-ink);box-shadow:0 3px 18px var(--treehub-primary-soft)}
.sidebar-nav-link.active{background:var(--treehub-primary-soft);color:var(--treehub-primary);border-color:var(--treehub-primary-border)}
