/* NYXO application design system. Loaded after the legacy presentation styles. */
:root {
  --bg: #090e16;
  --surface: #111a27;
  --surface-2: #172333;
  --line: #28384a;
  --text: #f3f6fa;
  --muted: #a7b5c5;
  --blue: #85b8ee;
  --cyan: #77c7cf;
  --purple: #b1a4de;
  --green: #80c9a6;
  --shadow: 0 10px 28px rgba(0, 0, 0, .12);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }
body.app-body,
body.auth-body {
  background: #090e16;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}
body.app-body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: radial-gradient(ellipse 70% 42% at 77% -14%, rgba(72, 116, 164, .12), transparent 72%);
  content: "";
  pointer-events: none;
}
*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; }
a { text-underline-offset: 3px; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid #badbff;
  outline-offset: 3px;
}

/* Shared member shell */
.app-sidebar {
  background: #0d1520;
  border-right: 1px solid #263548;
  box-shadow: none;
}
.sidebar-head { padding-bottom: 16px; border-bottom: 1px solid #273548; }
.app-brand img { width: 132px; }
.app-user {
  margin-top: 19px;
  padding: 13px;
  background: #172333;
  border: 1px solid #2d4056;
  border-radius: 14px;
}
.user-avatar {
  background: #314c6c;
  color: #e9f4ff;
  box-shadow: inset 0 0 0 1px #557395;
}
.app-user strong { color: #f4f7fb; }
.app-user small { color: #b2c2d2; }
.app-nav .nav-group {
  color: #8499ae;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.app-sidebar nav a,
.sidebar-foot a {
  gap: 12px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #c2cddb;
  font-weight: 570;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.app-sidebar nav a:hover,
.sidebar-foot a:hover {
  background: #182638;
  color: #fff;
}
.app-sidebar nav a.is-active {
  background: #20334a;
  border-color: #35516e;
  box-shadow: inset 3px 0 #9ac7f1;
  color: #f5f9ff;
}
.app-sidebar nav a .nav-icon,
.sidebar-foot a .nav-icon { color: #92acc5; }
.app-sidebar nav a.is-active .nav-icon { color: #b9daff; }
.sidebar-foot { border-top: 1px solid #273548; }
.app-main {
  max-width: 1680px;
  padding: 32px clamp(24px, 3.6vw, 56px) 36px;
}
.app-main > * { min-width: 0; }
.app-topbar {
  align-items: flex-end;
  min-height: 75px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #29384a;
}
.app-topbar .eyebrow,
.eyebrow {
  color: #9ac5ed;
  font-weight: 730;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.app-topbar h1 {
  margin-top: 5px;
  color: #f8fafc;
  font-size: clamp(1.7rem, 2.35vw, 2.4rem);
  font-weight: 740;
  letter-spacing: -.035em;
}
.topbar-user {
  padding: 8px 12px;
  background: #172332;
  border: 1px solid #30445a;
  border-radius: 999px;
  color: #d5e3f2;
  font-size: .81rem;
}
.status-dot { background: #84c8a5; }

/* Surfaces and information hierarchy */
.app-main > .panel,
.app-main > .grid-2,
.app-main > .grid-3,
.app-main > .stats-grid,
.app-main > .trend-grid { margin-bottom: 20px; }
.panel,
.stat-card,
.trend-card {
  background: #111b29;
  border: 1px solid #2b3b4d;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.panel { padding: clamp(20px, 2.25vw, 30px); }
.panel h2,
.trend-card h2 {
  color: #f3f7fb;
  font-weight: 690;
  letter-spacing: -.025em;
}
.panel h2 { font-size: clamp(1.13rem, 1.3vw, 1.35rem); }
.panel h3 { color: #edf4fa; }
.panel-head { gap: 18px; margin-bottom: 18px; }
.panel-head .muted,
.muted { color: #aabaca; }
.dashboard-welcome {
  background: linear-gradient(105deg, #1d334b, #142538 57%, #182435);
  border-color: #3a5a78;
}
.dashboard-welcome h2 { font-size: clamp(1.45rem, 2vw, 1.95rem); }
.dashboard-welcome .muted { color: #c3d0dc; }
.stats-grid { gap: 14px; }
.stat-card { min-height: 118px; padding: 20px 21px; }
.stat-card::before { width: 3px; background: var(--blue); }
.stat-card.tone-cyan::before { background: var(--cyan); }
.stat-card.tone-purple::before { background: var(--purple); }
.stat-card.tone-green::before { background: var(--green); }
.stat-card.tone-amber::before { background: #e7bd76; }
.stat-label { color: #acbac8; font-size: .72rem; letter-spacing: .035em; }
.stat-card strong {
  color: #f8fafc;
  font-size: clamp(1.65rem, 2.3vw, 2.3rem);
  font-weight: 730;
  letter-spacing: -.035em;
  line-height: 1.15;
}
.stat-card small { color: #a9b8c7; }
.trend-card { padding: 19px; }
.trend-card-head { align-items: flex-start; }
.trend-unit { background: #1c2a3a; border-color: #364a5f; color: #bacadb; }
.trend-gridline { stroke: #405267; }
.trend-month { fill: #a9b9c9; }
.trend-details { border-color: #304154; }
.trend-details summary { min-height: 36px; color: #b9d8f5; }
.founder-tools-panel { background: #111b29; }
.founder-tool-grid a,
.reward-tier-card,
.match-request-card {
  border: 1px solid #304257;
  border-radius: 13px;
  background: #172638;
  box-shadow: none;
}
.founder-tool-grid a {
  position: relative;
  min-height: 120px;
  padding: 18px 40px 18px 18px;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}
.founder-tool-grid a::after {
  position: absolute;
  top: 17px;
  right: 18px;
  color: #9cc9f2;
  content: "↗";
  font-size: 1.12rem;
}
.founder-tool-grid a:hover,
.founder-tool-grid a:focus-visible {
  background: #1c3046;
  border-color: #6486a9;
  transform: translateY(-2px);
}
.founder-tool-grid a strong { color: #eef5fc; }
.founder-tool-grid a span { color: #afc0d0; }
.reward-tier-card { padding: 18px; }
.reward-tier-card h3 { color: #f1f6fa; }
.reward-tier-card > strong { color: #b9d8f5; }
.match-request-details dt { color: #a8b9c9; }
.match-request-details dd { color: #eef4f9; }

/* Forms, actions, tables and states */
.app-main label { color: #d3deea; font-size: .79rem; font-weight: 630; }
.app-main input:not([type=checkbox]):not([type=radio]),
.app-main select,
.app-main textarea {
  min-height: 46px;
  background: #0d1723;
  border: 1px solid #3b5067;
  border-radius: 10px;
  color: #f5f8fb;
  font: inherit;
}
.app-main input::placeholder,
.app-main textarea::placeholder { color: #899caf; }
.app-main input:focus,
.app-main select:focus,
.app-main textarea:focus { border-color: #8cbcec; box-shadow: 0 0 0 3px rgba(139, 188, 236, .14); }
.app-main textarea { min-height: 116px; line-height: 1.55; }
.app-main input[type=checkbox],
.app-main input[type=radio] { accent-color: #90bde9; }
.btn {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 690;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease, transform .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: #a8cef2;
  border-color: #a8cef2;
  box-shadow: none;
  color: #101c2a;
}
.btn-primary:hover { background: #c3dfff; border-color: #c3dfff; color: #101c2a; }
.btn-ghost { background: #1a2a3b; border-color: #39516a; color: #e4eef8; }
.btn-ghost:hover { background: #25394e; border-color: #6585a3; color: #fff; }
.btn-danger { background: #3a2530; border-color: #81515d; color: #ffd8dc; }
.actions { gap: 10px; }
.actions > .btn,
.actions > button { white-space: normal; }
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid #34475a;
  border-radius: 12px;
  background: #101a27;
}
.table-wrap table { width: 100%; min-width: 650px; border-collapse: separate; border-spacing: 0; }
.table-wrap th,
.table-wrap td { padding: 13px 15px; border-bottom: 1px solid #28394a; vertical-align: middle; }
.table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #1b2b3d;
  color: #bdd0e2;
  font-size: .68rem;
  font-weight: 750;
  letter-spacing: .075em;
}
.table-wrap td { color: #dbe5ed; font-size: .82rem; }
.table-wrap tbody tr:nth-child(even) { background: #142130; }
.table-wrap tbody tr:hover { background: #1b2d40; }
.table-wrap a:not(.btn) { color: #b8d9f8; }
.table-wrap .btn { min-height: 38px; }
.table-wrap table:has(th:nth-child(8)) { min-width: 1100px; }
.table-wrap .team-table { min-width: 1780px !important; }
.team-table th { white-space: nowrap; }
.team-table th:first-child,
.team-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 145px;
  background: #172536;
  box-shadow: 1px 0 #34485c;
}
.team-table th:first-child { z-index: 3; background: #1b2b3d; }
.team-table .user-actions { min-width: 340px; }
.team-table .user-actions form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.team-table .user-actions select { min-width: 0; }
.team-table .user-actions .btn { min-height: 40px; }
.badge { background: #213650; border-color: #496989; color: #dcecff; font-weight: 710; }
.badge.good { background: #19392e; border-color: #407960; color: #a8e3c0; }
.badge.warn { background: #3d3020; border-color: #79613d; color: #f3d8a6; }
.badge.bad { background: #412932; border-color: #82525f; color: #ffd1d6; }
.progress { height: 9px; background: #27394a; }
.progress > i { background: #8ab9e7; }
.metric { margin: 18px 0; }
.metric-head { color: #dbe5ef; }
.kpi-pill { background: #1d2d3e; border-color: #39516b; color: #d0deeb; }
.flash { padding: 14px 16px; border-color: #48627c; background: #182d42; color: #e9f3fc; }
.flash.success { border-color: #46745e; background: #173629; }
.flash.error { border-color: #845361; background: #3b242d; }
.empty {
  padding: clamp(28px, 4vw, 46px) 20px;
  border: 1px dashed #415870;
  border-radius: 12px;
  background: #101d2b;
}
.empty-mark { color: #a9d0f4; }
.empty strong { color: #f1f7fd; font-size: 1rem; }
.empty p { max-width: 58ch; margin: 8px auto 0; color: #afc0d1; font-size: .83rem; line-height: 1.6; }
.pagination { flex-wrap: wrap; color: #c3d3e3; }
.app-footer { border-top-color: #2b3b4d; color: #91a5b9; }
.page-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin: 0 0 20px;
  padding: 24px 28px;
  border: 1px solid #3a5875;
  border-radius: 16px;
  background: #1a3046;
}
.page-intro .eyebrow { flex-basis: 100%; margin: 0; }
.page-intro h2 { flex: 1 1 320px; margin: 0; color: #f5f9fc; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.page-intro .muted { flex-basis: 100%; margin: 0; color: #c4d1df; }
.page-intro .btn { margin-left: auto; }
.filter-bar { gap: 12px; align-items: end; }
.filter-bar label { min-width: min(100%, 160px); }
.filter-bar .btn { min-width: 112px; }
.user-actions { gap: 8px; }
.user-actions .btn { min-height: 40px; }
.team-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.reward-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-action { margin: 20px 0 0; }
.activity-entry,
.followup-entry { padding: 14px 0; border-bottom: 1px solid #2c3e50; }
.activity-entry:last-child,
.followup-entry:last-child { border-bottom: 0; }
.activity-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.followup-entry p { overflow-wrap: anywhere; color: #d4e1ec; line-height: 1.65; }
.charter-panel { max-width: 1050px; }
.charter-title { margin: 13px 0 17px; }
.charter-content { white-space: pre-wrap; overflow-wrap: anywhere; color: #c5d4e2; line-height: 1.8; }
.charter-editor { min-height: 360px !important; }
.charter-accept-form { margin-top: 26px; padding-top: 20px; border-top: 1px solid #304559; }
.charter-accept-label { display: flex !important; align-items: flex-start; gap: 10px; font-size: .88rem !important; line-height: 1.55; }
.charter-accept-label input { flex: 0 0 auto; width: 18px !important; height: 18px; margin-top: 3px; }
.charter-accept-form .btn { margin-top: 17px; }
.charter-accepted { margin-top: 22px; }

/* Authentication shares the member palette and component rhythm. */
body.auth-body {
  background: radial-gradient(ellipse 60% 65% at 0 -10%, #1d344b 0, #090e16 72%);
}
.auth-layout {
  width: min(1500px, 100%);
  gap: clamp(16px, 2.5vw, 36px);
  padding: clamp(14px, 2.5vw, 36px);
  grid-template-columns: minmax(0, 1.1fr) minmax(370px, .9fr);
}
.auth-story {
  min-height: calc(100dvh - 72px);
  padding: clamp(30px, 4vw, 62px);
  border: 1px solid #3a526b;
  border-radius: 20px;
  background: linear-gradient(145deg, #203a52, #142637 55%, #101d2c);
  box-shadow: none;
}
.auth-story::before {
  top: auto;
  right: -130px;
  bottom: -190px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(138, 184, 220, .12), transparent 68%);
}
.auth-story::after { display: none; }
.auth-story-copy { max-width: 600px; padding-block: 60px; }
.auth-kicker { color: #aed4f5; letter-spacing: .13em; }
.auth-story h1 {
  max-width: 600px;
  color: #f7fafd;
  font-size: clamp(2.35rem, 4.2vw, 4.25rem);
  font-weight: 740;
  letter-spacing: -.047em;
  line-height: 1.09;
}
.auth-story p { max-width: 51ch; color: #cfdae5; font-size: clamp(.96rem, 1.1vw, 1.06rem); line-height: 1.7; }
.auth-story-foot { color: #c2d1de; }
.auth-panel {
  align-self: center;
  padding: clamp(26px, 4vw, 58px);
  border: 1px solid #33485d;
  border-radius: 20px;
  background: #121e2c;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .17);
}
.auth-panel h2 { color: #f7fafd; font-size: clamp(1.75rem, 2.4vw, 2.2rem); letter-spacing: -.035em; }
.auth-panel .auth-intro { color: #b9c8d8; line-height: 1.65; }
.auth-form { gap: 17px; }
.auth-form label { color: #d8e4ef; font-size: .81rem; font-weight: 650; }
.auth-form input:not([type=checkbox]) {
  min-height: 50px;
  background: #0c1723;
  border-color: #435b72;
  color: #f6f8fb;
}
.auth-form input:focus-visible { border-color: #a5c9ed; box-shadow: 0 0 0 3px rgba(145, 192, 236, .17); }
.auth-password-toggle { min-height: 40px; background: #25394d; border-color: #4b657e; color: #e7f1f9; }
.auth-form .auth-submit { min-height: 52px; margin-top: 7px; font-size: .9rem; }
.auth-actions { border-top: 1px solid #304255; padding-top: 18px; }
.auth-actions a,
.auth-back { color: #b9d9f7; }
.auth-note { color: #9aafc2; }
.auth-error { border-color: #845360; background: #3d2730; color: #ffe1e4; }

/* Cookies remain visible above the fixed five-item navigation. */
.nyxo-cookie-banner,
.nyxo-cookie-dialog {
  background: #142131;
  border: 1px solid #496077;
  color: #f2f6fa;
  box-shadow: 0 18px 54px rgba(0, 0, 0, .35);
}
.nyxo-cookie-banner { border-radius: 16px; }
.nyxo-cookie-banner p,
.nyxo-cookie-dialog p { color: #c2d0df; }
.nyxo-cookie-actions button { background: #25405a; border-color: #64829e; border-radius: 9px; }
.nyxo-cookie-actions button:hover { background: #335571; }

@media (max-width: 1250px) {
  .founder-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .app-sidebar { width: min(360px, 88vw); }
  .app-main { padding: 25px clamp(17px, 3vw, 32px) calc(112px + env(safe-area-inset-bottom)); }
  .app-bottom-nav {
    background: #101b29;
    border-top: 1px solid #3c5369;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .26);
  }
  .bottom-nav-item { min-height: 56px; color: #acbbcb; }
  .bottom-nav-item.is-active:not(.bottom-nav-home) { background: #20374d; color: #edf6ff; }
  .bottom-nav-home .bottom-nav-icon {
    background: #a8cef2;
    border-color: #cee6fa;
    border-radius: 15px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .25);
  }
  .bottom-nav-home .nav-icon { color: #12263a; }
  .bottom-nav-home.is-active .bottom-nav-icon { box-shadow: 0 0 0 3px #3c5b76, 0 8px 18px rgba(0, 0, 0, .25); }
  body.app-body .nyxo-cookie-banner {
    bottom: calc(88px + env(safe-area-inset-bottom));
    max-height: calc(100dvh - 106px - env(safe-area-inset-bottom));
  }
}
@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; max-width: 720px; }
  .auth-story { min-height: 250px; padding: 28px; }
  .auth-story-copy { padding: 24px 0 18px; }
  .auth-story h1 { max-width: 590px; font-size: clamp(1.9rem, 5vw, 2.8rem); }
  .auth-panel { width: 100%; }
}
@media (max-width: 720px) {
  .app-main { padding-inline: 15px; padding-top: 18px; }
  .app-topbar { min-height: 56px; margin-bottom: 18px; padding-bottom: 17px; }
  .app-topbar h1 { font-size: clamp(1.42rem, 5.2vw, 1.85rem); }
  .panel { padding: 18px; }
  .grid-2, .grid-3, .trend-grid { grid-template-columns: 1fr; }
  .panel-head { flex-wrap: wrap; }
  .panel-head > .actions, .panel-head > form { max-width: 100%; }
  .founder-tool-grid, .reward-tier-grid { grid-template-columns: 1fr; }
  .founder-tool-grid a { min-height: 90px; }
  .table-wrap table { min-width: 620px; }
  .actions { align-items: stretch; }
  .actions > .btn, .actions > button { flex: 1 1 auto; }
  .pagination .btn { flex: 1 1 110px; }
  .app-footer { gap: 8px; }
}
@media (max-width: 520px) {
  .auth-layout { padding: 12px; gap: 12px; }
  .auth-story { min-height: 0; padding: 18px 22px; border-radius: 15px; }
  .auth-brand img { width: 112px; }
  .auth-story-copy { margin: 0; padding: 18px 0 0; }
  .auth-story h1 { font-size: clamp(1.35rem, 6vw, 1.7rem); line-height: 1.18; }
  .auth-story p, .auth-story-foot { display: none; }
  .auth-kicker { margin-bottom: 9px; font-size: .62rem; }
  .auth-panel { padding: 24px 20px; border-radius: 15px; }
  .auth-actions { flex-wrap: wrap; gap: 12px; }
  .auth-actions a { min-height: 38px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { min-height: 106px; padding: 15px; }
  .stat-card strong { font-size: clamp(1.35rem, 6vw, 1.8rem); overflow-wrap: anywhere; }
  .match-request-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nyxo-cookie-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .nyxo-cookie-actions button { width: 100%; }
  .nyxo-cookie-banner { padding: 15px; gap: 8px; }
  .nyxo-cookie-banner p { margin: 5px 0; font-size: .8rem; line-height: 1.45; }
  .nyxo-cookie-banner strong { font-size: .96rem; }
  .nyxo-cookie-banner a { font-size: .8rem; }
  .nyxo-cookie-actions button { min-height: 40px; padding: 7px 9px; font-size: .78rem; }
  .team-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-intro { padding: 20px; }
  .page-intro .btn { margin-left: 0; }
}
@media (max-width: 360px) {
  .stats-grid { grid-template-columns: 1fr; }
  .app-main { padding-inline: 11px; }
  .panel { padding: 15px; }
  .bottom-nav-label { font-size: .54rem; }
  .nyxo-cookie-actions { grid-template-columns: 1fr; }
  .team-stats-grid, .reward-summary-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .founder-tool-grid a { transition: none; }
}
