:root {
  color-scheme: dark;
  --bg: #111820;
  --sidebar: #101417;
  --panel: #171d22;
  --panel-2: #20282f;
  --panel-3: #13191e;
  --line: #2a333b;
  --text: #f4f4f5;
  --muted: #a4a8ae;
  --accent: #3d6f38;
  --accent-2: #97f69a;
  --good: #25d487;
  --bad: #ff646f;
  --warn: #f4b83f;
  --widget-title-size: clamp(30px, 3vw, 40px);
  --widget-support-size: clamp(22px, 2.2vw, 30px);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  text-transform: uppercase;
}

button,
input,
select,
textarea {
  font: inherit;
  text-transform: uppercase;
}

textarea {
  resize: none;
  scrollbar-width: none;
}

textarea::-webkit-scrollbar {
  display: none;
}

input::placeholder,
textarea::placeholder {
  text-transform: uppercase;
}

input[type="password"],
input[type="url"],
input[type="email"] {
  text-transform: none;
}

button {
  align-items: center;
  background: var(--accent);
  border: 1px solid #8c73ff;
  border-radius: 7px;
  color: white;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
}

button:hover {
  background: #8c73ff;
}

.auth-landing {
  align-items: stretch;
  background:
    radial-gradient(circle at 18% 20%, rgba(151, 246, 154, 0.16), transparent 34%),
    linear-gradient(135deg, #07090b 0%, #111820 48%, #171d22 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  min-height: 100vh;
}

.auth-landing-art {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 34px;
}

.auth-landing-art img {
  display: block;
  filter: drop-shadow(0 34px 42px rgba(0, 0, 0, 0.58));
  max-height: min(760px, 88vh);
  max-width: 100%;
  object-fit: contain;
}

.auth-landing-panel {
  align-content: center;
  background: rgba(17, 24, 32, 0.9);
  border-left: 1px solid rgba(151, 246, 154, 0.22);
  display: grid;
  gap: 18px;
  padding: clamp(24px, 5vw, 64px);
}

.auth-landing-brand {
  align-items: center;
  display: flex;
  gap: 14px;
}

.auth-landing-logo {
  background: #07090b;
  border: 1px solid rgba(151, 246, 154, 0.44);
  border-radius: 8px;
  display: grid;
  height: 78px;
  overflow: hidden;
  place-items: center;
  width: 78px;
}

.auth-landing-logo img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.auth-landing-brand strong {
  color: #f7fff2;
  display: block;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 950;
  line-height: 1;
}

.auth-landing-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.auth-landing-form label,
.session-panel {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 850;
  gap: 7px;
}

.auth-landing-form input {
  background: #0f151b;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-height: 48px;
  padding: 0 12px;
  width: 100%;
}

.auth-landing .auth-actions {
  margin-top: 4px;
}

.session-panel strong {
  color: var(--accent-2);
  font-size: 16px;
  overflow-wrap: anywhere;
  text-transform: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 80;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-height: 54px;
}

.brand-mark {
  align-items: center;
  background: #07090b;
  border: 1px solid rgba(151, 246, 154, 0.48);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36), inset 0 0 18px rgba(151, 246, 154, 0.14);
  display: grid;
  height: 44px;
  overflow: hidden;
  place-items: center;
  width: 44px;
}

.brand-mark img {
  display: block;
  height: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: #f7fff2;
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.08;
  max-width: 168px;
}

.brand span,
.sidebar-footer,
small {
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.nav-item {
  align-items: center;
  background: #171d22;
  border: 2px solid #2d343c;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-weight: 900;
  justify-content: center;
  min-height: 58px;
  padding: 12px 14px;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.nav-item.active,
.nav-item:hover {
  background: #171d22;
  border-color: var(--accent-2);
  color: white;
}

.sidebar-character {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(151, 246, 154, 0.12), rgba(16, 20, 23, 0) 62%),
    radial-gradient(circle at 50% 40%, rgba(37, 212, 135, 0.18), rgba(16, 20, 23, 0) 64%);
  border: 1px solid rgba(151, 246, 154, 0.16);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  margin-top: auto;
  min-height: 240px;
  overflow: hidden;
  padding: 10px;
}

.sidebar-character img {
  display: block;
  filter: drop-shadow(0 24px 28px rgba(0, 0, 0, 0.45));
  height: 100%;
  max-height: 220px;
  object-fit: contain;
  transform: none;
  width: 100%;
}

.sidebar-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  padding-top: 14px;
}

#connectionDot {
  background: var(--warn);
  border-radius: 99px;
  display: inline-block;
  height: 10px;
  width: 10px;
}

.content {
  align-content: start;
  display: grid;
  gap: 18px;
  padding: 22px;
  position: relative;
}

.app-topbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  min-height: 42px;
}

.app-topbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  max-width: min(360px, 48vw);
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.app-topbar button {
  min-height: 34px;
}

.page-top,
.panel-title,
.journal-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.journal-header {
  display: flex;
}

.page-top {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 22px;
  margin-bottom: 0;
}

h2 {
  font-size: 15px;
  margin-bottom: 0;
}

h3 {
  font-size: 13px;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.view {
  display: none;
  width: 100%;
}

.view.active {
  display: grid;
  gap: 16px;
}

.view h1,
.view h2,
.view h3 {
  text-align: center;
}

.smartsheet-title.small {
  color: white;
  font-size: clamp(28px, 4vw, 42px);
  min-height: 86px;
}

.dashboard-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(61, 111, 56, 0.95), rgba(18, 53, 37, 0.94)),
    var(--panel);
  border: 1px solid rgba(151, 246, 154, 0.18);
  border-radius: 8px;
  display: flex;
  grid-column: 1 / -1;
  height: 132px;
  justify-self: stretch;
  justify-content: center;
  min-height: 132px;
  padding: 26px;
  text-align: center;
  width: 100%;
}

.dashboard-hero.compact {
  height: 112px;
  min-height: 112px;
}

.view#settingsView {
  align-content: start;
  gap: 12px;
  margin-top: 0;
}

.content:has(#settingsView.active) {
  display: block;
  padding-top: 22px;
}

.content:has(#settingsView.active) .app-topbar {
  margin-bottom: 10px;
  min-height: 42px;
}

#settingsView.active {
  display: grid;
  gap: 12px;
}

#settingsView .connections-shell {
  margin-top: 0;
}

.content:has(#awardsView.active) {
  align-content: start;
  gap: 12px;
  padding-top: 18px;
}

#awardsView.active {
  align-content: start;
  gap: 14px;
}

#awardsView .dashboard-hero.compact {
  height: 78px;
  min-height: 78px;
  padding: 18px 24px;
}

#awardsView .payout-section.sheet-section.compact-report {
  min-height: 0;
}

.dashboard-hero.compact h2 {
  font-size: var(--widget-title-size);
}

.dashboard-hero h2 {
  color: #f3eadf;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 900;
  margin: 0;
  text-transform: uppercase;
}

.dashboard-hero span {
  color: #dbe8d9;
  display: block;
  max-width: 760px;
}

.payouts-top {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
}

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

.awards-toolbar {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: flex-end;
  text-transform: uppercase;
}

.awards-gallery {
  display: grid;
  gap: 18px;
}

.certificate-section {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.certificate-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.certificate-empty {
  min-height: 180px;
}

.award-firm-group {
  display: grid;
  gap: 10px;
}

.award-firm-group > strong {
  color: var(--accent-2);
  font-size: 32px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
}

.award-firm-group > strong span {
  color: white;
  display: inline-block;
  margin-left: 10px;
  white-space: nowrap;
}

.award-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 420px));
  justify-content: center;
}

.award-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  max-width: 420px;
  overflow: hidden;
  width: 100%;
}

.award-card img {
  aspect-ratio: 1 / 1;
  background: #0c1116;
  object-fit: contain;
  width: 100%;
}

