﻿/* â”€â”€ DESIGN TOKENS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  /* Primary palette */
  --primary-dark:   #0a2f44;
  --primary-medium: #1b4d6e;
  --primary-light:  #2c5a74;
  --navy:           #0a2f44;
  --navy-mid:       #0c2e3f;
  --navy-lite:      #1e4663;
  --nav-gradient:   linear-gradient(98deg, #0c2e3f 0%, #134659 100%);

  /* Accent */
  --gold:      #e4b363;
  --gold-dim:  #c49a3f;
  --gold-pale: #fef9ef;

  /* Status */
  --green:        #10b981;
  --green-light:  #d1fae5;
  --red:          #ef4444;
  --red-light:    #fee2e2;

  /* Text */
  --text-dark: #1e2f3a;
  --grey:      #5a6e7c;

  /* Surfaces */
  --surface: #ffffff;
  --border:  rgba(228, 179, 99, 0.5);

  /* Shadows â€” exact spec */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 25px 45px -12px rgba(0, 0, 0, 0.4);

  /* Border radius â€” exact spec */
  --radius-lg: 2rem;
  --radius-md: 1.5rem;
  --radius-sm: 1rem;

  /* Typography â€” system-ui stack (spec) */
  --font-ui:   'Segoe UI', system-ui, -apple-system, 'Inter', sans-serif;
  --font-mono: 'Courier New', Consolas, monospace;
}

.app-boot-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: auto minmax(0, max-content);
  place-content: center;
  align-items: center;
  gap: .9rem;
  background: linear-gradient(135deg, #082f44 0%, #164a63 100%);
  color: #fff;
  padding: 1.5rem;
}

.app-boot-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--gold);
  color: var(--primary-dark);
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0,0,0,.24);
}

.app-boot-screen strong,
.app-boot-screen span {
  display: block;
  white-space: nowrap;
}

.app-boot-screen strong {
  font-size: 1rem;
  font-weight: 850;
}

.app-boot-screen span {
  color: rgba(255,255,255,.72);
  font-size: .82rem;
  font-weight: 700;
  margin-top: .18rem;
}

