:root {
      color-scheme: dark;
      --bg: #0c0c0e;
      --bg-soft: #09090b;
      --panel: rgba(15, 15, 17, 0.92);
      --panel-strong: rgba(19, 19, 22, 0.96);
      --panel-soft: rgba(12, 12, 14, 0.92);
      --panel-lift: rgba(24, 24, 28, 0.82);
      --text: #e4e4e7;
      --text-strong: #f4f4f5;
      --muted: #71717a;
      --muted-strong: #a1a1aa;
      --line: rgba(255, 255, 255, 0.06);
      --line-strong: rgba(255, 255, 255, 0.1);
      --accent: #e4e4e7;
      --accent-strong: #f4f4f5;
      --accent-soft: rgba(244, 244, 245, 0.08);
      --text-on-accent: #18181b;
      --green: #22c55e;
      --red: #ef4444;
      --amber: #eab308;
      --blue: #3b82f6;
      --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
      --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.4);
      --radius: 12px;
    }

    * {
      box-sizing: border-box;
    }

    [hidden] {
      display: none !important;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background: var(--bg);
      color: var(--text);
      font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      line-height: 1.45;
      font-size: 15px;
    }

    body::before {
      display: none;
    }

    button,
    input,
    select,
    textarea {
      font: inherit;
    }

    button {
      cursor: pointer;
    }

    .app {
      width: min(1500px, 100%);
      margin: 0 auto;
      padding: clamp(18px, 2.2vw, 34px);
      position: relative;
    }

    .topbar {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 22px;
      margin-bottom: 26px;
      padding-bottom: 18px;
      border-bottom: 1px solid var(--line);
    }

    .topbar > div:first-child {
      max-width: 840px;
    }

    .eyebrow {
      margin: 0 0 4px;
      color: var(--accent-strong);
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    h1 {
      margin: 0;
      font-size: clamp(1.85rem, 3vw, 2.8rem);
      line-height: 1.05;
      letter-spacing: 0;
      color: var(--text-strong);
    }

    .subtitle {
      margin: 8px 0 0;
      color: var(--muted);
      max-width: 760px;
      font-size: 0.96rem;
    }

    .storage-status {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--muted-strong);
      font-size: 0.9rem;
      background: var(--panel-strong);
      border: 1px solid var(--line);
      border-radius: 10px;
      padding: 10px 14px;
      box-shadow: var(--shadow-soft);
      white-space: nowrap;
    }

    .storage-status[data-state="saving"] .status-dot {
      background: var(--amber);
      box-shadow: 0 0 0 4px rgba(234, 179, 8, 0.14), 0 0 20px rgba(234, 179, 8, 0.45);
      animation: save-status-pulse 1.1s ease-in-out infinite alternate;
    }

    .storage-status[data-state="error"] .status-dot {
      background: var(--red);
      box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14), 0 0 20px rgba(239, 68, 68, 0.45);
    }

    .storage-status[data-state="local"] .status-dot {
      background: var(--blue);
      box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14), 0 0 18px rgba(59, 130, 246, 0.4);
    }

    .storage-status[data-state="idle"] .status-dot {
      background: var(--muted);
      box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
    }

    @keyframes save-status-pulse {
      from { opacity: 0.55; }
      to { opacity: 1; }
    }

    .topbar-actions {
      flex: 0 0 auto;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 10px;
    }

    .user-greeting {
      min-height: 42px;
      display: inline-flex;
      align-items: center;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel-soft);
      color: var(--text-strong);
      padding: 9px 14px;
      font-size: 0.88rem;
      font-weight: 850;
      white-space: nowrap;
    }

    .user-greeting span {
      color: var(--accent-strong);
      margin-left: 5px;
    }

    .app-nav {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-strong);
      padding: 6px;
      margin-bottom: 22px;
      box-shadow: var(--shadow-soft);
    }

    .nav-tab {
      min-height: 38px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: transparent;
      color: var(--muted-strong);
      padding: 0 16px;
      font-size: 0.86rem;
      font-weight: 850;
      transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
    }

    .nav-tab:hover {
      color: var(--text-strong);
      background: var(--panel-lift);
    }

    .nav-tab.active {
      border-color: rgba(244, 244, 245, 0.2);
      background: var(--accent-soft);
      color: var(--text-strong);
      box-shadow: none;
    }

    .app-page {
      display: block;
    }

    .app-page:not(.active) {
      display: none;
    }

    .role-hidden {
      display: none !important;
    }

    .settings-page {
      display: grid;
      gap: 18px;
      max-width: 940px;
      margin: 0 auto;
    }

    .admin-page {
      display: grid;
      gap: 16px;
    }

    .admin-intro {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 22px;
    }

    .admin-intro h2 {
      margin: 4px 0 6px;
    }

    .admin-stat-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .admin-stat {
      display: grid;
      gap: 12px;
      padding: 18px;
    }

    .admin-stat span,
    .admin-feature-heading {
      color: var(--muted-strong);
      font-size: 0.76rem;
      font-weight: 850;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .admin-stat strong {
      color: var(--text-strong);
      font-size: 1.8rem;
      line-height: 1;
    }

    .admin-section {
      display: grid;
      gap: 14px;
      padding: 20px;
    }

    .admin-members-list,
    .admin-reports-list {
      display: grid;
      gap: 10px;
    }

    .admin-member-row,
    .admin-report-row {
      min-width: 0;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-soft);
      padding: 14px;
    }

    .admin-member-row {
      display: grid;
      grid-template-columns: minmax(170px, 1.2fr) minmax(220px, 1.5fr) minmax(120px, 0.6fr) minmax(230px, 1fr);
      align-items: center;
      gap: 14px;
    }

    .admin-member-identity,
    .admin-member-meta,
    .admin-role-control,
    .admin-feature-controls {
      display: grid;
      gap: 6px;
      min-width: 0;
    }

    .admin-member-identity strong {
      overflow-wrap: anywhere;
    }

    .admin-member-identity span,
    .admin-member-meta span,
    .admin-role-control,
    .admin-report-author {
      color: var(--muted);
      font-size: 0.78rem;
    }

    .admin-member-meta {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px 12px;
    }

    .admin-member-meta strong {
      color: var(--text-strong);
    }

    .admin-role-control select,
    .admin-report-status select {
      width: 100%;
      min-height: 36px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--bg-soft);
      color: var(--text-strong);
      padding: 6px 9px;
    }

    .admin-feature-controls {
      grid-template-columns: repeat(2, max-content);
      align-items: center;
      gap: 8px 12px;
    }

    .admin-feature-heading {
      grid-column: 1 / -1;
    }

    .admin-feature-controls label {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      color: var(--muted-strong);
      font-size: 0.78rem;
    }

    .admin-feature-controls input {
      accent-color: var(--accent);
    }

    .admin-report-row {
      display: grid;
      gap: 10px;
    }

    .admin-report-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 16px;
    }

    .admin-report-head > div {
      display: grid;
      gap: 5px;
      min-width: 0;
    }

    .admin-report-category {
      width: fit-content;
      border-radius: 999px;
      background: var(--accent-soft);
      color: var(--accent-strong);
      padding: 3px 8px;
      font-size: 0.72rem;
      font-weight: 850;
    }

    .admin-report-row p {
      margin: 0;
      color: var(--muted-strong);
      line-height: 1.5;
      overflow-wrap: anywhere;
      white-space: pre-wrap;
    }

    .admin-report-status {
      display: grid;
      gap: 5px;
      min-width: 145px;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .admin-message {
      min-height: 1.2em;
      margin: -8px 2px 0;
      color: var(--muted-strong);
      font-size: 0.85rem;
    }

    .settings-intro,
    .settings-card {
      padding: 22px;
    }

    .settings-intro h2 {
      margin: 0;
      color: var(--text-strong);
      font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    }

    .settings-intro .panel-kicker {
      margin: 8px 0 0;
    }

    .settings-card h3 {
      margin: 0 0 6px;
      color: var(--text-strong);
      font-size: 1.05rem;
    }

    .settings-description,
    .settings-account-email,
    .settings-message,
    .settings-warning {
      margin: 0;
      color: var(--muted-strong);
      font-size: 0.86rem;
      line-height: 1.55;
    }

    .settings-form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: end;
      gap: 14px;
      margin-top: 16px;
    }

    .settings-password-form {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .settings-password-form button {
      justify-self: start;
    }

    .settings-account-email {
      grid-column: 1 / -1;
      overflow-wrap: anywhere;
    }

    .settings-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 16px;
    }

    .settings-warning {
      margin-top: 12px;
      color: var(--amber);
    }

    .settings-message:not(:empty) {
      margin-top: 12px;
    }

    .status-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: var(--green);
      box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14), 0 0 20px rgba(34, 197, 94, 0.55);
    }

    body:not(.is-authenticated) .app {
      display: none;
    }

    body.is-authenticated .auth-screen {
      display: none;
    }

    .auth-screen {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: clamp(18px, 4vw, 42px);
      position: relative;
    }

    .auth-stack {
      width: min(480px, 100%);
      display: grid;
      justify-items: center;
      gap: 36px;
    }

    .auth-logo {
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      gap: 16px;
      color: var(--text-strong);
      text-align: left;
      filter: none;
    }

    .auth-logo-mark {
      width: 78px;
      height: 78px;
      display: grid;
      place-items: center;
      border: 1px solid rgba(244, 244, 245, 0.2);
      border-radius: 18px;
      background:
        radial-gradient(circle at 62% 20%, rgba(244, 244, 245, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(244, 244, 245, 0.08), rgba(244, 244, 245, 0.02)),
        #1b1b1f;
      color: var(--accent-strong);
      box-shadow:
        inset 0 0 0 1px rgba(244, 244, 245, 0.06),
        0 18px 44px rgba(0, 0, 0, 0.32);
      overflow: hidden;
    }

    .auth-logo-mark svg {
      width: 56px;
      height: 56px;
      display: block;
    }

    .logo-orbit {
      fill: none;
      stroke: rgba(244, 244, 245, 0.08);
      stroke-width: 1;
    }

    .logo-bar {
      fill: rgba(244, 244, 245, 0.18);
      stroke: rgba(244, 244, 245, 0.78);
      stroke-width: 1.3;
      filter: drop-shadow(0 0 4px rgba(244, 244, 245, 0.32));
    }

    .logo-arrow,
    .logo-arrow-head {
      fill: none;
      stroke: rgba(255, 255, 255, 0.96);
      stroke-width: 4.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.52));
    }

    .auth-logo-text {
      display: inline-flex;
      align-items: baseline;
      gap: 9px;
      color: var(--text-strong);
      font-size: clamp(2rem, 7vw, 3rem);
      font-weight: 900;
      line-height: 1;
      letter-spacing: 0;
      text-transform: none;
      white-space: nowrap;
    }

    .auth-logo-text span:last-child {
      color: var(--text);
      font-size: 0.86em;
      font-weight: 800;
      letter-spacing: 0;
      margin-top: 0;
    }

    .auth-card {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--panel-strong);
      box-shadow: var(--shadow);
      padding: clamp(24px, 4vw, 36px);
    }

    .auth-title {
      margin: 0;
      color: var(--text-strong);
      font-size: clamp(1.45rem, 5vw, 2rem);
      font-weight: 900;
      line-height: 1.08;
      letter-spacing: 0;
      text-align: center;
    }

    .auth-subtitle {
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 0.92rem;
      font-weight: 750;
      text-align: center;
    }

    .auth-link {
      border: 0;
      background: transparent;
      color: var(--accent-strong);
      font-weight: 900;
      padding: 0;
      text-decoration: none;
      transition: color 140ms ease, text-shadow 140ms ease;
    }

    .auth-link:hover {
      color: var(--accent-strong);
      text-shadow: none;
    }

    .auth-fields {
      display: grid;
      gap: 14px;
      margin-top: 30px;
    }

    .auth-username-field.is-hidden {
      display: none;
    }

    .password-field {
      position: relative;
    }

    .password-field input {
      padding-right: 48px;
    }

    .password-toggle {
      position: absolute;
      right: 10px;
      top: 50%;
      width: 34px;
      height: 34px;
      min-height: 34px;
      display: grid;
      place-items: center;
      border: 1px solid transparent;
      border-radius: 10px;
      background: transparent;
      color: var(--muted);
      padding: 0;
      transform: translateY(-50%);
      transition: border-color 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
    }

    .password-toggle:hover {
      border-color: rgba(244, 244, 245, 0.22);
      background: var(--accent-soft);
      color: var(--accent-strong);
      box-shadow: none;
    }

    .password-toggle svg {
      width: 18px;
      height: 18px;
      stroke: currentColor;
    }

    .auth-actions {
      margin-top: 22px;
    }

    .auth-submit {
      width: 100%;
      min-height: 50px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: var(--accent);
      color: var(--text-on-accent, #ffffff);
      font-weight: 900;
      letter-spacing: 0.02em;
      padding: 0 16px;
      box-shadow: var(--shadow-soft);
      transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
    }

    .auth-submit:hover {
      border-color: transparent;
      background: #d4d4d8;
      box-shadow: var(--shadow-soft);
      transform: translateY(-1px);
    }

    .auth-submit:active {
      transform: translateY(0);
    }

    .auth-submit:disabled {
      cursor: not-allowed;
      opacity: 0.3;
      transform: none;
    }

    .auth-actions .auth-submit {
      margin-top: 0;
    }

    .auth-note {
      min-height: 20px;
      margin: 14px 0 0;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 750;
    }

    .account-panel {
      margin-bottom: 22px;
      padding: 22px;
    }

    .account-switcher {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
      gap: 18px;
      align-items: end;
    }

    .current-account-name {
      margin: 2px 0 0;
      color: var(--text-strong);
      font-size: clamp(1.25rem, 2.1vw, 1.9rem);
      line-height: 1.12;
      letter-spacing: 0;
    }

    .current-account-meta {
      margin: 8px 0 0;
      color: var(--muted);
      font-size: 0.9rem;
      font-weight: 700;
    }

    .account-status-row {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 10px;
      margin-top: 12px;
    }

    .journal-scope-panel {
      margin-top: 18px;
      border: 1px solid rgba(148, 163, 184, 0.14);
      border-radius: 8px;
      background: #0f0f11;
      padding: 14px;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 12px;
      align-items: start;
    }

    .journal-scope-title {
      color: var(--text-strong);
      font-size: 0.92rem;
      font-weight: 950;
    }

    .journal-scope-note {
      margin: 5px 0 0;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 750;
    }

    .journal-scope-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }

    .journal-scope-actions .mini-action {
      width: auto;
      min-width: 104px;
      padding: 0 12px;
      white-space: nowrap;
    }

    .journal-scope-list {
      grid-column: 1 / -1;
      display: grid;
      gap: 12px;
    }

    .journal-scope-group {
      display: grid;
      gap: 8px;
    }

    .journal-scope-group-title {
      color: var(--muted-strong);
      font-size: 0.72rem;
      font-weight: 950;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }

    .journal-scope-group-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
    }

    .journal-scope-option {
      border: 1px solid rgba(148, 163, 184, 0.16);
      border-radius: 8px;
      background: #0f0f11;
      padding: 10px;
      display: flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
      cursor: pointer;
    }

    .journal-scope-option.selected {
      border-color: rgba(244, 244, 245, 0.22);
      background: var(--accent-soft);
    }

    .journal-scope-option input {
      width: 16px;
      height: 16px;
      accent-color: var(--accent);
      flex: 0 0 auto;
    }

    .journal-scope-option span {
      color: var(--muted-strong);
      font-size: 0.84rem;
      font-weight: 850;
      min-width: 0;
      flex: 1 1 auto;
      overflow-wrap: anywhere;
    }

    .journal-scope-option strong {
      color: var(--muted);
      font-size: 0.78rem;
      white-space: nowrap;
    }

    .journal-scope-empty {
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 800;
    }

    .field.is-hidden {
      display: none;
    }

    .risk-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 32px;
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .risk-safe {
      color: #86efac;
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.3);
    }

    .risk-at-risk {
      color: #fde68a;
      background: rgba(251, 191, 36, 0.13);
      border: 1px solid rgba(251, 191, 36, 0.34);
    }

    .risk-danger {
      color: #fda4af;
      background: rgba(244, 63, 94, 0.14);
      border: 1px solid rgba(244, 63, 94, 0.36);
    }

    .risk-note {
      color: var(--muted);
      font-size: 0.86rem;
      font-weight: 750;
    }

    .account-empty-state {
      display: none;
      margin-top: 18px;
      border: 1px dashed rgba(148, 163, 184, 0.28);
      border-radius: 8px;
      background: #0f0f11;
      color: var(--muted);
      padding: 18px;
      text-align: center;
      font-weight: 800;
    }

    .accounts-overview-panel {
      margin-bottom: 22px;
      overflow: hidden;
    }

    .visible-accounts-menu {
      position: relative;
      min-width: 210px;
    }

    .visible-accounts-menu summary {
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #18181c;
      color: var(--muted-strong);
      padding: 9px 14px;
      font-size: 0.82rem;
      font-weight: 850;
      list-style: none;
      cursor: pointer;
    }

    .visible-accounts-menu summary::-webkit-details-marker {
      display: none;
    }

    .visible-accounts-list {
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      z-index: 10;
      min-width: 250px;
      max-height: 280px;
      overflow: auto;
      border: 1px solid var(--line-strong);
      border-radius: 14px;
      background: rgba(11, 18, 30, 0.98);
      box-shadow: var(--shadow-soft);
      padding: 10px;
    }

    .visible-account-option {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 9px;
      padding: 9px;
      border-radius: 10px;
      color: var(--muted-strong);
      font-size: 0.84rem;
      font-weight: 800;
    }

    .visible-account-toggle {
      display: flex;
      align-items: center;
      gap: 9px;
      min-width: 0;
      flex: 1;
    }

    .visible-account-toggle span {
      overflow-wrap: anywhere;
    }

    .visible-account-option:hover {
      background: rgba(148, 163, 184, 0.08);
    }

    .visible-account-option input {
      width: 16px;
      height: 16px;
      min-height: 16px;
      accent-color: var(--accent);
    }

    .accounts-overview-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 14px;
      padding: 22px;
    }

    .account-overview-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      color: var(--text);
      padding: 15px;
      text-align: left;
      transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
    }

    .account-overview-card:hover {
      border-color: var(--line-strong);
      background: #151518;
      transform: translateY(-1px);
    }

    .account-overview-card.active {
      border-color: rgba(244, 244, 245, 0.22);
      box-shadow: inset 0 0 0 1px rgba(244, 244, 245, 0.08);
    }

    .account-overview-card.challenge-passed {
      border-color: rgba(34, 197, 94, 0.32);
      background: rgba(34, 197, 94, 0.07);
    }

    .account-card-top {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: flex-start;
      margin-bottom: 14px;
    }

    .account-card-title {
      min-width: 0;
    }

    .account-card-name {
      color: var(--text-strong);
      font-size: 1rem;
      font-weight: 900;
      line-height: 1.18;
      overflow-wrap: anywhere;
    }

    .account-card-size {
      margin-top: 5px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
    }

    .account-card-actions {
      display: flex;
      gap: 7px;
      flex: 0 0 auto;
    }

    .mini-action {
      width: 30px;
      height: 30px;
      min-height: 30px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #18181c;
      color: var(--muted-strong);
      font-weight: 900;
      padding: 0;
    }

    .mini-action:hover {
      border-color: var(--line-strong);
      background: #1f1f24;
      color: var(--text-strong);
    }

    .mini-action.delete:hover {
      border-color: rgba(251, 113, 133, 0.5);
      color: #fda4af;
      background: rgba(244, 63, 94, 0.12);
    }

    .account-card-stats {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-bottom: 13px;
    }

    .account-stat {
      border: 1px solid rgba(148, 163, 184, 0.12);
      border-radius: 8px;
      background: #131316;
      padding: 9px;
      min-width: 0;
    }

    .account-stat-label {
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 850;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .account-stat-value {
      margin-top: 4px;
      color: var(--text-strong);
      font-size: 0.98rem;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
      overflow-wrap: anywhere;
    }

    .account-card-footer {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
    }

    .account-form {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
      align-items: end;
      margin-top: 18px;
      padding-top: 18px;
      border-top: 1px solid rgba(148, 163, 184, 0.12);
    }

    .account-form .primary-btn {
      margin-top: 0;
    }

    .account-type-field {
      min-width: 150px;
    }

    .metrics {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
      gap: 14px;
      margin-bottom: 18px;
    }

    .card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .metric-card {
      position: relative;
      overflow: hidden;
      padding: 18px;
      min-height: 124px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .metric-card::before {
      display: none;
    }

    .metric-card::after {
      content: "";
      position: absolute;
      left: 0;
      top: 18px;
      bottom: 18px;
      width: 2px;
      border-radius: 0 999px 999px 0;
      background: var(--accent);
      opacity: 0.72;
    }

    .metric-card > * {
      position: relative;
      z-index: 1;
    }

    .metric-label {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 10px;
      color: var(--muted);
      font-size: 0.74rem;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .metric-icon {
      width: 30px;
      height: 30px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(244, 244, 245, 0.14);
      border-radius: 8px;
      background: var(--accent-soft);
      color: var(--accent-strong);
      font-size: 0.8rem;
      font-weight: 900;
    }

    .metric-value {
      margin-top: 13px;
      font-size: clamp(1.55rem, 2.5vw, 2.35rem);
      line-height: 1;
      font-weight: 850;
      letter-spacing: 0;
      color: var(--text-strong);
      font-variant-numeric: tabular-nums;
      overflow-wrap: anywhere;
    }

    .metric-note {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.82rem;
      min-height: 1.1em;
    }

    .challenge-panel {
      margin-bottom: 22px;
      overflow: hidden;
    }

    .challenge-panel.challenge-complete {
      border-color: rgba(34, 197, 94, 0.34);
      box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(34, 197, 94, 0.08);
    }

    .challenge-panel.challenge-complete .progress-fill {
      background: var(--green);
    }

    .challenge-panel.challenge-complete .challenge-account-card {
      border-color: rgba(34, 197, 94, 0.28);
      background: rgba(34, 197, 94, 0.08);
    }

    .challenge-body {
      display: grid;
      grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.35fr);
      gap: 18px;
      padding: 22px;
    }

    .challenge-metrics-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
    }

    .challenge-account-card {
      min-height: 128px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      padding: 16px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .challenge-account-name {
      margin-top: 12px;
      color: var(--text-strong);
      font-size: clamp(1.25rem, 2vw, 1.7rem);
      font-weight: 900;
      line-height: 1.1;
    }

    .challenge-stat {
      min-height: 128px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel-soft);
      padding: 16px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .challenge-label {
      color: var(--muted);
      font-size: 0.74rem;
      font-weight: 850;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .challenge-value {
      margin-top: 12px;
      color: var(--text-strong);
      font-size: clamp(1.45rem, 2.4vw, 2.15rem);
      font-weight: 900;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    .challenge-note {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.82rem;
    }

    .progress-track {
      height: 9px;
      border-radius: 999px;
      background: rgba(148, 163, 184, 0.14);
      overflow: hidden;
      margin-top: 14px;
    }

    .progress-fill {
      height: 100%;
      width: 0%;
      border-radius: inherit;
      background: var(--accent);
      transition: width 160ms ease;
    }

    .status-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 0.82rem;
      font-weight: 900;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      width: fit-content;
    }

    .status-on-track {
      color: #86efac;
      background: rgba(34, 197, 94, 0.12);
      border: 1px solid rgba(34, 197, 94, 0.28);
    }

    .status-at-risk {
      color: #fde68a;
      background: rgba(251, 191, 36, 0.12);
      border: 1px solid rgba(251, 191, 36, 0.3);
    }

    .status-failed {
      color: #fda4af;
      background: rgba(244, 63, 94, 0.14);
      border: 1px solid rgba(244, 63, 94, 0.34);
    }

    .status-passed {
      color: #86efac;
      background: rgba(34, 197, 94, 0.14);
      border: 1px solid rgba(34, 197, 94, 0.34);
    }

    .best-edge-panel {
      position: relative;
      overflow: hidden;
      margin-bottom: 22px;
      border-color: var(--line);
      background: var(--panel-strong);
    }

    .best-edge-panel::after {
      display: none;
    }

    .best-edge-content {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 18px;
      align-items: center;
      padding: 22px;
    }

    .best-edge-title {
      margin: 4px 0 0;
      color: var(--text-strong);
      font-size: clamp(1.2rem, 2vw, 1.85rem);
      line-height: 1.16;
      letter-spacing: 0;
    }

    .best-edge-details {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 8px;
    }

    .best-edge-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 8px;
      background: #0f0f11;
      padding: 7px 12px;
      color: var(--muted-strong);
      font-size: 0.82rem;
      font-weight: 850;
      white-space: nowrap;
      font-variant-numeric: tabular-nums;
    }

    .monthly-report-panel {
      margin-bottom: 22px;
      overflow: hidden;
    }

    .monthly-report-actions {
      min-width: 190px;
    }

    .monthly-report-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 12px;
      padding: 22px;
    }

    .monthly-report-card {
      min-height: 116px;
      border: 1px solid rgba(148, 163, 184, 0.14);
      border-radius: 8px;
      background: #0f0f11;
      padding: 14px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 12px;
    }

    .monthly-report-card.wide {
      grid-column: span 2;
    }

    .monthly-report-label {
      color: var(--muted);
      font-size: 0.7rem;
      font-weight: 900;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .monthly-report-value {
      color: var(--text-strong);
      font-size: 1.32rem;
      line-height: 1.1;
      font-weight: 950;
      overflow-wrap: anywhere;
      font-variant-numeric: tabular-nums;
    }

    .monthly-report-note {
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 800;
    }

    .layout {
      display: grid;
      grid-template-columns: minmax(390px, 0.88fr) minmax(0, 1.72fr);
      gap: 22px;
      align-items: start;
    }

    .layout > .card:first-child {
      position: sticky;
      top: 18px;
    }

    .panel-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 16px;
      padding: 22px 22px 0;
    }

    .panel-title {
      margin: 0;
      color: var(--text-strong);
      font-size: 1rem;
      letter-spacing: 0;
    }

    .panel-kicker {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 0.84rem;
    }

    .trade-form {
      padding: 22px;
    }

    .trade-entry-section {
      scroll-margin-top: 20px;
    }

    .form-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 14px;
    }

    .field {
      display: flex;
      flex-direction: column;
      gap: 7px;
      min-width: 0;
    }

    .field.full {
      grid-column: 1 / -1;
    }

    label {
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.02em;
    }

    input,
    select,
    textarea {
      width: 100%;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #070709;
      color: var(--text);
      outline: none;
      min-height: 45px;
      padding: 11px 13px;
      transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
    }

    select {
      color-scheme: dark;
    }

    input::placeholder,
    textarea::placeholder {
      color: var(--muted);
    }

    input[type="file"] {
      padding: 9px 11px;
    }

    input[type="file"]::file-selector-button {
      margin-right: 12px;
      border: 1px solid rgba(244, 244, 245, 0.14);
      border-radius: 7px;
      background: var(--accent-soft);
      color: var(--accent-strong);
      padding: 7px 10px;
      font-weight: 850;
      cursor: pointer;
    }

    textarea {
      min-height: 88px;
      resize: vertical;
    }

    input:focus,
    select:focus,
    textarea:focus {
      border-color: rgba(244, 244, 245, 0.22);
      box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.08);
      background: #070709;
    }

    input[readonly] {
      color: var(--accent-strong);
      background: var(--accent-soft);
      border-color: rgba(244, 244, 245, 0.14);
      font-weight: 850;
    }

    .primary-btn {
      width: 100%;
      margin-top: 18px;
      border: 1px solid transparent;
      border-radius: 8px;
      background: var(--accent);
      color: var(--text-on-accent);
      font-weight: 850;
      min-height: 48px;
      padding: 14px 16px;
      box-shadow: var(--shadow-soft);
      transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
    }

    .primary-btn:hover {
      background: #d4d4d8;
      transform: translateY(-1px);
      box-shadow: var(--shadow-soft);
    }

    .primary-btn:active {
      transform: translateY(0);
    }

    .trade-form-actions {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      margin-top: 18px;
    }

    .trade-form-actions .primary-btn {
      margin-top: 0;
    }

    .trade-cancel-edit {
      min-width: 126px;
    }

    .trade-cancel-edit.is-hidden {
      display: none;
    }

    .right-stack {
      display: grid;
      gap: 18px;
    }

    .chart-panel {
      padding-bottom: 18px;
      overflow: hidden;
    }

    .chart-wrap {
      height: 320px;
      padding: 12px 22px 0;
    }

    .drawdown-wrap {
      height: 220px;
      padding-top: 8px;
    }

    .result-distribution {
      display: grid;
      grid-template-columns: minmax(230px, 1fr) minmax(220px, 0.85fr);
      gap: 14px;
      padding: 12px 22px 22px;
    }

    .distribution-card {
      min-height: 260px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #131316;
      padding: 18px;
    }

    .distribution-card h3 {
      margin: 0 0 16px;
      color: var(--muted-strong);
      font-size: 1rem;
      font-weight: 900;
      text-align: center;
    }

    .distribution-pie {
      width: min(100%, 230px);
      aspect-ratio: 1;
      margin: 0 auto 16px;
      border-radius: 50%;
      background: var(--pie-bg);
      border: 1px solid rgba(244, 244, 245, 0.08);
      box-shadow: inset 0 0 0 1px rgba(244, 244, 245, 0.04);
    }

    .distribution-legend {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
    }

    .distribution-legend-item {
      display: grid;
      gap: 6px;
      text-align: center;
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 850;
    }

    .distribution-legend-item i {
      height: 5px;
      border-radius: 999px;
      background: var(--muted);
    }

    .distribution-legend-item.tp i {
      background: var(--green);
    }

    .distribution-legend-item.sl i {
      background: var(--red);
    }

    .distribution-legend-item.be i {
      background: var(--amber);
    }

    .distribution-legend-item strong {
      color: var(--muted);
      font-size: 0.78rem;
    }

    .distribution-summary {
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 16px;
    }

    .distribution-summary dl {
      display: grid;
      gap: 8px;
      margin: 0;
    }

    .distribution-summary dl div,
    .distribution-result-line {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: var(--muted-strong);
      font-weight: 850;
    }

    .distribution-summary dt,
    .distribution-summary dd {
      margin: 0;
    }

    .distribution-summary dd,
    .distribution-result-line strong {
      color: var(--text-strong);
      font-weight: 950;
      font-variant-numeric: tabular-nums;
    }

    .chart-subhead {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 14px 22px 0;
      color: var(--muted-strong);
      font-size: 0.82rem;
      font-weight: 850;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    canvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    .calendar-panel {
      overflow-x: auto;
      overflow-y: hidden;
    }

    .calendar-actions {
      display: grid;
      grid-template-columns: 38px minmax(140px, auto) 38px;
      gap: 8px;
      align-items: center;
    }

    .icon-btn {
      width: 38px;
      min-width: 38px;
      min-height: 38px;
      padding: 0;
      border-radius: 10px;
      font-size: 1rem;
      font-weight: 900;
    }

    .calendar-title {
      min-height: 38px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #070709;
      color: var(--text-strong);
      font-size: 0.86rem;
      font-weight: 900;
      padding: 0 12px;
      white-space: nowrap;
    }

    .calendar-grid {
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(92px, 0.82fr);
      gap: 8px;
      padding: 22px;
      min-width: 720px;
    }

    .calendar-weekday {
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 900;
      letter-spacing: 0.06em;
      text-align: center;
      text-transform: uppercase;
    }

    .calendar-week-total-label {
      color: var(--text);
    }

    .calendar-day {
      min-height: 86px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      color: var(--text);
      padding: 10px;
      text-align: left;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 8px;
      transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
    }

    .calendar-day:hover {
      border-color: var(--line-strong);
      transform: translateY(-1px);
    }

    .calendar-day.outside-month {
      opacity: 0.38;
    }

    .calendar-day.selected {
      border-color: rgba(244, 244, 245, 0.22);
      box-shadow: inset 0 0 0 1px rgba(244, 244, 245, 0.08);
    }

    .calendar-day.positive-day {
      border-color: rgba(34, 197, 94, 0.34);
      background: rgba(34, 197, 94, 0.12);
    }

    .calendar-day.negative-day {
      border-color: rgba(251, 113, 133, 0.36);
      background: rgba(251, 113, 133, 0.12);
    }

    .calendar-day.break-even-day {
      border-color: rgba(251, 191, 36, 0.42);
      background: rgba(251, 191, 36, 0.12);
    }

    .calendar-day.neutral-day {
      border-color: rgba(148, 163, 184, 0.18);
      background: rgba(148, 163, 184, 0.07);
    }

    .calendar-date {
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 900;
    }

    .calendar-r {
      font-size: 1.08rem;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }

    .calendar-trades {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 800;
    }

    .calendar-week-total {
      min-height: 86px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 8px;
      text-align: center;
    }

    .calendar-week-total.positive-week {
      border-color: rgba(34, 197, 94, 0.34);
      background: rgba(34, 197, 94, 0.12);
    }

    .calendar-week-total.negative-week {
      border-color: rgba(251, 113, 133, 0.36);
      background: rgba(251, 113, 133, 0.12);
    }

    .calendar-week-total.break-even-week {
      border-color: rgba(251, 191, 36, 0.42);
      background: rgba(251, 191, 36, 0.12);
    }

    .calendar-week-total.neutral-week {
      border-color: rgba(148, 163, 184, 0.18);
      background: rgba(148, 163, 184, 0.07);
    }

    .week-label {
      color: var(--muted-strong);
      font-size: 0.72rem;
      font-weight: 900;
    }

    .calendar-week-total strong {
      font-size: clamp(1rem, 1.8vw, 1.42rem);
      line-height: 1;
      font-weight: 950;
      font-variant-numeric: tabular-nums;
    }

    .week-days {
      min-height: 24px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      background: rgba(244, 244, 245, 0.08);
      color: var(--muted-strong);
      padding: 4px 8px;
      font-size: 0.68rem;
      font-weight: 900;
    }

    .calendar-detail {
      margin: 0 22px 22px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #070709;
      color: var(--muted-strong);
      padding: 12px 14px;
      font-size: 0.86rem;
      font-weight: 800;
    }

    .index-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
      gap: 12px;
      padding: 22px;
    }

    .heatmap-grid {
      display: grid;
      gap: 14px;
      padding: 22px;
    }

    .heatmap-group {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 13px;
    }

    .heatmap-title {
      margin: 0 0 10px;
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 850;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .heatmap-cells {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
      gap: 10px;
    }

    .heatmap-cell {
      min-height: 78px;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 11px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .heatmap-cell.heat-positive {
      border-color: rgba(34, 197, 94, 0.34);
      background: rgba(34, 197, 94, var(--heat-alpha));
    }

    .heatmap-cell.heat-negative {
      border-color: rgba(251, 113, 133, 0.36);
      background: rgba(251, 113, 133, var(--heat-alpha));
    }

    .heatmap-cell.heat-neutral {
      border-color: rgba(148, 163, 184, 0.18);
      background: rgba(148, 163, 184, 0.08);
    }

    .heatmap-label {
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 850;
      overflow-wrap: anywhere;
    }

    .heatmap-value {
      font-size: 1.32rem;
      font-weight: 900;
      line-height: 1;
    }

    .roi-page {
      display: grid;
      gap: 22px;
    }

    .fc-million-page {
      display: grid;
      gap: 22px;
    }

    .fc-club-header,
    .fc-goal-card,
    .fc-scoreboard-panel {
      padding: 22px;
    }

    .fc-club-header,
    .fc-goal-head,
    .fc-scoreboard-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }

    .fc-club-header h2,
    .fc-goal-head h2 {
      margin: 0;
      color: var(--text-strong);
      font-size: clamp(1.35rem, 2.2vw, 1.8rem);
      line-height: 1.15;
    }

    .fc-manager-form {
      width: min(100%, 380px);
      display: grid;
      gap: 7px;
    }

    .fc-manager-form label {
      color: var(--muted-strong);
      font-size: 0.82rem;
      font-weight: 800;
    }

    .fc-manager-form input {
      color: var(--text-strong);
      font-size: 0.9rem;
    }

    .fc-manager-controls {
      display: flex;
      gap: 8px;
    }

    .fc-manager-controls input {
      min-width: 0;
      flex: 1;
    }

    .fc-goal-card {
      display: grid;
      gap: 18px;
      border-color: rgba(34, 197, 94, 0.24);
    }

    .fc-goal-amount {
      display: grid;
      justify-items: end;
      gap: 2px;
    }

    .fc-goal-amount strong {
      color: var(--green);
      font-size: clamp(1.7rem, 4vw, 2.6rem);
      font-variant-numeric: tabular-nums;
      line-height: 1.1;
    }

    .fc-goal-amount span,
    .fc-goal-foot {
      color: var(--muted-strong);
      font-size: 0.88rem;
    }

    .fc-progress-track {
      height: 13px;
      overflow: hidden;
      border: 1px solid var(--line-strong);
      border-radius: 999px;
      background: var(--bg-soft);
    }

    .fc-progress-track span {
      display: block;
      width: 0;
      height: 100%;
      border-radius: inherit;
      background: var(--green);
      box-shadow: 0 0 14px rgba(34, 197, 94, 0.35);
      transition: width 180ms ease;
    }

    .fc-goal-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .fc-goal-foot > span:first-child {
      color: var(--green);
      font-size: 1.1rem;
      font-weight: 900;
      font-variant-numeric: tabular-nums;
    }

    .fc-goal-note {
      margin: -8px 0 0;
      color: var(--muted);
      font-size: 0.78rem;
    }

    .fc-pitch-panel,
    .fc-bench-panel {
      overflow: hidden;
    }

    .fc-team-layout {
      display: grid;
      grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
      align-items: stretch;
      gap: 22px;
    }

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

    .fc-bench-panel {
      display: flex;
      min-width: 0;
      flex-direction: column;
    }

    .fc-bench-panel .panel-header {
      align-items: flex-start;
    }

    .fc-bench-drop {
      flex: 1;
    }

    .fc-section-heading {
      align-items: center;
    }

    .fc-pitch-count {
      flex: 0 0 auto;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: var(--panel-strong);
      color: var(--muted-strong);
      padding: 7px 11px;
      font-size: 0.78rem;
      font-weight: 800;
      font-variant-numeric: tabular-nums;
    }

    .fc-announcement {
      min-height: 22px;
      margin: 12px 22px 0;
      color: var(--muted-strong);
      font-size: 0.84rem;
    }

    .fc-pitch {
      position: relative;
      isolation: isolate;
      display: flex;
      min-height: 790px;
      margin: 12px 22px 22px;
      padding: 34px 16px;
      flex-direction: column;
      justify-content: space-around;
      gap: 14px;
      overflow: hidden;
      border: 1px solid rgba(244, 244, 245, 0.15);
      border-radius: 14px;
      background: linear-gradient(160deg, #172b1d, #14251a 52%, #182c20);
    }

    .fc-pitch-markings {
      position: absolute;
      z-index: -1;
      inset: 14px;
      border: 1px solid rgba(228, 228, 231, 0.2);
      border-radius: 7px;
      pointer-events: none;
    }

    .fc-halfway-line {
      position: absolute;
      top: 50%;
      right: 0;
      left: 0;
      border-top: 1px solid rgba(228, 228, 231, 0.2);
    }

    .fc-center-circle {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 120px;
      aspect-ratio: 1;
      border: 1px solid rgba(228, 228, 231, 0.2);
      border-radius: 50%;
      transform: translate(-50%, -50%);
    }

    .fc-penalty-box,
    .fc-goal-box {
      position: absolute;
      left: 50%;
      width: min(48%, 340px);
      border: 1px solid rgba(228, 228, 231, 0.2);
      transform: translateX(-50%);
    }

    .fc-penalty-box {
      height: 92px;
    }

    .fc-goal-box {
      width: min(25%, 180px);
      height: 38px;
    }

    .fc-penalty-top,
    .fc-goal-top {
      top: 0;
      border-top: 0;
    }

    .fc-penalty-bottom,
    .fc-goal-bottom {
      bottom: 0;
      border-bottom: 0;
    }

    .fc-formation-row {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: clamp(4px, 1.7vw, 24px);
    }

    .fc-slot {
      display: flex;
      width: min(22%, 148px);
      min-width: 0;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      padding: 4px;
      border: 1px solid transparent;
      border-radius: 12px;
      transition: border-color 140ms ease, background 140ms ease;
    }

    .fc-defenders .fc-slot {
      width: min(23%, 148px);
    }

    .fc-slot.is-drop-target,
    .fc-slot.is-selected {
      border-color: var(--green);
      background: rgba(34, 197, 94, 0.12);
    }

    .fc-slot-main {
      position: relative;
      isolation: isolate;
      overflow: hidden;
      display: flex;
      width: 100%;
      min-height: 108px;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 9px 5px;
      border: 1px solid rgba(228, 228, 231, 0.23);
      border-radius: 10px;
      background: rgba(12, 12, 14, 0.87);
      color: var(--text-strong);
      text-align: center;
      transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
    }

    .fc-slot-main::before {
      position: absolute;
      z-index: 0;
      inset: 8px;
      content: "";
      background-image: var(--fc-firm-logo);
      background-position: center;
      background-repeat: no-repeat;
      background-size: 82% auto;
      opacity: 0.5;
      filter: brightness(1.08) saturate(0.92);
      pointer-events: none;
    }

    .fc-slot-main > * {
      position: relative;
      z-index: 1;
      text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    }

    .fc-slot-main:hover,
    .fc-slot.is-drop-target .fc-slot-main,
    .fc-slot.is-selected .fc-slot-main {
      border-color: var(--green);
      background: rgba(9, 19, 12, 0.96);
    }

    .fc-slot-main:focus-visible,
    .fc-account-card:focus-visible,
    .fc-unassign:focus-visible {
      outline: 2px solid var(--green);
      outline-offset: 2px;
    }

    .fc-position-label {
      display: inline-flex;
      min-width: 34px;
      justify-content: center;
      border: 1px solid rgba(244, 244, 245, 0.24);
      border-radius: 999px;
      background: rgba(244, 244, 245, 0.09);
      color: var(--text-strong);
      padding: 2px 7px;
      font-size: 0.68rem;
      font-weight: 900;
    }

    .fc-slot-main strong {
      max-width: 100%;
      color: var(--text-strong);
      font-size: 0.75rem;
      line-height: 1.15;
      overflow-wrap: anywhere;
    }

    .fc-player-size,
    .fc-slot-placeholder {
      color: var(--muted-strong);
      font-size: 0.7rem;
      font-weight: 750;
    }

    .fc-player-size {
      color: var(--text-strong);
      font-variant-numeric: tabular-nums;
    }

    .fc-unassign {
      min-height: 32px;
      border: 1px solid var(--line-strong);
      border-radius: 7px;
      background: rgba(12, 12, 14, 0.84);
      color: var(--muted-strong);
      padding: 4px 9px;
      font-size: 0.7rem;
      font-weight: 800;
    }

    .fc-unassign:hover {
      border-color: var(--line-strong);
      color: var(--text-strong);
    }

    .fc-bench-drop {
      margin: 0 22px 22px;
      border: 1px dashed var(--line-strong);
      border-radius: 10px;
      padding: 14px;
      transition: border-color 140ms ease, background 140ms ease;
    }

    .fc-bench-drop.is-drop-target {
      border-color: var(--green);
      background: rgba(34, 197, 94, 0.08);
    }

    .fc-bench-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
      gap: 10px;
    }

    .fc-account-card {
      display: grid;
      min-height: 112px;
      align-content: start;
      justify-items: start;
      gap: 6px;
      border: 1px solid var(--line-strong);
      border-radius: 10px;
      background: var(--panel-strong);
      color: var(--text);
      padding: 13px;
      text-align: left;
      cursor: grab;
      transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
    }

    .fc-account-card:hover,
    .fc-account-card.is-selected {
      border-color: var(--green);
      background: rgba(18, 34, 23, 0.96);
    }

    .fc-account-card:active {
      cursor: grabbing;
      transform: scale(0.99);
    }

    .fc-account-card-kicker,
    .fc-account-card-size {
      color: var(--muted-strong);
      font-size: 0.74rem;
    }

    .fc-account-card strong {
      color: var(--text-strong);
      font-size: 0.9rem;
      overflow-wrap: anywhere;
    }

    .fc-account-card-size {
      color: var(--green);
    }

    .fc-empty-state,
    .fc-source-state {
      border: 1px dashed var(--line-strong);
      border-radius: 9px;
      color: var(--muted-strong);
      padding: 16px;
      text-align: center;
    }

    .fc-source-state {
      border-color: rgba(234, 179, 8, 0.35);
      color: var(--amber);
      text-align: left;
    }

    .fc-scoreboard-heading {
      align-items: flex-start;
      margin-bottom: 10px;
    }

    .fc-scoreboard-heading .panel-title {
      margin: 0;
    }

    .fc-payout-total {
      display: grid;
      flex: 0 0 auto;
      gap: 4px;
      justify-items: end;
    }

    .fc-payout-total span,
    .fc-not-tracked {
      color: var(--muted-strong);
      font-size: 0.77rem;
    }

    .fc-payout-total strong {
      color: var(--muted);
      font-size: 0.92rem;
    }

    .fc-data-note {
      margin: 0 0 14px;
      border-left: 2px solid var(--amber);
      color: var(--muted-strong);
      padding: 7px 10px;
      font-size: 0.8rem;
    }

    .fc-table-wrap table {
      width: 100%;
      min-width: 680px;
      table-layout: fixed;
      border-collapse: collapse;
      font-size: 0.9rem;
    }

    .fc-table-wrap th,
    .fc-table-wrap td {
      padding: 11px 16px;
    }

    .fc-table-wrap th:nth-child(1) { width: 22%; }
    .fc-table-wrap th:nth-child(2) { width: 30%; }
    .fc-table-wrap th:nth-child(3) { width: 24%; }
    .fc-table-wrap th:nth-child(4) { width: 24%; }

    .fc-table-wrap tfoot th {
      border-top: 1px solid var(--line-strong);
      color: var(--text-strong);
      padding: 12px 10px;
      text-align: left;
    }

    .fc-table-wrap tfoot th:nth-child(3) {
      color: var(--green);
      font-variant-numeric: tabular-nums;
    }

    .roi-empty-page {
      min-height: 220px;
      padding: 22px;
    }

    .roi-dashboard-shell {
      overflow: hidden;
      border-radius: 12px;
      background: var(--panel);
    }

    .roi-dashboard-title {
      border-bottom: 1px solid var(--line);
      padding: 16px 22px 14px;
      text-align: center;
    }

    .roi-dashboard-title h2 {
      margin: 0;
      color: var(--text-strong);
      font-size: clamp(1.6rem, 3vw, 2.5rem);
      font-weight: 950;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .roi-summary-strip {
      display: grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .roi-summary-strip article {
      min-height: 86px;
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: #0f0f11;
      padding: 10px 14px;
    }

    .roi-summary-strip article:last-child {
      border-right: 0;
    }

    .roi-summary-label {
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .roi-summary-value {
      margin-top: 8px;
      color: var(--text-strong);
      font-size: clamp(1.4rem, 2.5vw, 2.3rem);
      font-weight: 950;
      line-height: 1;
      font-variant-numeric: tabular-nums;
    }

    .roi-summary-value.blue {
      color: var(--accent-strong);
    }

    .roi-summary-value.amber {
      color: var(--amber);
    }

    .roi-entry-panel {
      padding: 0;
      overflow: hidden;
    }

    .roi-entry-panel summary {
      min-height: 48px;
      padding: 14px 18px;
      color: var(--text-strong);
      font-weight: 950;
      cursor: pointer;
      list-style: none;
    }

    .roi-entry-panel summary::-webkit-details-marker {
      display: none;
    }

    .roi-simple-form {
      border-top: 1px solid var(--line);
      padding: 18px;
    }

    .roi-simple-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      align-items: end;
    }

    .roi-wide-field {
      grid-column: span 2;
    }

    .roi-payout-list {
      display: grid;
      gap: 8px;
      border-top: 1px solid var(--line);
      padding: 12px 18px 18px;
    }

    .roi-payout-item {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      align-items: center;
      gap: 10px;
      border: 1px solid rgba(148, 163, 184, 0.14);
      border-radius: 10px;
      background: rgba(7, 7, 9, 0.54);
      padding: 9px 10px;
    }

    .roi-payout-item strong {
      color: var(--text-strong);
      font-size: 0.86rem;
      font-weight: 950;
      overflow-wrap: anywhere;
    }

    .roi-payout-item span {
      color: var(--green);
      font-size: 0.86rem;
      font-weight: 950;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .roi-payout-item small {
      display: block;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 800;
      margin-top: 2px;
    }

    .roi-dashboard-grid {
      display: grid;
      grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.75fr);
      gap: 22px;
      align-items: start;
    }

    .roi-dashboard-left {
      display: grid;
      gap: 22px;
    }

    .roi-table-card {
      overflow: hidden;
      border-radius: 12px;
    }

    .roi-ledger-section {
      display: grid;
      gap: 14px;
    }

    .roi-monthly-card {
      align-self: start;
    }

    .roi-table-card h3 {
      margin: 0;
      border-bottom: 1px solid var(--line);
      background: #18181c;
      color: var(--text-strong);
      padding: 8px 10px;
      font-size: 1rem;
      font-weight: 950;
      letter-spacing: 0;
      text-transform: uppercase;
    }

    .roi-monthly-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid var(--line);
      background: #18181c;
      padding-right: 10px;
    }

    .roi-monthly-head h3 {
      border-bottom: 0;
      background: transparent;
    }

    .roi-year-tabs {
      display: inline-flex;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .roi-year-tabs button {
      min-height: 30px;
      border: 1px solid rgba(148, 163, 184, 0.22);
      border-radius: 8px;
      background: #0f0f11;
      color: var(--muted-strong);
      padding: 5px 10px;
      font-size: 0.78rem;
      font-weight: 950;
    }

    .roi-year-tabs button.active {
      border-color: rgba(244, 244, 245, 0.22);
      background: var(--accent-soft);
      color: var(--accent-strong);
    }

    .roi-payout-calendar {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      padding: 12px;
      border-top: 1px solid var(--line);
      background: #0c0c0e;
    }

    .roi-payout-month {
      min-height: 82px;
      border: 1px solid rgba(148, 163, 184, 0.14);
      border-radius: 8px;
      background: #0f0f11;
      padding: 9px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      gap: 6px;
    }

    .roi-payout-month.has-payout {
      border-color: rgba(34, 197, 94, 0.34);
      background: rgba(34, 197, 94, 0.1);
    }

    .roi-payout-month.best-month {
      border-color: rgba(244, 244, 245, 0.22);
      background: var(--accent-soft);
      box-shadow: inset 0 0 0 1px rgba(244, 244, 245, 0.08);
    }

    .roi-payout-month span {
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 950;
      text-transform: uppercase;
    }

    .roi-payout-month strong {
      color: var(--text-strong);
      font-size: 1rem;
      font-weight: 950;
      font-variant-numeric: tabular-nums;
    }

    .roi-payout-month.has-payout strong {
      color: var(--green);
    }

    .roi-payout-month.best-month strong {
      color: var(--accent-strong);
    }

    .roi-payout-month small {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 800;
    }

    .roi-table-wrap {
      overflow-x: auto;
    }

    .roi-table-card table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.86rem;
      font-variant-numeric: tabular-nums;
    }

    .roi-table-card th,
    .roi-table-card td {
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      padding: 6px 8px;
      text-align: center;
      white-space: nowrap;
    }

    .roi-table-card th {
      color: var(--accent-strong);
      background: #18181c;
      font-weight: 950;
    }

    .roi-table-card td:first-child,
    .roi-table-card th:first-child {
      text-align: left;
    }

    .roi-empty-cell {
      color: var(--muted);
      text-align: center !important;
      white-space: normal !important;
    }

    .roi-status-edit {
      width: 112px;
      min-height: 30px;
      border: 1px solid rgba(244, 244, 245, 0.14);
      border-radius: 8px;
      background: #070709;
      color: var(--accent-strong);
      padding: 5px 8px;
      font-size: 0.84rem;
      font-weight: 900;
      text-align: right;
      font-variant-numeric: tabular-nums;
    }

    .roi-status-edit {
      text-align: left;
      color: var(--text);
    }

    .roi-status-edit:focus {
      outline: none;
      border-color: rgba(244, 244, 245, 0.22);
      box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.08);
    }

    .roi-status-lock {
      color: var(--muted-strong);
      font-weight: 900;
    }

    .roi-ledger-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid var(--line);
      background: #18181c;
      padding-right: 10px;
    }

    .roi-ledger-head h3 {
      border-bottom: 0;
      background: transparent;
    }

    @media (max-width: 1100px) {
      .roi-summary-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .roi-dashboard-grid {
        grid-template-columns: 1fr;
      }

      .roi-wide-field {
        grid-column: auto;
      }

      .roi-simple-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 680px) {
      .roi-summary-strip,
      .roi-simple-grid {
        grid-template-columns: 1fr;
      }

      .roi-summary-strip article {
        border-right: 0;
      }

      .roi-payout-item {
        grid-template-columns: 1fr;
      }
    }

    .roi-hero {
      position: relative;
      overflow: hidden;
      border-color: var(--line);
      background: var(--panel-strong);
      padding: 24px;
      box-shadow: var(--shadow);
    }

    .roi-hero::after {
      display: none;
    }

    .roi-hero-top {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 22px;
    }

    .roi-title {
      margin: 0;
      color: var(--text-strong);
      font-size: clamp(1.35rem, 2.5vw, 2.2rem);
      line-height: 1.08;
    }

    .roi-main-value {
      color: var(--text-strong);
      font-size: clamp(2.6rem, 7vw, 5rem);
      font-weight: 950;
      line-height: 0.95;
      font-variant-numeric: tabular-nums;
      text-align: right;
    }

    .roi-main-label {
      margin-top: 8px;
      color: var(--muted-strong);
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      text-align: right;
    }

    .roi-stats-grid {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
      gap: 12px;
    }

    .roi-stat {
      min-height: 104px;
      border: 1px solid rgba(148, 163, 184, 0.16);
      border-radius: 8px;
      background: #0f0f11;
      padding: 14px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .roi-stat-label {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 900;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .roi-stat-value {
      margin-top: 10px;
      color: var(--text-strong);
      font-size: 1.45rem;
      font-weight: 950;
      font-variant-numeric: tabular-nums;
    }

    .roi-stat.pass-rate .roi-stat-value {
      color: #fde68a;
    }

    .roi-form {
      padding: 22px;
    }

    .roi-form-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
    }

    .roi-payout-field.is-hidden {
      display: none;
    }

    .roi-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      margin-top: 18px;
    }

    .roi-actions .primary-btn,
    .roi-actions .secondary-btn {
      width: auto;
      min-width: 140px;
      margin-top: 0;
    }

    #roiCancelEdit {
      display: none;
    }

    .roi-filters {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
      padding: 0 22px 22px;
    }

    .roi-list {
      display: grid;
      gap: 12px;
      padding: 0 22px 22px;
    }

    .roi-account-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 15px;
    }

    .roi-account-card.selected {
      border-color: rgba(244, 244, 245, 0.22);
      box-shadow: inset 0 0 0 1px rgba(244, 244, 245, 0.08);
    }

    .roi-account-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 13px;
    }

    .roi-account-name {
      color: var(--text-strong);
      font-size: 1rem;
      font-weight: 950;
    }

    .roi-account-meta {
      margin-top: 5px;
      color: var(--muted);
      font-size: 0.82rem;
      font-weight: 800;
    }

    .roi-card-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
      flex-wrap: wrap;
      justify-content: flex-end;
    }

    .roi-card-actions .mini-action {
      width: auto;
      min-width: 42px;
      padding: 0 9px;
      font-size: 0.76rem;
    }

    .roi-account-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
      gap: 10px;
    }

    .roi-mini-stat {
      border: 1px solid rgba(148, 163, 184, 0.12);
      border-radius: 8px;
      background: #131316;
      padding: 10px;
      min-width: 0;
    }

    .roi-mini-label {
      color: var(--muted);
      font-size: 0.67rem;
      font-weight: 900;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .roi-mini-value {
      margin-top: 5px;
      color: var(--text-strong);
      font-size: 0.98rem;
      font-weight: 900;
      overflow-wrap: anywhere;
      font-variant-numeric: tabular-nums;
    }

    .roi-status-badge {
      display: inline-flex;
      align-items: center;
      border-radius: 999px;
      border: 1px solid rgba(148, 163, 184, 0.16);
      padding: 6px 10px;
      font-size: 0.72rem;
      font-weight: 950;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      white-space: nowrap;
    }

    .roi-status-progress {
      color: var(--accent-strong);
      background: var(--accent-soft);
      border-color: rgba(244, 244, 245, 0.14);
    }

    .roi-status-passed {
      color: #86efac;
      background: rgba(34, 197, 94, 0.12);
      border-color: rgba(34, 197, 94, 0.3);
    }

    .roi-status-burned {
      color: #fda4af;
      background: rgba(244, 63, 94, 0.14);
      border-color: rgba(244, 63, 94, 0.36);
    }

    .roi-status-active {
      color: var(--text-strong);
      background: rgba(244, 244, 245, 0.08);
      border-color: rgba(244, 244, 245, 0.14);
    }

    .roi-status-lost {
      color: #fdba74;
      background: rgba(249, 115, 22, 0.13);
      border-color: rgba(251, 146, 60, 0.34);
    }

    .roi-notes {
      margin-top: 12px;
      color: var(--muted-strong);
      font-size: 0.84rem;
      line-height: 1.5;
    }

    .roi-journal-panel {
      overflow: hidden;
    }

    .roi-journal-body {
      display: grid;
      gap: 14px;
      padding: 0 22px 22px;
    }

    .roi-journal-hero {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 16px;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
    }

    .roi-journal-title {
      color: var(--text-strong);
      font-size: clamp(1.25rem, 2vw, 1.7rem);
      font-weight: 950;
      line-height: 1.1;
    }

    .roi-journal-meta {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.84rem;
      font-weight: 800;
    }

    .roi-journal-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 10px;
    }

    .roi-journal-split {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 12px;
    }

    .roi-journal-block,
    .roi-journal-recent {
      border: 1px solid rgba(148, 163, 184, 0.14);
      border-radius: 8px;
      background: #0f0f11;
      padding: 14px;
    }

    .roi-linked-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }

    .roi-journal-block-head,
    .roi-selection-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }

    .roi-selection-actions {
      justify-content: flex-start;
      margin-top: 10px;
    }

    .roi-journal-mode {
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 900;
      letter-spacing: 0.04em;
      text-transform: uppercase;
    }

    .roi-linked-account {
      border: 1px solid rgba(148, 163, 184, 0.16);
      border-radius: 8px;
      background: #0f0f11;
      color: var(--text);
      padding: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      text-align: left;
    }

    .roi-linked-account.selected {
      border-color: rgba(244, 244, 245, 0.22);
      background: var(--accent-soft);
    }

    .roi-linked-account.auto-match:not(.selected) {
      border-color: rgba(251, 191, 36, 0.24);
    }

    .roi-linked-account:hover {
      border-color: rgba(244, 244, 245, 0.22);
      background: var(--accent-soft);
    }

    .roi-linked-toggle {
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 9px;
      flex: 1 1 auto;
      cursor: pointer;
    }

    .roi-linked-toggle input {
      width: 16px;
      height: 16px;
      accent-color: var(--accent);
      flex: 0 0 auto;
    }

    .roi-linked-account span,
    .roi-journal-trade span {
      color: var(--muted);
      font-size: 0.8rem;
      font-weight: 800;
    }

    .roi-linked-account strong {
      color: var(--muted-strong);
      font-size: 0.8rem;
      white-space: nowrap;
    }

    .roi-journal-feature {
      margin-top: 9px;
      color: var(--text-strong);
      font-size: 1rem;
      font-weight: 900;
      line-height: 1.35;
    }

    .roi-journal-note,
    .roi-journal-empty {
      margin-top: 8px;
      color: var(--muted);
      font-size: 0.84rem;
      line-height: 1.45;
    }

    .roi-journal-trade {
      border-top: 1px solid rgba(148, 163, 184, 0.12);
      padding: 10px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .roi-journal-trade:first-of-type {
      border-top: 0;
      margin-top: 6px;
    }

    .roi-journal-trade strong {
      display: block;
      color: var(--text-strong);
      font-size: 0.88rem;
    }

    .index-tile {
      min-height: 118px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 15px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .index-name {
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 850;
      letter-spacing: 0.07em;
      text-transform: uppercase;
    }

    .index-r {
      font-size: clamp(1.55rem, 2.4vw, 2rem);
      line-height: 1;
      font-weight: 850;
      font-variant-numeric: tabular-nums;
    }

    .positive {
      color: var(--green);
    }

    .negative {
      color: var(--red);
    }

    .neutral {
      color: var(--muted);
    }

    .break-even {
      color: var(--amber);
    }

    .filters {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 12px;
      padding: 22px;
      align-items: end;
    }

    .toggle-field {
      min-height: 46px;
      display: flex;
      align-items: center;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #070709;
      padding: 0 12px;
      color: var(--muted-strong);
      font-weight: 750;
      white-space: nowrap;
    }

    .toggle-field input {
      width: 17px;
      height: 17px;
      accent-color: var(--accent);
    }

    .check-field {
      min-height: 46px;
      display: flex;
      align-items: center;
      gap: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #070709;
      color: var(--muted-strong);
      padding: 0 12px;
      font-size: 0.82rem;
      font-weight: 800;
    }

    .check-field input {
      width: 17px;
      height: 17px;
      flex: 0 0 auto;
      accent-color: var(--accent);
    }

    .secondary-btn {
      min-height: 46px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #18181c;
      color: var(--text);
      font-weight: 800;
      padding: 0 14px;
      transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
    }

    .secondary-btn:hover {
      border-color: var(--line-strong);
      background: #1f1f24;
      color: var(--text-strong);
    }

    .secondary-btn:disabled {
      cursor: not-allowed;
      opacity: 0.45;
      transform: none;
    }

    .export-btn {
      min-width: 116px;
    }

    .history-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 10px;
    }

    .history-list {
      display: grid;
      gap: 12px;
      padding: 0 22px 22px;
    }

    .history-pagination {
      display: flex;
      justify-content: center;
      padding: 0 22px 22px;
    }

    .history-pagination[hidden] {
      display: none;
    }

    .trade-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 16px;
      display: grid;
      gap: 13px;
      box-shadow: var(--shadow-soft);
    }

    .trade-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
    }

    .trade-title {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px;
    }

    .symbol {
      font-size: 1.05rem;
      font-weight: 900;
      color: var(--text-strong);
    }

    .pill {
      display: inline-flex;
      align-items: center;
      min-height: 25px;
      border-radius: 999px;
      padding: 3px 9px;
      border: 1px solid rgba(148, 163, 184, 0.18);
      color: var(--muted-strong);
      background: rgba(148, 163, 184, 0.1);
      font-size: 0.76rem;
      font-weight: 850;
      white-space: nowrap;
    }

    .pill.grade {
      color: #fde68a;
      background: rgba(251, 191, 36, 0.12);
      border-color: rgba(251, 191, 36, 0.22);
    }

    .pill.plan-yes {
      color: #86efac;
      background: rgba(34, 197, 94, 0.12);
      border-color: rgba(34, 197, 94, 0.22);
    }

    .pill.plan-no {
      color: #fda4af;
      background: rgba(244, 63, 94, 0.13);
      border-color: rgba(244, 63, 94, 0.24);
    }

    .pill.valid-yes {
      color: var(--text-strong);
      background: rgba(6, 182, 212, 0.12);
      border-color: rgba(6, 182, 212, 0.24);
    }

    .pill.valid-no {
      color: #fcd34d;
      background: rgba(251, 191, 36, 0.12);
      border-color: rgba(251, 191, 36, 0.24);
    }

    .result-block {
      text-align: right;
      flex: 0 0 auto;
    }

    .rr-value {
      font-size: 1.38rem;
      line-height: 1;
      font-weight: 900;
      white-space: nowrap;
    }

    .result-label {
      margin-top: 4px;
      color: var(--muted);
      font-size: 0.78rem;
      font-weight: 850;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }

    .trade-meta {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
      gap: 9px;
    }

    .meta-item {
      min-height: 60px;
      border: 1px solid rgba(148, 163, 184, 0.14);
      border-radius: 8px;
      background: #131316;
      padding: 9px 10px;
    }

    .meta-label {
      display: block;
      color: var(--muted);
      font-size: 0.72rem;
      font-weight: 850;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .meta-value {
      display: block;
      margin-top: 4px;
      color: var(--text);
      font-size: 0.92rem;
      font-weight: 750;
      overflow-wrap: anywhere;
    }

    .notes {
      display: grid;
      gap: 8px;
      color: var(--muted-strong);
      font-size: 0.94rem;
    }

    .note-line strong {
      color: var(--text-strong);
    }

    .card-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }

    .edit-btn {
      border: 1px solid rgba(244, 244, 245, 0.18);
      border-radius: 8px;
      background: rgba(244, 244, 245, 0.08);
      color: var(--text-strong);
      font-weight: 850;
      padding: 9px 12px;
      transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
    }

    .edit-btn:hover {
      background: rgba(244, 244, 245, 0.12);
      border-color: rgba(244, 244, 245, 0.28);
      transform: translateY(-1px);
    }

    .delete-btn {
      border: 1px solid rgba(251, 113, 133, 0.3);
      border-radius: 8px;
      background: rgba(244, 63, 94, 0.1);
      color: var(--red);
      font-weight: 850;
      padding: 9px 12px;
      transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
    }

    .delete-btn:hover {
      background: rgba(244, 63, 94, 0.17);
      border-color: rgba(251, 113, 133, 0.5);
      transform: translateY(-1px);
    }

    .screenshot-preview {
      display: none;
      align-items: center;
      gap: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #0f0f11;
      padding: 10px;
    }

    .screenshot-preview.has-image {
      display: flex;
    }

    .screenshot-preview img {
      width: 112px;
      height: 68px;
      object-fit: cover;
      border-radius: 9px;
      border: 1px solid rgba(148, 163, 184, 0.2);
      background: #0f0f11;
    }

    .screenshot-preview-meta {
      min-width: 0;
      flex: 1;
      color: var(--muted-strong);
      font-size: 0.82rem;
      font-weight: 800;
      overflow-wrap: anywhere;
    }

    .screenshot-clear {
      width: auto;
      margin: 0;
      border: 1px solid rgba(251, 113, 133, 0.26);
      border-radius: 9px;
      background: rgba(244, 63, 94, 0.1);
      color: var(--red);
      padding: 8px 10px;
      font-size: 0.78rem;
      font-weight: 900;
    }

    .trade-screenshot {
      display: grid;
      gap: 8px;
      margin-top: 2px;
    }

    .trade-image-open {
      display: inline-flex;
      width: fit-content;
      max-width: 100%;
      border: 0;
      border-radius: 8px;
      background: transparent;
      padding: 0;
      cursor: zoom-in;
    }

    .trade-screenshot img {
      width: min(100%, 520px);
      max-height: 340px;
      object-fit: contain;
      border: 1px solid rgba(148, 163, 184, 0.18);
      border-radius: 8px;
      background: #0f0f11;
      box-shadow: var(--shadow-soft);
    }

    .trade-image-hint {
      color: var(--muted-strong);
      font-size: 0.82rem;
    }

    .trade-image-dialog {
      width: min(96vw, 1500px);
      max-width: none;
      max-height: 94vh;
      margin: auto;
      overflow: hidden;
      border: 1px solid var(--line-strong);
      border-radius: 14px;
      background: #09090b;
      color: var(--text);
      padding: 14px;
      box-shadow: 0 24px 90px rgba(0, 0, 0, 0.7);
    }

    .trade-image-dialog::backdrop {
      background: rgba(0, 0, 0, 0.88);
      backdrop-filter: blur(4px);
    }

    .trade-image-dialog-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 10px;
    }

    .trade-image-dialog-header h2 {
      margin: 0;
      color: var(--text-strong);
      font-size: 0.95rem;
    }

    .trade-image-dialog-close {
      display: grid;
      place-items: center;
      width: 38px;
      height: 38px;
      border: 1px solid var(--line-strong);
      border-radius: 9px;
      background: var(--panel-lift);
      color: var(--text-strong);
      font-size: 1.5rem;
      line-height: 1;
    }

    .trade-image-dialog > img {
      display: block;
      max-width: 100%;
      max-height: calc(94vh - 78px);
      object-fit: contain;
      margin: 0 auto;
      border-radius: 8px;
    }

    .empty-state {
      margin: 0 20px 20px;
      border: 1px dashed rgba(148, 163, 184, 0.28);
      border-radius: 8px;
      color: var(--muted);
      background: #0f0f11;
      text-align: center;
      padding: 28px 18px;
      font-weight: 700;
    }

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

      .layout > .card:first-child {
        position: static;
      }

      .metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .account-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }

    @media (max-width: 900px) {
      .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .account-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }

    @media (max-width: 760px) {
      .app {
        padding: 14px;
      }

      .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 18px;
        padding-bottom: 14px;
      }

      .storage-status {
        width: 100%;
        justify-content: center;
      }

      .app-nav {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .nav-tab {
        width: 100%;
        padding: 0 10px;
      }

      .topbar-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
      }

      .fc-club-header,
      .fc-goal-head,
      .fc-scoreboard-heading {
        align-items: stretch;
        flex-direction: column;
      }

      .fc-team-layout {
        grid-template-columns: 1fr;
      }

      .fc-bench-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      }

      .fc-club-header,
      .fc-goal-card,
      .fc-scoreboard-panel {
        padding: 16px;
      }

      .settings-intro,
      .settings-card {
        padding: 16px;
      }

      .settings-form,
      .settings-password-form {
        grid-template-columns: 1fr;
      }

      .settings-form > button {
        justify-self: stretch;
      }

      .settings-actions {
        display: grid;
        grid-template-columns: 1fr;
      }

      .fc-manager-form {
        width: 100%;
      }

      .fc-goal-amount,
      .fc-payout-total {
        justify-items: start;
      }

      .fc-pitch {
        min-height: 700px;
        margin: 10px 10px 12px;
        padding: 24px 2px;
        gap: 0;
      }

      .fc-pitch-markings {
        inset: 8px;
      }

      .fc-center-circle {
        width: 78px;
      }

      .fc-penalty-box {
        height: 74px;
      }

      .fc-goal-box {
        height: 30px;
      }

      .fc-formation-row {
        gap: 1px;
      }

      .fc-slot,
      .fc-defenders .fc-slot {
        width: 25%;
        padding: 2px;
        gap: 4px;
      }

      .fc-slot-main {
        min-height: 92px;
        padding: 7px 3px;
        gap: 5px;
      }

      .fc-slot-main strong {
        font-size: 0.66rem;
      }

      .fc-position-label {
        min-width: 29px;
        font-size: 0.62rem;
      }

      .fc-player-size,
      .fc-slot-placeholder {
        font-size: 0.64rem;
      }

      .fc-unassign {
        min-height: 34px;
        padding: 4px 6px;
      }

      .fc-announcement {
        margin: 10px 16px 0;
      }

      .fc-bench-drop {
        margin: 0 12px 16px;
        padding: 10px;
      }

      h1 {
        font-size: 2rem;
      }

      .subtitle {
        font-size: 0.9rem;
      }

      .metrics,
      .account-switcher,
      .account-form,
      .form-grid,
      .index-grid,
      .filters,
      .trade-meta {
        grid-template-columns: 1fr;
      }

      .metrics {
        gap: 10px;
        margin-bottom: 12px;
      }

      .metric-card {
        min-height: 108px;
        padding: 15px;
      }

      .metric-card::after {
        top: 15px;
        bottom: 15px;
      }

      .metric-value {
        font-size: 1.65rem;
      }

      .card {
        border-radius: 14px;
      }

      .account-panel {
        padding: 16px;
      }

      .panel-header {
        flex-direction: column;
        padding: 16px 16px 0;
      }

      .trade-form,
      .challenge-body,
      .index-grid,
      .monthly-report-grid,
      .heatmap-grid,
      .roi-form,
      .roi-filters,
      .roi-list,
      .accounts-overview-grid,
      .filters {
        padding: 16px;
      }

      .monthly-report-actions {
        width: 100%;
      }

      .monthly-report-card.wide {
        grid-column: auto;
      }

      .challenge-body,
      .challenge-metrics-grid {
        grid-template-columns: 1fr;
      }

      .best-edge-content {
        grid-template-columns: 1fr;
        padding: 16px;
      }

      .best-edge-details {
        justify-content: flex-start;
      }

      .history-list {
        padding: 0 16px 16px;
      }

      .history-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .secondary-btn,
      .export-btn {
        width: 100%;
        min-width: 0;
      }

      .topbar-actions .secondary-btn {
        width: 100%;
        min-width: 0;
      }

      .user-greeting {
        width: 100%;
        justify-content: center;
      }

      .chart-wrap {
        height: 240px;
        padding-left: 16px;
        padding-right: 16px;
      }

      .result-distribution {
        grid-template-columns: 1fr;
        padding: 10px 16px 16px;
      }

      .distribution-card {
        min-height: auto;
      }

      .drawdown-wrap {
        height: 190px;
      }

      .chart-subhead {
        padding-left: 16px;
        padding-right: 16px;
        font-size: 0.76rem;
      }

      .trade-head {
        flex-direction: column;
        gap: 12px;
      }

      .result-block {
        width: 100%;
        text-align: left;
      }

      .rr-value {
        font-size: 1.7rem;
      }

      .heatmap-cells {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .roi-hero {
        padding: 18px;
      }

      .roi-hero-top {
        flex-direction: column;
      }

      .roi-main-value,
      .roi-main-label {
        text-align: left;
      }

      .roi-form-grid,
      .roi-filters {
        grid-template-columns: 1fr;
      }

      .roi-actions .primary-btn,
      .roi-actions .secondary-btn {
        width: 100%;
      }

      .visible-accounts-menu {
        width: 100%;
      }

      .visible-accounts-menu summary {
        text-align: center;
      }

      .visible-accounts-list {
        left: 0;
        right: 0;
        min-width: 0;
      }

      .accounts-overview-grid {
        grid-template-columns: 1fr;
      }

      .calendar-actions {
        width: 100%;
        grid-template-columns: 38px minmax(0, 1fr) 38px;
      }

      .calendar-grid {
        gap: 5px;
        min-width: 560px;
        padding: 16px;
      }

      .calendar-day,
      .calendar-week-total {
        min-height: 68px;
        border-radius: 8px;
        padding: 8px 6px;
      }

      .calendar-r,
      .calendar-week-total strong {
        font-size: 0.76rem;
      }

      .calendar-trades,
      .week-days {
        display: none;
      }
    }

    @media (max-width: 460px) {
      .app-nav {
        gap: 3px;
        padding: 4px;
      }

      .nav-tab {
        min-height: 42px;
        padding: 4px 3px;
        font-size: 0.68rem;
        line-height: 1.15;
      }

      .fc-goal-foot {
        align-items: flex-start;
        flex-direction: column;
      }

      .fc-pitch {
        min-height: 640px;
        margin-right: 6px;
        margin-left: 6px;
        padding-right: 0;
        padding-left: 0;
      }

      .fc-slot-main {
        min-height: 82px;
      }

      .fc-slot-main strong {
        font-size: 0.6rem;
      }

      .fc-unassign {
        font-size: 0.65rem;
      }

      .fc-section-heading {
        align-items: flex-start;
      }

      .fc-pitch-count {
        align-self: flex-start;
      }

      .heatmap-cells {
        grid-template-columns: 1fr;
      }

      .history-actions {
        grid-template-columns: 1fr;
      }

      .trade-form-actions {
        grid-template-columns: 1fr;
      }

      .auth-actions {
        grid-template-columns: 1fr;
      }

      .auth-stack {
        gap: 30px;
      }

      .auth-logo {
        gap: 13px;
      }

      .auth-logo-mark {
        width: 66px;
        height: 66px;
        border-radius: 16px;
      }

      .auth-logo-mark svg {
        width: 48px;
        height: 48px;
      }

      .auth-logo-text {
        font-size: clamp(1.7rem, 12vw, 2.35rem);
      }
    }

    @media (max-width: 980px) {
      .admin-member-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
      }
    }

    @media (max-width: 680px) {
      .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .admin-intro,
      .admin-report-head {
        align-items: stretch;
        flex-direction: column;
      }

      .admin-member-row {
        grid-template-columns: 1fr;
      }

      .admin-member-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