.award-file-link {
  align-items: center;
  aspect-ratio: 1 / 1;
  background: #0c1116;
  color: var(--accent-2);
  display: grid;
  font-size: 18px;
  font-weight: 950;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.award-card footer {
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: center;
}

.award-card footer strong {
  color: white;
  font-size: 13px;
  font-weight: 950;
}

.award-card footer span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.award-card footer .award-date {
  color: white;
  font-size: 36px;
  font-weight: 950;
  line-height: 1;
}

.money-input {
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  grid-template-columns: auto 1fr;
  min-height: 30px;
  overflow: hidden;
}

.money-input span {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
  padding-left: 8px;
}

.money-input input {
  background: transparent;
  border: 0;
  min-height: 28px;
  padding-left: 5px;
}

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

.sheet-panel,
.sheet-section,
.sheet-chart {
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.report-heading {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  position: relative;
  text-align: center;
}

.report-heading > button,
.report-heading > .hero-actions {
  position: absolute;
  right: 16px;
}

.report-heading h2 {
  color: var(--text);
  font-size: var(--widget-title-size);
  margin: 0 0 4px;
  text-align: center;
  text-transform: uppercase;
}

.report-heading span {
  color: var(--muted);
  font-size: var(--widget-support-size);
}

.sheet-table-wrap {
  overflow-x: scroll;
  scrollbar-gutter: stable;
}

.sheet-table-wrap::-webkit-scrollbar {
  height: 13px;
}

.sheet-table-wrap::-webkit-scrollbar-track {
  background: #10161b;
  border: 1px solid var(--line);
}

.sheet-table-wrap::-webkit-scrollbar-thumb {
  background: #97f69a;
  border: 2px solid #10161b;
  border-radius: 999px;
}

.sheet-table {
  background: var(--panel-2);
  border-collapse: collapse;
  color: var(--text);
  margin: 0;
  min-width: 980px;
  width: 100%;
}

.sheet-table th,
.sheet-table td {
  border: 1px solid #d8d8d8;
  font-size: 13px;
  padding: 6px 8px;
  text-align: center;
}

.sheet-table th {
  background: #17251d;
  color: white;
  font-weight: 800;
  text-transform: uppercase;
}

.sheet-table td {
  font-weight: 650;
}

.sheet-table .blue-cell {
  background: #183746;
  text-align: center;
}

.sheet-table .yellow-cell {
  background: #3b321b;
  text-align: center;
}

.sheet-table .pink-cell {
  background: #3b1f2a;
  text-align: center;
}

.sheet-table .orange-cell {
  background: #b95712;
  color: white;
  text-align: center;
}

.sheet-table .green-cell {
  background: #1d7d48;
  color: white;
  text-align: center;
}

.sheet-table .red-cell {
  background: #8d2631;
  color: white;
  text-align: center;
}

.sheet-table .milestone-cell {
  color: white;
  max-width: 40px;
  min-width: 34px;
  padding: 7px 5px;
  text-align: center;
  vertical-align: middle;
  width: 34px;
}

.account-progress-table th.milestone-head {
  max-width: 40px;
  min-width: 34px;
  padding-left: 5px;
  padding-right: 5px;
  width: 34px;
}

.sheet-table .milestone-cell.pass {
  background: #1d7d48;
}

.sheet-table .milestone-cell.fail {
  background: #8d2631;
}

.sheet-table .milestone-cell strong {
  display: block;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.sheet-table .milestone-detail-cell {
  color: white;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.15;
  min-width: 110px;
  padding: 7px 8px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.sheet-table .progress-detail {
  line-height: 1.25;
  min-width: 118px;
}

.sheet-table .progress-detail strong,
.sheet-table .progress-detail span {
  display: block;
}

.sheet-table .progress-detail strong {
  color: white;
  font-size: 12px;
  font-weight: 950;
}

.sheet-table .progress-detail span {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 950;
  margin-top: 3px;
}

.sheet-table .progress-percent-cell {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 950;
  min-width: 110px;
}

.sheet-table .progress-percent-cell.complete {
  color: #8cff9a;
  font-weight: 1000;
}

.sheet-table .progress-percent-cell.near {
  color: #ffd84d;
  font-weight: 1000;
}

.sheet-table .progress-percent-cell.partial {
  color: #ff9d32;
  font-weight: 1000;
}

.sheet-table .progress-percent-cell.empty {
  color: #ff5a6b;
  font-weight: 1000;
}

.sheet-table .combined-progress-cell {
  color: white;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.18;
  min-width: 170px;
}

.sheet-table .combined-progress-cell strong,
.sheet-table .combined-progress-cell span {
  display: block;
}

.sheet-table .combined-progress-cell strong {
  color: white;
  font-size: 13px;
  font-weight: 1000;
}

.sheet-table .combined-progress-cell span {
  color: var(--accent-2);
  font-size: 14px;
  font-weight: 1000;
  margin-top: 3px;
}

.sheet-table .combined-progress-cell.complete {
  background: #1d7d48;
  color: white;
}

.sheet-table .combined-progress-cell.complete span {
  color: #8cff9a;
}

.sheet-table .combined-progress-cell.near span {
  color: #ffd84d;
}

.sheet-table .combined-progress-cell.partial span {
  color: #ff9d32;
}

.sheet-table .combined-progress-cell.empty span {
  color: #ff5a6b;
}

.payout-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.4fr 0.5fr;
  padding: 0;
}

.sheet-chart {
  border: 1px solid var(--line);
  display: grid;
  justify-items: center;
  padding: 14px;
  text-align: center;
}

.sheet-chart h3 {
  color: white;
  font-size: var(--widget-title-size);
  line-height: 1.05;
  margin-bottom: 18px;
  text-align: center;
  text-transform: uppercase;
}

.sheet-chart.wide {
  grid-column: span 1;
}

.sheet-chart.full-width {
  grid-column: 1 / -1;
  justify-items: stretch;
  padding-left: 0;
  padding-right: 0;
}

.payout-line-chart {
  align-items: end;
  display: flex;
  gap: 7px;
  height: 750px;
  justify-content: center;
  width: 100%;
}

.payout-line-chart {
  align-items: stretch;
  overflow-x: auto;
}

.payout-line-chart svg,
.rolling-line-wrap svg {
  display: block;
  height: 100%;
  min-width: 0;
  width: 100%;
}

.payout-line-chart polyline,
.rolling-line-wrap polyline {
  fill: none;
  stroke: #97f69a;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.payout-line-chart circle,
.rolling-line-wrap circle {
  fill: #97f69a;
  stroke: #101417;
  stroke-width: 3;
}

.rolling-line-wrap .x-axis,
.rolling-line-wrap .x-tick,
.rolling-line-wrap .y-axis {
  stroke: rgba(164, 168, 174, 0.42);
  stroke-width: 1;
}

.rolling-line-wrap .y-grid {
  stroke: rgba(164, 168, 174, 0.16);
  stroke-width: 1;
}

.payout-line-chart text,
.rolling-line-wrap text {
  fill: white;
  font-size: 14px;
  font-weight: 800;
  text-anchor: middle;
}

.payout-line-chart .point-value,
.rolling-line-wrap .point-value {
  font-size: 13px;
}

.payout-line-chart .point-label,
.rolling-line-wrap .point-label {
  color: var(--muted);
  fill: var(--muted);
  font-size: 13px;
}

.rolling-line-wrap .y-axis-label {
  fill: rgba(232, 235, 239, 0.78);
  font-size: 13px;
  font-weight: 900;
  text-anchor: end;
}

.rolling-progress-chart {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: stretch;
  min-height: 980px;
  width: 100%;
}

.rolling-summary {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
}

.rolling-summary span {
  background: #10161c;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: var(--widget-support-size);
  gap: 8px;
  padding: 8px 14px;
}

.rolling-summary strong {
  color: var(--accent-2);
}

.rolling-track {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(151, 246, 154, 0.08) var(--progress), transparent var(--progress)),
    repeating-linear-gradient(90deg, transparent 0 64px, rgba(255, 255, 255, 0.04) 64px 65px);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 5px;
  height: 585px;
  overflow-x: auto;
  padding: 24px 14px 42px;
}

.monthly-track {
  height: 100%;
  min-width: 100%;
  padding-bottom: 70px;
  width: 100%;
}

.monthly-step {
  background: linear-gradient(180deg, #97f69a, #24784d);
}

.rolling-line-wrap {
  height: 940px;
  overflow: visible;
  width: 100%;
}

.rolling-step {
  background: linear-gradient(180deg, #97f69a, #24784d);
  border-radius: 5px 5px 0 0;
  flex: 1;
  min-width: 54px;
  position: relative;
}

.rolling-step strong {
  color: white;
  font-size: 13px;
  left: 50%;
  position: absolute;
  top: -24px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.rolling-step em {
  bottom: -28px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) rotate(-25deg);
  white-space: nowrap;
}

.stacked-payout {
  align-items: center;
  display: grid;
  height: 790px;
  justify-content: center;
  min-height: 0;
  padding: 20px 12px 12px;
}

.single-year-stack {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  justify-content: center;
  justify-items: center;
  position: relative;
}

.single-year-stack > strong {
  color: white;
  font-size: 12px;
  justify-self: center;
  position: absolute;
  top: -26px;
}

.single-year-stack-bar {
  border-radius: 8px 8px 0 0;
  display: flex;
  flex-direction: column-reverse;
  height: 670px;
  max-height: 100%;
  overflow: hidden;
  width: 158px;
}

.single-year-stack-bar span {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 20px;
}

.single-year-stack-bar em {
  color: #101417;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.single-year-stack-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  justify-content: center;
}

.single-year-stack-legend div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px auto;
}

.single-year-stack-legend span {
  border-radius: 50%;
  height: 10px;
  width: 10px;
}

.single-year-stack-legend strong,
.single-year-stack-legend em {
  font-size: 12px;
}

.single-year-stack-legend em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
}

.year-stack-column {
  align-items: center;
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 72px;
  position: relative;
}

.year-stack-segments {
  border-radius: 7px 7px 0 0;
  display: flex;
  flex-direction: column-reverse;
  height: 100%;
  overflow: hidden;
  width: 72px;
}

.year-stack-segments span {
  display: block;
  flex-shrink: 0;
  min-height: 2px;
  width: 100%;
}

.year-stack-column strong {
  color: white;
  font-size: 10px;
  position: absolute;
  top: -22px;
  white-space: nowrap;
}

.year-stack-column em {
  bottom: -22px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  position: absolute;
}

.donut-wrap {
  display: grid;
  min-height: 230px;
  place-items: center;
}

.donut-wrap.labeled {
  align-items: center;
  gap: 14px;
  grid-template-columns: 190px 1fr;
  justify-items: center;
}

.donut-chart {
  background: conic-gradient(#97f69a 0 58%, #ffe475 58% 88%, #ff6976 88% 94%, #5366ff 94% 100%);
  border-radius: 50%;
  height: 150px;
  position: relative;
  width: 150px;
}

.donut-chart::after {
  background: var(--panel);
  border-radius: 50%;
  content: "";
  inset: 34px;
  position: absolute;
}

.donut-legend {
  align-content: center;
  display: grid;
  gap: 8px;
  justify-self: stretch;
}

.donut-legend div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.donut-legend span {
  border-radius: 50%;
  display: block;
  height: 10px;
  width: 10px;
}

.donut-legend strong,
.donut-legend em {
  font-size: 12px;
}

.donut-legend strong {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donut-legend em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
}

.firm-payout-bars {
  align-items: stretch;
  display: flex;
  gap: 7px;
  flex-direction: column;
  height: 500px;
  overflow-y: auto;
}

.firm-payout-bars div {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(150px, 210px) 1fr 92px;
}

.firm-payout-bars span {
  background: #97f69a;
  display: block;
  height: 14px;
}

.firm-half-donut-wrap {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(360px, 0.75fr) 1fr;
  min-height: 440px;
}

.half-donut-shell {
  align-items: center;
  display: grid;
  justify-items: center;
  min-height: 300px;
  position: relative;
}

.half-donut-chart {
  height: 240px;
  overflow: visible;
  width: min(100%, 420px);
}

.half-donut-chart path {
  fill: none;
  stroke-linecap: butt;
  stroke-width: 54px;
}

.half-donut-chart text {
  fill: #101417;
  font-size: 11px;
  font-weight: 950;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 2px;
  text-anchor: middle;
}

.half-donut-track {
  stroke: #263039;
}

.half-donut-shell > strong {
  color: white;
  font-size: 28px;
  left: 50%;
  position: absolute;
  top: 68%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.half-donut-legend {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.half-donut-legend div {
  align-items: center;
  display: grid;
  column-gap: 8px;
  grid-template-columns: 12px max-content max-content;
  justify-content: center;
}

.half-donut-legend span {
  border-radius: 50%;
  height: 12px;
  width: 12px;
}

.half-donut-legend strong {
  color: var(--text);
  text-align: center;
}

.half-donut-legend em {
  color: var(--accent-2);
  font-style: normal;
  font-weight: 900;
}

.half-donut-empty {
  color: var(--muted);
  min-height: 220px;
  place-content: center;
}

.panel,
.metrics-grid article,
.setup-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel,
.setup-panel {
  padding: 16px;
}

.panel > h2,
.setup-panel h2,
.integration-grid h2,
.connections-shell h2,
.journal-block h2,
.account-kanban h3,
.sheet-section h2 {
  text-align: center;
}

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

.payout-summary-grid {
  grid-template-columns: minmax(250px, 1.15fr) repeat(3, minmax(0, 1fr));
}

.metrics-grid article {
  display: grid;
  gap: 8px;
  min-height: 124px;
  padding: 18px;
}

.metrics-grid span {
  color: var(--muted);
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
}

.metrics-grid strong {
  color: var(--accent-2);
  font-size: var(--widget-title-size);
  line-height: 1.05;
  text-align: center;
}

.metrics-grid strong.metric-positive {
  color: var(--accent-2);
}

.metrics-grid strong.metric-negative {
  color: var(--bad);
}

.metrics-grid strong.metric-zero {
  color: #5e6872;
}

.metric-share {
  font-size: 0.72em;
  white-space: nowrap;
}

.center-metric {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.center-metric strong {
  font-size: var(--widget-title-size);
}

.streak-widget {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.streak-main {
  display: grid;
  gap: 10px;
}

.streak-main strong {
  font-size: var(--widget-title-size);
}

.streak-main strong.metric-zero,
.streak-side strong.metric-zero {
  color: #5e6872;
}

.streak-main strong.metric-positive {
  color: var(--accent-2);
}

.streak-side {
  display: grid;
  gap: 10px;
  min-width: 104px;
}

.streak-side div {
  background: rgba(151, 246, 154, 0.08);
  border: 1px solid rgba(151, 246, 154, 0.16);
  border-radius: 999px;
  display: grid;
  gap: 2px;
  padding: 6px 12px;
  text-align: center;
}

.streak-side div:first-child {
  background: rgba(37, 255, 135, 0.22);
  border-color: rgba(37, 255, 135, 0.42);
}

.streak-side div:first-child strong {
  color: #97f69a;
}

.streak-side div:last-child {
  background: rgba(92, 18, 28, 0.76);
  border-color: rgba(160, 38, 54, 0.68);
}

.streak-side div:last-child strong {
  color: #ff646f;
}

.streak-side div:first-child strong.metric-zero,
.streak-side div:last-child strong.metric-zero {
  color: #5e6872;
}

.streak-side span {
  font-size: 18px;
}

.streak-side strong {
  font-size: var(--widget-support-size);
}

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

.score-panel {
  grid-column: span 4;
}

.chart-panel {
  grid-column: span 4;
}

.score-panel,
.chart-panel {
  display: flex;
  flex-direction: column;
  min-height: 460px;
}

.calendar-panel {
  grid-column: 1 / -1;
}

.calendar-panel .panel-title h2 {
  font-size: 36px;
  font-weight: 900;
}

.calendar-toolbar {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.monthly-stats-card {
  align-items: center;
  background: rgba(151, 246, 154, 0.07);
  border: 1px solid rgba(151, 246, 154, 0.28);
  border-radius: 7px;
  color: var(--text);
  display: grid;
  gap: 2px;
  min-width: 210px;
  padding: 8px 12px;
  text-align: center;
}

.monthly-stats-heading {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.monthly-stats-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.monthly-stats-card strong {
  color: var(--accent);
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
}

.monthly-stats-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.monthly-stats-card.negative-day {
  background: rgba(255, 100, 111, 0.08);
  border-color: rgba(255, 100, 111, 0.36);
}

.monthly-stats-card.negative-day strong {
  color: var(--bad);
}

.monthly-grade {
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  padding: 2px 5px;
  white-space: nowrap;
}

.calendar-toolbar .icon-button {
  align-items: center;
  aspect-ratio: 1;
  background: #20272d;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  font-size: 28px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.calendar-toolbar .icon-button:hover {
  border-color: var(--accent);
  color: var(--accent-2);
}

.progress-panel {
  grid-column: span 4;
}

.account-panel {
  grid-column: span 12;
}

.radar {
  background: #151b20;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  flex: 1;
  margin-top: 16px;
  min-height: 350px;
  overflow: hidden;
  padding: 8px;
}

.score-line {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 118px 1fr;
  margin-top: 12px;
}

.score-readout {
  display: grid;
  gap: 2px;
  justify-items: start;
}

.score-readout span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-readout strong {
  color: var(--text);
  font-size: 34px;
  font-weight: 950;
  line-height: 0.92;
}

.score-line > div {
  background: #27292d;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.score-line > .score-readout {
  background: transparent;
  border-radius: 0;
  height: auto;
  overflow: visible;
}

#scoreBar {
  background: linear-gradient(90deg, var(--bad), var(--warn), var(--good));
  display: block;
  height: 100%;
  width: 0%;
}

.area-chart,
.bar-chart {
  background: #151b20;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex: 1;
  height: auto;
  margin-top: 18px;
  min-height: 410px;
  overflow: hidden;
}

.dashboard-svg {
  display: block;
  height: 100%;
  width: 100%;
}

.chart-gridline {
  stroke: rgba(255, 255, 255, 0.11);
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.chart-axis,
.zero-line {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1;
}

.zero-line {
  stroke: rgba(255, 255, 255, 0.55);
}

.axis-label,
.axis-title {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.axis-title {
  fill: var(--text);
  font-size: 13px;
}

.area-fill {
  fill: rgba(37, 212, 135, 0.2);
}

.line-stroke {
  fill: none;
  stroke: #8d83d9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.bar-positive {
  fill: var(--accent);
}

.bar-negative {
  fill: var(--bad);
}

.radar-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(255, 255, 255, 0.18);
  stroke-width: 1;
}

.radar-fill {
  fill: rgba(37, 212, 135, 0.36);
  stroke: var(--accent);
  stroke-width: 2;
}

.radar-dot {
  fill: #8d83d9;
  stroke: #d8d1ff;
  stroke-width: 1.5;
}

.radar-label {
  fill: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-anchor: middle;
}

.radar-values {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 6px 10px;
  grid-template-columns: repeat(3, 1fr);
  padding: 8px 4px 2px;
}

.radar-values span {
  color: var(--muted);
  display: grid;
  font-size: 11px;
  gap: 2px;
  text-align: center;
}

.radar-values strong {
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.calendar-grid,
.heatmap {
  display: grid;
  gap: 5px;
  margin-top: 16px;
}

.calendar-grid {
  grid-template-columns: repeat(5, minmax(86px, 1fr)) minmax(112px, 0.82fr);
}

.calendar-header {
  color: var(--muted);
  font-size: 18px;
  font-weight: 900;
  padding: 4px 8px;
  text-align: center;
}

.calendar-header.weekday-header {
  color: var(--text);
}

.day-cell.weekday-cell {
  background: #232c33;
}

.day-cell {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 207px;
  padding: 8px;
  position: relative;
  text-align: center;
}

.day-cell .day-number {
  color: var(--text);
  font-size: 18px;
  font-weight: 500;
  position: absolute;
  left: 10px;
  top: 6px;
}

.day-cell .calendar-grade {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  display: inline-flex;
  font-size: 15px;
  font-weight: 950;
  justify-content: center;
  min-height: 28px;
  min-width: 34px;
  padding: 2px 7px;
  position: absolute;
  right: 8px;
  top: 7px;
}

.day-cell.today-cell {
  border-color: var(--warn);
  box-shadow: 0 0 0 2px rgba(244, 184, 63, 0.62), 0 0 22px rgba(244, 184, 63, 0.58);
}

.week-summary .calendar-grade::before {
  color: var(--muted);
  content: "AVG ";
  font-size: 10px;
  margin-right: 3px;
}

.day-cell .day-pnl {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.day-cell .day-trades {
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.day-cell .day-detail {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.1;
}

.day-cell.empty {
  align-content: start;
  min-height: 207px;
}

.day-cell.outside-month {
  background: #171d22;
}

.week-summary {
  background: #171d22;
  border-color: var(--line);
}

.week-summary.positive-day {
  background: rgba(151, 246, 154, 0.07);
  border-color: rgba(151, 246, 154, 0.28);
}

.week-summary.negative-day {
  background: rgba(255, 100, 111, 0.08);
  border-color: rgba(255, 100, 111, 0.36);
}

.week-summary .day-number {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.day-cell.weekday-cell.positive-day {
  background: rgba(151, 246, 154, 0.11);
  border-color: rgba(151, 246, 154, 0.34);
  box-shadow: inset 0 0 0 1px rgba(151, 246, 154, 0.06);
}

.day-cell.weekday-cell.negative-day {
  background: rgba(255, 100, 111, 0.12);
  border-color: rgba(255, 100, 111, 0.36);
  box-shadow: inset 0 0 0 1px rgba(255, 100, 111, 0.07);
}

.day-cell .gain {
  color: var(--good);
}

.day-cell .loss {
  color: var(--bad);
}

.heatmap {
  grid-template-columns: repeat(14, 1fr);
}

.heatmap span {
  aspect-ratio: 1;
  background: #24262a;
  border: 1px solid #34373d;
  border-radius: 3px;
}

.heatmap span.level-1 { background: #15346d; }
.heatmap span.level-2 { background: #167a50; }
.heatmap span.level-3 { background: #25d487; }

.accounts-layout,
.accounts-shell {
  display: grid;
  gap: 14px;
}

#accountsView.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.accounts-shell {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.account-section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.account-snapshot-card,
.account-progression-card,
.account-summary-card,
.account-type-card,
.account-history-card,
.account-rules-card {
  grid-column: 1 / -1;
}

.account-form-card {
  grid-column: span 5;
}

.account-board-card {
  grid-column: span 7;
}

.account-table-card {
  grid-column: 1 / -1;
  overflow: hidden;
}

.account-progression-card {
  container-type: inline-size;
  overflow: visible;
}

.account-type-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.account-type-stat {
  align-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 9px;
  justify-items: center;
  min-height: 128px;
  padding: 18px;
  text-align: center;
}

.account-type-stat span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.account-type-stat strong {
  color: #25ff93;
  font-size: 48px;
  font-weight: 950;
  line-height: 1;
}

.account-type-stat strong.snapshot-positive,
.account-type-stat small.snapshot-positive {
  color: var(--accent-2);
}

.account-type-stat strong.snapshot-negative,
.account-type-stat small.snapshot-negative {
  color: var(--bad);
}

.account-type-stat strong.snapshot-neutral,
.account-type-stat small.snapshot-neutral {
  color: var(--muted);
}

.account-type-stat small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.account-progression-flow {
  align-items: stretch;
  display: flex;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.account-flow-stage {
  align-content: center;
  background: #11171c;
  border: 1px solid #2a333b;
  border-radius: 7px;
  display: grid;
  flex: 1 1 260px;
  gap: 10px;
  justify-items: center;
  min-height: 150px;
  min-width: 0;
  padding: 14px;
  text-align: center;
}

.account-flow-stage.has-ready {
  border-color: rgba(37, 255, 147, 0.55);
  box-shadow: inset 0 0 0 1px rgba(37, 255, 147, 0.12);
}

.flow-step {
  align-items: center;
  background: #20282f;
  border: 1px solid #384550;
  border-radius: 50%;
  color: #25ff93;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.account-flow-stage strong {
  color: #f4f4f5;
  display: block;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
  text-transform: uppercase;
  word-break: normal;
}

.account-flow-stage p {
  color: #aeb6bf;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  margin: 6px 0 0;
}

.account-flow-stage footer {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.account-flow-stage footer span,
.account-flow-stage footer b {
  background: #20282f;
  border: 1px solid #2f3a43;
  border-radius: 999px;
  color: white;
  display: block;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.15;
  min-width: 0;
  overflow-wrap: normal;
  padding: 6px 8px;
  text-align: center;
  text-transform: uppercase;
  white-space: normal;
  word-break: normal;
}

.account-flow-stage footer b {
  color: #25ff93;
}

.account-flow-arrow {
  align-self: center;
  color: #25ff93;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.account-firm-allocation-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

.account-allocation-panel {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.account-allocation-head {
  align-items: baseline;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
}

.account-allocation-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  grid-column: 2;
  justify-self: center;
  text-transform: uppercase;
}

.account-allocation-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  grid-column: 3;
  justify-self: end;
  text-transform: uppercase;
}

.account-allocation-table th,
.account-allocation-table td {
  font-size: 60px;
  font-weight: 1000;
  line-height: 1.08;
  min-height: 108px;
  padding-bottom: 16px;
  padding-top: 16px;
  white-space: nowrap;
}

.account-allocation-table {
  table-layout: fixed;
}

.account-allocation-table th:nth-child(1),
.account-allocation-table td:nth-child(1) {
  width: 24%;
}

.account-allocation-table th:nth-child(2),
.account-allocation-table td:nth-child(2),
.account-allocation-table th:nth-child(3),
.account-allocation-table td:nth-child(3),
.account-allocation-table th:nth-child(4),
.account-allocation-table td:nth-child(4),
.account-allocation-table th:nth-child(5),
.account-allocation-table td:nth-child(5) {
  width: 9%;
}

.account-allocation-table td:nth-child(2),
.account-allocation-table td:nth-child(3),
.account-allocation-table td:nth-child(4) {
  font-size: 180px;
}

.account-allocation-table th:nth-child(6),
.account-allocation-table td:nth-child(6) {
  width: 40%;
}

.allocation-percent-cell {
  color: var(--allocation-percent-color, #ff5a6b) !important;
  font-size: 30px !important;
  font-weight: 1000;
}

.allocation-percent-cell.complete {
  color: var(--allocation-percent-color, #8cff9a) !important;
}

.allocation-percent-cell.near {
  color: var(--allocation-percent-color, #ffd84d) !important;
}

.allocation-percent-cell.partial {
  color: var(--allocation-percent-color, #ff9d32) !important;
}

.allocation-percent-cell.empty {
  color: var(--allocation-percent-color, #ff5a6b) !important;
}

.account-allocation-timeline {
  display: grid;
  gap: 6px;
  min-width: 300px;
}

.timeline-track {
  background: #111820;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: block;
  height: 14px;
  overflow: hidden;
  position: relative;
}

.timeline-track i {
  display: block;
  height: 100%;
  position: absolute;
  top: 0;
}

.timeline-fill {
  background: var(--timeline-fill-color, #ff5a6b);
  left: 0;
}

.timeline-labels {
  color: var(--muted);
  display: grid;
  font-size: 10px;
  font-weight: 900;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  text-transform: uppercase;
}

.timeline-labels em {
  font-style: normal;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-section-head {
  align-items: center;
  border-bottom: 0;
  border-top: 1px solid #d9d9d9;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  justify-content: center;
  min-height: 0;
  padding: 18px 0 0;
}

.app-section-head {
  align-items: center;
  border-top: 1px solid #d9d9d9;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
  justify-content: center;
  padding: 18px 0 0;
}

.account-section-head h2 {
  background: linear-gradient(180deg, rgba(18, 59, 43, 0.98), rgba(10, 35, 29, 0.98));
  border: 1px solid rgba(151, 246, 154, 0.42);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(151, 246, 154, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  display: inline-flex;
  font-size: 18px;
  font-weight: 950;
  grid-column: 2;
  justify-content: center;
  margin: 0;
  min-width: 180px;
  padding: 8px 18px;
  text-align: center;
  text-decoration: none;
}

.app-section-head h2 {
  background: linear-gradient(180deg, rgba(18, 59, 43, 0.98), rgba(10, 35, 29, 0.98));
  border: 1px solid rgba(151, 246, 154, 0.42);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(151, 246, 154, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  display: inline-flex;
  font-size: 18px;
  font-weight: 950;
  grid-column: 2;
  justify-content: center;
  margin: 0;
  min-width: 180px;
  padding: 8px 18px;
  text-align: center;
  text-decoration: none;
}

.account-form-card .stacked-form {
  margin-top: 0;
}

.account-collapse {
  display: grid;
  gap: 14px;
}

.account-collapse summary {
  align-items: center;
  border-bottom: 0;
  color: var(--accent-2);
  cursor: pointer;
  display: flex;
  font-size: 18px;
  font-weight: 950;
  justify-content: center;
  list-style: none;
  min-height: 42px;
  position: relative;
  text-align: center;
}

.account-collapse summary::-webkit-details-marker {
  display: none;
}

.account-collapse summary::after {
  color: var(--accent-2);
  content: "+";
  font-size: 24px;
  font-weight: 950;
  line-height: 1;
  position: absolute;
  right: 0;
}

.account-collapse[open] summary {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.account-collapse[open] summary::after {
  content: "-";
}

.account-collapse[open] > *:not(summary) {
  margin-top: 14px;
}

.account-form-card form > button {
  justify-self: start;
  min-height: 36px;
  min-width: 150px;
  padding: 0 18px;
  width: auto;
}

.account-snapshot-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(170px, 0.8fr) minmax(220px, 1fr) auto;
}

.account-snapshot-grid button {
  align-self: end;
  min-height: 38px;
}

.account-snapshot-grid p,
.account-snapshot-review,
#saveAccountSnapshotReview,
#confirmAwardUpload,
#savePayoutScreenshotReview {
  grid-column: 1 / -1;
}

.account-snapshot-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

.account-snapshot-review table {
  background: var(--panel-2);
  border-collapse: collapse;
  min-width: 940px;
  width: 100%;
}

.account-snapshot-review th,
.account-snapshot-review td {
  border: 1px solid var(--line);
  font-size: 12px;
  padding: 7px 8px;
  text-align: center;
  vertical-align: middle;
}

.account-snapshot-review th {
  background: #17251d;
  color: white;
  font-weight: 900;
}

.account-snapshot-review select,
.account-snapshot-review input {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 32px;
  text-align: center;
  width: 100%;
}

.account-snapshot-review .phase-select {
  min-width: 136px;
}

.account-snapshot-review .review-other-firm {
  margin-top: 6px;
}

.account-snapshot-review .review-number-cell {
  color: var(--accent-2);
  font-weight: 950;
  text-align: center;
  width: 62px;
}

.account-snapshot-review .review-delete-cell {
  text-align: center;
  width: 58px;
}

.account-snapshot-review .review-delete-row {
  background: #8d2631;
  border-color: #ff646f;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 950;
  min-height: 32px;
  padding: 0;
  width: 34px;
}

.account-snapshot-review .review-delete-row:hover {
  background: #ff646f;
}

.certificate-upload-review table {
  min-width: 720px;
}

.secondary-action {
  justify-self: start;
  width: fit-content;
}

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

.snapshot-firm-card {
  align-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  text-align: center;
}

.snapshot-firm-card strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.snapshot-firm-card .firm-balance {
  color: var(--accent-2);
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
}

.snapshot-firm-card span,
.snapshot-firm-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.snapshot-firm-bar {
  background: #111820;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.snapshot-firm-bar i {
  background: var(--accent-2);
  display: block;
  height: 100%;
}

.snapshot-status {
  border: 1px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 950;
  justify-content: center;
  min-width: 0;
  padding: 3px 8px;
  white-space: nowrap;
  width: max-content;
}

.snapshot-status.open {
  color: var(--accent-2);
}

.snapshot-status.new {
  color: var(--warn);
}

.snapshot-status.missing {
  color: #ff2f45;
}

.snapshot-status.in-work {
  color: #ff9d32;
}

.snapshot-status.payout-time {
  color: #25ff93;
  font-weight: 1000;
}

.snapshot-positive {
  color: var(--accent-2);
}

.snapshot-negative {
  color: var(--bad);
}

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

.full-account-cell {
  font-size: 11px;
  letter-spacing: 0;
  min-width: 260px;
  overflow-wrap: anywhere;
}

.account-pnl-cell {
  font-size: 33px !important;
  font-weight: 950;
  line-height: 1;
  min-width: 150px;
}

.account-pnl-cell.snapshot-positive {
  color: var(--accent-2) !important;
}

.account-pnl-cell.snapshot-negative {
  color: var(--bad) !important;
}

.account-pnl-cell.snapshot-neutral {
  color: var(--muted) !important;
}

.pass-cell {
  font-size: 14px;
  font-weight: 950;
  text-align: center;
}

.pass-cell.pass {
  color: #25ff93 !important;
}

.pass-cell.fail {
  color: #ff2f45 !important;
}

.account-pnl-charts {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  width: 100%;
}

.account-pnl-chart {
  align-content: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 10px;
  justify-items: stretch;
  min-height: 1040px;
  min-width: 0;
  overflow: visible;
  padding: 12px 0;
}

.account-pnl-chart-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: center;
  text-align: center;
}

.account-pnl-chart-head strong {
  color: #25ff93;
  font-size: 36px;
  font-weight: 950;
}

.account-pnl-chart-head span,
.account-chart-legend span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.account-pnl-chart svg {
  background: #111820;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: block;
  height: 840px;
  max-height: none;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

.account-pnl-chart text {
  fill: var(--muted);
  font-size: 16px;
  font-weight: 850;
}

.account-pnl-chart .day-axis-label {
  font-size: 48px;
  font-weight: 950;
}

.account-pnl-chart .axis-title {
  fill: var(--accent-2);
  font-size: 48px;
  font-weight: 950;
}

.account-pnl-chart .account-balance-point-label {
  fill: var(--text);
  font-size: 48px;
  font-weight: 950;
  paint-order: stroke;
  stroke: #111820;
  stroke-width: 8px;
}

.chart-grid-line {
  stroke: rgba(164, 168, 174, 0.18);
  stroke-dasharray: 4 6;
}

.chart-zero-line {
  stroke: rgba(244, 244, 245, 0.35);
  stroke-width: 1.5;
}

.account-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  justify-content: center;
}

.account-chart-legend span {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.account-chart-legend i {
  border-radius: 99px;
  display: inline-block;
  height: 8px;
  width: 8px;
}

.theme-firm-cell {
  color: white;
  font-weight: 950;
}

#accountsView .sheet-table,
#accountsView .sheet-table td,
#accountsView .sheet-table th,
#accountsView .account-type-stat span,
#accountsView .account-type-stat small,
#accountsView .account-rules-table .rule-firm-cell {
  color: white;
}

#accountsView .sheet-table td,
#accountsView .sheet-table th {
  font-size: 11px;
  line-height: 1.15;
  padding: 5px 6px;
}

#accountsView .account-progress-table tr {
  min-height: 58px;
}

#accountsView .account-progress-table th,
#accountsView .account-progress-table td {
  height: auto;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}

#accountsView .account-progress-table th {
  overflow-wrap: normal;
  word-break: normal;
}

#accountsView .account-allocation-table .rule-firm-cell {
  font-size: 20px;
  line-height: 1.1;
  text-align: center;
}

#accountsView .account-allocation-table .prop-firm-name-wrap {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  justify-content: center;
  min-width: 0;
  text-align: left;
}

#accountsView .account-allocation-table .prop-firm-logo {
  align-items: center;
  background: #101822;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(36, 255, 147, 0.08);
  color: white;
  display: inline-flex;
  flex: 0 0 44px;
  font-size: 12px;
  font-weight: 1000;
  height: 44px;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1;
  width: 44px;
}

#accountsView .account-allocation-table .prop-firm-logo-legends {
  background: linear-gradient(135deg, #151b22, #3f4852);
  color: #f4f5f7;
}

#accountsView .account-allocation-table .prop-firm-logo-topstep {
  background: linear-gradient(135deg, #e7edf5, #5f6872);
  color: #0a0e14;
}

#accountsView .account-allocation-table .prop-firm-logo-take-profit {
  background: linear-gradient(135deg, #101923, #1ed66f);
  color: #ffffff;
}

#accountsView .account-allocation-table .prop-firm-logo-alpha {
  background: linear-gradient(135deg, #0d1625, #ffffff);
  color: #0d1625;
}

#accountsView .account-allocation-table .prop-firm-logo-my-funded {
  background: linear-gradient(135deg, #111827, #f3b52e);
  color: #10141c;
}

#accountsView .account-allocation-table .prop-firm-logo-e8 {
  background: linear-gradient(135deg, #111827, #7c5cff);
  color: #ffffff;
}

#accountsView .account-allocation-table .prop-firm-logo-elite {
  background: linear-gradient(135deg, #17202b, #ff4d5d);
  color: #ffffff;
}

#accountsView .account-allocation-table .prop-firm-logo-funded-next {
  background: #ffffff;
  color: #111827;
}

#accountsView .account-allocation-table .prop-firm-logo-lucid {
  background: radial-gradient(circle at 62% 62%, #eaf5ff 0 12%, #6b87af 22%, #121a25 52%);
  color: #ffffff;
}

#accountsView .account-allocation-table .prop-firm-logo-tradeday {
  background: linear-gradient(135deg, #111827, #5bd6df);
  color: #ffffff;
}

#accountsView .account-allocation-table .prop-firm-logo-tradeify {
  background: linear-gradient(135deg, #0e1a26, #22ef9f);
  color: #06130f;
}

#accountsView .account-allocation-table .prop-firm-logo-apex {
  background: linear-gradient(135deg, #101923, #ffffff);
  color: #0d1520;
}

#accountsView .account-allocation-table tbody td:nth-child(2),
#accountsView .account-allocation-table tbody td:nth-child(3),
#accountsView .account-allocation-table tbody td:nth-child(4) {
  font-size: 33px;
  font-weight: 1000;
  line-height: 1;
}

#accountsView .account-progress-table th:first-child,
#accountsView .account-progress-table td:first-child {
  font-size: 44px;
  line-height: 1;
}

#accountsView .sheet-table-wrap {
  border-right: 1px solid #d8d8d8;
}

#accountsView .sheet-table {
  box-shadow: inset -1px 0 0 #d8d8d8;
}

#accountsView .sheet-table th:last-child,
#accountsView .sheet-table td:last-child {
  border-right: 1px solid #d8d8d8;
}

#accountsView .account-progress-table th:nth-child(n+7),
#accountsView .account-progress-table td:nth-child(n+7) {
  max-width: none;
  min-width: 110px;
  width: 110px;
}

#accountsView .account-progress-table th:first-child,
#accountsView .account-progress-table td:first-child {
  max-width: none;
  min-width: 112px;
  width: 112px;
}

#accountsView .account-progress-table th:nth-child(2),
#accountsView .account-progress-table td:nth-child(2) {
  max-width: none;
  min-width: 112px;
  width: 112px;
}

#accountsView .account-progress-table th:nth-child(3),
#accountsView .account-progress-table td:nth-child(3) {
  max-width: none;
  min-width: 128px;
  width: 128px;
}

#accountsView .account-progress-table th:nth-child(4),
#accountsView .account-progress-table td:nth-child(4) {
  max-width: none;
  min-width: 210px;
  width: 210px;
}

#accountsView .account-progress-table th:nth-child(5),
#accountsView .account-progress-table td:nth-child(5) {
  max-width: none;
  min-width: 170px;
  width: 170px;
}

#accountsView .account-progress-table th:nth-child(6),
#accountsView .account-progress-table td:nth-child(6) {
  max-width: none;
  min-width: 130px;
  width: 130px;
}

#accountsView .account-progress-table th:nth-child(7),
#accountsView .account-progress-table td:nth-child(7) {
  max-width: none;
  min-width: 150px;
  width: 150px;
}

#accountsView .account-progress-table:has(#liveAccountDetails) th:nth-child(8),
#accountsView .account-progress-table:has(#liveAccountDetails) td:nth-child(8),
#accountsView .account-progress-table:has(#fundedAccountDetails) th:nth-child(8),
#accountsView .account-progress-table:has(#fundedAccountDetails) td:nth-child(8) {
  max-width: none;
  min-width: 110px;
  width: 110px;
}

#accountsView .account-progress-table .milestone-cell,
#accountsView .account-progress-table th.milestone-head {
  max-width: none;
  min-width: 110px;
  width: 110px;
}

#accountsView .account-progress-table .milestone-detail-cell,
#accountsView .account-progress-table .progress-detail,
#accountsView .account-progress-table .progress-percent-cell,
#accountsView .account-progress-table .pass-cell {
  max-width: none;
  min-width: 110px;
  overflow-wrap: anywhere;
  white-space: normal;
  width: 110px;
}

#accountsView .account-progress-table .combined-progress-cell {
  max-width: none;
  min-width: 190px;
  width: 190px;
}

#accountsView .account-progress-table th:nth-child(13),
#accountsView .account-progress-table td:nth-child(13),
#accountsView .account-progress-table th:nth-child(16),
#accountsView .account-progress-table td:nth-child(16) {
  min-width: 190px;
  width: 190px;
}