/* â”€â”€ RESET / BASE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
  min-height: 100vh;
  color: var(--text-dark);
}

/* â”€â”€ AUTH â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#authSection {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
  padding: 2rem;
}
.auth-box {
  width: min(1040px, 100%);
  background: rgba(255,255,255,0.97);
  border-radius: var(--radius-lg);
  padding: .8rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  border-top: 5px solid var(--gold);
  animation: slideUp .4s ease;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: .8rem;
  overflow: hidden;
}
.auth-visual {
  position: relative;
  min-height: 540px;
  border-radius: calc(var(--radius-lg) - .5rem);
  overflow: hidden;
  background: #0a2f44;
  color: #fff;
}
.auth-visual > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,31,47,.12) 0%, rgba(6,31,47,.58) 58%, rgba(6,31,47,.92) 100%),
    linear-gradient(90deg, rgba(6,31,47,.62) 0%, rgba(6,31,47,.18) 52%, rgba(6,31,47,.48) 100%);
}
.auth-visual-copy {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  gap: 1.35rem;
}
.auth-visual-logo {
  position: static;
  width: min(26%, 135px);
  object-fit: contain;
  display: block;
  border-radius: .85rem;
  background: rgba(255,255,255,.92);
  padding: .45rem;
  box-shadow: 0 14px 34px rgba(0,0,0,.26);
}
.auth-visual-message {
  width: min(500px, 94%);
  margin-top: clamp(.15rem, 1.2vh, .85rem);
  margin-left: auto;
  margin-right: auto;
  display: grid;
  justify-items: center;
  gap: .7rem;
}
.auth-visual-kicker {
  color: var(--gold);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.auth-visual-title {
  font-size: clamp(1.65rem, 3.4vw, 2.7rem);
  line-height: 1.08;
  font-weight: 900;
  color: #fff;
  max-width: 560px;
}
.auth-visual-text {
  color: rgba(255,255,255,.82);
  font-size: 1rem;
  max-width: 500px;
}
.auth-visual-slogan {
  color: #fff;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-style: italic;
  font-weight: 750;
  font-family: Georgia, 'Times New Roman', serif;
  margin-top: .2rem;
}
.auth-form-panel {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-logo { font-size: 2.4rem; font-weight: 800; color: var(--primary-dark); letter-spacing: -1px; }
.auth-logo span { color: var(--gold); }
.auth-lead { color: var(--grey); font-size: .92rem; margin: .45rem 0 1.4rem; }
.auth-footer-credit {
  margin-top: 1rem;
  padding-top: .9rem;
  border-top: 1px solid #edf2f7;
  color: var(--grey);
  font-size: .78rem;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}
.auth-legal-note {
  color: var(--grey);
  font-size: .76rem;
  line-height: 1.45;
  margin-top: .9rem;
  text-align: center;
}
.auth-legal-note a,
.terms-accept-row a { color: var(--primary-dark); font-weight: 850; }
.first-login-badge {
  display: inline-flex;
  margin: 1rem 0 .55rem;
  padding: .32rem .65rem;
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--primary-dark);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .65px;
  text-transform: uppercase;
}
.first-login-title {
  color: var(--primary-dark);
  font-size: 1.35rem;
  font-weight: 900;
  margin: 0;
}
.terms-accept-row {
  align-items: flex-start;
  background: #f8fafc;
  border: 1px solid #dfe8ee;
  border-radius: .8rem;
  color: var(--grey);
  cursor: pointer;
  display: flex;
  font-size: .8rem;
  gap: .65rem;
  line-height: 1.45;
  margin-bottom: 1rem;
  padding: .75rem;
}
.terms-accept-row input { accent-color: var(--gold); flex: 0 0 auto; margin-top: .18rem; }
.pwa-install-btn {
  width: 100%;
  margin-top: .25rem;
  padding: .72rem 1rem;
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  background: var(--primary-dark);
  color: var(--gold);
  font-weight: 800;
  cursor: pointer;
}
.pwa-install-btn[hidden] { display: none; }
.pwa-install-prompt {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6,31,47,.58);
  backdrop-filter: blur(5px);
}
.pwa-install-prompt[hidden] { display: none; }
.pwa-install-card {
  position: relative;
  width: min(430px, 100%);
  border: 1px solid rgba(218,165,32,.42);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 24px 70px rgba(6,31,47,.26);
  color: var(--navy);
  padding: 1.35rem;
}
.pwa-install-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid #dbe5ec;
  border-radius: 50%;
  background: #f8fafc;
  color: var(--grey);
  cursor: pointer;
}
.pwa-install-mark {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--primary-dark);
  color: var(--gold);
  font-size: 1.35rem;
  margin-bottom: .85rem;
}
.pwa-install-card h2 {
  margin: 0 2.25rem .35rem 0;
  font-size: 1.35rem;
  font-weight: 900;
}
.pwa-install-card p {
  margin: 0;
  color: var(--grey);
  font-weight: 700;
  line-height: 1.5;
}
.pwa-install-steps {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--navy);
  font-size: .93rem;
  font-weight: 800;
  line-height: 1.65;
}
.pwa-install-steps[hidden] { display: none; }
.pwa-install-steps li::marker {
  color: var(--gold);
  font-weight: 900;
}
.pwa-install-actions {
  display: flex;
  gap: .7rem;
  margin-top: 1.15rem;
}
.pwa-install-primary,
.pwa-install-secondary {
  min-height: 2.8rem;
  border-radius: var(--radius-sm);
  font-weight: 900;
  cursor: pointer;
}
.pwa-install-primary {
  flex: 1 1 auto;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--navy);
}
.pwa-install-secondary {
  flex: 0 0 auto;
  border: 1px solid #dbe5ec;
  background: #f8fafc;
  color: var(--grey);
  padding: 0 1rem;
}
.auth-visual > p, .auth-role-tabs { display: none !important; }
.password-change-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6,31,47,.82);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.password-change-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border-top: 5px solid var(--gold);
  box-shadow: var(--shadow-lg);
}
.reset-password-card {
  position: relative;
  width: min(470px, 100%);
}
.reset-close-btn {
  position: absolute;
  top: .85rem;
  right: .9rem;
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f5f7;
  color: var(--primary-dark);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.reset-otp-note {
  display: none;
  margin-bottom: 1rem;
  padding: .75rem .85rem;
  border-radius: var(--radius-sm);
  background: var(--gold-pale);
  color: var(--primary-dark);
  font-size: .84rem;
  font-weight: 700;
}
.reset-otp-note.active { display: block; }
.reset-help-text {
  margin: .45rem 0 0;
  color: var(--grey);
  font-size: .78rem;
  line-height: 1.35;
}
.reset-actions {
  display: grid;
  grid-template-columns: .65fr 1fr;
  gap: .65rem;
}
.auth-tab-btn {
  flex: 1; padding: .5rem; border: 2px solid rgba(228,179,99,.4);
  background: transparent; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 700; font-size: .85rem;
  color: var(--grey); cursor: pointer; transition: all .2s;
}
.auth-tab-btn.active { background: var(--primary-dark); color: var(--gold); border-color: var(--primary-dark); }
.auth-panel { display: none; } .auth-panel.active { display: block; }
.forgot-password-link {
  display: block;
  width: fit-content;
  margin: .75rem auto 0;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.form-label-sm { font-size: .78rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: .8px; color: var(--grey); margin-bottom: .3rem; display: block; }
.form-ctrl {
  width: 100%; padding: .65rem .9rem; border: 1.5px solid #dde3e8;
  border-radius: var(--radius-sm); font-family: var(--font-ui);
  font-size: .95rem; line-height: 1.5; transition: border .2s; outline: none;
}
.form-ctrl:focus { border-color: var(--gold); }
.btn-primary-gold {
  width: 100%; padding: .75rem; background: var(--gold);
  border: none; border-radius: var(--radius-sm); font-family: var(--font-ui);
  font-weight: 600; font-size: .9rem; line-height: 1.2; color: var(--text-dark); cursor: pointer;
  transition: all .2s;
}
.btn-primary-gold:hover { background: var(--gold-dim); transform: scale(1.02); }
.btn-outline-gold {
  width: 100%; padding: .75rem; background: transparent;
  border: 2px solid var(--gold); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .9rem; line-height: 1.2;
  color: var(--gold); cursor: pointer; transition: all .2s;
}
.btn-outline-gold:hover { background: var(--gold); color: var(--text-dark); }
@media (max-width: 840px) {
  #authSection { padding: 1rem; }
  .auth-box { grid-template-columns: 1fr; }
  .auth-visual { min-height: 300px; }
  .auth-visual-copy { padding: 1rem; gap: .9rem; }
  .auth-visual-logo { width: min(36%, 112px); }
  .auth-visual-message { width: 100%; }
}

/* â”€â”€ APP SHELL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#mainApp { display: none; min-height: 100vh; }

/* â”€â”€ SIDEBAR â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 220px;
  background: linear-gradient(180deg, #0c2e3f 0%, #134659 100%);
  border-right: 4px solid var(--gold);
  display: flex; flex-direction: column; z-index: 100;
  transition: transform .3s;
  box-shadow: 8px 0 20px rgba(0,0,0,.15);
}
.sidebar-logo {
  padding: 1.5rem 1.2rem 1rem;
  font-size: 1.2rem; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(228,179,99,.3); letter-spacing: 0;
}
.tenant-brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  background: rgba(255,255,255,.95);
  padding: .25rem;
  margin-bottom: .65rem;
  border: 1px solid rgba(228,179,99,.35);
}
.sidebar-logo span { color: var(--gold); }
.sidebar-logo small { display: block; font-size: .7rem; color: rgba(255,255,255,.45);
  font-weight: 400; letter-spacing: 1px; text-transform: uppercase; margin-top: 3px; }
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.nav-item-btn {
  display: flex; align-items: center; gap: .75rem;
  width: 100%; padding: .65rem 1.2rem; background: none; border: none;
  color: rgba(255,255,255,.55); font-family: var(--font-ui); font-weight: 600; font-size: .88rem;
  cursor: pointer; transition: all .18s; text-align: left; border-left: 3px solid transparent;
}
.nav-item-btn:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item-btn.active { color: var(--gold); background: rgba(228,179,99,.1); border-left-color: var(--gold); }
.nav-item-btn i { font-size: 1rem; width: 18px; text-align: center; }
.nav-section-label {
  font-size: .65rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,.25); padding: .6rem 1.2rem .2rem; font-weight: 600;
}
.sidebar-footer {
  padding: 1rem 1.2rem; border-top: 1px solid rgba(228,179,99,.2);
}
.user-chip {
  display: flex; align-items: center; gap: .6rem;
  background: rgba(255,255,255,.06); border-radius: var(--radius-sm); padding: .5rem .75rem;
}
.user-chip-avatar {
  width: 30px; height: 30px; background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--text-dark);
}
.user-chip-info { flex: 1; min-width: 0; }
.user-chip-name { font-size: .8rem; font-weight: 600; color: #fff; }
.user-chip-role { font-size: .65rem; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .8px; }
.logout-btn {
  background: none; border: none; color: rgba(255,255,255,.4); font-size: 1rem;
  cursor: pointer; transition: color .2s; padding: 0;
}
.logout-btn:hover { color: var(--red); }

/* â”€â”€ MAIN CONTENT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.main-content {
  margin-left: 220px;
  padding: 2rem;
  background: #f0f2f5;
  min-height: 100vh;
}
.page { display: none; }
.page.active { display: block; animation: fadeIn .25s ease; }

/* â”€â”€ PAGE HEADER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.page-title { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--primary-dark); }
.page-title small { font-size: .75rem; font-weight: 500; color: var(--grey);
  text-transform: uppercase; letter-spacing: 1px; display: block; line-height: 1.4; }
.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  flex-wrap: wrap;
}
.trade-actions .icon-btn,
.account-actions .icon-btn {
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.trade-actions {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(10,47,68,.08);
  border-radius: 1rem;
  padding: .35rem;
  box-shadow: 0 10px 26px rgba(10,47,68,.08);
}
.trade-file-action {
  min-height: 40px;
  border-radius: .8rem;
  padding: .55rem .9rem;
  font-size: .84rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}
.trade-file-action i {
  font-size: 1rem;
}
.trade-file-action.import {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--primary-dark);
}
.trade-file-action.export {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  color: var(--gold);
}
.trade-file-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(10,47,68,.12);
}
.trade-file-action.import:hover {
  border-color: var(--gold-dim);
  background: var(--gold-dim);
  color: var(--primary-dark);
}
.trade-file-action.export:hover {
  border-color: var(--gold);
  background: #123d54;
  color: #ffd98a;
}
.primary-action {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--gold) !important;
}

/* â”€â”€ FILTER BAR â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.filter-bar {
  background: rgba(255,255,255,0.97); border-radius: var(--radius-md); padding: .75rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.filter-select {
  padding: .45rem .75rem; border: 1.5px solid #dde3e8; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: .85rem; font-weight: 600; outline: none;
  color: var(--primary-dark); transition: border .2s; background: #f8f9fa;
}
.filter-select:focus { border-color: var(--gold); background: #fff; }
.currency-sel {
  padding: .45rem .75rem; border: 2px solid var(--gold); border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-size: .85rem; font-weight: 700; outline: none;
  color: var(--gold); background: var(--primary-dark); transition: all .2s;
}

/* â”€â”€ STAT CARDS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #fef9ef 100%);
  border-radius: var(--radius-md); padding: 1.25rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  border-left: 6px solid var(--gold); transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card-label { font-size: .85rem; text-transform: uppercase; letter-spacing: 1px;
  color: var(--grey); font-weight: 500; margin-bottom: .4rem; line-height: 1.4; }
.stat-card-value { font-size: 2rem; font-weight: 800; color: var(--primary-dark); line-height: 1.2; overflow-wrap: anywhere; }
.stat-card-value.profit { color: var(--green); }
.stat-card-value.loss   { color: var(--red); }
.stat-card-sub { font-size: .75rem; color: var(--grey); margin-top: .25rem; }

/* DASHBOARD */
.dashboard-shell { display: grid; gap: 1.25rem; }
.dashboard-hero {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 1rem; align-items: stretch;
}
.dashboard-panel {
  background: linear-gradient(135deg, #0c2e3f 0%, #174f64 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-md); border: 1px solid rgba(228,179,99,.35);
}
.dashboard-panel-label {
  color: rgba(255,255,255,.62); font-size: .72rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: .35rem;
}
.dashboard-panel-value { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 850; line-height: 1; overflow-wrap: anywhere; }
.dashboard-panel-sub { color: rgba(255,255,255,.72); font-size: .9rem; margin-top: .75rem; overflow-wrap: anywhere; }
.dashboard-panel-row { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.1rem; }
.dashboard-chip {
  display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.88);
  padding: .45rem .7rem; font-size: .78rem; font-weight: 700;
  min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere;
}
.dashboard-health {
  background: #fff; border-radius: var(--radius-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.35);
}
.news-alert-card {
  background: #fff7ed;
  border: 1px solid rgba(220, 53, 69, .28);
  border-left: 5px solid #dc3545;
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.news-alert-title { color: var(--red); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .9px; margin-bottom: .25rem; }
.news-alert-event { color: var(--primary-dark); font-size: 1rem; font-weight: 850; }
.news-alert-meta { color: var(--grey); font-size: .8rem; font-weight: 650; margin-top: .15rem; }
.news-alert-countdown { color: #991b1b; background: #fee2e2; border-radius: 999px; padding: .4rem .7rem; font-weight: 900; white-space: nowrap; }
.news-alert-actions { display:flex; gap:.5rem; align-items:center; flex-wrap:wrap; }
.health-title { font-size: .86rem; font-weight: 800; color: var(--primary-dark); margin-bottom: .8rem; }
.health-row { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; font-size: .82rem; color: var(--grey); min-width: 0; }
.health-row span,
.health-row strong { min-width: 0; overflow-wrap: anywhere; }
.health-row strong { color: var(--primary-dark); text-align: right; }
.health-track { height: 10px; background: #edf2f7; border-radius: 999px; overflow: hidden; margin: .65rem 0 1rem; }
.health-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold)); }
.dashboard-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 1rem; }
.dashboard-kpi {
  background: #fff; border-radius: var(--radius-md); padding: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.28);
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .85rem; align-items: center;
}
.dashboard-kpi-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  color: var(--primary-dark); background: var(--gold-pale); border: 1px solid rgba(228,179,99,.45);
}
.dashboard-kpi-label { font-size: .72rem; color: var(--grey); font-weight: 800; text-transform: uppercase; letter-spacing: .7px; overflow-wrap: anywhere; }
.dashboard-kpi-value { font-size: 1.35rem; font-weight: 850; color: var(--primary-dark); line-height: 1.15; margin-top: .1rem; overflow-wrap: anywhere; }
.dashboard-kpi-value.profit, .session-value.profit { color: var(--green); }
.dashboard-kpi-value.loss, .session-value.loss { color: var(--red); }
.dashboard-kpi-sub { font-size: .75rem; color: var(--grey); margin-top: .15rem; overflow-wrap: anywhere; }
.dashboard-grid-2 { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1rem; }
.dashboard-card {
  background: #fff; border-radius: var(--radius-md); padding: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.28);
}
.dashboard-card-title { font-size: .86rem; font-weight: 850; color: var(--primary-dark); margin-bottom: .85rem; }
.session-row { display: grid; grid-template-columns: 82px 1fr auto; gap: .75rem; align-items: center; margin-bottom: .75rem; }
.session-row:last-child { margin-bottom: 0; }
.session-name { font-size: .8rem; font-weight: 800; color: var(--primary-dark); min-width: 0; overflow-wrap: anywhere; }
.session-meter { height: 8px; background: #edf2f7; border-radius: 999px; overflow: hidden; }
.session-meter span { display: block; height: 100%; border-radius: inherit; }
.session-value { font-family: var(--font-mono); font-size: .8rem; font-weight: 800; white-space: normal; overflow-wrap: anywhere; text-align: right; }
.recent-table { width: 100%; border-collapse: collapse; font-size: .84rem; table-layout: fixed; }
.recent-table th { color: var(--grey); font-size: .68rem; letter-spacing: .8px; text-transform: uppercase; padding: .45rem .35rem; border-bottom: 1px solid #edf2f7; }
.recent-table td { padding: .55rem .35rem; border-bottom: 1px solid #f3f5f7; vertical-align: middle; overflow-wrap: anywhere; }
.recent-table tr:last-child td { border-bottom: none; }
.mini-empty { color: var(--grey); font-weight: 700; text-align: center; padding: 1.5rem .5rem; }
@media (max-width: 980px) {
  .dashboard-hero, .dashboard-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .stat-card-value { font-size: 1.5rem; }
  .dashboard-panel { padding: 1.15rem; }
  .dashboard-panel-value { font-size: 2rem; line-height: 1.08; }
  .dashboard-panel-sub { font-size: .82rem; }
  .dashboard-kpi-grid { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: .8rem; }
  .dashboard-kpi { padding: .85rem; gap: .65rem; }
  .dashboard-kpi-icon { width: 36px; height: 36px; border-radius: 12px; }
  .dashboard-kpi-value { font-size: 1.08rem; }
  .dashboard-card { padding: .85rem; }
  .recent-table { font-size: .76rem; }
  .recent-table th,
  .recent-table td { padding: .48rem .25rem; }
}

/* Dashboard card redesign: keep card content on one line and contain long values. */
.dashboard-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: .85rem;
}
.dashboard-kpi {
  position: relative;
  min-height: 88px;
  padding: .9rem .95rem;
  overflow: hidden;
  border-left: 4px solid var(--gold);
  align-items: center;
}
.dashboard-kpi > div:last-child,
.trade-summary-card > div:last-child,
.finance-card > div:last-child,
.account-kpi > div:last-child {
  min-width: 0;
}
.dashboard-kpi-label,
.dashboard-kpi-value,
.dashboard-kpi-sub,
.trade-summary-label,
.trade-summary-value,
.trade-summary-sub,
.stat-card-label,
.stat-card-value,
.stat-card-sub,
.finance-card-label,
.finance-card-value,
.finance-card-sub,
.account-kpi-label,
.account-kpi-value,
.account-kpi-sub {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.dashboard-kpi-value,
.trade-summary-value,
.stat-card-value,
.finance-card-value,
.account-kpi-value {
  font-size: clamp(.92rem, 1.8vw, 1.22rem);
  line-height: 1.1;
}
.dashboard-panel-value,
.dashboard-panel-sub,
.dashboard-chip,
.health-row span,
.health-row strong,
.session-name,
.session-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
}
.dashboard-chip {
  flex: 0 1 auto;
}
.session-row {
  grid-template-columns: minmax(72px, .7fr) minmax(76px, 1fr) minmax(76px, auto);
}
@media (max-width: 560px) {
  .dashboard-kpi-grid,
  .trade-summary-grid,
  .finance-summary-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-kpi,
  .trade-summary-card,
  .finance-card {
    min-height: 78px;
    padding: .8rem .85rem;
  }
  .dashboard-kpi-value,
  .trade-summary-value,
  .stat-card-value,
  .finance-card-value,
  .account-kpi-value {
    font-size: 1rem;
  }
  .dashboard-panel-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .1rem;
  }
  .dashboard-chip {
    flex: 0 0 auto;
    max-width: 75vw;
  }
  .finance-break-row,
  .weekly-split-row,
  .session-row {
    grid-template-columns: minmax(62px, .7fr) minmax(70px, 1fr) minmax(68px, auto);
    gap: .4rem;
  }
}

/* â”€â”€ TABLE CARD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.table-card {
  background: rgba(255,255,255,0.97); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.3);
}
.table-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid #f0f2f5; flex-wrap: wrap; gap: .75rem;
}
.table-card-title { font-weight: 600; font-size: 1.25rem; line-height: 1.3; color: var(--primary-dark); }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.4; }
.tbl thead th {
  background: #1e4663; color: white;
  padding: .6rem .75rem; font-weight: 600; font-size: .95rem; line-height: 1.3;
  white-space: nowrap; border: none;
}
.tbl tbody tr { border-bottom: 1px solid #f3f5f7; transition: background .15s; }
.tbl tbody tr:last-child { border-bottom: none; }
.tbl tbody tr:hover { background: #fef9ef; }
.tbl td { padding: .5rem .75rem; vertical-align: middle; font-size: .9rem; }
.tbl-input {
  width: 100%; border: 1.5px solid transparent; border-radius: .4rem;
  padding: .3rem .45rem; font-family: var(--font-ui); font-size: .9rem;
  background: transparent; transition: all .18s; color: var(--primary-dark); outline: none;
}
.tbl-input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 3px rgba(228,179,99,.15); }
.tbl-select {
  border: 1.5px solid transparent; border-radius: .4rem;
  padding: .3rem .45rem; font-family: var(--font-ui); font-size: .9rem;
  background: transparent; transition: all .18s; color: var(--primary-dark); outline: none; cursor: pointer;
}
.tbl-select:focus { border-color: var(--gold); background: #fff; }

/* TRADING LOG */
.trade-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.trade-summary-card {
  background: #fff; border: 1px solid rgba(228,179,99,.28); border-radius: var(--radius-md);
  padding: .95rem 1rem; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: .8rem;
}
.trade-summary-icon {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  color: var(--primary-dark); background: var(--gold-pale); border: 1px solid rgba(228,179,99,.42);
}
.trade-summary-label { color: var(--grey); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }
.trade-summary-value { color: var(--primary-dark); font-size: 1.22rem; font-weight: 850; line-height: 1.15; }
.trade-summary-value.profit { color: var(--green); }
.trade-summary-value.loss { color: var(--red); }
.trade-summary-sub { color: var(--grey); font-size: .72rem; margin-top: .1rem; }
.trade-table-card { border-radius: var(--radius-lg); }
.trade-table-card .table-card-header {
  background: #fff; padding: 1rem 1.15rem;
}
.trade-log-tools {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.trade-date-picker {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  padding: .35rem .55rem;
  border: 1px solid rgba(228,179,99,.45);
  border-radius: 10px;
  background: #fff;
  color: var(--primary-dark);
}
.trade-date-picker input {
  border: 0;
  outline: 0;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: .82rem;
  background: transparent;
}
.trade-log-clear {
  min-height: 36px;
  border: 1px solid rgba(10,47,68,.12);
  border-radius: 10px;
  background: var(--gold-pale);
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 850;
  padding: .35rem .65rem;
}
.trade-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-top: 1px solid #edf2f7;
  color: var(--grey);
  font-size: .8rem;
  font-weight: 750;
  flex-wrap: wrap;
}
.trade-pagination > div {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.trade-pagination button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(228,179,99,.45);
  border-radius: 10px;
  background: #fff;
  color: var(--primary-dark);
}
.trade-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}
.trade-pagination strong {
  color: var(--primary-dark);
  font-size: .78rem;
}
.trade-table-card .tbl thead th {
  position: sticky; top: 0; z-index: 1; background: #12384d;
  padding: .72rem .75rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .55px;
}
.trade-table-card .tbl td { padding: .62rem .75rem; }
.trade-table-card .tbl tbody tr:hover { background: #fffaf0; }
.trade-instrument-cell { display: flex; align-items: center; gap: .5rem; min-width: 112px; }
.trade-instrument-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--gold); flex: 0 0 auto; }
.trade-instrument-name { font-weight: 850; color: var(--primary-dark); }
.trade-direction { display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; }
.trade-direction.buy { color: #047857; }
.trade-direction.sell { color: #b91c1c; }
.trade-empty-actions { display: flex; justify-content: center; margin-top: .75rem; color: var(--grey); font-size: .82rem; font-weight: 700; }

/* â”€â”€ BADGES â”€ (WCAG AA compliant) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.badge-win  { background: #d1fae5; color: #065f46; padding: 4px 12px; border-radius: 20px; font-weight: 500; font-size: .75rem; }
.badge-loss { background: #fee2e2; color: #991b1b; padding: 4px 12px; border-radius: 20px; font-weight: 500; font-size: .75rem; }
.badge-be   { background: #f3f4f6; color: #374151; padding: 4px 12px; border-radius: 20px; font-weight: 500; font-size: .75rem; }
.pl-positive { color: #10b981; font-weight: 700; font-size: .9rem; }
.pl-negative { color: #ef4444; font-weight: 700; font-size: .9rem; }
.pl-zero     { color: var(--grey); font-weight: 600; font-size: .9rem; }

/* â”€â”€ BUTTONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.btn-sm-gold {
  padding: .4rem .9rem; background: var(--gold); border: none; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .9rem; line-height: 1.2;
  color: var(--text-dark); cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-sm-gold:hover { background: var(--gold-dim); transform: scale(1.02); }
.btn-sm-ghost {
  padding: .4rem .9rem; background: transparent; border: 1.5px solid #dde3e8;
  border-radius: var(--radius-sm); font-family: var(--font-ui); font-weight: 600; font-size: .9rem;
  color: var(--grey); cursor: pointer; transition: all .2s;
}
.btn-sm-ghost:hover { border-color: var(--gold); color: var(--primary-dark); }
.btn-danger-sm {
  padding: .4rem .9rem; background: #fee2e2; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-ui); font-weight: 600; font-size: .9rem;
  color: var(--red); cursor: pointer; transition: all .2s;
}
.btn-danger-sm:hover { background: var(--red); color: #fff; }
.delete-btn {
  background: none; border: none; color: #d1d5db; cursor: pointer; font-size: 1rem;
  padding: .2rem; border-radius: .3rem; transition: all .15s; line-height: 1;
}
.delete-btn:hover { color: var(--red); background: #fee2e2; }
.icon-btn {
  background: none; border: 1.5px solid #dde3e8; border-radius: var(--radius-md);
  padding: .4rem .7rem; cursor: pointer; color: var(--grey); font-size: .9rem;
  transition: all .2s; font-family: var(--font-ui); font-size: .78rem;
  font-weight: 600; display: flex; align-items: center; gap: .35rem;
}
.icon-btn:hover { border-color: var(--gold); color: var(--navy); }
.icon-btn:disabled { opacity: .4; cursor: not-allowed; }

/* â”€â”€ QUICK-ADD â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.quick-add-bar {
  background: var(--navy-mid); border-radius: var(--radius-lg); padding: 1rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end;
  margin-bottom: 1.25rem; border: 1px solid var(--border);
}
.quick-add-bar label { font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: rgba(255,255,255,.5); margin-bottom: .25rem; display: block; }
.quick-input {
  padding: .5rem .75rem; border: 1.5px solid rgba(255,255,255,.12); border-radius: var(--radius-md);
  background: rgba(255,255,255,.08); color: #fff; font-family: var(--font-ui);
  font-size: .85rem; outline: none; transition: all .2s;
}
.quick-input:focus { border-color: var(--gold); background: rgba(255,255,255,.12); }
.quick-input option { background: var(--navy-mid); color: #fff; }

.risk-panel {
  background: #fff; border: 1px solid rgba(18,56,77,.12); border-radius: var(--radius-lg);
  padding: 1rem 1.15rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm);
}
.risk-panel-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.85rem; flex-wrap:wrap; }
.risk-panel-title { font-size:.92rem; font-weight:850; color:var(--primary-dark); display:flex; align-items:center; gap:.45rem; }
.risk-panel-note { color:var(--grey); font-size:.76rem; font-weight:650; }
.risk-dashboard-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap:.75rem; }
.risk-metric {
  background:#f8fafc; border:1px solid #e8edf2; border-radius:var(--radius-md);
  padding:.8rem .9rem; min-height:82px;
}
.risk-metric-label { color:var(--grey); font-size:.66rem; font-weight:850; text-transform:uppercase; letter-spacing:.65px; }
.risk-metric-value { color:var(--primary-dark); font-size:1.12rem; font-weight:850; margin-top:.22rem; }
.risk-metric-value.good { color:var(--green); }
.risk-metric-value.warn { color:#b7791f; }
.risk-metric-value.bad { color:var(--red); }
.risk-metric-sub { color:var(--grey); font-size:.72rem; margin-top:.18rem; }
.risk-settings-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap:.85rem; }
.risk-quick-action { display:flex; align-items:center; gap:.5rem; flex-wrap:wrap; align-self:flex-end; }

/* â”€â”€ WEEKLY REPORT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.day-card {
  background: #fff; border-radius: var(--radius-md); padding: .9rem;
  border-left: 4px solid var(--gold); box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
.day-card:hover { transform: translateX(3px); }
.day-card-name { font-size: .75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--grey); margin-bottom: .4rem; }
.day-card-pl { font-size: 1rem; font-weight: 800; font-family: var(--font-mono); }
.day-card-pills { display: flex; gap: .25rem; margin-top: .3rem; flex-wrap: wrap; }
.pill { font-size: .65rem; padding: 1px 7px; border-radius: 20px; font-weight: 700; }
.pill-trades { background: #e0e7ef; color: #374151; }
.pill-win    { background: #d1fae5; color: #065f46; }
.pill-loss   { background: #fee2e2; color: #991b1b; }

/* WEEKLY REPORT */
.weekly-shell { display: grid; gap: 1rem; }
#weeklyStats { display: grid; gap: 1.35rem; }
.weekly-hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 1rem; align-items: stretch;
}
.weekly-scoreboard {
  background: linear-gradient(135deg, #0c2e3f 0%, #174f64 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow-md); border: 1px solid rgba(228,179,99,.35);
}
.weekly-eyebrow { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,.62); }
.weekly-score { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 850; line-height: 1; margin-top: .35rem; }
.weekly-score-sub { margin-top: .75rem; color: rgba(255,255,255,.76); font-size: .9rem; }
.weekly-pill-row { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1rem; }
.weekly-chip {
  display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px;
  padding: .42rem .65rem; background: rgba(255,255,255,.1); color: rgba(255,255,255,.88);
  font-size: .76rem; font-weight: 750;
}
.weekly-focus-card {
  background: #fff; border-radius: var(--radius-lg); padding: 1.05rem 1.15rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.32);
}
.weekly-focus-title { font-weight: 850; color: var(--primary-dark); font-size: .9rem; margin-bottom: .75rem; }
.weekly-focus-row { display: flex; justify-content: space-between; gap: 1rem; color: var(--grey); font-size: .82rem; margin-bottom: .55rem; }
.weekly-focus-row strong { color: var(--primary-dark); }
.weekly-progress { height: 9px; border-radius: 999px; background: #edf2f7; overflow: hidden; margin: .65rem 0 1rem; }
.weekly-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--gold)); }
.weekly-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.35rem; }
.weekly-metric {
  background: #fff; border-radius: var(--radius-md); padding: .9rem .95rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.28);
  display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: center;
}
.weekly-metric i {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  color: var(--primary-dark); background: var(--gold-pale); border: 1px solid rgba(228,179,99,.45);
}
.weekly-metric-label { color: var(--grey); font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }
.weekly-metric-value { color: var(--primary-dark); font-size: 1.28rem; font-weight: 850; line-height: 1.15; }
.weekly-metric-value.profit { color: var(--green); }
.weekly-metric-value.loss { color: var(--red); }
.weekly-metric-sub { color: var(--grey); font-size: .74rem; margin-top: .12rem; }
.weekly-insight-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 1.5rem; align-items: start; }
.weekly-side-stack { display: grid; gap: 1.35rem; }
.weekly-panel {
  background: #fff; border-radius: var(--radius-md); padding: 1.05rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.28);
}
.weekly-panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-size: .86rem; font-weight: 850; color: var(--primary-dark); margin-bottom: .85rem;
}
.day-grid.weekly-days { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1.15rem; margin-bottom: 0; }
.weekly-day-card {
  background: #fff; border-radius: var(--radius-md); padding: .85rem .9rem;
  border: 1px solid rgba(228,179,99,.24); box-shadow: var(--shadow-sm);
}
.weekly-day-top { display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-bottom:.5rem; }
.weekly-day-name { font-size:.76rem; font-weight:850; color:var(--primary-dark); text-transform:uppercase; letter-spacing:.7px; }
.weekly-day-count { color:var(--grey); font-size:.72rem; font-weight:800; }
.weekly-day-pl { font-family:var(--font-mono); font-size:1.05rem; font-weight:850; margin-bottom:.55rem; }
.weekly-day-bar { height:7px; background:#edf2f7; border-radius:999px; overflow:hidden; }
.weekly-day-bar span { display:block; height:100%; border-radius:inherit; }
.weekly-split-row { display:grid; grid-template-columns:92px 1fr auto; gap:.65rem; align-items:center; margin-bottom:.7rem; }
.weekly-split-row:last-child { margin-bottom:0; }
.weekly-split-name { font-size:.8rem; font-weight:800; color:var(--primary-dark); }
.weekly-split-track { height:8px; background:#edf2f7; border-radius:999px; overflow:hidden; }
.weekly-split-track span { display:block; height:100%; border-radius:inherit; }
.weekly-split-value { font-family:var(--font-mono); font-size:.78rem; font-weight:850; white-space:nowrap; }
.weekly-focus-list { display: grid; gap: .9rem; }
.weekly-focus-item {
  display: grid; grid-template-columns: 36px 1fr auto; gap: .65rem; align-items: center;
  padding: .62rem .65rem; border: 1px solid #edf2f7; border-radius: var(--radius-sm); background: #fbfcfd;
}
.weekly-focus-item i {
  width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center;
  background: var(--gold-pale); color: var(--primary-dark); border: 1px solid rgba(228,179,99,.4);
}
.weekly-focus-label { color: var(--grey); font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .65px; }
.weekly-focus-main { color: var(--primary-dark); font-size: .92rem; font-weight: 850; line-height: 1.18; }
.weekly-focus-meta { color: var(--grey); font-size: .72rem; margin-top: .08rem; }
.weekly-focus-amount { font-family: var(--font-mono); font-size: .78rem; font-weight: 850; white-space: nowrap; }
.weekly-trade-table { border-radius: var(--radius-lg); }
.weekly-trade-table .tbl thead th { background:#12384d; }
.weekly-trade-table .tbl thead th {
  font-size: .76rem; text-transform: uppercase; letter-spacing: .55px; position: sticky; top: 0; z-index: 1;
}
.weekly-trade-table .tbl tbody tr:hover { background: #fffaf0; }
@media (max-width: 980px) {
  .weekly-hero, .weekly-insight-grid { grid-template-columns: 1fr; }
  #weeklyStats,
  .weekly-card-grid,
  .weekly-insight-grid,
  .weekly-side-stack,
  .day-grid.weekly-days { gap: 1.2rem; }
}

/* â”€â”€ CHART GRID â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.chart-card {
  background: rgba(255,255,255,0.97); border-radius: var(--radius-lg); padding: 1.25rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.chart-card-title { font-size: .85rem; font-weight: 600; color: var(--primary-dark);
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 1rem; }

/* â”€â”€ WEEKLY SUMMARY CARD (navy gradient, white text â€” matches original spec) */
.chart-card-subtitle { color: var(--grey); font-size: .78rem; font-weight: 650; margin: -.65rem 0 1rem; }
.dashboard-chart-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.dashboard-chart-card {
  padding: 1rem;
  min-height: 240px;
}
.dashboard-chart-frame {
  height: 170px;
  min-width: 0;
  position: relative;
}
.dashboard-chart-frame canvas {
  width: 100% !important;
  height: 100% !important;
}
@media (max-width: 640px) {
  .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-chart-card {
    min-height: 220px;
  }
  .dashboard-chart-frame {
    height: 150px;
  }
}
.finance-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr); gap: 1rem; margin-bottom: 1.25rem; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.finance-card {
  background: #fff; border-radius: var(--radius-md); padding: 1rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.3);
  display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center;
}
.finance-card-icon {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  color: var(--primary-dark); background: var(--gold-pale); border: 1px solid rgba(228,179,99,.45);
}
.finance-card-label { color: var(--grey); font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }
.finance-card-value { color: var(--primary-dark); font-size: 1.32rem; font-weight: 850; line-height: 1.15; margin-top: .08rem; }
.finance-card-value.profit { color: var(--green); }
.finance-card-value.loss { color: var(--red); }
.finance-card-sub { color: var(--grey); font-size: .74rem; margin-top: .12rem; }
.finance-panel {
  background: linear-gradient(135deg, #0c2e3f 0%, #174f64 100%);
  border-radius: var(--radius-lg); padding: 1rem 1.1rem; color: #fff;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(228,179,99,.35);
}
.finance-panel-title { font-size: .82rem; font-weight: 850; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.72); margin-bottom: .85rem; }
.finance-break-row { display: grid; grid-template-columns: 96px 1fr auto; gap: .65rem; align-items: center; margin-bottom: .7rem; }
.finance-break-row:last-child { margin-bottom: 0; }
.finance-break-name { font-size: .78rem; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finance-break-track { height: 8px; background: rgba(255,255,255,.14); border-radius: 999px; overflow: hidden; }
.finance-break-track span { display: block; height: 100%; border-radius: inherit; background: var(--gold); }
.finance-break-value { font-family: var(--font-mono); font-size: .77rem; font-weight: 850; color: rgba(255,255,255,.9); white-space: nowrap; }
.finance-table-card .tbl thead th { background: #12384d; font-size: .78rem; text-transform: uppercase; letter-spacing: .55px; }
.finance-table-note { color: var(--grey); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; }
.finance-category-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  border-radius: 999px; padding: .25rem .55rem; background: var(--gold-pale);
  color: var(--primary-dark); border: 1px solid rgba(228,179,99,.35); font-size: .78rem; font-weight: 800;
}
.accounts-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.account-kpi {
  background: #fff;
  border: 1px solid rgba(228,179,99,.32);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: .85rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
}
.account-kpi i {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #eef6f8;
  border: 1px solid #d9ebef;
  color: var(--primary-dark);
}
.account-kpi-label { color: var(--grey); font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }
.account-kpi-value { color: var(--primary-dark); font-size: 1.15rem; line-height: 1.1; font-weight: 900; overflow-wrap: anywhere; }
.account-kpi-sub { color: var(--grey); font-size: .74rem; margin-top: .15rem; }
.accounts-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(140px, auto) minmax(140px, auto) auto;
  gap: .65rem;
  align-items: center;
  margin-bottom: .85rem;
  padding: .7rem;
  border: 1px solid rgba(228,179,99,.32);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.accounts-search {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: 0 .75rem;
  border: 1px solid #dbe5eb;
  border-radius: .7rem;
  color: var(--grey);
  background: #f8fafc;
}
.accounts-search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(228,179,99,.14); }
.accounts-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--primary-dark);
  font: 750 .86rem/1.2 var(--font-ui);
}
.accounts-filter {
  min-height: 42px;
  border: 1px solid #dbe5eb;
  border-radius: .7rem;
  background: #fff;
  color: var(--primary-dark);
  font: 800 .8rem/1.2 var(--font-ui);
  padding: 0 .65rem;
}
.accounts-result-count {
  min-width: 62px;
  border-radius: 999px;
  padding: .42rem .65rem;
  background: var(--primary-dark);
  color: var(--gold);
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
}
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: .9rem;
  margin-bottom: 1rem;
}
.accounts-grid > .account-card:only-child {
  grid-column: 1 / -1;
}
.accounts-grid > .account-card:only-child .account-card-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.account-card {
  background: #fff;
  border: 1px solid rgba(228,179,99,.34);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: .9rem;
  position: relative;
  overflow: hidden;
}
.account-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), #2c5a74);
}
.account-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; }
.account-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--gold-pale);
  border: 1px solid rgba(228,179,99,.5);
  color: var(--primary-dark);
  font-weight: 900;
  flex: 0 0 auto;
}
.account-name { color: var(--primary-dark); font-size: 1rem; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.account-broker { color: var(--grey); font-size: .78rem; font-weight: 750; margin-top: .15rem; overflow-wrap: anywhere; }
.account-status {
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .55px;
  white-space: nowrap;
}
.account-status.active { background: var(--green-light); color: #047857; }
.account-status.hidden { background: #eef2f7; color: var(--grey); }
.account-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin: .75rem 0;
}
.account-card-metric {
  background: #f8fafc;
  border: 1px solid #e8eef3;
  border-radius: .8rem;
  padding: .55rem;
  min-width: 0;
}
.account-card-metric span { color: var(--grey); display: block; font-size: .66rem; font-weight: 850; text-transform: uppercase; letter-spacing: .65px; }
.account-card-metric strong { color: var(--primary-dark); display: block; font-size: .92rem; font-weight: 900; margin-top: .15rem; overflow-wrap: anywhere; }
.account-card-input {
  width: 100%;
  min-height: 34px;
  margin-top: .2rem;
  border: 1px solid #dbe5eb;
  border-radius: .55rem;
  background: #fff;
  color: var(--primary-dark);
  font: 900 .92rem/1.2 var(--font-ui);
  padding: .35rem .5rem;
  outline: none;
}
.account-card-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(228,179,99,.16);
}
.account-number-line { margin: -.25rem 0 .8rem; }
.account-trades {
  border: 1px solid #e8eef3;
  border-radius: .85rem;
  overflow: hidden;
  margin: .65rem 0;
  background: #fbfdff;
}
.account-trades summary { cursor: pointer; list-style: none; }
.account-trades summary::-webkit-details-marker { display: none; }
.account-trades-head strong { display: inline-flex; align-items: center; gap: .4rem; }
.account-trades-head i { transition: transform .2s ease; }
.account-trades[open] .account-trades-head i { transform: rotate(180deg); }
.account-trades-body { border-top: 1px solid #e8eef3; }
.account-trades-head,
.account-trade-row {
  display: grid;
  grid-template-columns: 76px minmax(72px, 1fr) 48px minmax(78px, auto);
  gap: .5rem;
  align-items: center;
}
.account-trades-head {
  background: #eef6f8;
  color: var(--primary-dark);
  padding: .48rem .58rem;
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .65px;
}
.account-trades-head strong { text-align: right; }
.account-trade-row {
  padding: .45rem .58rem;
  border-top: 1px solid #edf2f7;
  font-size: .76rem;
  color: var(--grey);
}
.account-trade-row strong {
  color: var(--primary-dark);
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-trade-row em {
  font-style: normal;
  font-weight: 850;
  color: var(--primary-dark);
}
.account-trade-row b {
  text-align: right;
  white-space: nowrap;
}
.account-trade-empty,
.account-trade-more {
  padding: .65rem;
  color: var(--grey);
  font-size: .78rem;
  font-weight: 750;
  text-align: center;
  border-top: 1px solid #edf2f7;
}
.account-note { min-height: 1.2rem; color: var(--grey); font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.account-card-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .7rem; }
.account-action {
  border: 1px solid rgba(228,179,99,.55);
  border-radius: .75rem;
  background: var(--gold-pale);
  color: var(--primary-dark);
  min-height: 38px;
  padding: .45rem .7rem;
  font-size: .78rem;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}
.account-action.primary { background: var(--primary-dark); color: var(--gold); border-color: var(--primary-dark); }
.account-action.account-top-up {
  background: #ecfdf5;
  border-color: #b7ead3;
  color: #08764f;
}
.account-filter-empty {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .35rem;
  border: 1px dashed #cad8df;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.72);
  color: var(--grey);
  text-align: center;
}
.account-filter-empty i { font-size: 1.6rem; color: var(--gold); }
.account-filter-empty strong { color: var(--primary-dark); }
.account-table-disclosure {
  margin-top: .8rem;
  border: 1px solid rgba(228,179,99,.32);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.account-table-disclosure > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1rem;
  cursor: pointer;
  list-style: none;
  color: var(--primary-dark);
  font-size: .84rem;
  font-weight: 900;
}
.account-table-disclosure > summary::-webkit-details-marker { display: none; }
.account-table-disclosure > summary span { display: inline-flex; align-items: center; gap: .5rem; }
.account-table-disclosure > summary i { color: var(--gold); }
.account-table-disclosure > summary small { color: var(--grey); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.account-table-disclosure .account-table-card { margin: 0; border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid #edf2f7; }
.account-table-card { margin-top: .25rem; }
.analytics-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.analytics-tile {
  background: #fff; border: 1px solid rgba(228,179,99,.3); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 1rem; display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: center;
}
.analytics-tile i {
  width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center;
  color: var(--primary-dark); background: #eef6f8; border: 1px solid #d9ebef;
}
.analytics-label { color: var(--grey); font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }
.analytics-value { color: var(--primary-dark); font-size: 1.25rem; font-weight: 850; line-height: 1.15; }
.analytics-value.profit { color: var(--green); }
.analytics-value.loss { color: var(--red); }
.analytics-sub { color: var(--grey); font-size: .74rem; margin-top: .12rem; }
@media (max-width: 980px) {
  .finance-shell { grid-template-columns: 1fr; }
}

.weekly-summary-card {
  background: linear-gradient(135deg, #1e4663 0%, #0f2c42 100%);
  color: white; border-radius: var(--radius-md); padding: 1.2rem;
  box-shadow: var(--shadow-sm);
}
.weekly-stat-label { font-size: .85rem; font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255,255,255,.65); margin-bottom: .4rem; }
.weekly-stat-number { font-size: 2rem; font-weight: 800; line-height: 1.2; }

/* â”€â”€ ADMIN PANEL â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Spacing polish: keep dashboard, weekly, finance, and analytics cards from crowding each other. */
.dashboard-shell,
.weekly-shell { gap: 1.5rem; }
.dashboard-hero,
.dashboard-kpi-grid,
.dashboard-grid-2,
.trade-summary-grid,
.weekly-hero,
.weekly-card-grid,
.weekly-insight-grid,
.weekly-side-stack,
.finance-shell,
.finance-summary-grid,
.analytics-overview,
.chart-grid { gap: 1.25rem; }
.dashboard-kpi,
.dashboard-card,
.trade-summary-card,
.weekly-metric,
.weekly-panel,
.weekly-day-card,
.weekly-focus-card,
.finance-card,
.finance-panel,
.analytics-tile,
.chart-card { min-width: 0; }
.weekly-focus-item {
  grid-template-columns: 36px minmax(0, 1fr) minmax(96px, auto);
  gap: .85rem;
}
.weekly-focus-amount { text-align: right; }
.finance-break-row,
.weekly-split-row,
.session-row { grid-template-columns: minmax(84px, auto) minmax(0, 1fr) minmax(86px, auto); }
@media (max-width: 640px) {
  .main-content { padding: 1.25rem; }
  .dashboard-shell,
  .weekly-shell { gap: 1.2rem; }
  .dashboard-hero,
  .dashboard-kpi-grid,
  .dashboard-grid-2,
  .trade-summary-grid,
  .weekly-hero,
  .weekly-card-grid,
  .weekly-insight-grid,
  .weekly-side-stack,
  .finance-shell,
  .finance-summary-grid,
  .analytics-overview,
  .chart-grid { gap: 1rem; }
  .weekly-focus-item { grid-template-columns: 34px minmax(0, 1fr); }
  .weekly-focus-amount { grid-column: 2; text-align: left; }
  .finance-break-row,
  .weekly-split-row,
  .session-row { grid-template-columns: 1fr; gap: .35rem; }
}
@media (max-width: 640px) {
  .session-row {
    grid-template-columns: minmax(62px, .7fr) minmax(70px, 1fr) minmax(68px, auto);
    gap: .4rem;
  }
  .session-name,
  .session-value {
    white-space: nowrap;
  }
}

/* Keep every dashboard section present while making the cards compact. */
.dashboard-shell,
.dashboard-hero,
.dashboard-kpi-grid,
.dashboard-grid-2 {
  display: grid;
}
.dashboard-panel,
.dashboard-health,
.dashboard-card {
  display: block;
}
.dashboard-panel,
.dashboard-health,
.dashboard-card {
  visibility: visible;
}
.dashboard-panel-value,
.dashboard-kpi-value,
.trade-summary-value,
.finance-card-value,
.account-kpi-value {
  font-size: clamp(.86rem, 1.45vw, 1.16rem);
  letter-spacing: 0;
}
.dashboard-panel-value {
  font-size: clamp(1.45rem, 3.2vw, 2.7rem);
}
.dashboard-kpi-sub,
.dashboard-panel-sub,
.health-row,
.recent-table {
  min-width: 0;
}
@media (max-width: 560px) {
  .dashboard-hero,
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }
  .dashboard-panel,
  .dashboard-health,
  .dashboard-card {
    min-height: auto;
  }
}

.admin-section { background: #fff; border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 1.25rem; }
.admin-section h6 { font-weight: 800; margin-bottom: 1rem; color: var(--navy);
  font-size: .9rem; text-transform: uppercase; letter-spacing: .8px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.upgrade-section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.upgrade-section-head h6 { margin-bottom:.25rem; }
.upgrade-section-head p { color:var(--grey); font-size:.82rem; margin:0; }
.upgrade-request-status { background:var(--gold-pale); border:1px solid rgba(228,179,99,.55); border-radius:999px; color:var(--primary-dark); font-size:.72rem; font-weight:900; padding:.35rem .7rem; }
.brand-logo-actions { align-items:flex-start; display:flex; flex-direction:column; gap:.4rem; }
.brand-logo-actions span { color:var(--grey); font-size:.74rem; font-weight:700; line-height:1.35; }
.tenant-plan-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1rem; }
.tenant-plan-card { background:#fff; border:1px solid #dfe8ee; border-radius:var(--radius-md); box-shadow:0 12px 30px rgba(16,47,64,.07); display:flex; flex-direction:column; min-height:360px; padding:1.15rem; position:relative; overflow:hidden; }
.tenant-plan-card::before { background:linear-gradient(90deg,var(--primary),var(--gold)); content:""; height:4px; left:0; position:absolute; right:0; top:0; }
.tenant-plan-card.current { background:linear-gradient(145deg,#fff9ed,#fff); border-color:var(--gold); box-shadow:0 16px 36px rgba(228,179,99,.18); }
.tenant-plan-top { align-items:center; display:flex; justify-content:space-between; gap:.5rem; }
.tenant-plan-top span { color:var(--primary-dark); font-size:1.05rem; font-weight:900; }
.tenant-plan-top b { background:var(--primary-dark); border-radius:999px; color:var(--gold); font-size:.62rem; padding:.25rem .5rem; text-transform:uppercase; }
.tenant-plan-price { align-items:flex-end; color:var(--primary-dark); display:flex; gap:.12rem; margin:.85rem 0 .35rem; }
.tenant-plan-price span { color:var(--gold); font-size:1.1rem; font-weight:900; line-height:1.3; }
.tenant-plan-price strong { font-family:var(--font-mono); font-size:2.15rem; font-weight:900; letter-spacing:0; line-height:1; }
.tenant-plan-price em { color:var(--grey); font-size:.78rem; font-style:normal; font-weight:800; padding-bottom:.18rem; }
.tenant-plan-meta { display:flex; flex-wrap:wrap; gap:.45rem; margin:.3rem 0 .8rem; }
.tenant-plan-meta span { align-items:center; background:#eef5f7; border:1px solid #dce8ed; border-radius:999px; color:var(--primary-dark); display:flex; font-size:.72rem; font-weight:900; gap:.3rem; padding:.32rem .5rem; white-space:nowrap; }
.tenant-plan-card ul { color:var(--grey); flex:1; font-size:.79rem; list-style:none; margin:0 0 1rem; padding:0; }
.tenant-plan-card li { align-items:center; display:flex; gap:.45rem; margin:.42rem 0; min-width:0; text-transform:none; }
.tenant-plan-card li i { color:#13865c; }
.tenant-plan-card li span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tenant-plan-card button { width:100%; }
.admin-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .8rem; align-items: end; }
.user-management-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .9rem 1rem;
}
.user-management-form > div { min-width: 0; }
.user-field-role,
.user-field-email,
.user-management-actions { grid-column: span 2; }
.user-management-actions {
  display: grid;
  gap: .45rem;
  align-self: end;
}
.user-management-actions .btn-sm-gold {
  width: 100%;
}
.user-management-hint {
  margin: 0;
  color: var(--grey);
  font-size: .74rem;
  line-height: 1.45;
}
.admin-mini-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.admin-mini-table th { color: var(--grey); font-size: .68rem; letter-spacing: .8px; text-transform: uppercase; padding: .45rem; border-bottom: 1px solid #edf2f7; }
.admin-mini-table td { padding: .5rem .45rem; border-bottom: 1px solid #f3f5f7; vertical-align: middle; }
.admin-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: .2rem .5rem; font-size: .68rem; font-weight: 850; text-transform: uppercase; letter-spacing: .5px; background: var(--gold-pale); color: var(--primary-dark); }
.license-strip { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; padding: .8rem 1rem; border-radius: var(--radius-md); background: linear-gradient(98deg, #0c2e3f 0%, #134659 100%); color: #fff; margin-bottom: 1rem; }
.license-strip strong { color: var(--gold); }
.report-actions {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(10,47,68,.08);
  border-radius: 1rem;
  padding: .55rem;
}
.report-file-action {
  min-height: 40px;
  border-radius: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .84rem;
  font-weight: 900;
  background: var(--gold);
  border-color: var(--gold);
  color: var(--primary-dark);
}
.report-file-action:hover {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
  color: var(--primary-dark);
}
.report-file-action.primary {
  background: var(--primary-dark);
  border: 1px solid var(--primary-dark);
  color: var(--gold);
}
.report-file-action.primary:hover {
  background: #123d54;
  color: #ffd98a;
}
@media print {
  body { background: #fff !important; }
  body.printing-report #authSection,
  body.printing-report .sidebar,
  body.printing-report .filter-bar,
  body.printing-report .page:not(#dashboardPage) { display: none !important; }
  body.printing-report .main-content { margin: 0; padding: 0; background: #fff; }
  body.printing-report #dashboardPage { display: block !important; }
}
@media (max-width: 1120px) {
  .user-management-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .user-management-actions {
    grid-column: 1 / -1;
  }
}
.danger-zone { border: 2px solid #fee2e2; border-radius: var(--radius-lg);
  padding: 1.25rem; background: #fff9f9; }
.danger-zone h6 { color: var(--red); }

.calendar-filter-row { display:grid; grid-template-columns: 1.4fr 1.1fr minmax(150px,.7fr) 1fr; gap:.75rem; align-items:center; }
.calendar-tabs, .calendar-impact-filters { display:flex; gap:.45rem; flex-wrap:wrap; }
.calendar-tabs .active, .calendar-impact-filters .active { border-color:var(--gold); color:var(--primary-dark); background:var(--gold-pale); }
.calendar-table tr.upcoming { border-left:3px solid var(--impact-color, #6c757d); animation: pulseBorder 1.8s ease-in-out infinite; }
.calendar-table tr.past-unreleased { opacity:.5; }
.impact-dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:.35rem; background:var(--impact-color); }
.currency-badge { font-weight:850; background:#eef2f7; color:var(--primary-dark); border-radius:999px; padding:.18rem .5rem; display:inline-flex; gap:.3rem; align-items:center; }
.calendar-event-btn { border:0; background:none; padding:0; color:var(--primary-dark); font-weight:750; text-align:left; cursor:pointer; }
.calendar-countdown { display:block; color:var(--red); font-size:.72rem; font-weight:800; margin-top:.15rem; }
.calendar-drawer { position:fixed; top:0; right:-430px; width:min(420px, 92vw); height:100vh; background:#fff; z-index:300; box-shadow:var(--shadow-lg); padding:1.4rem; transition:right .22s ease; overflow:auto; border-left:1px solid var(--border); }
.calendar-drawer.open { right:0; }
.drawer-close { float:right; border:0; background:#f3f4f6; border-radius:50%; width:34px; height:34px; cursor:pointer; }
.watch-chip { display:inline-flex; align-items:center; gap:.4rem; margin:.25rem; padding:.35rem .6rem; border-radius:999px; background:var(--gold-pale); color:var(--primary-dark); font-weight:750; }
.tradebb-calendar-page {
  background: rgba(254, 249, 239, .72);
  border: 1px solid var(--border);
  min-height: calc(100vh - 3rem);
}
.tradebb-calendar-title {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  color: var(--primary-dark);
  font-size: 1.15rem;
  font-weight: 900;
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
}
.tradebb-calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 31%);
  gap: .7rem;
  padding: .7rem;
}
.tradebb-calendar-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  padding: .7rem .7rem 0;
}
.tradebb-stat-card {
  min-height: 112px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
  padding: .9rem 1rem;
  display: grid;
  align-content: space-between;
  gap: .45rem;
}
.tradebb-stat-card span {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: var(--grey);
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.tradebb-stat-card i {
  color: var(--gold-dim);
  font-size: .95rem;
}
.tradebb-stat-card strong {
  color: var(--primary-dark);
  font-size: 1.45rem;
  line-height: 1.05;
  font-weight: 950;
}
.tradebb-stat-card small {
  color: var(--grey);
  font-weight: 750;
}
.tradebb-stat-card.positive { border-top-color: var(--green); }
.tradebb-stat-card.negative { border-top-color: var(--red); }
.tradebb-calendar-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 31%);
  gap: .7rem;
  padding: 2.15rem .7rem .7rem;
  border-top: 2.35rem solid rgba(228, 179, 99, .18);
}
.tradebb-calendar-main,
.tradebb-calendar-side {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.tradebb-calendar-main {
  padding: 1.35rem 1.5rem;
}
.tradebb-calendar-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.tradebb-calendar-total {
  color: var(--text-dark);
  font-weight: 700;
}
.tradebb-calendar-total span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: .5rem;
  color: var(--primary-dark);
  background: var(--gold-pale);
  padding: .22rem .55rem;
  margin-left: .35rem;
  font-weight: 850;
}
.tradebb-calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .6rem;
}
.tradebb-calendar-controls .form-ctrl {
  width: auto;
  min-height: 34px;
  padding: .35rem 1.8rem .35rem .75rem;
  background: var(--surface);
  color: var(--primary-dark);
  border-color: var(--border);
}
.tradebb-calendar-toggle {
  display: inline-flex;
  border: 1px solid var(--gold);
  border-radius: .75rem;
  overflow: hidden;
}
.tradebb-calendar-toggle button {
  border: 0;
  background: var(--surface);
  color: var(--primary-dark);
  padding: .42rem .82rem;
  font-weight: 850;
}
.tradebb-calendar-toggle button.active {
  background: var(--primary-dark);
  color: #fff;
}
.tradebb-weekdays,
.tradebb-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(70px, 1fr));
  gap: .4rem;
}
.tradebb-weekdays {
  color: var(--primary-dark);
  font-size: .82rem;
  margin-bottom: .45rem;
}
.tradebb-weekdays span {
  text-align: center;
  font-weight: 700;
}
.tradebb-calendar-grid.year-view {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: .55rem;
}
.tradebb-day-cell,
.tradebb-month-cell {
  min-height: 86px;
  border: 0;
  border-radius: .35rem;
  background: rgba(228, 179, 99, .12);
  color: var(--text-dark);
  padding: .7rem;
  text-align: center;
  position: relative;
}
.tradebb-day-cell {
  display: grid;
  align-content: start;
  gap: .28rem;
}
.tradebb-day-cell.empty {
  background: transparent;
}
.tradebb-day-cell.today span,
.tradebb-month-cell.current b {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--primary-dark);
  color: #fff;
  padding: 0 .3rem;
}
.tradebb-month-cell {
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: .25rem;
  font: inherit;
}
.tradebb-day-cell em,
.tradebb-month-cell em {
  font-style: normal;
  font-weight: 850;
  font-size: .78rem;
}
.tradebb-day-cell small {
  color: var(--grey);
  font-weight: 750;
}
.tradebb-calendar-side {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}
.tradebb-period-chip {
  align-self: flex-start;
  border: 1px solid var(--gold);
  background: var(--gold-pale);
  color: var(--primary-dark);
  border-radius: .75rem;
  padding: .35rem .65rem;
  font-weight: 850;
  margin-bottom: .9rem;
}
.tradebb-symbol-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.tradebb-symbol-table th,
.tradebb-symbol-table td {
  text-align: left;
  padding: .5rem .45rem;
}
.tradebb-symbol-table th {
  color: var(--primary-dark);
  font-size: .78rem;
  font-weight: 900;
}
.tradebb-symbol-table td {
  border-top: 1px solid rgba(228, 179, 99, .22);
  color: var(--text-dark);
  font-weight: 750;
}
.tradebb-calendar-empty {
  flex: 1;
  min-height: 310px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .65rem;
  color: var(--text-dark);
}
.tradebb-calendar-empty i {
  color: rgba(10, 47, 68, .25);
  font-size: 3rem;
}
.tradebb-calendar-page .positive { color: var(--green); }
.tradebb-calendar-page .negative { color: var(--red); }
.risk-page-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap:1rem; }
.risk-rules-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap:.75rem; }
.risk-rule-card { border:1px solid var(--border); border-radius:var(--radius-md); padding:1rem; background:#fff; }
.risk-rule-card.warning { border-color:#ffc107; background:#fffaf0; }
.risk-rule-card.breached { border-color:#dc3545; background:#fff5f5; }
.risk-warning-banner { border-left:4px solid #dc3545; background:#fff5f5; color:#991b1b; padding:.85rem 1rem; border-radius:var(--radius-md); margin-bottom:1rem; font-weight:700; }
.sparkline { height:24px; width:100%; background:linear-gradient(90deg, rgba(228,179,99,.15), rgba(18,56,77,.08)); border-radius:var(--radius-sm); margin-top:.5rem; }
.notion-journal-shell {
  max-width: 980px;
  margin: 0 auto;
  background: #191919;
  color: #f5f5f3;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  box-shadow: 0 18px 50px rgba(2,8,15,.18);
  overflow: hidden;
}
.notion-journal-cover {
  min-height: clamp(180px, 32vw, 265px);
  background: #030303;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
}
.notion-journal-cover img {
  width: min(620px, 92%);
  max-height: 190px;
  object-fit: contain;
  filter: invert(1) grayscale(1) contrast(1.55);
  mix-blend-mode: screen;
}
.notion-journal-head {
  padding: clamp(1.7rem, 5vw, 3.8rem) clamp(1rem, 8vw, 5.75rem) 1rem;
}
.notion-journal-head h1 {
  color: #f7f7f5;
  font-size: clamp(2.7rem, 8vw, 5.2rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: .98;
  margin: 0;
  max-width: 620px;
}
.notion-database-heading {
  padding: 0 0 .65rem;
}
.notion-db-page-title {
  color: #f7f7f5;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 850;
  margin-bottom: .65rem;
}
.notion-view-row,
.notion-journal-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.notion-view-pill {
  border: 1px solid transparent;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.78);
  border-radius: .55rem;
  padding: .45rem .65rem;
  font-size: .82rem;
  font-weight: 800;
}
.notion-view-pill.active,
.notion-view-pill:hover {
  background: rgba(255,255,255,.13);
  color: #fff;
  border-color: rgba(255,255,255,.12);
}
.notion-journal-grid {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 0 clamp(1rem, 8vw, 5.75rem) clamp(1.5rem, 5vw, 3.2rem);
}
.notion-entry-panel,
.notion-database-panel {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .45rem;
  background: transparent;
}
.notion-entry-panel {
  padding: .25rem .75rem .85rem;
}
.notion-entry-panel summary {
  color: rgba(255,255,255,.78);
  cursor: pointer;
  font-weight: 750;
  padding: .65rem 0;
}
.notion-entry-form {
  display: grid;
  gap: .7rem;
  padding-top: .2rem;
}
.notion-entry-form .form-label-sm {
  color: rgba(255,255,255,.62);
}
.notion-entry-form .form-ctrl {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
  color: #f7f7f5;
}
.notion-entry-form .form-ctrl::placeholder {
  color: rgba(255,255,255,.38);
}
.notion-db-title {
  color: #f2f2ef;
  font-weight: 900;
}
.notion-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
.notion-textarea {
  min-height: 130px;
  resize: vertical;
}
.notion-entry-template[hidden] {
  display: none;
}
.notion-entry-template {
  display: grid;
  gap: .75rem;
}
.notion-callout-field {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: .65rem;
  align-items: start;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.06);
  border-radius: .5rem;
  padding: .75rem;
}
.notion-callout-field > i {
  width: 28px;
  height: 28px;
  border-radius: .35rem;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  color: #f7d774;
}
.notion-market-grid {
  display: grid;
  gap: .65rem;
}
.notion-market-section {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .45rem;
  padding: .7rem;
}
.notion-market-section h6 {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: #f7f7f5;
  margin: 0 0 .55rem;
  font-size: .92rem;
  font-weight: 850;
}
.notion-market-section h6 i {
  color: rgba(255,255,255,.55);
  font-size: .72rem;
}
.notion-attachment-field {
  display: grid;
  gap: .55rem;
}
.notion-attachment-drop {
  border: 1px dashed rgba(255,255,255,.22);
  border-radius: .5rem;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.78);
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem;
  cursor: pointer;
  font-weight: 800;
  transition: background .18s ease, border-color .18s ease;
}
.notion-attachment-drop:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.36);
}
.notion-attachment-drop i {
  color: rgba(255,255,255,.58);
  font-size: 1.05rem;
}
.notion-attachment-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .6rem;
}
.notion-attachment-thumb {
  position: relative;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .45rem;
  overflow: hidden;
  background: rgba(255,255,255,.04);
  aspect-ratio: 4 / 3;
}
.notion-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.notion-attachment-thumb button {
  position: absolute;
  top: .35rem;
  right: .35rem;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.68);
  color: #fff;
  cursor: pointer;
}
.notion-db-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.notion-db-count,
.notion-muted {
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  font-weight: 750;
}
.notion-table-wrap {
  overflow-x: auto;
}
.notion-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .88rem;
}
.notion-table th {
  color: rgba(255,255,255,.48);
  font-size: .72rem;
  font-weight: 850;
  text-align: left;
  padding: .55rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.notion-property-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  white-space: nowrap;
}
.notion-property-label span,
.notion-property-label i {
  color: rgba(255,255,255,.38);
  font-size: .78rem;
  font-style: normal;
  font-weight: 800;
}
.notion-table td {
  padding: .72rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  vertical-align: top;
}
.notion-calendar-panel[hidden] {
  display: none;
}
.notion-calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 32%);
  min-height: 540px;
}
.notion-calendar-main {
  padding: 1rem 1.2rem 1.25rem;
  border-right: 1px solid rgba(255,255,255,.08);
}
.notion-calendar-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.notion-calendar-metric {
  color: rgba(255,255,255,.76);
  font-weight: 850;
}
.notion-calendar-metric span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: .45rem;
  padding: .2rem .55rem;
  color: #f7f7f5;
  margin-left: .35rem;
}
.notion-calendar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}
.notion-calendar-controls .form-ctrl {
  width: auto;
  min-height: 34px;
  padding: .35rem 1.7rem .35rem .65rem;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  color: #f7f7f5;
}
.notion-calendar-toggle {
  display: inline-flex;
  border: 1px solid rgba(105,94,255,.7);
  border-radius: .65rem;
  overflow: hidden;
}
.notion-calendar-toggle button {
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.78);
  padding: .38rem .75rem;
  font-weight: 850;
}
.notion-calendar-toggle button.active {
  background: #5c50f2;
  color: #fff;
}
.notion-calendar-weekdays,
.notion-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(72px, 1fr));
}
.notion-calendar-weekdays {
  color: rgba(255,255,255,.48);
  font-size: .72rem;
  font-weight: 850;
  border-bottom: 0;
}
.notion-calendar-weekdays span {
  padding: .55rem .35rem;
  text-align: center;
}
.notion-calendar-grid {
  gap: .35rem;
  min-width: 620px;
}
.notion-calendar-cell {
  min-height: 86px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: .35rem;
  background: rgba(255,255,255,.06);
  padding: .45rem;
}
.notion-calendar-cell.muted {
  background: transparent;
  border-color: transparent;
}
.notion-calendar-cell.today {
  border-color: rgba(105,94,255,.92);
  box-shadow: inset 0 0 0 1px rgba(105,94,255,.55);
}
.notion-calendar-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255,255,255,.56);
  font-size: .76rem;
  font-weight: 800;
  margin-bottom: .4rem;
}
.notion-calendar-day b {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #5c50f2;
  color: #fff;
  font-size: .72rem;
}
.notion-calendar-entry {
  display: flex;
  align-items: center;
  gap: .35rem;
  color: #f5f5f3;
  background: rgba(255,255,255,.09);
  border-radius: .25rem;
  padding: .18rem .3rem;
  margin-top: .25rem;
  font-size: .74rem;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notion-calendar-entry i {
  color: rgba(255,255,255,.62);
  flex: 0 0 auto;
}
.notion-calendar-side {
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.notion-calendar-month-chip {
  align-self: flex-start;
  color: #a9a4ff;
  border: 1px solid rgba(105,94,255,.75);
  background: rgba(105,94,255,.12);
  border-radius: .65rem;
  padding: .28rem .6rem;
  font-weight: 850;
  margin-bottom: .85rem;
}
.notion-calendar-summary {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.notion-calendar-summary th,
.notion-calendar-summary td {
  text-align: left;
  padding: .45rem .35rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.notion-calendar-summary th {
  color: rgba(255,255,255,.58);
  font-size: .72rem;
}
.notion-calendar-summary td {
  color: rgba(255,255,255,.82);
  font-weight: 750;
}
.notion-calendar-empty {
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: .65rem;
  color: rgba(255,255,255,.48);
  min-height: 260px;
}
.notion-calendar-empty i {
  font-size: 2.4rem;
  color: rgba(255,255,255,.18);
}
.notion-name-cell {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: #f5f5f3;
  font-weight: 850;
}
.notion-name-cell i {
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.11);
  border-radius: .22rem;
  padding: .12rem;
}
.notion-attachment-count {
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  color: rgba(255,255,255,.58);
  font-size: .74rem;
  font-weight: 800;
}
.notion-attachment-count i {
  background: transparent;
  padding: 0;
  color: rgba(255,255,255,.48);
}
.notion-tags {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
}
.notion-tag {
  display: inline-flex;
  align-items: center;
  border-radius: .35rem;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
  padding: .16rem .42rem;
  font-size: .74rem;
  font-weight: 800;
}
.notion-empty {
  color: rgba(255,255,255,.48);
  text-align: center;
  padding: 2rem !important;
}
.daily-journal-page {
  min-height: calc(100vh - 2rem);
  background: #f5f6f8;
  border: 1px solid rgba(10, 47, 68, .12);
}
.daily-journal-header {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .35rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid rgba(10, 47, 68, .12);
}
.daily-journal-header h1 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 1.15rem;
  font-weight: 950;
}
.daily-journal-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: .55rem;
}
.daily-filter-btn {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(10, 47, 68, .22);
  border-radius: .45rem;
  background: var(--surface);
  color: var(--text-dark);
  padding: .35rem .8rem;
  font-weight: 750;
}
.daily-filter-btn i:first-child {
  color: var(--gold-dim);
}
.daily-filter-field {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(10, 47, 68, .22);
  border-radius: .45rem;
  background: var(--surface);
  color: var(--text-dark);
  padding: .25rem .55rem;
  font-weight: 750;
}
.daily-filter-field i:first-child {
  color: var(--gold-dim);
}
.daily-filter-field i:last-child {
  color: var(--grey);
  font-size: .78rem;
}
.daily-filter-select {
  min-width: 118px;
  border: 0;
  background: transparent;
  color: var(--text-dark);
  font: inherit;
  outline: 0;
  appearance: none;
}
.daily-journal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 17%);
  gap: .55rem;
  padding: 0 .55rem .8rem;
}
.daily-journal-feed {
  min-width: 0;
}
.daily-journal-count {
  color: var(--grey);
  font-size: .78rem;
  font-weight: 850;
  padding: .7rem .2rem;
}
.daily-journal-list {
  display: grid;
  gap: 1.5rem;
}
.daily-card {
  overflow: hidden;
  border: 1px solid rgba(10, 47, 68, .5);
  border-radius: .9rem;
  background: #202c3d;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.daily-card.selected,
.daily-card:hover {
  border-color: var(--gold);
  box-shadow: 0 14px 32px rgba(10, 47, 68, .18);
}
.daily-card.selected {
  transform: translateY(-1px);
}
.daily-card-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
  padding: .75rem 1.4rem;
  background: linear-gradient(90deg, rgba(209, 250, 229, .66), rgba(228, 179, 99, .24));
}
.daily-card-datebox {
  width: 48px;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, .35);
  border-radius: .45rem;
  background: #fff;
  text-align: center;
  box-shadow: 0 8px 18px rgba(10, 47, 68, .08);
}
.daily-card-datebox span {
  display: block;
  background: #3f9d74;
  color: #fff;
  font-size: .63rem;
  font-weight: 950;
  letter-spacing: .08em;
  padding: .12rem;
}
.daily-card-datebox strong {
  display: block;
  color: #3f9d74;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 950;
}
.daily-card-title {
  min-width: 0;
}
.daily-card-title h2 {
  margin: 0 0 .35rem;
  color: rgba(10, 47, 68, .18);
  font-size: 1rem;
  font-weight: 950;
}
.daily-add-journal {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px dashed rgba(10, 47, 68, .22);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  color: var(--grey);
  padding: .3rem .8rem;
  font-weight: 850;
}
.daily-journal-saved {
  display: inline-flex;
  align-items: center;
  margin-left: .5rem;
  color: var(--primary-dark);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(10, 47, 68, .12);
  border-radius: 999px;
  padding: .18rem .55rem;
  font-size: .74rem;
  font-weight: 850;
}
.daily-card-pl {
  text-align: right;
  color: #3f9d74;
  font-weight: 950;
}
.daily-card-pl strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1.1;
}
.daily-card-pl span {
  display: block;
  font-size: .8rem;
}
.daily-card-pl.negative {
  color: #ff496d;
}
.daily-card-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  background: #202c3d;
  color: #d7e0ea;
}
.daily-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: .75rem;
  padding: 2.4rem 2.6rem;
  background: rgba(255,255,255,.08);
  margin: 2.5rem 1rem 2.5rem 0;
  border-radius: 0 .7rem .7rem 0;
}
.daily-metric {
  display: grid;
  gap: .25rem;
}
.daily-metric span {
  color: #a9b6c7;
  font-size: .72rem;
  font-weight: 900;
}
.daily-metric strong {
  color: #3f9d74;
  font-size: 1.1rem;
  font-weight: 950;
}
.daily-metric.negative strong {
  color: #ff496d;
}
.daily-chart-panel {
  border-left: 1px solid rgba(255,255,255,.12);
  padding: .85rem 1rem;
  display: grid;
  align-content: end;
  gap: .75rem;
  min-height: 188px;
}
.daily-chart-label {
  color: #8997aa;
  text-align: center;
  font-size: .72rem;
  font-weight: 950;
}
.daily-chart {
  height: 130px;
  position: relative;
  overflow: hidden;
}
.daily-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}
.daily-card-details {
  background: #202c3d;
}
.daily-card-details > summary {
  list-style: none;
}
.daily-card-details > summary::-webkit-details-marker {
  display: none;
}
.daily-card-foot {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 1.55rem;
  background: rgba(255,255,255,.08);
  cursor: pointer;
  user-select: none;
}
.daily-card-details[open] .daily-card-open i {
  transform: rotate(90deg);
}
.daily-card-open i {
  transition: transform .18s ease;
}
.daily-card-lower {
  display: grid;
}
.daily-card-form-slot {
  background: #eef3f7;
  border-top: 1px solid rgba(255,255,255,.12);
  cursor: default;
  padding: 1.15rem;
}
.daily-card-form-slot[hidden] {
  display: none;
}
.daily-card-form-slot * {
  cursor: auto;
}
.daily-card-form-slot .daily-entry-panel {
  max-width: none;
  border-color: rgba(10, 47, 68, .18);
  box-shadow: 0 18px 38px rgba(10, 47, 68, .1);
}
.daily-card-form-slot .daily-entry-panel summary {
  background: #fff;
  border-bottom: 1px solid rgba(228,179,99,.35);
  font-size: 1rem;
  font-weight: 950;
}
.daily-card-trades,
.daily-saved-entries {
  display: grid;
  gap: .65rem;
  padding: .85rem 1.35rem 1rem;
  background: #202c3d;
  border-top: 1px solid rgba(255,255,255,.08);
}
.daily-card-section-title {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #d7e0ea;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}
.daily-card-section-title i {
  color: var(--gold);
}
.daily-card-trade-journal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .55rem;
  background: rgba(255,255,255,.07);
  color: #d7e0ea;
  padding: .75rem .85rem;
  text-align: left;
}
.daily-card-trade-journal span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 850;
}
.daily-card-trade-journal strong {
  font-weight: 950;
}
.daily-card-trade-journal strong.positive { color: var(--green); }
.daily-card-trade-journal strong.negative { color: var(--red); }
.daily-card-trade-journal em {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--primary-dark);
  font-size: .74rem;
  font-style: normal;
  font-weight: 900;
  padding: .28rem .55rem;
}
.daily-card-trade-journal.journaled {
  border-color: rgba(16, 185, 129, .34);
  background: rgba(16, 185, 129, .1);
}
.daily-card-trade-journal.journaled em {
  background: rgba(16, 185, 129, .16);
  color: #d1fae5;
}
.daily-saved-entry {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .55rem;
  background: rgba(255,255,255,.06);
  color: #d7e0ea;
  padding: .8rem .9rem;
}
.daily-saved-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}
.daily-saved-entry-head strong {
  min-width: 0;
  color: #fff;
  font-weight: 950;
}
.daily-saved-entry-head button {
  border: 1px solid rgba(228,179,99,.45);
  border-radius: 999px;
  background: var(--gold-pale);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .74rem;
  font-weight: 900;
  padding: .3rem .65rem;
  white-space: nowrap;
}
.daily-saved-entry p {
  margin: 0 0 .45rem;
  color: #c4cfdd;
  font-size: .84rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.daily-saved-entry span {
  color: #9fb0c4;
  font-size: .72rem;
  font-weight: 850;
}
.daily-saved-images {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .55rem 0 .6rem;
}
.daily-saved-images button {
  display: block;
  width: 84px;
  height: 64px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: .45rem;
  background: rgba(255,255,255,.08);
  padding: 0;
  cursor: zoom-in;
}
.daily-saved-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.daily-card-open {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
}
.daily-card-foot i {
  color: #8997aa;
  font-size: 1.15rem;
}
.daily-trade-pill {
  border-radius: 999px;
  background: rgba(10, 47, 68, .7);
  color: #fff;
  padding: .22rem .72rem;
  font-size: .72rem;
  font-weight: 950;
}
.daily-journal-side {
  padding-top: .75rem;
  display: grid;
  align-content: start;
  gap: .75rem;
}
.daily-journal-side > .form-ctrl {
  min-height: 38px;
  background: #fff;
  border-color: rgba(10, 47, 68, .14);
}
.daily-side-card {
  display: grid;
  gap: .7rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .65rem;
  box-shadow: var(--shadow-sm);
  padding: .9rem;
}
.daily-side-card h6 {
  margin: 0;
  color: var(--primary-dark);
  font-size: .95rem;
  font-weight: 950;
}
.daily-side-card p {
  margin: 0;
  color: var(--grey);
  font-size: .82rem;
  font-weight: 750;
}
.daily-side-action,
.daily-side-trade {
  width: 100%;
  border: 1px solid rgba(10,47,68,.14);
  border-radius: .5rem;
  background: var(--gold-pale);
  color: var(--primary-dark);
  padding: .55rem .65rem;
  font-weight: 850;
  text-align: left;
}
.daily-side-action {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.daily-side-trades {
  display: grid;
  gap: .45rem;
}
.daily-side-trade {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: center;
  background: #fff;
}
.daily-side-trade span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.daily-side-trade strong {
  font-size: .78rem;
}
.daily-side-trade .positive { color: var(--green); }
.daily-side-trade .negative { color: var(--red); }
.daily-side-empty {
  color: var(--grey);
  font-size: .82rem;
  font-weight: 750;
}
.daily-entry-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .65rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.daily-entry-panel summary {
  color: var(--primary-dark);
  padding: .8rem 1rem;
}
.daily-journal-page .notion-entry-form {
  padding: 0 1rem 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.daily-journal-page .notion-entry-form > label,
.daily-journal-page .notion-entry-form > input,
.daily-journal-page .notion-entry-form > textarea,
.daily-journal-page .notion-entry-form > button,
.daily-journal-page .notion-entry-form > .notion-form-row,
.daily-journal-page .notion-entry-form > .notion-entry-template,
.daily-journal-page .notion-entry-form > .notion-attachment-field,
.daily-journal-page .notion-entry-form > .daily-journal-context {
  grid-column: 1 / -1;
}
.daily-journal-context {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  border: 1px solid rgba(228,179,99,.45);
  border-radius: .55rem;
  background: var(--gold-pale);
  color: var(--primary-dark);
  padding: .6rem .7rem;
  font-size: .82rem;
  font-weight: 800;
}
.daily-journal-context[hidden] {
  display: none;
}
.daily-journal-page .notion-entry-form .form-label-sm {
  color: var(--grey);
}
.daily-journal-page .notion-entry-form .form-ctrl {
  background: #fff;
  border-color: rgba(10, 47, 68, .16);
  color: var(--text-dark);
}
.daily-journal-page .notion-callout-field,
.daily-journal-page .notion-market-section {
  border-color: rgba(228,179,99,.35);
  background: var(--gold-pale);
}
.daily-journal-page .notion-callout-field > i {
  background: var(--primary-dark);
  color: #fff;
}
.daily-journal-page .notion-market-section h6 {
  color: var(--primary-dark);
}
.daily-journal-page .notion-attachment-drop {
  border-color: rgba(10, 47, 68, .2);
  background: #fff;
  color: var(--primary-dark);
}
.daily-journal-page .notion-attachment-thumb {
  border-color: rgba(10, 47, 68, .16);
  background: #fff;
}
.daily-empty {
  display: grid;
  place-items: center;
  gap: .55rem;
  min-height: 260px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--grey);
  font-weight: 850;
}
@keyframes pulseBorder { 0%,100% { box-shadow: inset 3px 0 0 var(--impact-color); } 50% { box-shadow: inset 6px 0 0 var(--impact-color); } }
@media (max-width: 900px) { .calendar-filter-row { grid-template-columns:1fr; } }
@media (max-width: 900px) {
  .tradebb-calendar-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tradebb-calendar-shell,
  .tradebb-calendar-lower { grid-template-columns: 1fr; }
  .tradebb-calendar-topline { display: grid; }
  .tradebb-calendar-controls { justify-content: flex-start; }
  .tradebb-calendar-grid { overflow-x: auto; }
  .tradebb-calendar-side { min-height: 260px; }
  .daily-journal-header { align-items: flex-start; flex-direction: column; }
  .daily-journal-toolbar { justify-content: flex-start; }
  .daily-journal-layout { grid-template-columns: 1fr; }
  .daily-journal-side { order: -1; }
  .daily-journal-page .notion-entry-form { grid-template-columns: 1fr; }
  .daily-card-body { grid-template-columns: 1fr; }
  .daily-chart-panel { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
  .notion-calendar-shell { grid-template-columns: 1fr; }
  .notion-calendar-main { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .notion-calendar-side { min-height: 220px; }
}
@media (max-width: 560px) {
  .tradebb-calendar-cards { grid-template-columns: 1fr; }
  .tradebb-calendar-main { padding: 1rem; }
  .tradebb-calendar-grid.year-view { grid-template-columns: 1fr 1fr; }
  .tradebb-weekdays,
  .tradebb-calendar-grid { min-width: 540px; }
  .tradebb-calendar-grid.year-view { min-width: 0; }
  .daily-journal-layout { padding: 0 .25rem .65rem; }
  .daily-card-head { grid-template-columns: 48px minmax(0, 1fr); }
  .daily-card-pl { grid-column: 1 / -1; text-align: left; }
  .daily-card-trade-journal { grid-template-columns: 1fr; }
  .daily-card-trade-journal em { justify-content: center; }
  .daily-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1rem; padding: 1rem; border-radius: .7rem; }
  .daily-filter-btn,
  .daily-filter-field { width: 100%; justify-content: space-between; }
  .daily-filter-select { width: 100%; }
  .notion-journal-cover { min-height: 160px; }
  .notion-journal-head { padding-top: 1.5rem; }
  .notion-form-row { grid-template-columns: 1fr; }
  .notion-journal-toolbar { overflow-x: auto; }
  .notion-calendar-topline { display: grid; }
  .notion-calendar-controls { justify-content: flex-start; }
  .notion-calendar-grid { min-width: 520px; }
  .notion-calendar-cell { min-height: 78px; }
}

/* â”€â”€ TOAST â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#toast-root { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast-msg {
  background: var(--navy); color: #fff; padding: .65rem 1.1rem;
  border-radius: var(--radius-md); font-size: .85rem; font-weight: 600;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: .6rem;
  animation: slideRight .25s ease; min-width: 200px;
}
.toast-msg.success { border-left: 4px solid var(--green); }
.toast-msg.error   { border-left: 4px solid var(--red); }
.toast-msg.info    { border-left: 4px solid var(--gold); }

/* â”€â”€ EMPTY STATE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--grey); }
.empty-state i { font-size: 2.5rem; opacity: .3; margin-bottom: .75rem; display: block; }
.empty-state p { font-size: .9rem; font-weight: 600; }

/* â”€â”€ ANIMATIONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@keyframes slideUp    { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideRight { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes fadeIn     { from { opacity:0; } to { opacity:1; } }

/* â”€â”€ RESPONSIVE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (max-width: 768px) {
  .upgrade-section-head { flex-direction:column; }
  .tenant-plan-grid { grid-template-columns:1fr; }
  .accounts-grid > .account-card:only-child .account-card-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; padding: 1rem; }
  .mobile-menu-btn { display: flex !important; }
  .accounts-toolbar { grid-template-columns: 1fr 1fr; }
  .accounts-search { grid-column: 1 / -1; }
  .accounts-result-count { justify-self: end; }
}
.mobile-menu-btn { display: none; position: fixed; top: 1rem; left: 1rem; z-index: 460;
  background: var(--navy); border: none; color: var(--gold); font-size: 1.3rem;
  width: 42px; height: 42px; border-radius: .6rem; cursor: pointer; align-items: center; justify-content: center;
  transition: left .24s ease, transform .24s ease, background .24s ease, color .24s ease, box-shadow .24s ease; }
.mobile-menu-btn i {
  font-size: 1rem;
  line-height: 1;
  opacity: .8;
}
.mobile-menu-btn.is-open {
  left: calc(min(80vw, 320px) - 44px);
  transform: none;
  background: transparent;
  color: rgba(255,255,255,.72);
  box-shadow: none;
}
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 430;
  border: 0;
  background: rgba(6,31,47,.42);
  opacity: 0;
  transition: opacity .24s ease;
}
.mobile-sidebar-overlay.is-visible {
  display: block;
  opacity: 1;
}
.mobile-sidebar-overlay[hidden] { display: none !important; }

@media (max-width: 520px) {
  :root {
    --radius-lg: 1.05rem;
    --radius-md: .9rem;
    --radius-sm: .65rem;
  }
  body { background: #f0f2f5; }
  #authSection { align-items: stretch; padding: .6rem; min-height: 100svh; }
  .auth-box { padding: .45rem; gap: .45rem; border-radius: 1rem; min-height: calc(100svh - 1.2rem); }
  .auth-visual { min-height: 315px; border-radius: .85rem; }
  .auth-visual-copy { padding: 1rem .85rem; gap: .75rem; align-content: start; }
  .auth-visual-logo { width: min(32%, 92px); padding: .32rem; border-radius: .55rem; }
  .auth-visual-message { width: 100%; gap: .5rem; margin-top: .05rem; padding: 0 .25rem; }
  .auth-visual-kicker { font-size: .62rem; letter-spacing: 1px; }
  .auth-visual-title { width: 100%; font-size: clamp(1.3rem, 7vw, 1.7rem); line-height: 1.12; max-width: 330px; overflow-wrap: anywhere; }
  .auth-visual-slogan { font-size: 1rem; }
  .auth-form-panel { padding: 1rem; justify-content: flex-start; }
  .auth-logo { font-size: 1.75rem; text-align: center; }
  .auth-footer-credit { font-size: .72rem; margin-top: .8rem; padding-top: .75rem; }
  .form-ctrl, .form-select, .filter-select, .currency-sel, .quick-input { min-height: 44px; font-size: 16px; }
  .btn-primary-gold, .btn-sm-gold, .btn-sm-ghost, .btn-danger-sm, .icon-btn { min-height: 44px; justify-content: center; }
  .mobile-menu-btn {
    top: 1.15rem;
    left: .95rem;
    width: 26px;
    height: 26px;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,.74);
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
  }
  .mobile-menu-btn i { font-size: 1rem; opacity: .78; }
  .mobile-menu-btn.is-open { left: calc(min(80vw, 320px) - 40px); }
  .sidebar {
    top: .55rem;
    bottom: .55rem;
    width: min(80vw, 320px);
    z-index: 440;
    border: 1px solid rgba(228,179,99,.18);
    border-left: 0;
    border-right: 1px solid rgba(228,179,99,.22);
    border-radius: 0 1.35rem 1.35rem 0;
    box-shadow: 0 24px 52px rgba(0,0,0,.28);
  }
  .sidebar.open::after { display: none; }
  .sidebar-logo { padding: 1.1rem 1rem .85rem; font-size: 1.05rem; }
  .nav-item-btn { padding: .78rem 1rem; font-size: .92rem; }
  .sidebar-footer { padding: .85rem 1rem; }
  .main-content { padding: 4.5rem .75rem 1rem; }
  .page-header { align-items: stretch; gap: .75rem; margin-bottom: 1rem; }
  .page-title { font-size: 1.35rem; }
  .page-header > div:last-child, .report-actions, .news-alert-actions { width: 100%; }
  .page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .account-actions { grid-template-columns: 1fr; }
  .page-actions .icon-btn { width: 100%; justify-content: center; }
  .filter-bar {
    margin: 0 -.75rem 1rem;
    border-radius: 0;
    padding: .7rem .75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .currency-sel { grid-column: 1 / -1; }
  .dashboard-panel, .dashboard-health, .dashboard-card, .table-card, .admin-section, .finance-panel, .chart-card, .risk-panel-card {
    padding: .9rem;
  }
  .dashboard-panel-value { font-size: 2rem; overflow-wrap: anywhere; }
  .dashboard-panel-row, .news-alert-card { display: grid; grid-template-columns: 1fr; }
  .dashboard-chip { width: 100%; justify-content: center; }
  .dashboard-kpi-grid, .trade-summary-grid, .finance-summary-grid, .analytics-overview, .accounts-grid, .risk-dashboard-grid, .risk-rules-grid, .risk-page-grid {
    grid-template-columns: 1fr;
  }
  .accounts-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpi, .trade-summary-card, .finance-card, .analytics-tile, .account-kpi { grid-template-columns: 38px minmax(0, 1fr); padding: .85rem; }
  .account-card { padding: .9rem; }
  .account-card-top { display: grid; grid-template-columns: 1fr; }
  .account-card-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-trades-head,
  .account-trade-row { grid-template-columns: 1fr 1fr; }
  .account-trade-row b { text-align: left; }
  .account-card-actions { display: grid; grid-template-columns: 1fr; }
  .account-action { width: 100%; justify-content: center; }
  .accounts-toolbar { grid-template-columns: 1fr; }
  .accounts-search { grid-column: auto; }
  .accounts-result-count { justify-self: stretch; }
  .account-table-disclosure > summary { align-items: flex-start; flex-direction: column; }
  .table-card-header { padding: .85rem; align-items: flex-start; }
  .table-card-title { font-size: 1rem; }
  .tbl { font-size: .82rem; min-width: 760px; }
  .tbl thead th, .tbl td { padding: .55rem .6rem; }
  .trade-table-card .tbl td { padding: .55rem .6rem; }
  .quick-add-bar {
    margin-left: -.75rem;
    margin-right: -.75rem;
    border-radius: 0;
    display: grid;
    grid-template-columns: 1fr;
    padding: .85rem .75rem;
  }
  .quick-add-bar > div, .quick-add-bar select, .quick-add-bar input, #quickAddBtn { width: 100% !important; }
  .calendar-filter-row { grid-template-columns: 1fr; }
  .calendar-tabs, .calendar-impact-filters { display: grid; grid-template-columns: repeat(3, 1fr); }
  .calendar-tabs .btn-sm-ghost, .calendar-impact-filters .btn-sm-ghost { padding-left: .4rem; padding-right: .4rem; }
  #calendarCurrencyFilter { height: 132px; }
  .calendar-drawer { width: 100vw; right: -100vw; padding: 1rem; }
  .license-strip { display: grid; grid-template-columns: 1fr; gap: .45rem; padding: .7rem .8rem; }
  #toast-root { left: .75rem; right: .75rem; bottom: .75rem; }
  .toast-msg { width: 100%; min-width: 0; }
}

#importExcelBtn.trade-file-action,
#downloadTemplateBtn.report-file-action {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: var(--primary-dark) !important;
}

#exportExcelBtn.trade-file-action,
#exportWorkbookBtn.report-file-action.primary {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: var(--gold) !important;
}

#importExcelBtn.trade-file-action:hover,
#downloadTemplateBtn.report-file-action:hover {
  background: var(--gold-dim) !important;
  border-color: var(--gold-dim) !important;
  color: var(--primary-dark) !important;
}

#exportExcelBtn.trade-file-action:hover,
#exportWorkbookBtn.report-file-action.primary:hover {
  background: #123d54 !important;
  border-color: var(--gold) !important;
  color: #ffd98a !important;
}
.impersonation-banner { position: sticky; top: 0; z-index: 260; background:#dc3545; color:#fff; padding:.7rem 1rem; display:none; align-items:center; justify-content:space-between; gap:.75rem; font-weight:800; }
.notice-host { margin-bottom:.85rem; display:none; }
.message-bell { position:relative; border:1px solid #d8e2e8; background:#fff; color:var(--primary-dark); border-radius:10px; width:42px; height:42px; display:inline-grid; place-items:center; }
.message-bell .badge { position:absolute; top:-6px; right:-6px; }
.messages-dropdown { position:absolute; top:52px; right:0; width:min(360px, calc(100vw - 1.5rem)); max-height:360px; overflow:auto; background:#fff; border:1px solid #d8e2e8; border-radius:8px; box-shadow:0 18px 40px rgba(16,47,64,.18); display:none; z-index:300; }
.messages-dropdown.open { display:block; }
.suspension-screen { min-height:100vh; display:none; place-items:center; padding:1rem; background:#082f44; color:#fff; }
.suspension-card { width:min(520px,100%); background:#fff; color:#102f40; border-radius:8px; padding:1.5rem; text-align:center; }
.app-load-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: #f0f2f5;
  color: #0a2f44;
  font-family: var(--font-ui);
}
.app-load-error > div {
  max-width: 420px;
  background: #fff;
  border: 1px solid var(--gold);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
}
.app-load-error p {
  margin: .5rem 0 0;
  color: var(--grey);
}

/* Final mobile pass: make every main surface fit inside narrow screens. */
html, body { max-width: 100%; overflow-x: hidden; }
.main-content, .page, .table-card, .dashboard-card, .weekly-panel, .finance-panel, .admin-section { min-width: 0; }
.table-card > div[style*="overflow-x"] {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
#tradeTable { min-width: 1080px; }
#accountsTable { min-width: 1120px; }
.finance-table-card .tbl { min-width: 780px; }
.weekly-trade-table .tbl { min-width: 900px; }

@media (max-width: 900px) {
  .main-content { margin-left: 0; }
  .dashboard-hero,
  .dashboard-grid-2,
  .weekly-insight-grid,
  .finance-shell,
  .calendar-filter-row,
  .risk-page-grid,
  .admin-grid,
  .admin-form-grid {
    grid-template-columns: 1fr !important;
  }
  .user-field-role,
  .user-field-email,
  .user-management-actions {
    grid-column: auto;
  }
  .quick-add-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }
  .quick-add-bar > div,
  .quick-add-bar .quick-input,
  #quickAddBtn {
    width: 100% !important;
  }
  .filter-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-bar > *,
  .filter-select,
  .currency-sel {
    width: 100%;
    min-width: 0;
  }
  .message-bell { width: 100%; }
}

@media (max-width: 768px) {
  body { background: #f0f2f5; }
  .mobile-menu-btn {
    display: flex !important;
    z-index: 460;
    top: 1.25rem;
    left: 1rem;
    width: 26px;
    height: 26px;
    border-radius: 0;
    background: transparent;
    color: rgba(255,255,255,.74);
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
  }
  .mobile-menu-btn i { font-size: 1rem; opacity: .78; }
  .sidebar {
    top: .6rem;
    bottom: .6rem;
    width: min(80vw, 320px);
    z-index: 440;
    transform: translateX(calc(-100% - .9rem));
    border: 1px solid rgba(228,179,99,.18);
    border-left: 0;
    border-right: 1px solid rgba(228,179,99,.22);
    border-radius: 0 1.4rem 1.4rem 0;
    box-shadow: 0 24px 52px rgba(0,0,0,.28);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar.open::after { display: none; }
  .mobile-menu-btn.is-open { left: calc(min(80vw, 320px) - 40px); }
  .main-content {
    padding: 4.75rem .85rem 1.15rem;
  }
  .page-header {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .page-header > div {
    width: 100%;
  }
  .page-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .account-actions { grid-template-columns: 1fr; }
  .page-actions button,
  .page-actions .icon-btn {
    width: 100%;
    justify-content: center;
  }
  .page-title { font-size: 1.35rem; }
  .filter-bar {
    margin: 0 -.85rem 1rem;
    border-radius: 0;
    position: sticky;
    top: 0;
    z-index: 80;
    padding: .75rem .85rem;
  }
  .messages-dropdown {
    position: fixed;
    left: .75rem;
    right: .75rem;
    top: 7.25rem;
    width: auto;
    max-height: min(420px, 68vh);
  }
  .impersonation-banner {
    display: none;
    flex-direction: column;
    align-items: stretch;
    top: 0;
  }
  .notice-host .alert { font-size: .86rem; }
  .accounts-grid,
  .dashboard-kpi-grid,
  .trade-summary-grid,
  .weekly-card-grid,
  .finance-summary-grid,
  .analytics-overview,
  .chart-grid,
  .risk-dashboard-grid,
  .risk-rules-grid {
    grid-template-columns: 1fr !important;
  }
  .accounts-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: .65rem;
  }
  .account-card,
  .account-kpi,
  .dashboard-kpi,
  .trade-summary-card,
  .finance-card,
  .analytics-tile {
    min-width: 0;
  }
  .account-card-top,
  .account-card-actions,
  .calendar-tabs,
  .calendar-impact-filters,
  .risk-quick-action,
  .report-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .account-card-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-trades-head,
  .account-trade-row { grid-template-columns: 1fr 1fr; }
  .account-action,
  .calendar-tabs button,
  .calendar-impact-filters button,
  .report-actions button,
  .risk-quick-action button {
    width: 100%;
    justify-content: center;
  }
  .table-card {
    margin-left: -.1rem;
    margin-right: -.1rem;
  }
  .table-card-header {
    display: grid;
    grid-template-columns: 1fr;
  }
  .tbl th,
  .tbl td {
    white-space: nowrap;
  }
  .tbl-input,
  .tbl-select,
  .quick-input,
  .filter-select,
  .currency-sel,
  .form-ctrl {
    font-size: 16px;
  }
  .admin-section,
  .dashboard-panel,
  .dashboard-health,
  .dashboard-card,
  .weekly-panel,
  .finance-panel,
  .chart-card,
  .risk-panel,
  .risk-rule-card {
    padding: .95rem;
  }
}

@media (max-width: 480px) {
  .main-content { padding-left: .65rem; padding-right: .65rem; }
  .filter-bar {
    margin-left: -.65rem;
    margin-right: -.65rem;
    grid-template-columns: 1fr;
  }
  .page-actions { grid-template-columns: 1fr; }
  .accounts-overview { grid-template-columns: 1fr !important; }
  .account-card-metrics { grid-template-columns: 1fr; }
  .quick-add-bar {
    margin-left: -.65rem;
    margin-right: -.65rem;
    grid-template-columns: 1fr;
    border-radius: 0;
  }
  .account-card-metric,
  .account-kpi,
  .dashboard-kpi,
  .trade-summary-card,
  .finance-card,
  .analytics-tile {
    padding: .8rem;
  }
  .account-kpi-value,
  .dashboard-kpi-value,
  .finance-card-value,
  .analytics-value {
    font-size: 1.15rem;
  }
  .dashboard-panel-value { font-size: 1.85rem; }
  .news-alert-card,
  .dashboard-panel-row,
  .license-strip {
    display: grid;
    grid-template-columns: 1fr;
  }
  .news-alert-countdown,
  .dashboard-chip {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .calendar-drawer {
    width: 100vw;
    right: -100vw;
    padding: 1rem;
  }
  #toast-root {
    left: .65rem;
    right: .65rem;
    bottom: .65rem;
  }
  .toast-msg { width: 100%; min-width: 0; }
}

/* Mobile usability pass: clearer spacing, touch targets, and narrow-screen layouts. */
@media (max-width: 860px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }

  .main-content {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .page-header {
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(10,47,68,.08);
    border-radius: 1rem;
    padding: .85rem;
    box-shadow: 0 8px 22px rgba(10,47,68,.07);
  }

  .page-title {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .page-actions,
  .trade-actions,
  .report-actions,
  .news-alert-actions {
    gap: .55rem;
  }

  .page-actions .icon-btn,
  .trade-file-action,
  .report-file-action,
  .btn-sm-gold,
  .btn-sm-ghost,
  .btn-danger-sm,
  .account-action,
  .daily-filter-btn,
  .daily-side-action,
  .daily-side-trade {
    min-height: 46px;
    border-radius: .8rem;
    padding: .68rem .8rem;
    white-space: normal;
    text-align: center;
  }

  .filter-bar {
    box-shadow: 0 10px 24px rgba(10,47,68,.08);
  }

  .filter-select,
  .currency-sel,
  .quick-input,
  .form-ctrl,
  .form-select,
  .accounts-filter,
  .tbl-input,
  .tbl-select {
    min-height: 46px;
    font-size: 16px;
  }

  .quick-add-bar {
    box-shadow: 0 12px 28px rgba(10,47,68,.18);
  }

  .quick-add-bar label {
    font-size: .66rem;
    letter-spacing: .7px;
  }

  .trade-summary-grid,
  .dashboard-kpi-grid,
  .finance-summary-grid,
  .analytics-overview,
  .weekly-card-grid,
  .accounts-grid,
  .risk-dashboard-grid,
  .risk-rules-grid {
    gap: .75rem;
  }

  .dashboard-kpi,
  .trade-summary-card,
  .finance-card,
  .analytics-tile,
  .weekly-metric,
  .account-kpi {
    border-radius: .95rem;
  }

  .table-card {
    border-radius: 1rem;
  }

  .table-card > div[style*="overflow"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .table-card > div[style*="overflow"]::after {
    content: "Swipe sideways to view all columns";
    display: block;
    padding: .55rem .8rem .7rem;
    color: var(--grey);
    font-size: .72rem;
    font-weight: 800;
    text-align: center;
    background: #fbfcfd;
    border-top: 1px solid #edf2f7;
  }

  .tbl {
    border-collapse: separate;
    border-spacing: 0;
  }

  .tbl thead th {
    font-size: .72rem;
  }

  .tbl td {
    font-size: .84rem;
  }

  .daily-journal-page {
    padding: 0;
  }

  .daily-journal-header,
  .daily-journal-layout {
    border-radius: 1rem;
  }

  .daily-journal-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .daily-journal-toolbar > * {
    width: 100%;
    min-width: 0;
  }

  .daily-card {
    border-radius: 1rem;
    overflow: hidden;
  }

  .daily-card-head {
    padding: .85rem;
    gap: .75rem;
  }

  .daily-card-title h2 {
    font-size: .95rem;
    color: rgba(10,47,68,.42);
  }

  .daily-card-body {
    grid-template-columns: 1fr;
  }

  .daily-chart-panel {
    min-height: 150px;
    padding: .75rem;
  }

  .daily-card-foot {
    min-height: 48px;
    padding: .55rem .85rem;
  }

  .daily-card-trades,
  .daily-saved-entries {
    padding: .8rem;
  }

  .daily-entry-panel summary {
    min-height: 46px;
  }

  .daily-journal-page .notion-entry-form {
    padding: 0 .8rem .9rem;
  }

  .notion-attachment-drop {
    min-height: 104px;
  }
}

@media (max-width: 600px) {
  .main-content {
    padding-top: 4.35rem;
  }

  .page-header {
    margin-left: -.15rem;
    margin-right: -.15rem;
    padding: .75rem;
  }

  .page-actions,
  .trade-actions,
  .report-actions,
  .news-alert-actions,
  .risk-quick-action,
  .account-card-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .trade-actions,
  .report-actions {
    padding: .45rem;
  }

  .trade-file-action,
  .report-file-action,
  .page-actions .icon-btn,
  .page-actions button,
  .report-actions button,
  .report-actions label,
  .risk-quick-action button {
    width: 100%;
    justify-content: center;
  }

  .filter-bar {
    grid-template-columns: 1fr !important;
    gap: .5rem;
  }

  .quick-add-bar {
    grid-template-columns: 1fr !important;
    gap: .65rem;
  }

  .trade-summary-card,
  .dashboard-kpi,
  .finance-card,
  .analytics-tile,
  .weekly-metric,
  .account-kpi {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: .7rem;
  }

  .trade-summary-value,
  .dashboard-kpi-value,
  .finance-card-value,
  .weekly-metric-value,
  .account-kpi-value {
    font-size: 1.12rem;
    overflow-wrap: anywhere;
  }

  .dashboard-panel,
  .weekly-scoreboard,
  .finance-panel {
    border-radius: 1rem;
    padding: 1rem;
  }

  .dashboard-panel-row,
  .weekly-pill-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .dashboard-chip,
  .weekly-chip {
    justify-content: center;
  }

  .accounts-toolbar {
    grid-template-columns: 1fr !important;
  }

  .accounts-overview,
  .account-card-metrics {
    grid-template-columns: 1fr !important;
  }

  .account-trades-head,
  .account-trade-row,
  .weekly-focus-item,
  .weekly-split-row,
  .finance-break-row,
  .session-row {
    grid-template-columns: 1fr !important;
  }

  .session-value,
  .weekly-focus-amount,
  .weekly-split-value,
  .finance-break-value {
    text-align: left;
  }

  .daily-journal-toolbar {
    grid-template-columns: 1fr;
  }

  .daily-card-head {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .daily-card-datebox {
    width: 44px;
  }

  .daily-card-pl {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 52px;
  }

  .daily-add-journal,
  .daily-journal-saved {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    margin-top: .35rem;
  }

  .daily-metric-grid {
    grid-template-columns: 1fr 1fr;
    margin: .8rem;
    padding: .85rem;
    gap: .65rem;
  }

  .daily-card-trade-journal {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .daily-card-trade-journal span {
    white-space: normal;
  }

  .daily-card-trade-journal em {
    justify-content: center;
  }

  .daily-saved-entry-head {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .daily-saved-entry-head button {
    justify-content: center;
    min-height: 42px;
  }

  .daily-saved-images button {
    width: 74px;
    height: 58px;
  }

  .tradebb-calendar-cards,
  .tradebb-calendar-grid.year-view {
    grid-template-columns: 1fr !important;
  }

  .tradebb-calendar-topline,
  .notion-calendar-topline {
    gap: .65rem;
  }

  .tradebb-calendar-controls,
  .notion-calendar-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .tradebb-calendar-controls > *,
  .notion-calendar-controls > * {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .main-content {
    padding-left: .55rem;
    padding-right: .55rem;
  }

  .page-title {
    font-size: 1.22rem;
  }

  .table-card-header,
  .admin-section,
  .dashboard-card,
  .weekly-panel,
  .finance-panel,
  .chart-card,
  .risk-panel,
  .risk-rule-card {
    padding: .8rem;
  }

  .daily-metric-grid {
    grid-template-columns: 1fr;
  }

  .daily-card-pl {
    padding-left: 0;
  }

  .tradebb-weekdays,
  .tradebb-calendar-grid,
  .notion-calendar-grid {
    min-width: 430px;
  }
}

/* Dashboard KPI row: keep the main stat cards aligned on one desktop row. */
.dashboard-kpi-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: .7rem !important;
}

.dashboard-kpi {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  min-height: 82px;
  padding: .78rem .82rem !important;
  gap: .62rem !important;
}

.dashboard-kpi-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
}

.dashboard-kpi-label,
.dashboard-kpi-value,
.dashboard-kpi-sub {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-kpi-label {
  font-size: .64rem !important;
  letter-spacing: .45px !important;
}

.dashboard-kpi-value {
  font-size: clamp(.88rem, 1.15vw, 1.08rem) !important;
  line-height: 1.05 !important;
}

.dashboard-kpi-sub {
  font-size: .68rem !important;
}

@media (max-width: 1180px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

.dashboard-clock-strip {
  background: #fff;
  border: 1px solid rgba(228,179,99,.3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: .62rem .72rem;
  margin-bottom: .85rem;
}

.dashboard-clock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .5rem;
}

.dashboard-clock-head > i {
  color: var(--gold-dark);
  font-size: 1.15rem;
}

.dashboard-clock-sub {
  color: var(--grey);
  font-size: .68rem;
  font-weight: 700;
}

.dashboard-clock-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .45rem;
}

.dashboard-clock-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-areas:
    "icon main";
  gap: .4rem;
  min-width: 0;
  border: 1px solid rgba(10,47,68,.1);
  border-radius: 10px;
  padding: .48rem .55rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  align-items: center;
}

.dashboard-clock-card.active {
  border-color: rgba(40,167,69,.35);
  background: linear-gradient(180deg, #f4fff8 0%, #ffffff 100%);
}

.dashboard-clock-icon {
  grid-area: icon;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--primary-dark);
  background: var(--gold-pale);
  border: 1px solid rgba(228,179,99,.45);
  font-size: .82rem;
}

.dashboard-clock-main {
  grid-area: main;
  min-width: 0;
}

.dashboard-clock-label {
  color: var(--grey);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .35px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-clock-time {
  color: var(--primary-dark);
  font-family: var(--font-mono);
  font-size: clamp(.82rem, 1vw, .98rem);
  font-weight: 900;
  line-height: 1.1;
  margin-top: .08rem;
  white-space: nowrap;
}

.dashboard-clock-date {
  color: var(--grey);
  font-size: .58rem;
  font-weight: 700;
  margin-top: .06rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-clock-status {
  display: none;
  grid-area: status;
  justify-self: start;
  max-width: 100%;
  color: var(--grey);
  background: #f4f6f8;
  border-radius: 999px;
  padding: .25rem .55rem;
  font-size: .68rem;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-clock-card.active .dashboard-clock-status {
  color: var(--green);
  background: rgba(40,167,69,.1);
}

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

@media (max-width: 560px) {
  .dashboard-clock-strip {
    padding: .55rem;
    margin-bottom: .65rem;
  }
  .dashboard-clock-head { display: none; }
  .dashboard-clock-grid {
    display: flex;
    overflow-x: auto;
    padding-bottom: .1rem;
    scroll-snap-type: x proximity;
  }
  .dashboard-clock-card {
    flex: 0 0 138px;
    scroll-snap-align: start;
  }
}

[hidden]{display:none!important;}
/* Weekly payout report: uses the existing app palette and typography. */
.payout-intro{color:var(--grey);margin:-.2rem 0 1.3rem;line-height:1.6}
.payout-filters{display:grid;grid-template-columns:minmax(0,2fr) minmax(180px,1fr);gap:1rem;padding:1.2rem;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:1.2rem}
.payout-filters label{display:grid;gap:.5rem;font-weight:700;font-size:.85rem;color:var(--text-dark)}
.payout-filters .form-ctrl{width:100%;min-width:0}
.payout-identity{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:1.2rem 0}
.payout-identity strong{display:block;font-size:1.1rem;color:var(--navy)}
.payout-identity span{font-size:.85rem;color:var(--grey)}
.payout-tags{display:flex;flex-wrap:wrap;gap:.5rem}
.payout-tags span{padding:.4rem .7rem;border-radius:20px;background:var(--gold-pale);border:1px solid var(--border);font-weight:600;color:var(--navy)}
.payout-overview,.payout-columns{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:1.2rem;margin-bottom:1.2rem;align-items:stretch}
.payout-card,.payout-hero{border-radius:var(--radius-md);padding:1.5rem;min-width:0;box-shadow:var(--shadow-sm)}
.payout-card{background:var(--surface);border:1px solid var(--border)}
.payout-card h3{color:var(--navy);font-size:1.05rem;margin-bottom:1.2rem}
.payout-hero{background:var(--nav-gradient);color:white;display:flex;flex-direction:column;align-items:flex-start;gap:.75rem}
.payout-eyebrow{font-size:.8rem;letter-spacing:.06em;text-transform:uppercase;color:var(--gold)}
.payout-amount{font-size:clamp(1.7rem,3vw,2.7rem);line-height:1.2;overflow-wrap:anywhere}
.payout-chip{display:inline-block;padding:.3rem .65rem;border:1px solid rgba(228,179,99,.6);border-radius:20px;font-size:.75rem;color:var(--gold)}
.payout-hero p{font-size:.85rem;line-height:1.6;color:rgba(255,255,255,.83)}
.payout-period{margin-top:auto;padding-top:1rem;width:100%;border-top:1px solid rgba(255,255,255,.16);font-weight:600;font-size:.9rem}
.payout-period small{display:block;margin-top:.3rem;font-weight:400;color:rgba(255,255,255,.7)}
.payout-summary dl,.payout-review{margin:0}
.payout-summary dl>div,.payout-review>div{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;border-bottom:1px solid rgba(90,110,124,.12);padding:.75rem 0}
.payout-summary dt,.payout-review dt{color:var(--grey);font-size:.85rem;flex:1}
.payout-summary dd,.payout-review dd{margin:0;text-align:right;max-width:60%;font-size:.85rem;font-weight:700;color:var(--navy);overflow-wrap:anywhere}
.payout-footnote{margin-top:1rem;color:var(--grey);font-size:.8rem;line-height:1.6}
.payout-table-wrap{overflow-x:auto}
.payout-breakdown{width:100%;border-collapse:collapse;font-size:.85rem}
.payout-breakdown th,.payout-breakdown td{padding:.8rem .3rem;border-bottom:1px solid rgba(90,110,124,.12)}
.payout-breakdown th{text-align:left;font-weight:500;color:var(--grey)}
.payout-breakdown td{text-align:right;font-weight:700;color:var(--navy);white-space:nowrap}
.payout-breakdown tr:nth-last-child(2){background:var(--gold-pale)}
.payout-breakdown tr:nth-last-child(2) th{font-weight:700;color:var(--navy)}
.payout-empty{display:flex;gap:.85rem;background:var(--gold-pale);padding:1rem;border-radius:var(--radius-sm);color:var(--navy)}
.payout-empty>i{font-size:1.25rem}
.payout-empty p{margin-top:.5rem;font-size:.85rem;line-height:1.6;color:var(--grey)}
.payout-review-note{display:flex;align-items:flex-start;gap:.7rem;background:var(--gold-pale);padding:1rem;border-radius:var(--radius-sm);margin-top:1rem;color:var(--navy)}
.payout-review-note p,.payout-notes p{font-size:.85rem;line-height:1.65}
.payout-notes summary{cursor:pointer;color:var(--navy);font-weight:700}
.payout-request{margin-bottom:1.2rem}
.payout-request button{margin-top:1rem;background:var(--primary-medium);color:#fff;border:0;padding:.8rem 1.2rem;border-radius:var(--radius-sm);font:inherit;font-weight:700;cursor:pointer}
.payout-request button:disabled{opacity:.55;cursor:not-allowed}
.payout-notes p{color:var(--grey);margin-top:.8rem}
@media(max-width:900px){.payout-overview,.payout-columns{grid-template-columns:1fr}}
@media(max-width:560px){.payout-filters{grid-template-columns:1fr}.payout-identity{align-items:flex-start;flex-direction:column}.payout-card,.payout-hero{padding:1.1rem}.payout-summary dl>div,.payout-review>div{flex-direction:column;gap:.35rem}.payout-summary dd,.payout-review dd{text-align:left;max-width:100%}}