#accountsView .account-progress-table th:nth-child(14),
#accountsView .account-progress-table td:nth-child(14),
#accountsView .account-progress-table th:nth-child(15),
#accountsView .account-progress-table td:nth-child(15),
#accountsView .account-progress-table th:nth-child(17),
#accountsView .account-progress-table td:nth-child(17) {
  min-width: 150px;
  width: 150px;
}

#accountsView .account-progress-table th:last-child,
#accountsView .account-progress-table td:last-child {
  max-width: none;
  min-width: 340px;
  width: 340px;
}

#accountsView .account-type-card:has(#fundedAccountDetails) {
  min-height: 940px;
}

#accountsView .sheet-table-wrap:has(#fundedAccountDetails) {
  min-height: 760px;
}

#accountsView .sheet-table td.progress-percent-cell.complete {
  color: #8cff9a !important;
  font-weight: 1000;
}

#accountsView .sheet-table td.progress-percent-cell.near {
  color: #ffd84d !important;
  font-weight: 1000;
}

#accountsView .sheet-table td.progress-percent-cell.partial {
  color: #ff9d32 !important;
  font-weight: 1000;
}

#accountsView .sheet-table td.progress-percent-cell.empty {
  color: #ff5a6b !important;
  font-weight: 1000;
}

#accountsView .account-type-stat strong {
  color: #25ff93 !important;
}

#accountsView .snapshot-positive {
  color: var(--accent-2) !important;
}

#accountsView .snapshot-negative {
  color: var(--bad) !important;
}

#accountsView .snapshot-neutral {
  color: var(--muted) !important;
}

.account-rules-stack {
  display: grid;
  gap: 12px;
}

.account-rules-panel {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.account-rules-panel > summary {
  align-items: center;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 14px;
  font-weight: 950;
  justify-content: space-between;
  list-style: none;
  min-height: 44px;
  padding: 0 14px;
}

.account-rules-panel > summary::-webkit-details-marker {
  display: none;
}

.account-rules-panel > summary::after {
  color: var(--accent-2);
  content: "+";
  font-size: 22px;
  line-height: 1;
}

.account-rules-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.account-rules-panel[open] > summary::after {
  content: "-";
}

.account-rules-table {
  min-width: 1380px;
}

.missing-compatible-firms-table {
  min-width: 1180px;
}

.account-progress-table {
  min-width: 3320px;
  table-layout: fixed;
}

.account-rules-table th,
.account-rules-table td {
  font-size: 11px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.account-rules-table .rule-firm-cell {
  color: var(--accent-2);
  font-weight: 950;
}

.account-rules-table .table-link {
  align-items: center;
  color: var(--accent-2);
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  min-height: 28px;
  text-decoration: none;
}

.account-rules-table .table-link:hover {
  text-decoration: underline;
}

.account-kanban {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-kanban > div {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 150px;
  padding: 12px;
}

.account-card {
  background: var(--panel-2);
  border: 1px solid #214b37;
  border-radius: 7px;
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding: 12px;
}

.account-card strong {
  color: var(--accent-2);
}

.account-card span {
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  background: rgba(37, 212, 135, 0.14);
  border: 1px solid rgba(37, 212, 135, 0.35);
  border-radius: 999px;
  color: var(--accent-2);
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: center;
  padding: 3px 8px;
  width: fit-content;
}

.daily-check {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding-top: 14px;
}

.daily-check strong {
  font-size: 26px;
}

.notebook-layout {
  display: grid;
  grid-template-columns: 276px 1fr;
  min-height: calc(100vh - 110px);
}

.notes-list {
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: 8px 0 0 8px;
  padding: 12px;
}

.notes-list button,
.notes-list input {
  width: 100%;
}

.notes-list .add-journal-date-picker {
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px !important;
}

.journal-tag-search {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.journal-tag-search button {
  background: #10161b;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  min-height: 28px;
  padding: 0 10px;
  width: auto;
}

.journal-tag-search button.active,
.journal-tag-search button:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.journal-year-group,
.journal-month-group {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.journal-year-group.expanded {
  gap: 10px;
}

.journal-year-group .journal-month-group {
  margin-top: 0;
}

.journal-year-tab,
.journal-month-tab {
  align-items: center;
  background: #171d22;
  border: 2px solid #2d343c;
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 58px;
  padding: 12px 14px;
  position: relative;
  text-align: center;
  width: 100%;
}

.journal-year-tab {
  min-height: 64px;
}

.journal-year-tab::after,
.journal-month-tab::after {
  color: var(--accent-2);
  content: "+";
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  position: absolute;
  right: 14px;
}

.journal-year-group.expanded .journal-year-tab,
.journal-month-group.expanded .journal-month-tab {
  border-color: #3a424b;
}

.journal-year-group.current-year .journal-year-tab,
.journal-month-group.current-month .journal-month-tab {
  border-color: #3a424b;
}

.journal-year-group.expanded .journal-year-tab::after,
.journal-month-group.expanded .journal-month-tab::after {
  content: "-";
}

.journal-year-tab span,
.journal-month-tab span {
  color: var(--text);
  font-size: 16px;
  font-weight: 900;
}

.journal-year-tab span {
  font-size: 18px;
}

.note-row {
  align-items: center;
  background: transparent;
  border: 2px solid #2d343c;
  color: var(--text);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 72px;
  padding: 12px;
  position: relative;
  text-align: center;
  width: 100%;
}

.note-row.active {
  background: #292a2d;
  border-color: var(--accent-2);
}

.note-row span {
  color: var(--muted);
  font-size: 12px;
}

.note-saved-check {
  align-items: center;
  border: 1px solid rgba(151, 246, 154, 0.55);
  border-radius: 50%;
  color: var(--accent-2) !important;
  display: inline-flex;
  font-size: 11px !important;
  font-weight: 950;
  height: 18px;
  justify-content: center;
  opacity: 0.72;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
}

.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.note-tags em {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  padding: 2px 6px;
}

.note-tags em.red-tag {
  border-color: #ff6976;
  box-shadow: 0 0 0 1px rgba(255, 105, 118, 0.25);
  color: #ff9ca6;
}

.note-tags em.orange-tag {
  border-color: #f4b83f;
  box-shadow: 0 0 0 1px rgba(244, 184, 63, 0.25);
  color: #ffd06b;
}

.journal-page {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  display: grid;
  gap: 22px;
  padding: 22px clamp(16px, 3vw, 56px);
}

.journal-header {
  border-bottom: 0;
  padding-bottom: 0;
}

.journal-date-heading {
  align-items: center;
  display: flex;
  min-height: 54px;
}

.journal-date-heading strong {
  color: #ffffff;
  display: inline-flex;
  font-size: 16px;
  font-weight: 950;
  min-height: 0;
  min-width: 0;
  padding: 0;
  place-content: center;
}

.journal-save-controls {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.journal-save-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.journal-save-status.unsaved {
  color: var(--warn);
}

.journal-save-status.saving {
  color: var(--accent-2);
}

.journal-save-status.saved {
  color: var(--good);
}

.journal-save-status.error {
  color: var(--bad);
}

.journal-day-summary {
  align-items: center;
  border-bottom: 0;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
  min-height: 92px;
  padding: 4px 10px 18px;
  text-align: center;
  text-transform: uppercase;
}

.journal-day-summary span {
  color: var(--text);
  font-size: 28px;
  font-weight: 1000;
}

.journal-day-summary.empty span {
  color: var(--muted);
}

.journal-summary-pnl {
  font-size: 58px;
  font-weight: 1000;
  line-height: 1;
}

.journal-summary-pnl.gain {
  color: #25ff93;
}

.journal-summary-pnl.loss {
  color: #ff5a6b;
}

.journal-day-summary .calendar-grade {
  display: inline-flex;
  align-items: center;
  font-size: 58px;
  font-weight: 1000;
  line-height: 1;
  position: static;
}

.journal-header p,
.setup-panel p,
.ai-prompt p,
.muted-copy {
  color: var(--muted);
  margin-bottom: 0;
}

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

.integration-grid article {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.integration-grid strong {
  color: var(--accent-2);
}

.integration-grid span {
  color: var(--muted);
  font-size: 13px;
}

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

.settings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.settings-status-card,
.settings-sync-card {
  grid-column: span 6;
}

.settings-keys-card,
.settings-auth-card,
.settings-import-card,
.settings-backup-card {
  grid-column: span 4;
}

.settings-cleanup-shell .account-snapshot-card {
  grid-column: 1 / -1;
}

.settings-cleanup-shell .payout-screenshot-card {
  grid-column: 1 / -1;
}

.settings-cleanup-shell .settings-import-card {
  grid-column: 1 / -1;
  order: -10;
}

.settings-cleanup-shell .awards-upload-card {
  grid-column: 1 / -1;
}

#awardUploadFiles {
  width: 100%;
}

.awards-upload-card .muted-copy {
  max-width: 920px;
  overflow-wrap: normal;
  word-break: normal;
}

.settings-connections-card {
  grid-column: 1 / -1;
}

.settings-card-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 42px;
  padding-bottom: 12px;
  text-align: center;
}

.settings-card-head h2 {
  color: var(--accent-2);
  font-size: 18px;
  font-weight: 950;
  text-align: center;
  width: 100%;
}

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

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

.sync-controls label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
}

.inline-settings-form {
  display: grid;
  gap: 10px;
}

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

.auth-actions button {
  width: 100%;
}

.auth-actions #signOutButton {
  grid-column: 1 / -1;
}

.csv-import-panel {
  display: grid;
  gap: 12px;
}

.import-description {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  margin: 0;
  text-align: center;
  text-transform: uppercase;
}

.import-workflow {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.import-workflow label,
.csv-import-panel label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  min-width: 0;
  text-transform: uppercase;
}

.import-workflow input,
.import-workflow select {
  min-width: 0;
  width: 100%;
}

.import-workflow .csv-drop-zone {
  grid-column: 1 / -1;
}

.import-workflow button {
  grid-column: 1 / -1;
  justify-self: center;
  min-height: 36px;
  min-width: 180px;
  padding: 0 18px;
  width: auto;
}

.import-workflow p,
.csv-import-panel p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  grid-column: 1 / -1;
  margin: 0;
  min-height: 18px;
  text-align: center;
}

.backup-import-panel button,
.inline-settings-form button {
  width: 100%;
}

.csv-import-panel button {
  width: auto;
}

.csv-import-action {
  min-height: 42px;
}

.csv-drop-zone {
  align-content: center;
  background: #10161b;
  border: 2px dashed rgba(151, 246, 154, 0.46);
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 118px;
  padding: 18px;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.csv-drop-zone input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.csv-drop-zone span {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  text-transform: uppercase;
}

.csv-drop-zone.drag-over,
.csv-drop-zone:hover {
  background: rgba(37, 212, 135, 0.09);
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 1px rgba(151, 246, 154, 0.2);
}

.connections-table {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.connections-head,
.connection-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1.5fr 1fr 0.7fr 1fr 0.8fr 0.8fr;
  padding: 12px 16px;
}

.connections-head {
  background: #10161c;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.connection-row {
  border-top: 1px solid var(--line);
}

.connection-row strong {
  color: var(--text);
}

.connection-row button {
  min-height: 32px;
  padding: 0 12px;
}

.connection-status {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  justify-self: center;
  padding: 4px 10px;
}

.toggle-pill {
  background: #0d1216;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 24px;
  justify-self: center;
  position: relative;
  width: 44px;
}

.toggle-pill::after {
  background: #3d4652;
  border-radius: 50%;
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 2px;
  width: 18px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 10;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.connection-modal {
  background: #111821;
  border: 1px solid #29364a;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  max-width: 640px;
  padding: 20px;
  width: 100%;
}

.form-label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

.platform-picker {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
}

.platform-picker label {
  align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  min-height: 82px;
  justify-content: center;
  text-align: center;
}

.platform-picker label:has(input:checked) {
  border-color: #5366ff;
  box-shadow: 0 0 0 1px #5366ff inset;
}

.platform-picker input {
  display: none;
}

.connection-config {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

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

.form-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.compact-actions {
  justify-content: flex-start;
}

.compact-actions button {
  min-height: 36px;
  padding: 0 16px;
  width: auto;
}

.compact-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payout-ledger-panel {
  display: grid;
  gap: 12px;
}

.ledger-toggle {
  justify-self: start;
}

.payout-ledger-panel.collapsed .sheet-table-wrap {
  display: none;
}

.settings-status {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-2);
  grid-column: 1 / -1;
  margin: 12px 0 0;
  padding: 10px 12px;
}

.journal-block {
  border-top: 1px solid #d9d9d9;
  display: grid;
  gap: 12px;
  padding-top: 18px;
}

.journal-block h2 {
  background: linear-gradient(180deg, rgba(18, 59, 43, 0.98), rgba(10, 35, 29, 0.98));
  border: 1px solid rgba(151, 246, 154, 0.42);
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(151, 246, 154, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  display: inline-flex;
  font-size: 22px;
  justify-content: center;
  justify-self: center;
  padding: 8px 18px;
  text-decoration: none;
}

.day-results-section {
  background:
    linear-gradient(180deg, rgba(37, 212, 135, 0.22), rgba(61, 111, 56, 0.12)),
    #123525;
  border: 1px solid rgba(151, 246, 154, 0.58);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(151, 246, 154, 0.18), 0 18px 40px rgba(0, 0, 0, 0.28);
  padding: 18px;
}

.day-results-inner {
  display: grid;
  gap: 12px;
}

.day-results-section input,
.day-results-section select,
.day-results-section textarea {
  background: rgba(16, 22, 27, 0.88);
  border-color: rgba(151, 246, 154, 0.3);
}

.day-results-section [data-ai-result] {
  cursor: default;
}

.day-results-section select[data-ai-result] {
  pointer-events: none;
}

.day-results-section [data-ai-result]:read-only,
.day-results-section select[data-ai-result] {
  color: #dfffe5;
  opacity: 1;
}

.day-results-section textarea {
  min-height: 150px;
}

.day-results-section h2 {
  color: #f7fff2;
}

.day-results-section .reflection-grid {
  display: grid;
  gap: 12px;
}

.day-results-section .reflection-grid h2 {
  color: #d9f7df;
}

.results-criteria-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  width: 100%;
}

.results-criteria-grid > label {
  min-width: 0;
}

.results-criteria-grid input,
.results-criteria-grid select {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
  height: 56px;
  line-height: 1.2;
  min-width: 0;
  padding-bottom: 0;
  padding-top: 0;
}

.journal-section-title {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto 1fr;
}

.journal-section-title h2 {
  grid-column: 2;
  margin: 0;
  text-align: center;
}

.probability-display {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  grid-column: 3;
  justify-self: end;
}

.probability-display > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
}

.previous-summary textarea {
  min-height: 260px;
}

.three-col textarea[name^="focus_"] {
  line-height: 1.35;
  min-height: 132px;
  padding-bottom: 42px;
  padding-top: 42px;
  text-align: center;
}

.emotion-checkin label {
  text-align: center;
}

.previous-summary-raw {
  display: none;
}

.previous-summary-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.previous-summary-card {
  background: #10161b;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 230px;
  padding: 14px;
}

.previous-summary-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 14px;
  text-align: center;
}

.previous-summary-card strong {
  color: var(--accent-2);
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.previous-summary-card p {
  color: #dce7f3;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  text-align: center;
  text-transform: none;
  white-space: pre-wrap;
}

.previous-summary-line {
  color: #dce7f3;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 8px;
  text-align: center;
  text-transform: none;
}

.previous-summary-line b {
  color: #3d6f38;
  font-weight: 900;
}

.journal-context-menu {
  background: #10161b;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
  padding: 6px;
  position: fixed;
  z-index: 30;
}

.journal-context-menu button {
  background: transparent;
  border-color: transparent;
  color: var(--text);
  justify-content: flex-start;
  min-width: 120px;
}

.journal-context-menu button:hover {
  background: rgba(151, 246, 154, 0.14);
}

.journal-context-menu #deleteJournalDay {
  color: var(--bad);
}

.journal-context-menu #deleteJournalDay:hover {
  background: rgba(255, 100, 111, 0.14);
}

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

.scorecard-grid .full-row {
  grid-column: 1 / -1;
}

.economic-news-grid {
  grid-template-columns: 1fr;
}

.economic-news-field {
  grid-column: 1 / -1;
  font-size: 0;
}

.probability-badge {
  background: #10161b;
  border: 1px solid #f4e06d;
  border-radius: 999px;
  color: #f4e06d;
  display: inline-flex;
  font-size: 13px;
  font-weight: 950;
  min-width: 90px;
  justify-content: center;
  padding: 7px 12px;
}

.probability-badge.probability-high {
  border-color: var(--bad);
  color: var(--bad);
}

.probability-badge.probability-medium {
  border-color: var(--warn);
  color: var(--warn);
}

.probability-badge.probability-low {
  border-color: #f4e06d;
  color: #f4e06d;
}

.field-action-row {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.field-action-row button {
  min-width: 150px;
}

.field-action-row .economic-news-button {
  color: white;
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
  min-width: 150px;
  padding: 0 18px;
  text-align: center;
  text-indent: 0;
  white-space: nowrap;
}

.economic-events-raw {
  display: none;
}

.field-action-row:has(.economic-events-raw) {
  grid-template-columns: auto auto;
  justify-content: end;
}

.economic-calendar {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(138px, 1fr));
  margin-top: 10px;
}

.economic-day {
  align-content: start;
  background: #10161b;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 130px;
  padding: 10px;
}

.economic-day.today {
  border-color: rgba(151, 246, 154, 0.8);
  box-shadow: inset 0 0 0 1px rgba(151, 246, 154, 0.16);
}

.economic-day h3 {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  margin: 0;
  text-align: left;
}

.economic-day h3 span {
  color: var(--text);
  font-size: inherit;
}

.economic-event {
  align-content: center;
  background: var(--panel-2);
  border: 1px solid var(--warn);
  border-radius: 7px;
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px;
}

.economic-event.red {
  border-color: var(--bad);
}

.economic-event-time {
  color: #c8cdd2;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.economic-event-name {
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: center;
}

.economic-empty {
  display: none;
}

.economic-news-status {
  display: none;
}

.journal-ai-widget {
  display: grid;
  gap: 12px;
}

.journal-ai-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.journal-ai-stat,
.journal-ai-card {
  background: #10161b;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.journal-ai-stat span,
.journal-ai-card span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 5px;
}

.journal-ai-stat strong {
  color: var(--text);
  display: block;
  font-size: 18px;
}

.journal-ai-summaries {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.journal-ai-card {
  min-height: 190px;
}

.journal-ai-card strong {
  color: var(--accent-2);
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.journal-ai-card p {
  color: #dce7f3;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  text-align: left;
  text-transform: none;
  white-space: pre-wrap;
}

.field-status {
  color: var(--muted);
  font-size: 12px;
  min-height: 16px;
  text-align: center;
}

.htf-matrix {
  display: grid;
  gap: 10px;
  grid-template-columns: 82px repeat(3, minmax(240px, 1fr)) minmax(260px, 0.82fr);
  overflow-x: auto;
}

.htf-matrix h3,
.htf-matrix > strong {
  align-items: center;
  background: #10161b;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 950;
  justify-content: center;
  margin: 0;
  min-height: 46px;
  text-align: center;
}

.htf-matrix > strong {
  color: #c8cdd2;
  min-height: 90px;
}

.htf-shot {
  align-items: center;
  background: #10161b;
  border: 1px dashed #3b4853;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 900;
  justify-content: center;
  min-height: 270px;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.htf-shot:focus,
.htf-shot:hover {
  border-color: var(--accent-2);
  outline: none;
}

.htf-shot img {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: contain;
  position: absolute;
  width: 100%;
}

.htf-shot.has-image {
  border-style: solid;
}

.htf-shot.has-image span {
  display: none;
}

.htf-notes {
  align-content: center;
  background: #10161b;
  border-color: var(--line);
  min-height: 270px;
  padding: 14px;
  resize: vertical;
  text-align: center;
  text-transform: none;
}

.journal-page .htf-notes {
  text-align: center;
}

.session-grid,
.mini-trade-grid {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.session-grid > span,
.session-grid > strong {
  text-align: center;
}

.session-grid {
  grid-template-columns: 130px repeat(5, minmax(120px, 1fr)) minmax(180px, 1.25fr) minmax(120px, 1fr);
}

.mini-trade-grid {
  grid-template-columns:
    34px
    minmax(78px, 0.7fr)
    minmax(180px, 1.55fr)
    minmax(150px, 1.25fr)
    minmax(170px, 1.45fr)
    minmax(70px, 0.6fr)
    minmax(140px, 1.15fr)
    minmax(64px, 0.55fr)
    minmax(64px, 0.55fr)
    minmax(64px, 0.55fr)
    minmax(140px, 1.15fr);
}

.session-grid > span,
.mini-trade-grid > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.mini-trade-grid > strong {
  text-align: center;
}

.session-grid textarea,
.mini-trade-grid textarea {
  align-content: center;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  overflow: hidden;
  overflow-wrap: anywhere;
  padding-left: 6px;
  padding-right: 6px;
  resize: none;
  scrollbar-width: none;
  text-align: center;
  white-space: normal;
  word-break: normal;
}

.session-grid textarea {
  min-height: 70px;
}

.mini-trade-grid textarea {
  min-height: 70px;
}

.session-grid textarea::-webkit-scrollbar,
.mini-trade-grid textarea::-webkit-scrollbar {
  display: none;
}

.trade-grade-field,
.day-grade-badge {
  font-weight: 950;
}

.grade-a-plus,
.grade-a {
  border-color: var(--good);
  color: var(--good);
}

.grade-b {
  border-color: var(--warn);
  color: var(--warn);
}

.grade-c {
  border-color: #ff8b4a;
  color: #ff8b4a;
}

.grade-d {
  border-color: var(--bad);
  color: var(--bad);
}

.grade-f {
  border-color: #ff2f45;
  color: #ff2f45;
}

.grade-empty {
  border-color: var(--line);
  color: var(--muted);
}

.day-grade-badge {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  font-size: 42px;
  height: 115px;
  isolation: isolate;
  justify-content: center;
  line-height: 0.95;
  min-height: 115px;
  min-width: 116px;
  padding: 12px 22px 30px;
  position: relative;
  text-align: center;
  width: 116px;
}

.day-grade-badge::before,
.day-grade-badge::after {
  content: "";
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 115C24 101 12 78 12 53V17C28 9 72 9 88 17V53C88 78 76 101 50 115Z'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 115C24 101 12 78 12 53V17C28 9 72 9 88 17V53C88 78 76 101 50 115Z'/%3E%3C/svg%3E") center / contain no-repeat;
  position: absolute;
}

.day-grade-badge::before {
  background: currentColor;
  inset: 0;
  z-index: -2;
}

.day-grade-badge::after {
  background: #10161b;
  inset: 5px;
  z-index: -1;
}

.session-grid .bullish-label {
  color: var(--good);
}

.session-grid .bearish-label {
  color: var(--bad);
}

.session-grid .dol-label {
  color: #ffff33;
}

.session-grid > .context-news-cell {
  align-content: center;
  align-items: center;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  justify-content: center;
  min-height: 46px;
  padding: 5px;
  text-align: center;
  text-transform: none;
}

.context-news-chip {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  justify-content: center;
  line-height: 1.15;
  min-height: 26px;
  padding: 4px 8px;
}

.context-news-chip.red {
  border-color: #ff6976;
  color: #ff9ca6;
}

.context-news-chip.orange {
  border-color: #f4b83f;
  color: #ffd06b;
}

.journal-block label {
  text-align: center;
}

.reflection-grid textarea {
  align-content: center;
  min-height: 130px;
  padding-bottom: 42px;
  padding-top: 42px;
  text-align: center;
}

.daily-notes-textarea {
  min-height: 460px;
}

.stacked-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.two-col,
.three-col {
  display: grid;
  gap: 12px;
}

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

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

label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 950;
  gap: 6px;
}

input,
select,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  min-height: 38px;
  padding: 9px 10px;
  width: 100%;
}

.journal-page input,
.journal-page select,
.journal-page textarea {
  text-align: center;
}

.journal-page input,
.journal-page select {
  line-height: 1.2;
  padding-bottom: 9px;
  padding-top: 9px;
}

select {
  text-align: center;
  text-align-last: center;
}

select option {
  text-align: center;
}

textarea {
  line-height: 1.5;
  min-height: 92px;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

legend {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  padding: 0 6px;
}

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

.checklist label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checklist input {
  min-height: auto;
  width: auto;
}

.talimerk-ai-widget {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 90;
}

.talimerk-ai-launcher {
  background: #11171b;
  border: 2px solid rgba(151, 246, 154, 0.62);
  border-radius: 50%;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.42), 0 0 18px rgba(37, 212, 135, 0.2);
  cursor: grab;
  height: 76px;
  min-height: 76px;
  padding: 5px;
  touch-action: none;
  width: 76px;
}

.talimerk-ai-launcher:active {
  cursor: grabbing;
}

.talimerk-ai-launcher .talimerk-ai-avatar {
  height: 62px;
  width: 62px;
}

.talimerk-ai-panel {
  background: rgba(17, 23, 27, 0.98);
  border: 1px solid rgba(151, 246, 154, 0.28);
  border-radius: 10px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.58);
  display: grid;
  gap: 12px;
  max-height: min(860px, calc(100vh - 110px));
  overflow: auto;
  padding: 14px;
  position: fixed;
  right: 22px;
  top: 110px;
  width: min(720px, calc(100vw - 34px));
}

.talimerk-ai-panel[hidden] {
  display: none;
}

.talimerk-ai-panel-top {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr) 40px;
  padding-bottom: 12px;
}

.talimerk-ai-panel-top .talimerk-ai-title h2 {
  color: var(--accent-2);
  font-size: 28px;
  line-height: 1.05;
  margin: 0;
  overflow-wrap: anywhere;
}

.talimerk-ai-panel-top .talimerk-ai-title span {
  font-size: 12px;
  font-weight: 950;
}

.ai-close-button {
  align-items: center;
  background: #1f252b;
  border: 1px solid #3a424c;
  border-radius: 8px;
  color: white;
  display: flex;
  height: 40px;
  justify-content: center;
  min-height: 40px;
  padding: 0;
  width: 40px;
}

.talimerk-ai-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(18, 59, 43, 0.96), rgba(17, 20, 24, 0.98)),
    var(--panel);
  border: 1px solid rgba(151, 246, 154, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 18px;
  grid-template-columns: 140px minmax(280px, 1fr) minmax(420px, 0.8fr);
  min-height: 168px;
  padding: 18px;
}

.talimerk-ai-avatar {
  background: #07090b;
  border: 2px solid rgba(151, 246, 154, 0.34);
  border-radius: 50%;
  height: 124px;
  overflow: hidden;
  position: relative;
  width: 124px;
}

.talimerk-ai-panel-top .talimerk-ai-avatar {
  height: 54px;
  width: 54px;
}

.talimerk-ai-avatar img {
  height: 100%;
  left: 0;
  object-fit: contain;
  position: absolute;
  top: 0;
  transform: none;
  width: 100%;
}

.ai-logo-upright img {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
}

.talimerk-ai-title {
  display: grid;
  gap: 7px;
}

.talimerk-ai-title span,
.ai-brief-card span,
.ai-message-body b {
  color: var(--accent-2);
}

.talimerk-ai-title h2 {
  color: white;
  font-size: 42px;
  line-height: 1;
  text-align: left;
}

.talimerk-ai-title p {
  color: #dce7f3;
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
  max-width: 820px;
}

.talimerk-ai-kpis {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.talimerk-ai-panel .talimerk-ai-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.talimerk-ai-panel .talimerk-ai-kpis article {
  min-height: 58px;
  padding: 8px;
}

.talimerk-ai-panel .talimerk-ai-kpis strong {
  font-size: 16px;
}

.talimerk-ai-kpis article {
  background: #171d22;
  border: 1px solid #2d343c;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px;
}

.talimerk-ai-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.talimerk-ai-kpis strong {
  color: white;
  font-size: 24px;
  line-height: 1;
}

.talimerk-ai-kpis .good strong {
  color: var(--accent-2);
}

.talimerk-ai-kpis .bad strong {
  color: var(--bad);
}

.talimerk-ai-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(360px, 0.85fr) minmax(560px, 1.15fr);
}

.talimerk-ai-briefing,
.talimerk-ai-chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.talimerk-ai-briefing {
  display: grid;
  gap: 14px;
  align-content: start;
}

.ai-intel-grid {
  display: grid;
  gap: 10px;
}

.ai-brief-card {
  background: #11171b;
  border: 1px solid #2d343c;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.ai-brief-card strong {
  color: white;
  font-size: 18px;
  line-height: 1.25;
}

.ai-brief-card p {
  color: #b8c0c8;
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}

.talimerk-ai-chat {
  display: grid;
  gap: 12px;
  min-height: 740px;
}

.talimerk-ai-panel .talimerk-ai-chat {
  background: transparent;
  border: 0;
  min-height: 0;
  padding: 0;
}

.ai-chat-topbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
}

.talimerk-ai-panel .ai-chat-topbar {
  align-items: center;
  flex-wrap: wrap;
}

.ai-chat-topbar span {
  border: 1px solid rgba(137, 110, 255, 0.38);
  border-radius: 999px;
  color: #c9c3ff;
  font-weight: 900;
  padding: 8px 14px;
}

.ai-prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-empty-state {
  background: #11171b;
  border: 1px solid #2d343c;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

.ai-empty-state[hidden] {
  display: none;
}

.ai-empty-state strong {
  color: white;
  font-size: 20px;
}

.ai-empty-state p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

.ai-prompt-row button {
  background: #171d22;
  border: 1px solid #343c45;
  color: #dce7f3;
  min-height: 40px;
  padding: 8px 12px;
  width: auto;
}

.ai-chat-log {
  align-content: start;
  display: grid;
  gap: 16px;
  max-height: 560px;
  overflow-y: auto;
  padding-right: 8px;
}

.talimerk-ai-panel .ai-chat-log {
  max-height: min(330px, calc(100vh - 490px));
  min-height: 120px;
}

.ai-message {
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr);
}

.ai-message.user {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
}

.ai-message-avatar {
  background: #221a37;
  border: 2px solid rgba(137, 110, 255, 0.58);
  border-radius: 50%;
  height: 44px;
  overflow: hidden;
  position: relative;
  width: 44px;
}

.ai-message-avatar img {
  height: 360%;
  left: -12%;
  position: absolute;
  top: -142%;
  transform: none;
  width: auto;
}

.ai-message-avatar span {
  display: none;
}

.ai-message-body {
  background: #1f2327;
  border: 1px solid #303740;
  border-radius: 8px;
  color: #f3f7fb;
  font-size: 18px;
  line-height: 1.45;
  padding: 16px 18px;
}

.ai-message.user .ai-message-body {
  background: #2a2b2f;
  max-width: 82%;
}

.ai-message-body p,
.ai-message-body ul {
  margin-bottom: 12px;
}

.ai-message-body li {
  margin: 7px 0;
}

.ai-trade-chip {
  align-items: center;
  background: #2b2d30;
  border: 1px solid #555b62;
  border-radius: 999px;
  color: white;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  margin: 2px 4px 2px 0;
  padding: 5px 9px;
  white-space: nowrap;
}

.ai-trade-chip.gain {
  border-color: rgba(37, 212, 135, 0.55);
}

.ai-trade-chip.loss {
  border-color: rgba(255, 90, 103, 0.62);
}

.ai-chat-form {
  align-items: end;
  background: #11171b;
  border: 1px solid #343c45;
  border-radius: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 54px;
  padding: 10px;
}

.ai-chat-form textarea {
  background: transparent;
  border: 0;
  color: white;
  min-width: 0;
  min-height: 48px;
  resize: none;
}

.ai-chat-form button {
  align-items: center;
  background: #6f57db;
  border-radius: 50%;
  display: flex;
  font-size: 28px;
  height: 48px;
  justify-content: center;
  min-height: 48px;
  padding: 0;
  width: 48px;
}

.ai-disclaimer {
  color: #6d737c;
  font-size: 13px;
  margin: 0;
  text-align: center;
}

.insights #insightOutput {
  background: #101113;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #dce7f3;
  line-height: 1.55;
  margin-top: 16px;
  min-height: 420px;
  padding: 16px;
  white-space: pre-wrap;
}

.table-panel {
  overflow: hidden;
}

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

table {
  border-collapse: collapse;
  margin-top: 14px;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: center;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

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

@media (max-width: 1180px) {
  .auth-landing {
    grid-template-columns: 1fr;
  }

  .auth-landing-art {
    min-height: 38vh;
    padding: 18px;
  }

  .auth-landing-panel {
    border-left: 0;
    border-top: 1px solid rgba(151, 246, 154, 0.22);
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    position: relative;
  }

  .nav-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .sidebar-character {
    display: none;
  }

  .metrics-grid,
  .scorecard-grid,
  .htf-grid,
  .account-pnl-charts,
  .account-kanban,
  .payout-grid,
  .payouts-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-panel,
  .chart-panel,
  .calendar-panel,
  .progress-panel {
    grid-column: span 12;
  }

  .talimerk-ai-hero,
  .talimerk-ai-layout {
    grid-template-columns: 1fr;
  }

  .talimerk-ai-title h2 {
    font-size: 31px;
    text-align: center;
  }

  .talimerk-ai-kpis {
    grid-template-columns: 1fr;
  }

  .talimerk-ai-chat {
    min-height: 620px;
  }

  .ai-message-body {
    font-size: 16px;
  }

  .awards-upload-card .account-snapshot-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .ai-chat-form {
    grid-template-columns: minmax(0, 1fr) 46px;
  }

  .ai-chat-form button {
    height: 44px;
    min-height: 44px;
    width: 44px;
  }

  .talimerk-ai-title,
  .talimerk-ai-title p,
  .talimerk-ai-avatar {
    justify-self: center;
    text-align: center;
  }

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

  .journal-page,
  .notes-list {
    border-radius: 8px;
    border: 1px solid var(--line);
  }

  .account-progression-flow {
    flex-direction: row;
  }

  .account-flow-stage {
    flex: 1 1 260px;
    width: auto;
  }

  .account-flow-arrow {
    transform: none;
  }
}

@container (max-width: 680px) {
  .account-progression-flow {
    flex-direction: row;
  }

  .account-flow-stage {
    flex: 1 1 260px;
    width: auto;
  }

  .account-flow-arrow {
    align-self: center;
    transform: none;
  }

  .account-flow-stage strong {
    font-size: 18px;
  }

  .account-flow-stage p {
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .account-firm-allocation-summary {
    grid-template-columns: 1fr;
  }

  .account-allocation-head {
    align-items: start;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .account-allocation-head strong,
  .account-allocation-head span {
    grid-column: 1;
    justify-self: center;
  }

  .content {
    padding: 14px;
  }

  .talimerk-ai-widget {
    bottom: max(12px, env(safe-area-inset-bottom));
    right: 12px;
    top: auto !important;
  }

  .talimerk-ai-launcher {
    height: 56px;
    min-height: 56px;
    padding: 4px;
    width: 56px;
  }

  .talimerk-ai-launcher .talimerk-ai-avatar {
    height: 46px;
    width: 46px;
  }

  .talimerk-ai-panel {
    border-radius: 10px 10px 0 0;
    bottom: 0;
    left: 0 !important;
    max-height: min(82vh, 680px);
    overflow: hidden;
    padding: 10px;
    right: 0 !important;
    top: auto !important;
    width: auto;
  }

  .talimerk-ai-panel-top {
    gap: 8px;
    grid-template-columns: 42px minmax(0, 1fr) 36px;
    padding-bottom: 8px;
  }

  .talimerk-ai-panel-top .talimerk-ai-avatar {
    height: 40px;
    width: 40px;
  }

  .talimerk-ai-panel-top .talimerk-ai-title h2 {
    font-size: 20px;
    text-align: left;
  }

  .talimerk-ai-panel .talimerk-ai-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .talimerk-ai-panel .talimerk-ai-kpis article {
    min-height: 48px;
    padding: 6px;
  }

  .talimerk-ai-panel .talimerk-ai-kpis span {
    font-size: 9px;
  }

  .talimerk-ai-panel .talimerk-ai-kpis strong {
    font-size: 14px;
  }

  .talimerk-ai-panel .talimerk-ai-chat {
    display: grid;
    grid-template-rows: auto auto minmax(120px, 1fr) auto auto;
    max-height: calc(82vh - 150px);
    overflow: hidden;
  }

  .talimerk-ai-panel .ai-chat-topbar {
    gap: 6px;
    padding-bottom: 8px;
  }

  .talimerk-ai-panel .ai-chat-topbar button,
  .talimerk-ai-panel .ai-chat-topbar span,
  .talimerk-ai-panel .ai-prompt-row button {
    font-size: 11px;
    min-height: 32px;
    padding: 6px 8px;
  }

  .talimerk-ai-panel .ai-empty-state {
    padding: 10px;
  }

  .talimerk-ai-panel .ai-empty-state strong {
    font-size: 16px;
  }

  .talimerk-ai-panel .ai-empty-state p {
    font-size: 12px;
  }

  .talimerk-ai-panel .ai-chat-log {
    max-height: none;
    min-height: 120px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .talimerk-ai-panel .ai-message {
    gap: 8px;
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .talimerk-ai-panel .ai-message-avatar {
    height: 32px;
    width: 32px;
  }

  .talimerk-ai-panel .ai-message-body {
    font-size: 13px;
    padding: 10px;
  }

  .talimerk-ai-panel .ai-message.user .ai-message-body {
    max-width: 94%;
  }

  .talimerk-ai-panel .ai-chat-form {
    border-radius: 8px;
    gap: 6px;
    grid-template-columns: minmax(0, 1fr) 38px;
    padding: 7px;
  }

  .talimerk-ai-panel .ai-chat-form textarea {
    min-height: 38px;
  }

  .talimerk-ai-panel .ai-chat-form button {
    font-size: 21px;
    height: 36px;
    min-height: 36px;
    width: 36px;
  }

  .page-top,
  .journal-header,
  .top-actions,
  .dashboard-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .settings-grid,
  .connections-shell,
  .accounts-shell,
  .sync-controls,
  .account-snapshot-grid,
  .import-workflow,
  .csv-import-panel,
  .scorecard-grid,
  .htf-grid,
  .account-pnl-charts,
  .account-kanban,
  .payout-grid,
  .payouts-top,
  .integration-grid,
  .two-col,
  .three-col,
  .checklist {
    grid-template-columns: 1fr;
  }

  .account-progression-flow {
    flex-direction: row;
  }

  .account-flow-stage {
    flex: 1 1 260px;
    width: auto;
  }

  .account-flow-arrow {
    transform: none;
  }

  .calendar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-action-row {
    grid-template-columns: 1fr;
  }

  .settings-status-card,
  .settings-sync-card,
  .settings-keys-card,
  .settings-import-card,
  .settings-backup-card,
  .settings-connections-card {
    grid-column: 1;
  }

  .account-form-card,
  .account-board-card,
  .account-table-card,
  .account-snapshot-card,
  .account-summary-card,
  .account-type-card,
  .account-history-card,
  .account-rules-card {
    grid-column: 1;
  }

  .economic-calendar {
    grid-template-columns: 1fr;
  }

  .journal-ai-stats,
  .journal-ai-summaries,
  .previous-summary-cards,
  .results-criteria-grid {
    grid-template-columns: 1fr;
  }

  .streak-widget {
    grid-template-columns: 1fr;
  }

  .streak-side {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }
}

@media (max-width: 420px) {
  :root {
    --widget-title-size: 25px;
    --widget-support-size: 18px;
  }

  .content {
    padding: 10px;
  }

  .dashboard-hero.compact {
    min-height: 92px;
    padding: 12px;
  }

  .journal-page,
  .notes-list,
  .panel,
  .account-section-card {
    padding: 10px;
  }

  .journal-save-controls {
    align-items: stretch;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .journal-save-status,
  #saveJournalButton {
    width: 100%;
  }

  .talimerk-ai-panel {
    max-height: 86vh;
  }

  .talimerk-ai-panel .talimerk-ai-kpis {
    grid-template-columns: 1fr 1fr;
  }
}
