@import url('https://fonts.googleapis.com/css2?family=Bowlby+One+SC&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --ink: #10172c;
  --gold: #ae751f;
  --gold-deep: #895510;
  --paper: #fdfbf5;
  --line: rgba(174, 117, 31, 0.86);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Trebuchet MS', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: #e9e2d4; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background: radial-gradient(circle at 50% 20%, #fffefb 0, #f7f3ea 42%, #e7dfd1 120%);
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(0.7rem, 2.8vw, 2.5rem);
  perspective: 1500px;
}

.screen { width: min(100%, 62rem); }
.screen[hidden] { display: none; }

.paper-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  width: 100%;
  min-height: min(94vh, 92rem);
  padding: clamp(2rem, 5.5vw, 4.4rem) clamp(1.25rem, 8vw, 6.1rem) clamp(2.4rem, 6vw, 4.4rem);
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 51% 48%, rgba(255,255,255,.92) 0%, rgba(255,255,255,.34) 43%, rgba(233,222,194,.28) 100%),
    linear-gradient(135deg, #fcfaf4, #f7f2e7 60%, #faf7ee);
  box-shadow: 0 1.7rem 3rem rgba(66, 42, 8, .18), inset 0 0 3rem rgba(181, 137, 62, .06);
  transform-style: preserve-3d;
  transition: transform .22s ease-out, box-shadow .22s ease-out;
}

.paper-card::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: .32rem;
  border: 1px solid rgba(174, 117, 31, .14);
  pointer-events: none;
}

.brand-block { text-align: center; transform: translateZ(18px); }
.brand-mark {
  display: block;
  width: min(100%, 31rem);
  height: auto;
  margin: 0 auto .45rem;
  mix-blend-mode: multiply;
  user-select: none;
}
.brand-block--founder .brand-mark { width: min(100%, 23rem); margin-bottom: .4rem; }
.brand-block--login .brand-mark { width: min(100%, 35rem); margin-bottom: .45rem; }

.brand-name {
  margin: 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(2.25rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: .98;
  text-shadow: 0 1px 0 #fff, 0 2px 1px rgba(100, 61, 9, .15);
}

.back-button {
  position: absolute;
  top: clamp(1rem, 2.7vw, 1.7rem);
  left: clamp(1rem, 2.7vw, 1.7rem);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.6rem;
  padding: .45rem .7rem;
  border: 1px solid var(--gold);
  border-radius: .32rem;
  color: var(--gold-deep);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(239,229,207,.92));
  box-shadow: 0 .22rem 0 #d1bd9d, 0 .38rem .8rem rgba(89, 57, 16, .15), inset 0 1px rgba(255,255,255,.9);
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09rem;
  text-transform: uppercase;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.back-button span { font-size: 1.25rem; line-height: .7; }
.back-button:hover, .back-button:focus-visible { filter: brightness(1.06); transform: translateY(-.12rem) translateZ(10px); }
.back-button:active { transform: translateY(.16rem); box-shadow: 0 .08rem 0 #d1bd9d, inset 0 2px 4px rgba(84, 48, 1, .18); }

.eyebrow-rule, .mount-rule, .or-rule {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2.7vw, 1.8rem);
  margin: clamp(1.8rem, 3vw, 2.6rem) 0;
}
.eyebrow-rule span, .mount-rule span, .or-rule span { height: 1px; flex: 1; background: var(--line); }
.eyebrow-rule p, .motto, .founder-role { margin: 0; text-transform: uppercase; }
.eyebrow-rule p {
  font-size: clamp(.75rem, 1.85vw, 1.25rem);
  letter-spacing: clamp(.2rem, 1vw, .56rem);
  white-space: nowrap;
}
.eyebrow-rule--diamond p::before, .eyebrow-rule--diamond p::after { color: var(--gold); content: '◆'; font-size: .7em; padding: 0 1rem; }

.copy { max-width: 52rem; margin: 0 auto; text-align: center; font-size: clamp(1rem, 2.25vw, 1.54rem); line-height: 1.55; letter-spacing: .01em; }
.copy p { margin: 0 0 clamp(1.45rem, 3.7vw, 2.7rem); }
.copy strong { color: var(--gold-deep); font-weight: 700; }
.copy--founder { margin-top: clamp(1.9rem, 4vw, 3.6rem); }

.mount-rule { margin: clamp(2rem, 4vw, 3.2rem) 0 1.35rem; }
.mount-rule i { color: var(--gold); font-family: var(--serif); font-size: 3rem; font-style: normal; line-height: .35; transform: translateY(-.35rem) rotate(180deg); }
.motto { text-align: center; font-size: clamp(.72rem, 1.8vw, 1.16rem); letter-spacing: clamp(.14rem, .55vw, .42rem); line-height: 1.6; }

.action-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.8rem);
  width: min(100%, 36rem);
  min-height: clamp(4rem, 7vw, 5.5rem);
  margin: clamp(1.75rem, 4.2vw, 3rem) auto 0;
  padding: .7rem 1.3rem;
  border-radius: .45rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3.3vw, 2rem);
  letter-spacing: clamp(.08rem, .4vw, .25rem);
  text-transform: uppercase;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.action-button--outline {
  border: 2px solid var(--gold);
  color: var(--ink);
  background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(238,228,206,.85));
  box-shadow: 0 .52rem 0 #d7c8ad, 0 .76rem 1.4rem rgba(89, 57, 16, .19), inset 0 1px rgba(255,255,255,.9);
}
.action-button--gold {
  border: 1px solid var(--gold-deep);
  color: #fffdf8;
  text-shadow: 0 2px 1px rgba(63, 34, 0, .5);
  background: linear-gradient(135deg, #a16616, #d09a38 48%, #a66916);
  box-shadow: 0 .52rem 0 #70420a, 0 .85rem 1.6rem rgba(87, 52, 8, .28), inset 0 1px rgba(255,255,255,.3);
}
.action-button b { font-family: Arial, sans-serif; font-size: 1.6em; font-weight: 400; line-height: 1; }
.action-button:hover, .action-button:focus-visible { filter: brightness(1.06); transform: translateY(-.18rem) translateZ(12px); }
.action-button:active { transform: translateY(.36rem) translateZ(0); box-shadow: 0 .14rem 0 #b8a582, inset 0 2px 4px rgba(84, 48, 1, .18); }
.action-button--gold:active { box-shadow: 0 .14rem 0 #70420a, inset 0 2px 4px rgba(71, 39, 1, .35); }

.founder-name {
  margin: clamp(2.4rem, 5vw, 4rem) -4rem 1rem;
  color: var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.55rem, 4.85vw, 3.1rem);
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
  text-transform: uppercase;
}
.founder-role { font-size: clamp(.72rem, 1.7vw, 1.12rem); letter-spacing: clamp(.18rem, .7vw, .43rem); line-height: 1.9; text-align: center; }
.short-rule { width: min(7rem, 22%); height: 2px; margin: clamp(1.6rem, 3vw, 2.4rem) auto; background: var(--gold); }

.card--login { display: grid; align-content: start; min-height: min(94vh, 92rem); padding-top: clamp(2rem, 5vw, 4rem); }
.card--login .brand-name { font-size: clamp(2.2rem, 7vw, 5.1rem); }
.card--login form { margin-top: clamp(2.8rem, 6vw, 5rem); }
.field { position: relative; display: flex; align-items: center; margin-bottom: clamp(1.3rem, 3vw, 2rem); }
.field input {
  width: 100%;
  height: clamp(4.5rem, 9vw, 6.7rem);
  padding: 0 4.6rem 0 clamp(4.7rem, 9vw, 6.5rem);
  border: 2px solid var(--gold);
  border-radius: .9rem;
  outline: none;
  color: var(--gold-deep);
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 2px 5px rgba(88, 52, 8, .08), 0 .18rem .35rem rgba(88, 52, 8, .1);
  font-size: clamp(1.25rem, 3.3vw, 2rem);
  transition: box-shadow .15s ease, transform .15s ease;
}
.field input::placeholder { color: var(--gold-deep); opacity: 1; }
.field input:focus { transform: translateY(-2px); box-shadow: 0 .4rem .75rem rgba(88, 52, 8, .15), inset 0 2px 5px rgba(88, 52, 8, .08); }
.otp-field { min-width: 0; margin: 0 0 clamp(1.3rem, 3vw, 2rem); padding: 0; border: 0; }
.otp-field[hidden] { display: none !important; }
.otp-field legend { width: 100%; margin-bottom: .7rem; color: var(--gold-deep); font-size: clamp(.9rem, 2vw, 1.15rem); font-weight: 700; text-align: center; }
.otp-inputs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(.35rem, 1.1vw, .75rem); }
.otp-inputs input { width: 100%; min-width: 0; height: clamp(3.5rem, 7vw, 4.7rem); padding: 0; border: 1px solid rgba(174,117,31,.55); border-radius: .7rem; outline: 0; color: var(--gold-deep); background: rgba(255,255,255,.76); box-shadow: inset 0 2px 5px rgba(88,52,8,.08); font-size: clamp(1.45rem, 4vw, 2.2rem); font-weight: 800; text-align: center; transition: box-shadow .15s ease, transform .15s ease; }
.otp-inputs input:focus { transform: translateY(-2px); box-shadow: 0 .4rem .75rem rgba(88,52,8,.15), inset 0 2px 5px rgba(88,52,8,.08); }
html[data-theme="dark"] .otp-inputs input { color: #f7f8fb; background: #101621; }
.field-icon { position: absolute; z-index: 1; left: clamp(1.2rem, 3vw, 2.1rem); display: grid; width: clamp(1.65rem, 3.6vw, 2.35rem); height: clamp(1.65rem, 3.6vw, 2.35rem); place-items: center; color: var(--gold-deep); font-size: clamp(2rem, 4vw, 2.9rem); transform: none; }
.field-svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field-icon--gear { font-family: 'Segoe UI Symbol', Arial, sans-serif; font-size: clamp(1.6rem, 3.2vw, 2.15rem); }
.eye-button { position: absolute; right: clamp(1rem, 2.7vw, 1.8rem); border: 0; color: var(--gold-deep); background: none; font-size: 2rem; transition: transform .15s ease; }
.eye-button:hover, .eye-button:focus-visible { transform: scale(1.12); }
.eye-icon { display: block; width: clamp(1.7rem, 3.5vw, 2.35rem); height: clamp(1.7rem, 3.5vw, 2.35rem); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.eye-icon circle { fill: currentColor; stroke: none; }
.eye-slash { display: none; }
.eye-button.is-visible .eye-slash { display: block; }
.eye-button.is-visible .eye-outline, .eye-button.is-visible .eye-icon circle { opacity: .35; }
.or-rule { margin: clamp(2.4rem, 4.5vw, 3.5rem) 0 0; gap: 1.8rem; }
.or-rule em { color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-style: normal; text-transform: uppercase; }
.create-button { margin-top: clamp(2.2rem, 4.4vw, 3.4rem); }

.card--signup { min-height: min(94vh, 100rem); padding-top: clamp(2.3rem, 5vw, 4rem); }
.brand-block--signup .brand-mark { width: min(100%, 27rem); margin-bottom: .2rem; }
.card--signup .brand-name { font-size: clamp(2.1rem, 6.3vw, 4.3rem); }
.signup-heading { margin: clamp(1.4rem, 3vw, 2.2rem) 0 clamp(1.65rem, 3vw, 2.25rem); }
.card--signup .field { margin-bottom: clamp(.95rem, 2vw, 1.35rem); }
.card--signup .field input { height: clamp(4.1rem, 7.5vw, 5.55rem); font-size: clamp(1.12rem, 2.7vw, 1.65rem); }
.field--with-action input { padding-right: clamp(7.5rem, 19vw, 10.8rem); }
.field--with-action .field-icon { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.field-icon--phone { font-family: Arial, sans-serif; }
.field-action {
  position: absolute;
  right: .55rem;
  min-width: clamp(6.5rem, 15vw, 8.8rem);
  height: calc(100% - 1rem);
  padding: 0 .65rem;
  border: 1px solid var(--gold-deep);
  border-radius: .52rem;
  color: #fffdf8;
  background: linear-gradient(135deg, #9f6415, #c98f2e 55%, #9b6012);
  box-shadow: 0 .2rem 0 #754509, inset 0 1px rgba(255,255,255,.28);
  font-family: var(--sans);
  font-size: clamp(.65rem, 1.5vw, .88rem);
  font-weight: 700;
  letter-spacing: .06rem;
  text-transform: uppercase;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}
.field-action:hover, .field-action:focus-visible { filter: brightness(1.08); transform: translateY(-.1rem); }
.field-action:active { transform: translateY(.16rem); box-shadow: 0 .05rem 0 #754509, inset 0 2px 4px rgba(71,39,1,.3); }
.country-code { position: absolute; z-index: 1; left: clamp(3.45rem, 7vw, 4.85rem); width: clamp(4.2rem, 8vw, 5.3rem); padding: .1rem .15rem .1rem 0; border: 0; border-right: 1px solid rgba(174,117,31,.5); outline: 0; color: var(--gold-deep); background: transparent; font-size: clamp(.9rem, 2.1vw, 1.25rem); font-weight: 700; cursor: pointer; }
.country-code:focus-visible { outline: 2px solid var(--gold); outline-offset: .15rem; }
.phone-input { padding-left: clamp(8.6rem, 16vw, 10.4rem) !important; }
.signup-submit { margin-top: clamp(1.35rem, 3vw, 2.1rem); }

.theme-toggle { position: relative; display: inline-flex; align-items: center; justify-content: space-between; width: 4.25rem; height: 2.25rem; padding: .2rem .4rem; border: 1px solid var(--gold); border-radius: 2rem; color: var(--gold-deep); background: rgba(255,255,255,.82); box-shadow: 0 .2rem .55rem rgba(88,52,8,.1); transition: background .18s ease, transform .18s ease, box-shadow .18s ease; }
.theme-toggle { display: none !important; }
.theme-toggle::after { content: ''; position: absolute; top: .21rem; left: .22rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: linear-gradient(145deg, #d7a044, #985d12); box-shadow: 0 .1rem .28rem rgba(72,42,3,.28); transition: transform .22s ease; }
.theme-toggle span { position: relative; z-index: 1; font-family: Arial, sans-serif; font-size: .78rem; line-height: 1; }.theme-toggle span:last-child { color: #66461e; }
.theme-toggle:hover, .theme-toggle:focus-visible { outline: 0; box-shadow: 0 .35rem .8rem rgba(88,52,8,.18); transform: translateY(-.1rem); }.theme-toggle:active { transform: translateY(.05rem); }
.theme-toggle--public { position: fixed; z-index: 8; top: 1.2rem; right: 1.2rem; }.theme-toggle--dashboard { flex: 0 0 auto; }.dashboard-mode .theme-toggle--public { display: none; }
html[data-theme="dark"] .theme-toggle { background: #21180d; }.theme-toggle[aria-pressed="true"]::after { transform: translateX(1.98rem); }

.dashboard-screen { width: 100%; }
body.dashboard-mode .site-shell { display: block; padding: 0; perspective: none; }
.dashboard-layout { display: grid; grid-template-columns: minmax(17rem, 23rem) minmax(0, 1fr); min-height: 100vh; color: var(--gold-deep); background: #fbf8f0; }
.dashboard-sidebar { position: relative; z-index: 2; padding: 1.7rem 1.35rem 2rem; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(249,245,233,.88)); box-shadow: .4rem 0 1.6rem rgba(93,59,10,.04); transition: width .24s ease, padding .24s ease; }
.dashboard-layout.is-collapsed { grid-template-columns: 5.7rem minmax(0, 1fr); }
.dashboard-layout.is-collapsed .dashboard-sidebar { padding-right: .55rem; padding-left: .55rem; }
.dashboard-layout.is-collapsed .sidebar-brand h1, .dashboard-layout.is-collapsed .sidebar-brand p, .dashboard-layout.is-collapsed .sidebar-brand small, .dashboard-layout.is-collapsed .dashboard-nav button span { display: none; }
.dashboard-layout.is-collapsed .sidebar-brand img { width: 3.65rem; }.dashboard-layout.is-collapsed .dashboard-nav button { grid-template-columns: 1fr; justify-items: center; padding: .35rem; }.dashboard-layout.is-collapsed .dashboard-nav button:hover, .dashboard-layout.is-collapsed .dashboard-nav button:focus-visible { transform: translateX(.08rem); }
.sidebar-top { height: 2.5rem; }
.sidebar-toggle { border: 0; padding: .1rem .45rem; color: var(--gold-deep); background: transparent; font-size: 2rem; line-height: 1; transition: color .16s ease, transform .16s ease; }
.sidebar-toggle:hover, .sidebar-toggle:focus-visible { color: #c48320; transform: scale(1.08); }
.sidebar-brand { margin: .3rem auto 1.45rem; text-align: center; }
.sidebar-brand img { display: block; width: min(100%, 10rem); margin: 0 auto .35rem; mix-blend-mode: multiply; }
.sidebar-brand h1 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.45rem, 2.25vw, 2rem); font-weight: 600; letter-spacing: -.055em; line-height: 1; }
.sidebar-brand p { position: relative; display: inline-block; margin: .4rem 0 0; padding: 0 2.1rem; color: var(--gold-deep); font-size: .66rem; font-weight: 800; letter-spacing: .28rem; text-transform: uppercase; }
.sidebar-brand p::before, .sidebar-brand p::after { content: ''; position: absolute; top: 50%; width: 1.55rem; height: 1px; background: var(--gold); }
.sidebar-brand p::before { left: 0; }.sidebar-brand p::after { right: 0; }
.sidebar-brand small { display: block; margin-top: .6rem; font-size: .62rem; font-weight: 800; letter-spacing: .11rem; }
.dashboard-nav { display: grid; gap: .42rem; }
.local-preview-button { display: inline-flex; justify-content: center; width: 100%; margin-top: .85rem; padding: .55rem .75rem; border: 1px dashed rgba(174,117,31,.76); border-radius: .34rem; color: var(--gold-deep); background: transparent; font: inherit; font-size: .75rem; font-weight: 700; cursor: pointer; }
.local-preview-button:hover, .local-preview-button:focus-visible { color: #fffdf8; background: var(--gold-deep); outline: 0; }

/* Keep every real screen and its controls, while hiding only the temporary sample records. */
.preview-data-cleared .account-summary-grid,
.preview-data-cleared .account-list,
.preview-data-cleared .client-account-groups,
.preview-data-cleared .account-row--mount,
.preview-data-cleared .bot-summary-grid,
.preview-data-cleared .server-banner,
.preview-data-cleared .bot-library-grid,
.preview-data-cleared .bot-assignment-list > .bot-assignment-row,
.preview-data-cleared .approval-row,
.preview-data-cleared .server-health-card,
.preview-data-cleared .bot-logs-panel,
.preview-data-cleared .finance-summary-grid,
.preview-data-cleared .finance-document-grid,
.preview-data-cleared .stats-equity-chart,
.preview-data-cleared .trade-table-wrap tbody,
.preview-data-cleared [data-client-account] { display: none !important; }
.dashboard-nav button { display: grid; grid-template-columns: 2.9rem 1fr; align-items: center; width: 100%; min-height: 3.35rem; padding: .35rem .7rem; border: 1px solid rgba(174,117,31,.82); border-radius: .34rem; color: var(--gold-deep); background: rgba(255,255,255,.28); text-align: left; font-size: clamp(.84rem, 1.35vw, 1.02rem); transition: transform .16s ease, color .16s ease, background .16s ease, box-shadow .16s ease; }
.dashboard-nav button i { color: var(--gold-deep); font-family: Georgia, serif; font-size: 1.55rem; font-style: normal; text-align: center; transition: transform .16s ease; }
.dashboard-nav button:hover, .dashboard-nav button:focus-visible, .dashboard-nav button.is-active { color: #fffdf8; outline: 0; background: linear-gradient(135deg, #956019, #c48c2f 54%, #a06516); box-shadow: 0 .35rem .75rem rgba(122,79,12,.18); transform: translateX(.18rem); }
.dashboard-nav button:hover i, .dashboard-nav button:focus-visible i, .dashboard-nav button.is-active i { color: #fffdf8; transform: scale(1.12); }
.dashboard-main { position: relative; overflow: hidden; min-width: 0; padding: 1.8rem clamp(1.5rem, 3vw, 3rem); background: radial-gradient(ellipse at 45% 38%, rgba(255,255,255,.95), rgba(255,255,255,.35) 52%, rgba(239,228,202,.35) 100%), linear-gradient(140deg, #fcfaf4, #f6f0e4); }
.dashboard-main::after { content: ''; position: absolute; z-index: 0; right: -10%; bottom: -5%; left: 0; height: 25%; pointer-events: none; opacity: .28; background: linear-gradient(155deg, transparent 26%, rgba(195,169,118,.26) 27% 42%, transparent 43%), linear-gradient(24deg, transparent 33%, rgba(204,181,137,.28) 34% 48%, transparent 49%); }
.dashboard-toolbar { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 1.25rem; }
.dashboard-search { display: flex; align-items: center; min-width: 0; height: 4.2rem; padding: 0 1.2rem; border: 1px solid var(--gold); border-radius: 2.3rem; background: rgba(255,255,255,.36); transition: box-shadow .16s ease, background .16s ease; }
.dashboard-search:focus-within { background: rgba(255,255,255,.76); box-shadow: 0 0 0 .22rem rgba(190,134,42,.17); }
.dashboard-search span { margin-right: .9rem; color: var(--gold-deep); font-family: Georgia, serif; font-size: 2.7rem; line-height: 1; transform: rotate(-18deg); }
.dashboard-search input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--gold-deep); background: transparent; font-size: 1rem; }
.dashboard-search input::placeholder { color: var(--gold-deep); opacity: 1; }
.round-tool, .logout-tool { height: 4.2rem; border: 1px solid var(--gold); color: var(--gold-deep); background: rgba(255,255,255,.32); transition: transform .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease; }
.round-tool { width: 4.2rem; border-radius: 50%; font-size: 1.6rem; }
.logout-tool { display: inline-flex; align-items: center; gap: .7rem; padding: 0 1.35rem; border-radius: .55rem; font-size: 1rem; }
.logout-tool span { font-size: 2rem; line-height: 1; }
.round-tool:hover, .round-tool:focus-visible, .logout-tool:hover, .logout-tool:focus-visible { outline: 0; color: #fffdf8; background: var(--gold-deep); box-shadow: 0 .35rem .8rem rgba(111,72,10,.18); transform: translateY(-.15rem); }
.round-tool:active, .logout-tool:active, .dashboard-nav button:active { transform: translateY(.08rem); }
.dashboard-hero { position: relative; z-index: 1; display: grid; place-items: center; align-content: center; min-height: calc(100vh - 8rem); padding-bottom: 4rem; text-align: center; }
.dashboard-hero img { width: min(72%, 39rem); max-height: 36rem; object-fit: contain; mix-blend-mode: multiply; filter: drop-shadow(0 .7rem .65rem rgba(126,85,16,.07)); }
.dashboard-hero h2 { margin: -1rem 0 0; color: var(--gold); font-family: var(--serif); font-size: clamp(3rem, 7.4vw, 7rem); font-weight: 500; letter-spacing: -.075em; line-height: .94; }
.dashboard-hero p { position: relative; margin: .9rem 0 0; padding: 0 6.6rem; color: var(--gold-deep); font-size: clamp(.75rem, 1.75vw, 1.45rem); font-weight: 600; letter-spacing: clamp(.17rem, .7vw, .57rem); text-transform: uppercase; }
.dashboard-hero p::before, .dashboard-hero p::after { content: ''; position: absolute; top: 52%; width: 5rem; height: 2px; background: var(--gold); }.dashboard-hero p::before { left: 0; }.dashboard-hero p::after { right: 0; }
.dashboard-detail, .dashboard-management { position: relative; z-index: 1; max-width: 65rem; margin: clamp(3rem, 11vh, 8rem) auto; padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; background: rgba(255,255,255,.58); box-shadow: 0 1.2rem 3rem rgba(111,72,10,.09); }
.about-us-screen { display: grid; gap: 1.2rem; width: min(100%, 62rem); margin: 1.35rem auto; }
.about-us-screen[hidden] { display: none; }
.dashboard-detail h2 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.7rem); font-weight: 500; }.dashboard-detail p { max-width: 45rem; margin: .8rem 0 0; font-size: 1rem; line-height: 1.6; }.member-note { color: var(--gold-deep); font-size: .75rem !important; font-weight: 800; letter-spacing: .1rem; text-transform: uppercase; }
.dashboard-management { display: grid; gap: 1.1rem; max-width: 74rem; margin-top: 3rem; }
.dashboard-panel { padding: clamp(1rem, 2.5vw, 1.45rem); border: 1px solid rgba(174, 117, 31, .72); border-radius: .65rem; background: rgba(255,255,255,.5); box-shadow: inset 0 1px rgba(255,255,255,.8), 0 .25rem .7rem rgba(88, 52, 8, .08); }
.dashboard-panel h2 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.8rem); font-weight: 500; }.dashboard-panel p { margin: .55rem 0 0; font-size: clamp(.82rem, 1.55vw, 1rem); line-height: 1.55; }
.compact-form { display: grid; grid-template-columns: 1fr auto auto; gap: .65rem; margin-top: 1rem; }.compact-form input, .compact-form select { min-width: 0; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid var(--gold); border-radius: .4rem; outline: none; color: var(--gold-deep); background: rgba(255,255,255,.7); }
.dashboard-button, .text-button { border: 1px solid var(--gold-deep); border-radius: .4rem; color: #fffdf8; background: linear-gradient(135deg, #9f6415, #c98f2e 55%, #9b6012); font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .04rem; text-transform: uppercase; cursor: pointer; transition: transform .16s ease, filter .16s ease; }.dashboard-button:hover, .text-button:hover { filter: brightness(1.09); transform: translateY(-.1rem); }.dashboard-button { min-height: 2.7rem; padding: .45rem .75rem; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }.text-button { padding: .42rem .65rem; }.dashboard-list { display: grid; gap: .65rem; margin-top: 1rem; }.dashboard-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .8rem; padding: .75rem; border: 1px solid rgba(174,117,31,.42); border-radius: .45rem; background: rgba(255,255,255,.55); }.dashboard-row span { display: block; margin-top: .25rem; color: var(--gold-deep); font-size: .7rem; font-weight: 700; letter-spacing: .04rem; text-transform: uppercase; }.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }.row-action { min-height: 2.2rem; padding: .35rem .55rem; border: 1px solid var(--gold-deep); border-radius: .35rem; color: var(--gold-deep); background: rgba(255,255,255,.7); font-size: .68rem; font-weight: 700; letter-spacing: .04rem; text-transform: uppercase; cursor: pointer; transition: transform .16s ease, background .16s ease; }.row-action:hover { transform: translateY(-.08rem); background: #fff; }.row-action--approve { color: #fffdf8; background: linear-gradient(135deg, #9f6415, #c98f2e 55%, #9b6012); }.dashboard-empty { margin: .25rem 0 0; color: var(--gold-deep); font-size: .82rem; }

html[data-theme="dark"] { --ink: #f7efdf; --paper: #1d160d; background: #181209; }
html[data-theme="dark"] body { background: radial-gradient(circle at 50% 18%, #342718 0, #1a140c 50%, #0f0b06 110%); }
html[data-theme="dark"] .paper-card { background: radial-gradient(ellipse at 51% 48%, rgba(72,55,31,.9) 0%, rgba(31,23,13,.96) 58%, rgba(12,9,5,.98) 100%); box-shadow: 0 1.7rem 3rem rgba(0,0,0,.4), inset 0 0 3rem rgba(181,137,62,.08); }
html[data-theme="dark"] .field input, html[data-theme="dark"] .compact-form input, html[data-theme="dark"] .compact-form select { color: #f5d89c; background: rgba(28,21,12,.84); }
html[data-theme="dark"] .dashboard-layout { background: #161008; }
html[data-theme="dark"] .dashboard-sidebar { background: linear-gradient(145deg, #241b0f, #171108); box-shadow: .4rem 0 1.6rem rgba(0,0,0,.18); }
html[data-theme="dark"] .dashboard-main { background: radial-gradient(ellipse at 45% 38%, rgba(68,51,29,.88), rgba(29,22,13,.94) 55%, rgba(13,10,6,.98) 100%); }
html[data-theme="dark"] .dashboard-main::after { opacity: .14; }
html[data-theme="dark"] .dashboard-search, html[data-theme="dark"] .round-tool, html[data-theme="dark"] .logout-tool { background: rgba(34,25,14,.76); }
html[data-theme="dark"] .dashboard-nav button { background: rgba(27,20,11,.62); }
html[data-theme="dark"] .dashboard-detail, html[data-theme="dark"] .dashboard-management, html[data-theme="dark"] .dashboard-panel, html[data-theme="dark"] .dashboard-row { background: rgba(37,28,16,.82); box-shadow: 0 1.2rem 3rem rgba(0,0,0,.23); }
html[data-theme="dark"] .row-action { color: #f5d89c; background: rgba(29,21,12,.92); }

.toast { position: fixed; z-index: 80; bottom: 1.5rem; left: 50%; max-width: min(calc(100vw - 2rem), 38rem); margin: 0; padding: .78rem 1.1rem; border-radius: .45rem; color: #fff; background: var(--ink); box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.2); font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 1rem); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
html[data-theme="dark"] .toast { color: #fffaf0; background: #101621; border: 1px solid rgba(213,164,75,.86); box-shadow: 0 .8rem 2rem rgba(0,0,0,.62), 0 0 1rem rgba(213,164,75,.14); }
.app-dialog[hidden] { display: none; }
.app-dialog { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 1rem; }
.app-dialog__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
.app-dialog__card { position: relative; width: min(100%, 29rem); margin: 0; padding: 1.3rem; border: 1px solid rgba(213,164,75,.88); border-radius: .65rem; color: #fffaf0; background: #101621; box-shadow: 0 1rem 3rem rgba(0,0,0,.68), 0 0 1.3rem rgba(213,164,75,.12); }
.app-dialog__card h2 { margin: 0 0 .55rem; font-size: 1.2rem; color: #f5d89c; }
.app-dialog__card p { margin: 0; color: #e9dfcd; line-height: 1.55; }
.app-dialog__field { display: grid; gap: .4rem; margin-top: 1rem; color: #f5d89c; font-weight: 700; }
.app-dialog__field input { width: 100%; padding: .72rem .8rem; border: 1px solid rgba(213,164,75,.75); border-radius: .4rem; color: #fffaf0; background: #070b12; font: inherit; }
.app-dialog__actions { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.25rem; }
.dashboard-button--ghost { color: #f5d89c; background: transparent; border-color: rgba(213,164,75,.72); }
.dashboard-button--danger { color: #fff; background: #9c2f32; border-color: #d65a5e; }
.member-profile-popover[hidden] { display: none; }
.member-profile-popover { position: fixed; z-index: 101; inset: 0; display: grid; place-items: center; padding: 1rem; }
.member-profile-popover__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }
.member-profile-popover__card { position: relative; display: grid; justify-items: center; width: min(100%, 20rem); padding: 1.35rem; border: 1px solid rgba(213,164,75,.86); border-radius: .65rem; color: #fffaf0; background: #101621; box-shadow: 0 1rem 3rem rgba(0,0,0,.68), 0 0 1.3rem rgba(213,164,75,.12); text-align: center; }
.member-profile-popover__close { position: absolute; top: .5rem; right: .55rem; width: 2rem; height: 2rem; border: 0; border-radius: .35rem; color: #f5d89c; background: transparent; font: inherit; font-size: 1.35rem; cursor: pointer; }
.member-profile-popover__close:hover, .member-profile-popover__close:focus-visible { color: #fff; background: rgba(213,164,75,.2); outline: none; }
.member-profile-popover__avatar { width: 5.3rem; height: 5.3rem; margin-bottom: .75rem; border: 1px solid rgba(213,164,75,.76); border-radius: 50%; object-fit: cover; background: #070b12; }
.member-profile-popover__card h2 { margin: 0; color: #fffaf0; font-size: 1.3rem; }
.member-profile-popover__username { margin: .3rem 0 1rem; color: #f5d89c; font-weight: 700; }
.member-profile-popover__card dl { display: grid; width: 100%; gap: .55rem; margin: 0; text-align: left; }
.member-profile-popover__card dl div { display: grid; gap: .12rem; padding-top: .55rem; border-top: 1px solid rgba(213,164,75,.25); }
.member-profile-popover__card dt { color: #f5d89c; font-size: .66rem; font-weight: 800; letter-spacing: .06rem; text-transform: uppercase; }
.member-profile-popover__card dd { margin: 0; overflow-wrap: anywhere; color: #fffaf0; font-size: .82rem; }
.member-profile-popover__friend { width:100%; margin-top:1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 38rem) {
  .site-shell { padding: .45rem; }
  .paper-card { min-height: calc(100vh - .9rem); padding-left: 1.35rem; padding-right: 1.35rem; }
  .brand-mark, .brand-block--founder .brand-mark { margin-bottom: .15rem; }
  .founder-name { margin-right: 0; margin-left: 0; }
  .eyebrow-rule--diamond p::before, .eyebrow-rule--diamond p::after { display: none; }
  .card--signup .paper-card { padding-left: 1.05rem; padding-right: 1.05rem; }
  .field-action { right: .35rem; min-width: 5.7rem; }
  .field--with-action input { padding-right: 6.25rem; }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-sidebar { padding: 1rem; }
  .sidebar-top { height: auto; }
  .sidebar-brand { display: none; }
  .dashboard-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .7rem; }
  .dashboard-nav button { grid-template-columns: 1.8rem 1fr; min-height: 2.8rem; padding: .3rem .4rem; font-size: .72rem; }
  .dashboard-nav button i { font-size: 1.15rem; }
  .dashboard-main { padding: 1rem; }
  .dashboard-toolbar { gap: .65rem; }
  .dashboard-search, .round-tool, .logout-tool { height: 3.25rem; }
  .round-tool { width: 3.25rem; }
  .logout-tool { padding: 0 .7rem; font-size: .78rem; }
  .logout-tool span { font-size: 1.5rem; }
  .dashboard-search span { margin-right: .5rem; font-size: 2rem; }
  .dashboard-hero { min-height: 68vh; }
  .dashboard-hero img { width: min(100%, 25rem); }
  .dashboard-hero h2 { font-size: clamp(2.55rem, 12vw, 4.3rem); }
  .dashboard-hero p { padding: 0 3.3rem; font-size: .62rem; letter-spacing: .18rem; }
  .dashboard-hero p::before, .dashboard-hero p::after { width: 2.45rem; }
  .compact-form { grid-template-columns: 1fr; }
  .dashboard-row { grid-template-columns: 1fr; }
  .row-actions { justify-content: flex-start; }
}

/* Dashboard layout refresh: dedicated Home screen, fixed mobile sidebar, and crisp dark mode. */
.brand-mark, .sidebar-brand img, .dashboard-hero img { mix-blend-mode: normal; }
.dashboard-layout { grid-template-columns: minmax(17rem, 20rem) minmax(0, 1fr); min-height: 100vh; color: var(--gold-deep); background: #fbf8f0; }
.dashboard-sidebar { position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto; padding: 1.35rem 1.15rem 1.75rem; border: 0; border-right: 1px solid var(--line); background: #fcfaf4; box-shadow: none; }
.sidebar-top { display: none; }
.sidebar-brand { margin: 0 auto 1.25rem; }
.sidebar-brand img { width: min(100%, 8.5rem); margin-bottom: .25rem; }
.sidebar-brand h1 { font-size: clamp(1.35rem, 2vw, 1.75rem); }
.sidebar-brand p { margin-top: .32rem; }
.dashboard-nav { gap: .5rem; }
.dashboard-nav button { display: block; min-height: 3.1rem; padding: .55rem .75rem; border-radius: .4rem; color: var(--gold-deep); background: #fffdf8; text-align: left; font-size: clamp(.82rem, 1.15vw, .98rem); font-weight: 700; }
.dashboard-nav button:hover, .dashboard-nav button:focus-visible, .dashboard-nav button.is-active { color: #fffdf8; background: linear-gradient(135deg, #956019, #c48c2f 54%, #a06516); box-shadow: 0 .25rem .55rem rgba(122,79,12,.15); transform: translateX(.14rem); }
.dashboard-main { min-height: 100vh; padding: 1.4rem clamp(1.2rem, 3vw, 2.6rem); background: #fcfaf4; }
.dashboard-main::after { display: none; }
/* These sections have grid display styles, so enforce the browser's hidden state. */
.dashboard-hero[hidden],
.dashboard-detail[hidden],
.dashboard-management[hidden] { display: none !important; }
.dashboard-toolbar { gap: .9rem; }
.dashboard-search { height: 3.6rem; background: #fffdf8; }
.dashboard-search svg { flex: 0 0 auto; width: 1.65rem; height: 1.65rem; margin-right: .75rem; fill: none; stroke: var(--gold-deep); stroke-width: 2; stroke-linecap: round; }
.dashboard-search span { display: none; }
.round-tool, .logout-tool { height: 3.6rem; background: #fffdf8; }
.round-tool { display: grid; width: 3.6rem; place-items: center; }
.round-tool svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-greeting { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 1rem; max-width: 72rem; margin: 1rem auto 0; padding: .92rem 1.05rem; border: 1px solid rgba(174,117,31,.5); border-radius: .55rem; color: var(--gold-deep); background: linear-gradient(105deg, #fffdf8, #f5ead5); box-shadow: 0 .25rem .65rem rgba(111,72,10,.06); }
.dashboard-greeting p { margin: 0; font-family: var(--serif); font-size: clamp(1.15rem, 2.5vw, 1.65rem); font-weight: 500; }
.dashboard-greeting small { display: block; margin-top: .18rem; font-size: .72rem; font-weight: 800; letter-spacing: .03rem; }
.dashboard-greeting small b { display: inline-flex; align-items: center; margin-left: .48rem; padding-left: .48rem; border-left: 1px solid rgba(174,117,31,.5); color: var(--gold-deep); font-size: .64rem; letter-spacing: .06rem; text-transform: uppercase; }
.dashboard-clock { display: flex; flex: 0 0 auto; align-items: center; gap: .45rem; }
.dashboard-greeting time { color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.55rem, 3vw, 2.2rem); font-variant-numeric: tabular-nums; }
.dashboard-clock select { max-width: 10.5rem; min-height: 1.8rem; padding: .2rem .4rem; border: 1px solid rgba(174,117,31,.65); border-radius: 999px; color: var(--gold-deep); background: rgba(255,255,255,.64); font: inherit; font-size: .6rem; font-weight: 800; cursor: pointer; }
.dashboard-clock select:focus { outline: 0; box-shadow: 0 0 0 .18rem rgba(190,134,42,.16); }
.logout-tool { padding: 0 1rem; font-size: .86rem; font-weight: 700; }
.logout-tool span { display: none; }
.dashboard-hero { min-height: calc(100vh - 6.5rem); padding: 2rem 0 3rem; }
.dashboard-hero img { width: min(76%, 34rem); max-height: 32rem; filter: drop-shadow(0 .45rem .45rem rgba(126,85,16,.1)); }
.dashboard-hero h2 { margin: -.6rem 0 0; }
.dashboard-hero p { margin-top: .65rem; }
.dashboard-detail, .dashboard-management { max-width: 72rem; min-height: min(34rem, calc(100vh - 8rem)); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.dashboard-management { gap: 1.1rem; }
.dashboard-panel { background: #fffefb; }
.row-action--edit { display: inline-flex; align-items: center; gap: .35rem; }
.row-action--edit svg { width: .9rem; height: .9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-action--edit span { display: inline; margin: 0; color: inherit; font: inherit; letter-spacing: inherit; }
.row-action--save { color: #fffdf8; background: linear-gradient(135deg, #9f6415, #c98f2e 55%, #9b6012); }
.row-action--delete { color: #9f1f1f; border-color: #b64b4b; background: #fff4f4; }
.row-action--delete:hover { background: #ffe5e5; }
.dashboard-row select:disabled { cursor: default; opacity: .78; }

html[data-theme="dark"] { --ink: #f7f8fb; --paper: #070a10; background: #02040a; }
html[data-theme="dark"] body { color: #f7f8fb; background: #02040a; }
html[data-theme="dark"] .paper-card { background: #090d16; box-shadow: 0 1.2rem 2.6rem rgba(0,0,0,.46); }
html[data-theme="dark"] .paper-card::before { border-color: rgba(174,117,31,.3); }
html[data-theme="dark"] .copy, html[data-theme="dark"] .copy strong, html[data-theme="dark"] .eyebrow-rule p, html[data-theme="dark"] .motto, html[data-theme="dark"] .founder-role, html[data-theme="dark"] .or-rule em, html[data-theme="dark"] .founder-name { color: #f7f8fb; }
html[data-theme="dark"] .back-button, html[data-theme="dark"] .action-button--outline { color: #f7f8fb; background: #121824; box-shadow: 0 .22rem 0 #030509, 0 .45rem 1rem rgba(0,0,0,.34); }
html[data-theme="dark"] .field input, html[data-theme="dark"] .compact-form input, html[data-theme="dark"] .compact-form select { color: #f7f8fb; background: #101621; }
html[data-theme="dark"] .field input::placeholder, html[data-theme="dark"] .dashboard-search input::placeholder { color: #f7f8fb; }
html[data-theme="dark"] .field-icon, html[data-theme="dark"] .eye-button { color: #f7f8fb; }
html[data-theme="dark"] .dashboard-layout { color: #f7f8fb; background: #02040a; }
html[data-theme="dark"] .dashboard-sidebar { background: #070a10; border-right-color: rgba(174,117,31,.55); }
html[data-theme="dark"] .sidebar-brand h1 { color: var(--gold); }
html[data-theme="dark"] .sidebar-brand p, html[data-theme="dark"] .sidebar-brand small { color: #f7f8fb; }
html[data-theme="dark"] .dashboard-main { background: #02040a; }
html[data-theme="dark"] .dashboard-search, html[data-theme="dark"] .round-tool, html[data-theme="dark"] .logout-tool { color: #f7f8fb; background: #101621; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .dashboard-search input { color: #f7f8fb; }
html[data-theme="dark"] .dashboard-search svg { stroke: #f7f8fb; }
html[data-theme="dark"] .dashboard-nav button { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); }
html[data-theme="dark"] .dashboard-nav button:hover, html[data-theme="dark"] .dashboard-nav button:focus-visible, html[data-theme="dark"] .dashboard-nav button.is-active { color: #fff; background: #353d49; box-shadow: none; }
html[data-theme="dark"] .dashboard-detail, html[data-theme="dark"] .dashboard-management, html[data-theme="dark"] .dashboard-panel, html[data-theme="dark"] .dashboard-row { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .dashboard-detail h2, html[data-theme="dark"] .dashboard-detail p, html[data-theme="dark"] .dashboard-panel h2, html[data-theme="dark"] .dashboard-panel p, html[data-theme="dark"] .dashboard-row span, html[data-theme="dark"] .dashboard-empty, html[data-theme="dark"] .member-note { color: #f7f8fb; }
html[data-theme="dark"] .dashboard-hero h2 { color: var(--gold); }
html[data-theme="dark"] .dashboard-hero p { color: #f7f8fb; }
html[data-theme="dark"] .row-action { color: #f7f8fb; background: #1a2230; border-color: rgba(174,117,31,.7); }
html[data-theme="dark"] .row-action--approve, html[data-theme="dark"] .row-action--save { color: #fff; background: #a96e19; }
html[data-theme="dark"] .row-action--delete { color: #ffd0d0; border-color: #a94a4a; background: #4a1717; }
html[data-theme="dark"] .theme-toggle { color: #f7f8fb; background: #101621; }

@media (max-width: 38rem) {
  .dashboard-layout { grid-template-columns: 9.4rem minmax(0, 1fr); }
  .dashboard-sidebar { height: 100dvh; padding: .75rem .48rem 1rem; }
  .sidebar-brand { display: block; margin-bottom: .8rem; }
  .sidebar-brand img { width: min(100%, 4.7rem); margin-bottom: .16rem; }
  .sidebar-brand h1 { font-size: .98rem; line-height: 1.02; }
  .sidebar-brand p { margin-top: .25rem; padding: 0; font-size: .5rem; letter-spacing: .16rem; }
  .sidebar-brand p::before, .sidebar-brand p::after { display: none; }
  .sidebar-brand small { margin-top: .35rem; font-size: .47rem; letter-spacing: .04rem; }
  .dashboard-nav { grid-template-columns: 1fr; gap: .35rem; margin-top: 0; }
  .dashboard-nav button { min-height: 2.45rem; padding: .34rem .35rem; text-align: center; font-size: .66rem; line-height: 1.12; }
  .dashboard-nav button:hover, .dashboard-nav button:focus-visible, .dashboard-nav button.is-active { transform: none; }
  .dashboard-main { padding: .75rem; }
  .dashboard-toolbar { grid-template-columns: minmax(0, 1fr) auto auto auto; gap: .38rem; }
  .dashboard-search { grid-column: 1 / -1; height: 2.8rem; padding: 0 .72rem; }
  .dashboard-search svg { width: 1.15rem; height: 1.15rem; margin-right: .45rem; }
  .dashboard-search input { font-size: .72rem; }
  .round-tool, .logout-tool { height: 2.55rem; }
  .round-tool { width: 2.55rem; }
  .round-tool svg { width: 1.15rem; height: 1.15rem; }
  .theme-toggle { width: 3.35rem; height: 2.05rem; }
  .theme-toggle::after { width: 1.55rem; height: 1.55rem; }
  .theme-toggle[aria-pressed="true"]::after { transform: translateX(1.46rem); }
  .theme-toggle span { font-size: .62rem; }
  .logout-tool { padding: 0 .48rem; font-size: .63rem; }
  .dashboard-hero { min-height: calc(100dvh - 7.3rem); padding: 1rem 0 2rem; }
  .dashboard-hero img { width: min(100%, 15rem); max-height: 16rem; }
  .dashboard-hero h2 { margin-top: -.2rem; font-size: clamp(1.65rem, 8vw, 2.3rem); line-height: .95; }
  .dashboard-hero p { padding: 0; font-size: .52rem; letter-spacing: .16rem; }
  .dashboard-hero p::before, .dashboard-hero p::after { display: none; }
  .dashboard-detail, .dashboard-management { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; }
  .about-us-screen { width: 100%; margin: .8rem 0; }
  .dashboard-detail h2 { font-size: 1.55rem; }
  .dashboard-panel { padding: .8rem; }
  .dashboard-panel h2 { font-size: 1.25rem; }
  .dashboard-panel p { font-size: .74rem; }
  .compact-form { gap: .45rem; }
  .dashboard-row { padding: .65rem; }
  .dashboard-row strong { font-size: .75rem; overflow-wrap: anywhere; }
  .dashboard-row span { font-size: .58rem; }
  .row-actions { gap: .32rem; }
  .row-actions select, .row-action { min-height: 2rem; font-size: .6rem; }
}

@media (max-width: 23rem) {
  .dashboard-layout { grid-template-columns: 8.15rem minmax(0, 1fr); }
  .dashboard-nav button { font-size: .59rem; }
  .sidebar-brand h1 { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Persistent greeting and official contact page. */
.contact-us-screen { position: relative; z-index: 1; display: grid; gap: 1rem; width: min(100%, 62rem); margin: 1.35rem auto; padding: clamp(1.1rem, 3vw, 1.7rem); border: 1px solid rgba(174,117,31,.6); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .8rem 1.8rem rgba(111,72,10,.07); }
.contact-us-screen[hidden], [data-support-centre][hidden] { display: none !important; }
.contact-us-heading, .contact-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.contact-us-heading h2, .contact-editor-heading h3 { margin: .1rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 500; }
.contact-editor-heading h3 { font-size: clamp(1.25rem, 2.6vw, 1.65rem); }
.contact-us-heading p:not(.section-label), .contact-editor-heading p:not(.section-label) { max-width: 42rem; margin: .45rem 0 0; font-size: .86rem; line-height: 1.55; }
.account-role-card h3 { margin: .12rem 0 .35rem; color: var(--gold-deep); font-family: var(--serif); font-size: 1.65rem; font-weight: 500; }
.contact-edit-button { white-space: nowrap; }
.contact-channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.contact-channel { display: grid; gap: .28rem; min-height: 8.1rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .5rem; color: var(--gold-deep); background: linear-gradient(135deg, #fffefb, #f6eddb); text-decoration: none; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.contact-channel:hover, .contact-channel:focus-visible { outline: 0; color: #fff; background: var(--gold-deep); box-shadow: 0 .35rem .75rem rgba(111,72,10,.16); transform: translateY(-.12rem); }
.contact-channel span { font-size: .68rem; font-weight: 800; letter-spacing: .07rem; text-transform: uppercase; }
.contact-channel strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.contact-channel small { margin-top: auto; font-size: .7rem; font-weight: 800; }
.contact-empty { margin: 0; padding: 1rem; border: 1px dashed rgba(174,117,31,.55); border-radius: .45rem; text-align: center; font-size: .82rem; font-weight: 700; }
.contact-edit-panel { display: grid; gap: .9rem; padding: 1rem; border: 1px dashed rgba(174,117,31,.7); border-radius: .5rem; background: #fffefb; }
.contact-edit-panel[hidden] { display: none !important; }
.contact-editor-list { display: grid; gap: .7rem; }
.contact-editor-row { display: grid; grid-template-columns: 1fr 1.4fr auto; align-items: end; gap: .65rem; padding: .7rem; border: 1px solid rgba(174,117,31,.32); border-radius: .42rem; }
.contact-editor-row label { display: grid; gap: .32rem; color: var(--gold-deep); font-size: .66rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.contact-editor-row input { width: 100%; min-height: 2.65rem; padding: .5rem .65rem; border: 1px solid rgba(174,117,31,.64); border-radius: .38rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .8rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.contact-editor-row input:focus { outline: 0; box-shadow: 0 0 0 .2rem rgba(190,134,42,.16); }
.contact-editor-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
html[data-theme="dark"] .dashboard-greeting, html[data-theme="dark"] .contact-us-screen, html[data-theme="dark"] .contact-channel, html[data-theme="dark"] .contact-edit-panel { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .dashboard-greeting p, html[data-theme="dark"] .dashboard-greeting time, html[data-theme="dark"] .contact-us-heading h2, html[data-theme="dark"] .contact-editor-heading h3, html[data-theme="dark"] .contact-channel, html[data-theme="dark"] .contact-editor-grid label { color: #f7f8fb; }
html[data-theme="dark"] .dashboard-greeting small b, html[data-theme="dark"] .account-role-card h3 { color: #f7f8fb; }
html[data-theme="dark"] .dashboard-clock select { color: #f7f8fb; background: #101621; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .contact-channel:hover, html[data-theme="dark"] .contact-channel:focus-visible { color: #fff; background: #353d49; }
html[data-theme="dark"] .contact-editor-row input { color: #f7f8fb; background: #101621; border-color: rgba(174,117,31,.72); }

/* Overview: live broker data is supplied by the server once an account is connected. */
.overview-screen { display: grid; gap: 1rem; width: min(100%, 76rem); margin: 1.35rem auto 2rem; color: var(--gold-deep); }
.overview-heading, .overview-panel { padding: clamp(1rem, 2.5vw, 1.45rem); border: 1px solid rgba(174,117,31,.52); border-radius: .72rem; background: #fffdf8; box-shadow: 0 .8rem 1.8rem rgba(111,72,10,.07); }
.overview-heading, .overview-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.overview-heading h2, .overview-panel-heading h3 { margin: .1rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.65rem, 3vw, 2.25rem); font-weight: 500; }
.overview-panel-heading h3 { font-size: clamp(1.2rem, 2.5vw, 1.55rem); }
.overview-heading p:not(.section-label), .overview-panel-heading p:not(.section-label) { margin: .4rem 0 0; font-size: .82rem; line-height: 1.5; }
.overview-sync-state, .overview-count { flex: 0 0 auto; padding: .42rem .62rem; border: 1px solid rgba(174,117,31,.55); border-radius: 999px; color: var(--gold-deep); background: #fff8e8; font-size: .67rem; font-weight: 800; text-align: center; }
.greeting-settings-shortcut { display: inline; padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: .16rem; cursor: pointer; }
.greeting-settings-shortcut:hover, .greeting-settings-shortcut:focus-visible { outline: 0; color: var(--gold-deep); }
.overview-summary-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .65rem; }
.overview-stat-card { display: grid; gap: .38rem; min-height: 8.1rem; padding: .95rem; border: 1px solid rgba(174,117,31,.46); border-radius: .62rem; color: var(--gold-deep); background: linear-gradient(145deg, #fffefb, #f6eddb); }
.overview-stat-card > span { font-size: .63rem; font-weight: 800; letter-spacing: .065rem; text-transform: uppercase; }
.overview-stat-card strong { font-family: var(--serif); font-size: clamp(1.18rem, 2.2vw, 1.65rem); font-weight: 500; line-height: 1.1; }
.overview-stat-card small { margin-top: auto; font-size: .67rem; line-height: 1.35; }
.overview-stat-card--risk strong { color: #76633a; }
.overview-performance-controls { display: grid; justify-items: end; gap: .6rem; }
.overview-performance-controls label { display: flex; align-items: center; gap: .45rem; color: var(--gold-deep); font-size: .66rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.overview-performance-controls select { max-width: 13rem; min-height: 2rem; border: 1px solid rgba(174,117,31,.55); border-radius: .38rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .73rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.overview-range-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .32rem; }
.overview-range-buttons button { min-width: 2.5rem; min-height: 1.9rem; padding: .25rem .42rem; border: 1px solid rgba(174,117,31,.48); border-radius: .34rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .67rem; font-weight: 800; cursor: pointer; }
.overview-range-buttons button:hover, .overview-range-buttons button:focus-visible, .overview-range-buttons button.is-active { outline: 0; color: #fff; background: var(--gold-deep); }
.overview-chart { position: relative; min-height: 18rem; margin-top: 1.1rem; padding: .35rem .6rem 1.55rem 3.4rem; overflow: hidden; border: 1px solid rgba(174,117,31,.28); border-radius: .48rem; background: linear-gradient(180deg, #fffefb, #fcf5e8); }
.overview-chart svg { display: block; width: 100%; height: 14.6rem; }
.overview-chart-grid { fill: none; stroke: rgba(174,117,31,.15); stroke-width: 1; vector-effect: non-scaling-stroke; }
.overview-chart-area { fill: url(#overview-area); }
.overview-chart-line { fill: none; stroke: #bf842a; stroke-width: 2; vector-effect: non-scaling-stroke; }
.overview-y-axis { position: absolute; inset: .95rem auto 1.9rem .5rem; display: flex; flex-direction: column; justify-content: space-between; color: rgba(111,72,10,.7); font-size: .67rem; font-weight: 800; }
.overview-x-axis { position: absolute; right: .65rem; bottom: .5rem; left: 3.4rem; display: flex; justify-content: space-between; color: rgba(111,72,10,.7); font-size: .67rem; font-weight: 800; }
.overview-chart-tooltip { position: absolute; top: 1.25rem; left: 52%; padding: .36rem .55rem; border-radius: .3rem; color: #fff; background: rgba(30,25,17,.88); font-size: .66rem; font-weight: 700; opacity: 0; transform: translate(-50%, -.2rem); transition: opacity .15s ease, transform .15s ease; pointer-events: none; }
.overview-chart:hover .overview-chart-tooltip, .overview-chart:focus-visible .overview-chart-tooltip { opacity: 1; transform: translate(-50%, 0); }
.overview-performance-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; margin-top: .85rem; }
.overview-performance-metrics article { display: grid; gap: .26rem; padding: .72rem; border-left: 2px solid rgba(174,117,31,.58); background: #fffaf0; }
.overview-performance-metrics span { font-size: .61rem; font-weight: 800; letter-spacing: .045rem; text-transform: uppercase; }
.overview-performance-metrics strong { font-family: var(--serif); font-size: 1.16rem; font-weight: 500; }
.overview-table-wrap { max-height: 22rem; overflow: auto; margin-top: .9rem; border: 1px solid rgba(174,117,31,.32); border-radius: .46rem; }
.overview-table-wrap table { width: 100%; min-width: 68rem; border-collapse: collapse; font-size: .74rem; }
.overview-table-wrap th, .overview-table-wrap td { padding: .72rem .75rem; border-bottom: 1px solid rgba(174,117,31,.2); text-align: left; white-space: nowrap; }
.overview-table-wrap th { position: sticky; top: 0; color: var(--gold-deep); background: #f8edda; font-size: .62rem; letter-spacing: .05rem; text-transform: uppercase; }
.overview-empty-cell { padding: 1.3rem !important; color: rgba(111,72,10,.75); text-align: center !important; white-space: normal !important; }
.overview-account-empty { margin-top: .8rem; padding: .95rem; border: 1px dashed rgba(174,117,31,.5); border-radius: .42rem; color: rgba(111,72,10,.8); font-size: .8rem; font-weight: 700; }
.overview-quick-action-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin-top: .9rem; }
.overview-quick-action-grid button { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 3.55rem; padding: .75rem .9rem; border: 1px solid rgba(174,117,31,.58); border-radius: .46rem; color: var(--gold-deep); background: linear-gradient(135deg, #fffefb, #f6eddb); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.overview-quick-action-grid button span { font-size: 1.15rem; }
.overview-quick-action-grid button:hover, .overview-quick-action-grid button:focus-visible { outline: 0; color: #fff; background: var(--gold-deep); box-shadow: 0 .35rem .75rem rgba(111,72,10,.16); }
html[data-theme="dark"] .overview-heading, html[data-theme="dark"] .overview-panel, html[data-theme="dark"] .overview-stat-card, html[data-theme="dark"] .overview-chart, html[data-theme="dark"] .overview-performance-metrics article, html[data-theme="dark"] .overview-quick-action-grid button { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .overview-heading h2, html[data-theme="dark"] .overview-panel-heading h3, html[data-theme="dark"] .overview-stat-card, html[data-theme="dark"] .overview-performance-controls label, html[data-theme="dark"] .overview-quick-action-grid button { color: #f7f8fb; }
html[data-theme="dark"] .overview-performance-controls select, html[data-theme="dark"] .overview-range-buttons button { color: #f7f8fb; background: #101621; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .overview-range-buttons button.is-active, html[data-theme="dark"] .overview-range-buttons button:hover, html[data-theme="dark"] .overview-quick-action-grid button:hover { background: #353d49; }
html[data-theme="dark"] .overview-table-wrap th { color: #f7f8fb; background: #101621; }
html[data-theme="dark"] .overview-account-empty, html[data-theme="dark"] .overview-empty-cell { color: #d4d9e2; }

@media (max-width: 72rem) {
  .overview-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overview-performance-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 52rem) {
  .overview-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-performance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-heading, .overview-panel-heading { display: grid; }
  .overview-sync-state { justify-self: start; }
  .overview-performance-controls { justify-items: start; }
  .overview-range-buttons { justify-content: flex-start; }
}

@media (max-width: 38rem) {
  .dashboard-greeting { align-items: flex-start; margin-top: .7rem; padding: .75rem; }
  .dashboard-greeting p { font-size: 1rem; }
  .dashboard-greeting small { font-size: .6rem; }
  .dashboard-greeting time { font-size: 1.35rem; }
  .dashboard-clock { display: grid; justify-items: end; gap: .15rem; }
  .contact-us-screen { width: 100%; margin: .8rem 0; padding: .85rem; }
  .contact-channel-grid { grid-template-columns: 1fr; }
  .contact-editor-row { grid-template-columns: 1fr; }
  .contact-us-heading, .contact-editor-heading { display: grid; }
  .overview-heading, .overview-panel-heading { display: grid; }
  .overview-sync-state { justify-self: start; }
  .overview-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-performance-controls { justify-items: start; }
  .overview-range-buttons { justify-content: flex-start; }
  .overview-performance-metrics, .overview-quick-action-grid { grid-template-columns: 1fr; }
  .overview-chart { min-height: 14rem; padding-left: 2.55rem; }
  .overview-chart svg { height: 10.7rem; }
  .overview-x-axis { left: 2.6rem; }
}

/* Admin trading bots preview. */
.trading-bots-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.trading-bots-screen[hidden], .bot-tab-panel[hidden], .bot-controls-panel[hidden], .bot-logs-panel[hidden] { display: none !important; }
.bots-page-heading, .bot-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.bots-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.bots-page-heading > div:first-child > p:not(.section-label), .bot-panel-heading p { max-width: 43rem; margin: .48rem 0 0; font-size: .94rem; line-height: 1.55; }
.bots-header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; }
.emergency-button { min-height: 2.65rem; padding: .55rem .82rem; border: 1px solid #a4352c; border-radius: .42rem; color: #fff; background: #a4352c; font: inherit; font-size: .72rem; font-weight: 800; letter-spacing: .025rem; text-transform: uppercase; cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.emergency-button:hover, .emergency-button:focus-visible { outline: 0; border-color: #75251f; background: #75251f; transform: translateY(-.08rem); }
.server-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; padding: .72rem .9rem; border: 1px solid rgba(174,117,31,.52); border-radius: .52rem; background: #fffefb; color: var(--gold-deep); font-size: .73rem; font-weight: 700; }
.server-state { display: inline-flex; align-items: center; min-height: 1.75rem; padding: .16rem .48rem; border: 1px solid #2f8057; border-radius: 999px; color: #286c4c; background: #f2faf4; font-size: .63rem; font-weight: 800; letter-spacing: .04rem; text-transform: uppercase; }
.bot-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.bot-summary-grid article { display: grid; gap: .28rem; min-height: 7.25rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .5rem; background: #fffefb; }
.bot-summary-grid span { font-size: .75rem; font-weight: 700; }
.bot-summary-grid strong { color: var(--gold-deep); font-family: var(--serif); font-size: 2.1rem; font-weight: 500; line-height: 1; }
.bot-summary-grid small { color: var(--gold-deep); font-size: .7rem; opacity: .8; }
.bot-filter-bar { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(8rem, .42fr) minmax(8rem, .42fr); gap: .7rem; padding: .8rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.bot-filter-bar label { display: grid; gap: .3rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.bot-filter-bar input, .bot-filter-bar select { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.bot-filter-bar input:focus, .bot-filter-bar select:focus { box-shadow: 0 0 0 .2rem rgba(190,134,42,.16); }
.client-bot-connection-panel { display: grid; gap: .85rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.client-bot-connection-controls { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: .7rem; }
.client-bot-connection-controls label { display: grid; gap: .3rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.client-bot-connection-controls select { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.bot-tabs { display: flex; gap: .45rem; padding-bottom: .05rem; border-bottom: 1px solid rgba(174,117,31,.45); overflow-x: auto; }
.bot-tabs button { flex: 0 0 auto; min-height: 2.55rem; padding: .45rem .8rem; border: 1px solid transparent; border-bottom: 0; border-radius: .42rem .42rem 0 0; color: var(--gold-deep); background: transparent; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.bot-tabs button:hover, .bot-tabs button:focus-visible, .bot-tabs button.is-active { outline: 0; border-color: rgba(174,117,31,.58); color: #fffdf8; background: var(--gold-deep); }
.bot-tab-panel { display: grid; gap: .85rem; }
.bot-panel-heading h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 500; }
.bot-panel-heading .text-button { flex: 0 0 auto; }

/* Admin trading accounts preview. */
.trading-accounts-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.trading-accounts-screen[hidden], .account-tab-panel[hidden], .client-account-entries[hidden], .account-details-panel[hidden] { display: none !important; }
.accounts-page-heading, .account-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.accounts-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.accounts-page-heading p:not(.section-label), .account-panel-heading p { max-width: 43rem; margin: .48rem 0 0; font-size: .94rem; line-height: 1.55; }
.section-label { margin: 0; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .13rem; text-transform: uppercase; }
.account-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.account-summary-grid article { display: grid; gap: .28rem; min-height: 7.25rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .5rem; background: #fffefb; }
.account-summary-grid span { font-size: .75rem; font-weight: 700; }
.account-summary-grid strong { color: var(--gold-deep); font-family: var(--serif); font-size: 2.1rem; font-weight: 500; line-height: 1; }
.account-summary-grid small { color: var(--gold-deep); font-size: .7rem; opacity: .8; }
.account-filter-bar { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(8rem, .42fr) minmax(9rem, .48fr); gap: .7rem; padding: .8rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.account-filter-bar label { display: grid; gap: .3rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.account-filter-bar input, .account-filter-bar select { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.account-filter-bar input:focus, .account-filter-bar select:focus { box-shadow: 0 0 0 .2rem rgba(190,134,42,.16); }
.account-tabs { display: flex; gap: .45rem; padding-bottom: .05rem; border-bottom: 1px solid rgba(174,117,31,.45); overflow-x: auto; }
.account-tabs button { flex: 0 0 auto; min-height: 2.55rem; padding: .45rem .8rem; border: 1px solid transparent; border-bottom: 0; border-radius: .42rem .42rem 0 0; color: var(--gold-deep); background: transparent; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.account-tabs button:hover, .account-tabs button:focus-visible, .account-tabs button.is-active { outline: 0; border-color: rgba(174,117,31,.58); color: #fffdf8; background: var(--gold-deep); }
.account-tab-panel { display: grid; gap: .85rem; }
.account-panel-heading h3, .broker-connect-section h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 500; }
.account-panel-heading .text-button { flex: 0 0 auto; }
.account-list, .client-account-groups { display: grid; gap: .65rem; }
.account-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .88rem 1rem; border: 1px solid rgba(174,117,31,.5); border-radius: .48rem; background: #fffefb; }
.account-row > div:first-child { display: grid; gap: .25rem; min-width: 0; }
.account-row strong { color: var(--gold-deep); font-size: .93rem; }
.account-row small { font-size: .72rem; font-weight: 600; opacity: .82; }
.account-owner { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; color: var(--gold-deep); font-size: .76rem; font-weight: 800; }
.account-owner em { padding: .12rem .36rem; border: 1px solid rgba(174,117,31,.5); border-radius: 999px; font-size: .59rem; font-style: normal; letter-spacing: .035rem; text-transform: uppercase; }
.account-row-actions, .details-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .42rem; }
.connection-status { display: inline-flex; align-items: center; min-height: 2.15rem; padding: .34rem .55rem; border: 1px solid currentColor; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .025rem; text-transform: uppercase; white-space: nowrap; }
.status-connected { color: #286c4c; background: #f2faf4; }
.status-needs-reconnect { color: #9d5d12; background: #fff8e9; }
.status-syncing { color: #496b9a; background: #f3f7fc; }
.account-empty { margin: 0; padding: 1rem; border: 1px dashed rgba(174,117,31,.55); border-radius: .48rem; text-align: center; }
.client-account-group { overflow: clip; border: 1px solid rgba(174,117,31,.5); border-radius: .5rem; background: #fffefb; }
.client-account-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .9rem 1rem; border: 0; color: var(--gold-deep); background: transparent; text-align: left; font: inherit; cursor: pointer; }
.client-account-toggle:hover, .client-account-toggle:focus-visible { outline: 0; background: #f7efe0; }
.client-account-toggle span { display: grid; gap: .2rem; }
.client-account-toggle strong { font-size: .92rem; }
.client-account-toggle small { font-size: .72rem; font-weight: 600; }
.client-account-toggle b { font-size: 1.25rem; font-weight: 500; transition: transform .16s ease; }
.client-account-toggle[aria-expanded="true"] b { transform: rotate(180deg); }
.client-account-entries { padding: .72rem; border-top: 1px solid rgba(174,117,31,.36); background: #fcfaf4; }
.client-account-entries .account-row { padding: .75rem; }
.broker-connect-section { display: grid; gap: .85rem; padding: 1rem; border: 1px dashed rgba(174,117,31,.66); border-radius: .52rem; background: #fffefb; }
.broker-connect-section p { margin: .34rem 0 0; font-size: .84rem; line-height: 1.5; }
.broker-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: .9rem; margin-top: .3rem; }
.broker-card-grid article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .7rem; min-height: 4.35rem; padding: .8rem .9rem; border: 1px solid rgba(174,117,31,.52); border-radius: .5rem; background: linear-gradient(135deg, #fffefb, #f6eddb); }
.broker-card-grid strong { color: var(--gold-deep); font-family: var(--serif); font-size: 1.08rem; font-weight: 500; }
.broker-card-grid .row-action { min-width: 5.5rem; }
.broker-connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .9rem; margin-top: .25rem; }
.broker-connect-grid button { min-height: 3.45rem; padding: .7rem .85rem; border: 1px solid var(--gold-deep); border-radius: .5rem; color: var(--gold-deep); background: transparent; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; transition: background .16s ease, color .16s ease, transform .16s ease; }
.broker-connect-grid button:hover, .broker-connect-grid button:focus-visible { outline: 0; color: #fffdf8; background: var(--gold-deep); transform: translateY(-.1rem); }
.broker-connect-grid .broker-connect-button--fyers { color: #fffdf8; border-color: #8c5412; background: linear-gradient(135deg, #9f6415, #c98f2e 55%, #9b6012); }
.broker-connect-grid .broker-connect-button--fyers:hover, .broker-connect-grid .broker-connect-button--fyers:focus-visible { color: #fff; background: #7d4b0d; }
.account-details-panel { display: grid; gap: .85rem; padding: 1rem; border: 1px solid var(--gold); border-radius: .55rem; background: #fffefb; }
.account-details-panel dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 0; }
.account-details-panel dl div { padding: .68rem; border: 1px solid rgba(174,117,31,.4); border-radius: .4rem; }
.account-details-panel dt { color: var(--gold-deep); font-size: .63rem; font-weight: 800; letter-spacing: .075rem; text-transform: uppercase; }
.account-details-panel dd { margin: .28rem 0 0; color: var(--gold-deep); font-size: .82rem; font-weight: 700; }
.account-details-panel > p { margin: 0; font-size: .82rem; line-height: 1.5; }

html[data-theme="dark"] .trading-accounts-screen, html[data-theme="dark"] .account-summary-grid article, html[data-theme="dark"] .account-filter-bar, html[data-theme="dark"] .account-row, html[data-theme="dark"] .client-account-group, html[data-theme="dark"] .broker-connect-section, html[data-theme="dark"] .account-details-panel { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .broker-card-grid article { color: #f7f8fb; background: #101621; border-color: rgba(174,117,31,.58); }
html[data-theme="dark"] .accounts-page-heading h2, html[data-theme="dark"] .section-label, html[data-theme="dark"] .account-summary-grid strong, html[data-theme="dark"] .account-summary-grid small, html[data-theme="dark"] .account-panel-heading h3, html[data-theme="dark"] .broker-connect-section h3, html[data-theme="dark"] .account-row strong, html[data-theme="dark"] .account-owner, html[data-theme="dark"] .client-account-toggle, html[data-theme="dark"] .account-details-panel dt, html[data-theme="dark"] .account-details-panel dd { color: #f7f8fb; }
html[data-theme="dark"] .account-filter-bar input, html[data-theme="dark"] .account-filter-bar select { color: #f7f8fb; background: #101621; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .account-tabs { border-color: rgba(174,117,31,.58); }
html[data-theme="dark"] .account-tabs button { color: #f7f8fb; }
html[data-theme="dark"] .account-tabs button:hover, html[data-theme="dark"] .account-tabs button:focus-visible, html[data-theme="dark"] .account-tabs button.is-active { color: #fff; border-color: #515b69; background: #353d49; }
html[data-theme="dark"] .client-account-toggle:hover, html[data-theme="dark"] .client-account-toggle:focus-visible, html[data-theme="dark"] .client-account-entries { background: #101621; }
html[data-theme="dark"] .broker-connect-grid button { color: #f7f8fb; border-color: rgba(174,117,31,.72); background: #101621; }
html[data-theme="dark"] .broker-connect-grid button:hover, html[data-theme="dark"] .broker-connect-grid button:focus-visible { color: #fff; background: #353d49; }
html[data-theme="dark"] .status-connected { color: #8ce1ad; background: #12271e; }
html[data-theme="dark"] .status-needs-reconnect { color: #f4c46d; background: #2b210d; }
html[data-theme="dark"] .status-syncing { color: #accbff; background: #14233a; }

@media (max-width: 48rem) {
  .account-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-filter-bar { grid-template-columns: 1fr 1fr; }
  .account-search { grid-column: 1 / -1; }
  .broker-connect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-details-panel dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 38rem) {
  .trading-accounts-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; }
  .accounts-page-heading { display: grid; }
  .accounts-page-heading .dashboard-button { width: 100%; }
  .broker-card-grid { grid-template-columns: 1fr; }
  .accounts-page-heading h2 { font-size: 1.75rem; }
  .account-filter-bar { grid-template-columns: 1fr; }
  .account-search { grid-column: auto; }
  .account-row { grid-template-columns: 1fr; gap: .65rem; }
  .account-row-actions { justify-content: flex-start; }
  .account-tabs { gap: .3rem; }
  .account-tabs button { padding-inline: .6rem; font-size: .7rem; }
  .account-panel-heading { gap: .6rem; }
  .account-panel-heading .text-button { padding-inline: .55rem; font-size: .64rem; }
  .broker-connect-grid { grid-template-columns: 1fr; }
  .account-details-panel dl { grid-template-columns: 1fr; }
  .details-actions { justify-content: flex-start; }
}

.bot-library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.bot-card { display: grid; align-content: start; gap: .9rem; min-height: 18rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.bot-card h3 { margin: .35rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.bot-card > div:first-child > p:not(.bot-category) { margin: .45rem 0 0; font-size: .8rem; line-height: 1.5; }
.bot-category { margin: 0; color: var(--gold-deep); font-size: .63rem; font-weight: 800; letter-spacing: .06rem; text-transform: uppercase; }
.bot-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; margin: 0; }
.bot-card dl div { min-width: 0; padding: .5rem; border: 1px solid rgba(174,117,31,.35); border-radius: .36rem; }
.bot-card dt { font-size: .58rem; font-weight: 800; letter-spacing: .045rem; text-transform: uppercase; }
.bot-card dd { margin: .22rem 0 0; color: var(--gold-deep); font-size: .68rem; font-weight: 800; overflow-wrap: anywhere; }
.bot-card-actions, .bot-row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .42rem; }
.bot-card-actions { align-self: end; }
.bot-empty { margin: 0; padding: 1rem; border: 1px dashed rgba(174,117,31,.55); border-radius: .48rem; text-align: center; }
.bot-assignment-list { display: grid; gap: .65rem; }
.bot-assignment-row, .approval-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .9rem 1rem; border: 1px solid rgba(174,117,31,.5); border-radius: .48rem; background: #fffefb; }
.bot-assignment-row > div:first-child, .approval-row > div:first-child { display: grid; gap: .24rem; min-width: 0; }
.bot-assignment-row strong, .approval-row strong { color: var(--gold-deep); font-size: .92rem; }
.bot-assignment-row span, .approval-row span { font-size: .77rem; font-weight: 700; }
.bot-assignment-row small { font-size: .7rem; font-weight: 600; opacity: .82; }
.bot-status { display: inline-flex; align-items: center; min-height: 2.15rem; padding: .34rem .55rem; border: 1px solid currentColor; border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .025rem; text-transform: uppercase; white-space: nowrap; }
.status-running { color: #286c4c; background: #f2faf4; }
.status-awaiting { color: #9d5d12; background: #fff8e9; }
.approval-row { grid-template-columns: minmax(0, 1fr) minmax(13rem, .9fr) auto; }
.approval-steps { display: grid; gap: .35rem; }
.approval-step { display: inline-flex; width: fit-content; padding: .34rem .55rem; border: 1px solid rgba(174,117,31,.5); border-radius: 999px; font-size: .64rem; font-weight: 800; letter-spacing: .025rem; text-transform: uppercase; }
.approval-step.is-complete { color: #286c4c; border-color: #286c4c; background: #f2faf4; }
.approval-step.is-current { color: #9d5d12; border-color: #9d5d12; background: #fff8e9; }

.server-health-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, .9fr) auto; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.server-health-card p:not(.section-label) { margin: .42rem 0 0; font-size: .82rem; line-height: 1.5; }
.server-health-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.server-health-facts span { display: grid; gap: .15rem; padding: .5rem; border: 1px solid rgba(174,117,31,.35); border-radius: .36rem; font-size: .64rem; }
.server-health-facts b { color: var(--gold-deep); font-size: .78rem; }
.bot-logs-panel { display: grid; gap: .75rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.bot-logs-panel ol { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.bot-logs-panel li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: .65rem; padding: .6rem 0; border-top: 1px solid rgba(174,117,31,.3); font-size: .78rem; line-height: 1.45; }
.bot-logs-panel time { color: var(--gold-deep); font-weight: 800; }
.bot-controls-panel { display: grid; gap: .85rem; padding: 1rem; border: 1px solid var(--gold); border-radius: .55rem; background: #fffefb; }
.bot-controls-panel dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; margin: 0; }
.bot-controls-panel dl div { padding: .68rem; border: 1px solid rgba(174,117,31,.4); border-radius: .4rem; }
.bot-controls-panel dt { color: var(--gold-deep); font-size: .63rem; font-weight: 800; letter-spacing: .075rem; text-transform: uppercase; }
.bot-controls-panel dd { margin: .28rem 0 0; color: var(--gold-deep); font-size: .82rem; font-weight: 700; overflow-wrap: anywhere; }
.bot-control-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.bot-control-groups > div { display: flex; flex-wrap: wrap; gap: .42rem; padding: .75rem; border: 1px solid rgba(174,117,31,.4); border-radius: .42rem; }
.bot-control-groups p { flex-basis: 100%; margin: 0 0 .15rem; color: var(--gold-deep); font-size: .66rem; font-weight: 800; letter-spacing: .06rem; text-transform: uppercase; }

html[data-theme="dark"] .trading-bots-screen, html[data-theme="dark"] .server-banner, html[data-theme="dark"] .bot-summary-grid article, html[data-theme="dark"] .bot-filter-bar, html[data-theme="dark"] .bot-card, html[data-theme="dark"] .bot-assignment-row, html[data-theme="dark"] .client-bot-connection-panel, html[data-theme="dark"] .approval-row, html[data-theme="dark"] .server-health-card, html[data-theme="dark"] .bot-logs-panel, html[data-theme="dark"] .bot-controls-panel { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .bots-page-heading h2, html[data-theme="dark"] .bot-summary-grid strong, html[data-theme="dark"] .bot-summary-grid small, html[data-theme="dark"] .bot-panel-heading h3, html[data-theme="dark"] .server-health-card h3, html[data-theme="dark"] .bot-card h3, html[data-theme="dark"] .bot-card dd, html[data-theme="dark"] .bot-assignment-row strong, html[data-theme="dark"] .approval-row strong, html[data-theme="dark"] .server-health-facts b, html[data-theme="dark"] .bot-logs-panel time, html[data-theme="dark"] .bot-controls-panel dt, html[data-theme="dark"] .bot-controls-panel dd, html[data-theme="dark"] .bot-control-groups p { color: #f7f8fb; }
html[data-theme="dark"] .bot-filter-bar input, html[data-theme="dark"] .bot-filter-bar select, html[data-theme="dark"] .client-bot-connection-controls select { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .bot-tabs { border-color: rgba(174,117,31,.58); }
html[data-theme="dark"] .bot-tabs button { color: #f7f8fb; }
html[data-theme="dark"] .bot-tabs button:hover, html[data-theme="dark"] .bot-tabs button:focus-visible, html[data-theme="dark"] .bot-tabs button.is-active { color: #fff; border-color: #515b69; background: #353d49; }
html[data-theme="dark"] .bot-card dl div, html[data-theme="dark"] .server-health-facts span, html[data-theme="dark"] .bot-controls-panel dl div, html[data-theme="dark"] .bot-control-groups > div { border-color: rgba(174,117,31,.48); background: #101621; }
html[data-theme="dark"] .status-running, html[data-theme="dark"] .approval-step.is-complete, html[data-theme="dark"] .server-state { color: #8ce1ad; background: #12271e; }
html[data-theme="dark"] .status-awaiting, html[data-theme="dark"] .approval-step.is-current { color: #f4c46d; background: #242b36; }
html[data-theme="dark"] .emergency-button { background: #862d31; border-color: #bb6264; }

@media (max-width: 60rem) {
  .bot-library-grid { grid-template-columns: 1fr; }
  .bot-card { min-height: 0; }
  .server-health-card { grid-template-columns: 1fr; }
}

@media (max-width: 48rem) {
  .bot-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bot-filter-bar { grid-template-columns: 1fr 1fr; }
  .bot-search { grid-column: 1 / -1; }
  .approval-row { grid-template-columns: 1fr; }
  .bot-controls-panel dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 38rem) {
  .trading-bots-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; }
  .bots-page-heading { display: grid; }
  .bots-page-heading h2 { font-size: 1.75rem; }
  .bots-header-actions { justify-content: stretch; }
  .bots-header-actions > * { flex: 1; }
  .server-banner { display: grid; gap: .38rem; }
  .server-banner > span:not(.server-state) { padding-left: 0; border-left: 0; }
  .bot-filter-bar, .client-bot-connection-controls { grid-template-columns: 1fr; }
  .bot-search { grid-column: auto; }
  .bot-tabs { gap: .3rem; }
  .bot-tabs button { padding-inline: .6rem; font-size: .69rem; }
  .bot-panel-heading { gap: .6rem; }
  .bot-panel-heading .text-button { padding-inline: .55rem; font-size: .64rem; }
  .bot-card dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bot-assignment-row { grid-template-columns: 1fr; gap: .65rem; }
  .bot-row-actions { justify-content: flex-start; }
  .bot-controls-panel dl, .bot-control-groups { grid-template-columns: 1fr; }
  .bot-logs-panel li { grid-template-columns: 1fr; gap: .15rem; }
}

/* Admin finance and statements preview. */
.finance-statements-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.finance-statements-screen[hidden] { display: none !important; }
.finance-page-heading, .finance-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.finance-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.finance-page-heading > div:first-child > p:not(.section-label), .finance-panel-heading p { max-width: 43rem; margin: .48rem 0 0; font-size: .9rem; line-height: 1.55; }
.finance-header-actions, .finance-export-actions, .finance-document-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.finance-period-panel, .finance-library-panel, .finance-export-panel { display: grid; gap: .9rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.finance-panel-heading h3, .finance-export-panel h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 500; }
.finance-status-tag { display: inline-flex; align-items: center; width: fit-content; min-height: 2.15rem; padding: .34rem .55rem; border: 1px solid rgba(174,117,31,.56); border-radius: 999px; color: var(--gold-deep); background: #fffdf8; font-size: .63rem; font-weight: 800; letter-spacing: .025rem; white-space: nowrap; }
.finance-status-tag.is-ready { color: #286c4c; border-color: #286c4c; background: #f2faf4; }
.finance-status-tag.is-review { color: #9d5d12; border-color: #9d5d12; background: #fff8e9; }
.finance-period-controls { display: grid; grid-template-columns: minmax(10rem, .65fr) minmax(12rem, 1fr) auto; align-items: end; gap: .7rem; }
.finance-period-controls label { display: grid; gap: .3rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.finance-period-controls select { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; text-transform: none; }
.finance-period-controls .dashboard-button { min-height: 2.7rem; }
.finance-period-panel > p { margin: 0; padding-top: .72rem; border-top: 1px solid rgba(174,117,31,.3); font-size: .75rem; font-weight: 600; line-height: 1.5; }
.finance-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; }
.finance-summary-grid article { display: grid; gap: .32rem; min-height: 6.8rem; padding: .85rem; border: 1px solid rgba(174,117,31,.46); border-radius: .48rem; background: linear-gradient(135deg, #fffefb, #f6eddb); }
.finance-summary-grid span, .finance-summary-grid small { font-size: .67rem; font-weight: 700; }
.finance-summary-grid strong { color: var(--gold-deep); font-family: var(--serif); font-size: 1.55rem; font-weight: 500; }
.finance-document-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.finance-document-card { display: grid; gap: .75rem; min-height: 13rem; padding: .9rem; border: 1px solid rgba(174,117,31,.44); border-radius: .48rem; background: #fffdf8; }
.finance-document-card h3 { margin: .28rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.finance-document-card p { margin: .36rem 0 0; font-size: .77rem; font-weight: 600; line-height: 1.5; }
.finance-document-type { color: var(--gold-deep); font-size: .62rem; font-weight: 800; letter-spacing: .06rem; text-transform: uppercase; }
.finance-document-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem; }
.finance-document-meta small { font-size: .66rem; font-weight: 700; opacity: .82; }
.finance-document-actions { align-self: end; }
.finance-export-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.finance-export-panel p:not(.section-label) { max-width: 43rem; margin: .45rem 0 0; font-size: .78rem; font-weight: 600; line-height: 1.5; }
html[data-theme="dark"] .finance-statements-screen, html[data-theme="dark"] .finance-period-panel, html[data-theme="dark"] .finance-library-panel, html[data-theme="dark"] .finance-export-panel, html[data-theme="dark"] .finance-summary-grid article, html[data-theme="dark"] .finance-document-card { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .finance-page-heading h2, html[data-theme="dark"] .finance-panel-heading h3, html[data-theme="dark"] .finance-export-panel h3, html[data-theme="dark"] .finance-summary-grid strong, html[data-theme="dark"] .finance-document-card h3, html[data-theme="dark"] .finance-period-controls label { color: #f7f8fb; }
html[data-theme="dark"] .finance-status-tag, html[data-theme="dark"] .finance-period-controls select { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .finance-status-tag.is-ready { color: #8ce1ad; background: #02040a; }
html[data-theme="dark"] .finance-status-tag.is-review { color: #f4c46d; background: #02040a; }
@media (max-width: 60rem) { .finance-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 48rem) { .finance-document-grid, .finance-period-controls, .finance-export-panel { grid-template-columns: 1fr; } .finance-export-actions { justify-content: flex-start; } }
@media (max-width: 38rem) { .finance-statements-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; } .finance-page-heading, .finance-panel-heading { display: grid; } .finance-page-heading h2 { font-size: 1.75rem; } .finance-header-actions > * { flex: 1; } .finance-summary-grid { grid-template-columns: 1fr 1fr; } .finance-document-meta { align-items: flex-start; flex-direction: column; } }

/* Admin Mount Ex Vault workspace. */
.vault-screen { position: relative; z-index: 1; display: grid; gap: 1rem; width: 100%; max-width: none; min-height: calc(100vh - 3.5rem); margin: 0; padding: clamp(1rem, 2.8vw, 2rem); border: 0; border-radius: 0; color: var(--gold-deep); background: transparent; box-shadow: none; }
.vault-screen[hidden] { display: none !important; }
.vault-page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.vault-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.vault-page-heading > div > p:not(.section-label) { max-width: 46rem; margin: .48rem 0 0; font-size: .9rem; line-height: 1.55; }
.vault-workspace { display: grid; grid-template-areas: "editor sidebar"; grid-template-columns: minmax(0, 1fr) minmax(14rem, .3fr); min-height: min(74vh, 52rem); overflow: hidden; border: 0; border-radius: 0; background: #fffefb; }
.vault-sidebar { grid-area: sidebar; display: grid; align-content: start; gap: .7rem; padding: .85rem; border-left: 1px solid rgba(174,117,31,.35); background: #fffdf8; }
.vault-search input { width: 100%; min-height: 2.5rem; padding: .48rem .65rem; border: 1px solid rgba(174,117,31,.62); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .76rem; font-weight: 600; }
.vault-home-button { display: flex; align-items: center; gap: .55rem; width: 100%; min-height: 2.7rem; padding: .42rem .5rem; border: 1px solid rgba(174,117,31,.45); border-radius: .4rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .74rem; font-weight: 800; text-align: left; }
.vault-home-button img { width: 1.65rem; height: 1.65rem; object-fit: contain; }
.vault-home-button:hover, .vault-home-button:focus-visible, .vault-home-button.is-active { border-color: rgba(174,117,31,.72); background: #f0e2c4; outline: none; }
.vault-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: .4rem; color: var(--gold-deep); font-size: .65rem; font-weight: 800; letter-spacing: .06rem; text-transform: uppercase; }
.vault-section-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: .2rem .08rem; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; text-align: left; }
.vault-section-toggle b { font-size: .95rem; line-height: 1; }
.vault-sidebar-heading .text-button { padding: .25rem .35rem; font-size: .6rem; }
.vault-page-list { display: grid; gap: .28rem; }
.vault-page-tree-item { display: grid; gap: .22rem; }
.vault-page-children { display: grid; gap: .22rem; margin: .02rem 0 .14rem .82rem; padding-left: .55rem; border-left: 1px solid rgba(174,117,31,.4); }
.vault-page-list[hidden] { display: none !important; }
.vault-page-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .35rem; width: 100%; min-height: 2.55rem; padding: .46rem .55rem; border: 1px solid transparent; border-radius: .36rem; color: var(--gold-deep); background: transparent; font: inherit; font-size: .73rem; font-weight: 700; text-align: left; cursor: pointer; }
.vault-page-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-page-list button b { color: var(--gold); font-size: .85rem; }
.vault-page-list button:hover, .vault-page-list button:focus-visible, .vault-page-list button.is-active { border-color: rgba(174,117,31,.55); background: #f0e2c4; outline: none; }
.vault-sidebar-note { margin: .3rem 0 0; padding-top: .65rem; border-top: 1px solid rgba(174,117,31,.3); font-size: .65rem; font-weight: 600; line-height: 1.5; }
.vault-editor-panel { position: relative; grid-area: editor; display: grid; align-content: start; gap: .78rem; min-width: 0; padding: clamp(1rem, 3vw, 2rem); }
.vault-editor-topbar { display: flex; align-items: center; justify-content: space-between; gap: .65rem; color: var(--gold-deep); font-size: .66rem; font-weight: 800; letter-spacing: .025rem; }
.vault-page-title-input { width: 100%; padding: .15rem 0 .35rem; border: 0; border-bottom: 1px solid rgba(174,117,31,.38); outline: none; color: var(--gold-deep); background: transparent; font-family: var(--serif); font-size: clamp(1.6rem, 3.4vw, 2.35rem); font-weight: 500; }
.vault-page-title-input:focus { border-color: var(--gold); }
.vault-page-meta { margin: -.45rem 0 0; font-size: .68rem; font-weight: 600; opacity: .78; }
.vault-editor-toolbar { display: flex; flex-wrap: wrap; gap: .4rem; padding: .48rem; border: 1px solid rgba(174,117,31,.38); border-radius: .42rem; background: #f8f0df; }
.vault-editor-toolbar button, .vault-attach-button { min-height: 2.1rem; padding: .34rem .52rem; border: 1px solid rgba(174,117,31,.6); border-radius: .32rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .66rem; font-weight: 800; cursor: pointer; }
.vault-attach-button { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.vault-attach-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.vault-editor { min-height: 16rem; padding: .85rem 0; outline: none; color: var(--gold-deep); font-size: .86rem; font-weight: 600; line-height: 1.7; }
.vault-editor h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.vault-editor p { margin: .65rem 0 0; }
.vault-child-pages { display: grid; justify-items: center; margin: .05rem 0 .15rem; padding: .1rem 0; }
.vault-child-pages[hidden] { display: none !important; }
.vault-child-page-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: .48rem; width: min(100%, 34rem); }
.vault-child-page-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .48rem; min-height: 3.1rem; padding: .55rem .62rem; border: 1px solid rgba(174,117,31,.55); border-radius: .38rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.vault-child-page-card { flex: 1 1 14rem; max-width: 19rem; }
.vault-child-page-card:hover, .vault-child-page-card:focus-visible { border-color: var(--gold); background: #f0e2c4; outline: none; }
.vault-child-page-card > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vault-child-page-folder { color: var(--gold); font-size: 1.25rem; line-height: 1; transform: rotate(90deg); }
.vault-child-page-card b { color: var(--gold); font-size: .62rem; white-space: nowrap; }
.vault-editor hr { margin: 1rem 0; border: 0; border-top: 1px solid rgba(174,117,31,.5); }
.vault-editor:focus { box-shadow: inset 0 0 0 1px rgba(174,117,31,.35); }
.vault-editor table { width: 100%; margin: .75rem 0; border-collapse: collapse; }
.vault-editor th, .vault-editor td { min-width: 7rem; padding: .45rem; border: 1px solid rgba(174,117,31,.55); text-align: left; }
.vault-editor th { background: #f6eddb; }
.vault-line-plus { position: absolute; z-index: 4; display: grid; place-items: center; width: 1.7rem; height: 1.7rem; padding: 0; border: 1px solid rgba(174,117,31,.68); border-radius: .35rem; color: var(--gold-deep); background: #fffdf8; font-size: 1.2rem; line-height: 1; }
.vault-line-plus[hidden], .vault-line-menu[hidden] { display: none !important; }
.vault-line-menu { position: absolute; z-index: 5; display: flex; flex-wrap: wrap; width: min(25rem, calc(100% - 2rem)); gap: .35rem; padding: .48rem; border: 1px solid rgba(174,117,31,.68); border-radius: .44rem; background: #fffdf8; box-shadow: 0 .5rem 1rem rgba(88,52,8,.15); }
.vault-line-menu button, .vault-line-menu label { display: inline-flex; align-items: center; min-height: 2rem; padding: .32rem .48rem; border: 1px solid rgba(174,117,31,.55); border-radius: .3rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .64rem; font-weight: 800; cursor: pointer; }
.vault-line-menu label { position: relative; overflow: hidden; }
.vault-line-menu input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.vault-attachments { display: grid; gap: .55rem; padding: .8rem; border: 1px solid rgba(174,117,31,.42); border-radius: .44rem; background: #fffefb; }
.vault-attachments h3 { margin: .2rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
#vault-attachment-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.vault-file-chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 2rem; padding: .34rem .5rem; border: 1px solid rgba(174,117,31,.48); border-radius: .35rem; font-size: .68rem; font-weight: 800; }
.vault-file-chip small { padding-left: .4rem; border-left: 1px solid rgba(174,117,31,.35); color: var(--gold-deep); font-size: .6rem; }
.vault-home-panel { display: grid; place-items: center; align-content: center; min-height: 30rem; padding: 2rem; border: 1px dashed rgba(174,117,31,.45); border-radius: .5rem; text-align: center; }
.vault-home-panel[hidden] { display: none !important; }
.vault-home-panel img { width: min(14rem, 62%); height: auto; object-fit: contain; }
.vault-home-panel h3 { margin: 1rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 500; }
.vault-home-panel p { max-width: 24rem; margin: .55rem 0 0; font-size: .82rem; font-weight: 600; line-height: 1.55; }
html[data-theme="dark"] .vault-screen, html[data-theme="dark"] .vault-workspace, html[data-theme="dark"] .vault-sidebar, html[data-theme="dark"] .vault-editor-toolbar, html[data-theme="dark"] .vault-attachments { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .vault-page-heading h2, html[data-theme="dark"] .vault-page-title-input, html[data-theme="dark"] .vault-editor, html[data-theme="dark"] .vault-editor h3, html[data-theme="dark"] .vault-attachments h3, html[data-theme="dark"] .vault-editor-topbar, html[data-theme="dark"] .vault-sidebar-heading, html[data-theme="dark"] .vault-file-chip small { color: #f7f8fb; }
html[data-theme="dark"] .vault-search input, html[data-theme="dark"] .vault-home-button, html[data-theme="dark"] .vault-page-list button, html[data-theme="dark"] .vault-editor-toolbar button, html[data-theme="dark"] .vault-attach-button, html[data-theme="dark"] .vault-file-chip, html[data-theme="dark"] .vault-child-page-card { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .vault-page-children { border-color: rgba(218,160,57,.52); }
html[data-theme="dark"] .vault-home-button:hover, html[data-theme="dark"] .vault-home-button:focus-visible, html[data-theme="dark"] .vault-home-button.is-active, html[data-theme="dark"] .vault-page-list button:hover, html[data-theme="dark"] .vault-page-list button:focus-visible, html[data-theme="dark"] .vault-page-list button.is-active { border-color: #515b69; background: #353d49; }
html[data-theme="dark"] .vault-home-panel { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); }
html[data-theme="dark"] .vault-home-panel h3 { color: #f7f8fb; }
html[data-theme="dark"] .vault-line-plus, html[data-theme="dark"] .vault-line-menu, html[data-theme="dark"] .vault-line-menu button, html[data-theme="dark"] .vault-line-menu label, html[data-theme="dark"] .vault-editor th { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
@media (max-width: 48rem) { .vault-workspace { grid-template-areas: "sidebar" "editor"; grid-template-columns: 1fr; } .vault-sidebar { border-left: 0; border-bottom: 1px solid rgba(174,117,31,.35); } .vault-page-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 38rem) { .vault-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; } .vault-page-heading { display: grid; } .vault-page-heading h2 { font-size: 1.75rem; } .vault-page-heading .dashboard-button { width: 100%; } .vault-workspace { min-height: 0; } .vault-page-list { grid-template-columns: 1fr; } .vault-editor-panel { padding: .9rem; } .vault-editor-topbar { display: grid; } }

/* Admin and client account settings. */
.settings-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 68rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.settings-screen[hidden] { display: none !important; }
.settings-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.settings-page-heading > div > p:not(.section-label) { max-width: 45rem; margin: .48rem 0 0; font-size: .9rem; line-height: 1.55; }
.settings-profile-panel, .settings-card { display: grid; gap: 1rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.settings-profile-panel { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.settings-avatar-wrap { display: grid; justify-items: center; gap: .55rem; }
.settings-avatar-button { display: grid; place-items: center; width: 8rem; height: 8rem; overflow: hidden; padding: 0; border: 1px solid rgba(174,117,31,.7); border-radius: 50%; background: #fffdf8; cursor: zoom-in; }
.settings-avatar-button img { width: 100%; height: 100%; object-fit: cover; }
.settings-upload-button { position: relative; overflow: hidden; min-height: 2.2rem; padding: .42rem .55rem; border: 1px solid rgba(174,117,31,.62); border-radius: .35rem; color: var(--gold-deep); background: #fffdf8; font-size: .65rem; font-weight: 800; cursor: pointer; }
.settings-upload-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.settings-profile-panel h3, .settings-card h3 { margin: .2rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.7rem); font-weight: 500; }
.settings-profile-panel p:not(.section-label), .settings-card-heading p { margin: .45rem 0 0; font-size: .8rem; font-weight: 600; line-height: 1.5; }
.settings-profile-panel small { display: block; margin-top: .45rem; font-size: .67rem; font-weight: 600; opacity: .78; }
.settings-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.settings-limit { display: inline-flex; align-items: center; min-height: 2.1rem; padding: .34rem .55rem; border: 1px solid rgba(174,117,31,.55); border-radius: 999px; color: var(--gold-deep); background: #fffdf8; font-size: .63rem; font-weight: 800; white-space: nowrap; }
.settings-edit-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .7rem; }
.settings-edit-line label, .settings-email-change label { display: grid; gap: .32rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.settings-edit-line input, .settings-email-change input { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; text-transform: none; }
.settings-edit-line input:disabled { opacity: .72; }
.settings-helper { margin: 0; padding-top: .65rem; border-top: 1px solid rgba(174,117,31,.28); font-size: .7rem; font-weight: 600; line-height: 1.5; }
.settings-email-change { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .7rem; padding: .8rem; border: 1px dashed rgba(174,117,31,.55); border-radius: .45rem; }
.settings-email-change[hidden] { display: none !important; }
.settings-email-change #settings-otp-field, .settings-email-change #client-otp-field { grid-column: 1; }
.settings-photo-dialog { width: min(90vw, 48rem); padding: 1rem; border: 1px solid rgba(174,117,31,.7); border-radius: .6rem; color: var(--gold-deep); background: #fffdf8; }
.settings-photo-dialog::backdrop { background: rgba(0,0,0,.74); }
.settings-photo-dialog .text-button { display: block; margin-left: auto; }
.settings-photo-dialog img { display: block; max-width: 100%; max-height: 72vh; margin: .7rem auto 0; object-fit: contain; }
.settings-adjust-dialog { width: min(92vw, 34rem); padding: 1rem; border: 1px solid rgba(174,117,31,.7); border-radius: .6rem; color: var(--gold-deep); background: #fffdf8; }
.settings-adjust-dialog::backdrop { background: rgba(0,0,0,.74); }
.settings-adjust-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.settings-adjust-heading h3 { margin: .15rem 0 .7rem; }
.settings-crop-preview { width: min(72vw, 18rem); aspect-ratio: 1; margin: .4rem auto .5rem; overflow: hidden; border: 1px solid rgba(174,117,31,.8); background: #101624; cursor: grab; touch-action: none; }
.settings-crop-preview:active { cursor: grabbing; }
.settings-crop-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: center; user-select: none; pointer-events: none; }
.settings-adjust-helper { margin: .45rem 0 .8rem; font-size: .86rem; text-align: center; }
.settings-adjust-controls { display: grid; gap: .55rem; margin-bottom: .85rem; }
.settings-adjust-controls label { display: grid; grid-template-columns: 9rem minmax(0, 1fr); align-items: center; gap: .75rem; font-weight: 700; }
.settings-adjust-controls input { width: 100%; accent-color: var(--gold); }
.settings-adjust-dialog .dashboard-button { width: 100%; }
html[data-theme="dark"] .settings-screen, html[data-theme="dark"] .settings-profile-panel, html[data-theme="dark"] .settings-card, html[data-theme="dark"] .settings-photo-dialog, html[data-theme="dark"] .settings-adjust-dialog { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .settings-page-heading h2, html[data-theme="dark"] .settings-profile-panel h3, html[data-theme="dark"] .settings-card h3, html[data-theme="dark"] .settings-edit-line label, html[data-theme="dark"] .settings-email-change label, html[data-theme="dark"] .settings-limit { color: #f7f8fb; }
html[data-theme="dark"] .settings-avatar-button, html[data-theme="dark"] .settings-upload-button, html[data-theme="dark"] .settings-limit, html[data-theme="dark"] .settings-edit-line input, html[data-theme="dark"] .settings-email-change input { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
@media (max-width: 48rem) { .settings-email-change { grid-template-columns: 1fr; } .settings-adjust-controls label { grid-template-columns: 1fr; gap: .3rem; } }
@media (max-width: 38rem) { .settings-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; } .settings-page-heading h2 { font-size: 1.75rem; } .settings-profile-panel, .settings-edit-line { grid-template-columns: 1fr; } .settings-avatar-wrap { justify-items: start; } .settings-card-heading { display: grid; } }

/* One-way company communication centre. */
.communication-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.communication-screen[hidden] { display: none !important; }
.communication-page-heading, .communication-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.communication-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.communication-page-heading > div:first-child > p:not(.section-label), .communication-panel-heading p { max-width: 43rem; margin: .48rem 0 0; font-size: .9rem; line-height: 1.55; }
.communication-sender, .communication-one-way, .communication-audience, .communication-delivery, .communication-attachment, .communication-read { display: inline-flex; align-items: center; width: fit-content; min-height: 2.1rem; padding: .34rem .55rem; border: 1px solid rgba(174,117,31,.52); border-radius: 999px; color: var(--gold-deep); background: #fffdf8; font-size: .63rem; font-weight: 800; letter-spacing: .025rem; white-space: nowrap; }
.communication-one-way { color: #9d5d12; }
.communication-compose-panel, .communication-history-panel, .communication-inbox-panel { display: grid; gap: .9rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.communication-panel-heading h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 500; }
.communication-form { display: grid; gap: .75rem; }
.communication-form label, .communication-recipient-grid label { display: grid; gap: .32rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.communication-form input, .communication-form select, .communication-form textarea { width: 100%; min-height: 2.7rem; padding: .58rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.communication-form textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.communication-recipient-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.communication-attachments { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; padding: .7rem; border: 1px dashed rgba(174,117,31,.58); border-radius: .45rem; }
.attachment-picker { position: relative; overflow: hidden; width: fit-content; min-height: 2.35rem; padding: .5rem .65rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; cursor: pointer; }
.attachment-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.communication-attachments small { font-size: .68rem; font-weight: 600; line-height: 1.45; }
.communication-compose-actions, .communication-history-actions, .communication-inbox-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.communication-history-list, .communication-inbox-list { display: grid; }
.communication-history-list article, .communication-inbox-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1rem; padding: .85rem 0; border-top: 1px solid rgba(174,117,31,.28); }
.communication-history-list article:first-child, .communication-inbox-list article:first-child { border-top: 0; }
.communication-history-list h3, .communication-inbox-list h3 { margin: .28rem 0 0; color: var(--gold-deep); font-size: .96rem; }
.communication-history-list p, .communication-inbox-list p { margin: .3rem 0 0; font-size: .76rem; font-weight: 600; line-height: 1.48; }
.communication-history-list small, .communication-inbox-list small { display: block; margin-top: .42rem; color: var(--gold-deep); font-size: .65rem; font-weight: 700; opacity: .82; }
.communication-delivery { color: #286c4c; border-color: #286c4c; background: #f2faf4; }
.communication-history-actions .row-action b { margin-left: .2rem; font-size: .9em; }
.communication-seen-list { grid-column: 1 / -1; display: grid; gap: .55rem; padding: .72rem; border: 1px solid rgba(174,117,31,.42); border-radius: .42rem; background: #fff9eb; }
.communication-seen-list[hidden] { display: none !important; }
.communication-seen-list p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; margin: 0; color: var(--gold-deep); font-size: .72rem; }
.communication-seen-list p span { font-weight: 600; }
.communication-seen-list > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; }
.communication-seen-list > div > span { display: grid; gap: .16rem; padding: .48rem; border: 1px solid rgba(174,117,31,.3); border-radius: .35rem; color: var(--gold-deep); font-size: .72rem; font-weight: 800; }
.communication-seen-list small { color: inherit; font-size: .62rem; font-weight: 600; opacity: .8; }
.communication-inbox-list article.is-unread { padding-inline: .55rem; border: 1px solid rgba(174,117,31,.5); border-radius: .45rem; background: #fff9eb; }
.communication-read { opacity: .72; }
html[data-theme="dark"] .communication-screen, html[data-theme="dark"] .communication-compose-panel, html[data-theme="dark"] .communication-history-panel, html[data-theme="dark"] .communication-inbox-panel, html[data-theme="dark"] .communication-inbox-list article.is-unread { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .communication-seen-list, html[data-theme="dark"] .communication-seen-list > div > span { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); }
html[data-theme="dark"] .communication-page-heading h2, html[data-theme="dark"] .communication-panel-heading h3, html[data-theme="dark"] .communication-history-list h3, html[data-theme="dark"] .communication-inbox-list h3, html[data-theme="dark"] .communication-form label, html[data-theme="dark"] .communication-history-list small, html[data-theme="dark"] .communication-inbox-list small { color: #f7f8fb; }
html[data-theme="dark"] .communication-sender, html[data-theme="dark"] .communication-one-way, html[data-theme="dark"] .communication-audience, html[data-theme="dark"] .communication-attachment, html[data-theme="dark"] .communication-read, html[data-theme="dark"] .communication-form input, html[data-theme="dark"] .communication-form select, html[data-theme="dark"] .communication-form textarea, html[data-theme="dark"] .attachment-picker { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .communication-delivery { color: #8ce1ad; background: #02040a; border-color: #8ce1ad; }
@media (max-width: 48rem) { .communication-recipient-grid { grid-template-columns: 1fr; } .communication-history-list article, .communication-inbox-list article { grid-template-columns: 1fr; gap: .65rem; } .communication-history-actions, .communication-inbox-actions { justify-content: flex-start; } .communication-seen-list > div { grid-template-columns: 1fr; } }
@media (max-width: 38rem) { .communication-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; } .communication-page-heading, .communication-panel-heading { display: grid; } .communication-page-heading h2 { font-size: 1.75rem; } .communication-sender { white-space: normal; } }

/* Immutable Admin and Client notification centres. */
.roles-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.roles-screen[hidden] { display: none !important; }
.roles-page-heading, .panel-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.roles-page-heading h2, .roles-screen .dashboard-panel h3 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 2.3rem); font-weight: 500; }
.roles-screen .dashboard-panel h3 { font-size: clamp(1.1rem, 2.4vw, 1.5rem); }
.roles-page-heading > div > p:not(.section-label) { max-width: 43rem; margin: .48rem 0 0; font-size: .88rem; line-height: 1.55; }
.roles-self { display: inline-flex; align-items: center; min-height: 2.2rem; padding: .36rem .6rem; border: 1px solid rgba(174,117,31,.52); border-radius: 999px; background: #fffefb; font-size: .68rem; font-weight: 800; white-space: nowrap; }
.roles-search-panel { display: grid; gap: .85rem; }
.roles-search-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .7rem; }
.roles-search-form label { display: grid; gap: .32rem; font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.roles-search-form input { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffefb; font: inherit; font-size: .82rem; font-weight: 600; text-transform: none; }
.roles-search-result { display: grid; }
.roles-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.roles-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .75rem 0; border-top: 1px solid rgba(174,117,31,.28); }
.roles-row:first-child { border-top: 0; }
.roles-row > div:first-child { min-width: 0; }
.roles-row strong, .roles-row span { display: block; }
.roles-row strong { color: var(--gold-deep); font-size: .84rem; }
.roles-row span { margin-top: .26rem; font-size: .67rem; font-weight: 700; line-height: 1.45; opacity: .8; }
.roles-row .row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.roles-friends-panel { min-height: 10rem; }
html[data-theme="dark"] .roles-screen, html[data-theme="dark"] .roles-self, html[data-theme="dark"] .roles-search-form input { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .roles-page-heading h2, html[data-theme="dark"] .roles-screen .dashboard-panel h3, html[data-theme="dark"] .roles-row strong { color: #f7f8fb; }
@media (max-width: 48rem) { .roles-grid { grid-template-columns: 1fr; } .roles-page-heading { display: grid; } .roles-search-form { grid-template-columns: 1fr; } }
@media (max-width: 38rem) { .roles-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; } .roles-row { grid-template-columns: 1fr; } .roles-row .row-actions { justify-content: flex-start; } }

.notification-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.notification-screen[hidden] { display: none !important; }
.notification-page-heading, .notification-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.notification-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.notification-page-heading > div:first-child > p:not(.section-label) { max-width: 43rem; margin: .48rem 0 0; font-size: .9rem; line-height: 1.55; }
.notification-header-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.notification-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.notification-summary article { display: grid; gap: .3rem; min-height: 6.7rem; padding: .85rem; border: 1px solid rgba(174,117,31,.46); border-radius: .48rem; background: linear-gradient(135deg, #fffefb, #f6eddb); }
.notification-summary span, .notification-summary small { font-size: .67rem; font-weight: 700; }
.notification-summary strong { color: var(--gold-deep); font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.notification-tabs { display: flex; flex-wrap: wrap; gap: .45rem; padding: .4rem; border: 1px solid rgba(174,117,31,.48); border-radius: .5rem; background: #fffefb; }
.notification-tabs button { min-height: 2.35rem; padding: .4rem .65rem; border: 1px solid transparent; border-radius: .34rem; color: var(--gold-deep); background: transparent; font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.notification-tabs button:hover, .notification-tabs button:focus-visible, .notification-tabs button.is-active { border-color: rgba(174,117,31,.6); background: #f3e8d1; outline: none; }
.notification-list-panel { display: grid; gap: .75rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.notification-panel-heading h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 500; }
.notification-lock-note, .notification-read-state { display: inline-flex; align-items: center; width: fit-content; min-height: 2.1rem; padding: .34rem .55rem; border: 1px solid rgba(174,117,31,.5); border-radius: 999px; color: var(--gold-deep); background: #fffdf8; font-size: .63rem; font-weight: 800; letter-spacing: .025rem; white-space: nowrap; }
.notification-list { display: grid; }
.notification-row { display: grid; grid-template-columns: .72rem minmax(0, 1fr) auto; align-items: start; gap: .78rem; padding: .85rem 0; border-top: 1px solid rgba(174,117,31,.28); opacity: .78; }
.notification-row:first-child { border-top: 0; }
.notification-row.is-unread { opacity: 1; }
.notification-row > div:nth-child(2) { min-width: 0; }
.notification-row h3 { margin: .24rem 0 0; color: var(--gold-deep); font-size: .9rem; }
.notification-row p { margin: .28rem 0 0; font-size: .75rem; font-weight: 600; line-height: 1.48; }
.notification-meta, .notification-row time { display: block; color: var(--gold-deep); font-size: .63rem; font-weight: 800; letter-spacing: .025rem; }
.notification-row time { margin-top: .42rem; opacity: .8; }
.notification-indicator { width: .58rem; height: .58rem; margin-top: .35rem; border-radius: 999px; background: #a9adb4; }
.notification-row.is-unread .notification-indicator--account, .notification-row.is-unread .notification-indicator--bot { background: #c98d27; box-shadow: 0 0 0 .2rem rgba(201,141,39,.18); }
.notification-indicator--risk { background: #bd4b45; }
.notification-indicator--sync { background: #9d5d12; }
.notification-indicator--security { background: #4d78ac; }
.notification-indicator--expiry { background: #a07d37; }
.notification-row .row-action { align-self: center; }
.notification-empty { margin: 0; padding: 1rem; border: 1px dashed rgba(174,117,31,.55); border-radius: .45rem; text-align: center; }
html[data-theme="dark"] .notification-screen, html[data-theme="dark"] .notification-summary article, html[data-theme="dark"] .notification-tabs, html[data-theme="dark"] .notification-list-panel { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .notification-page-heading h2, html[data-theme="dark"] .notification-panel-heading h3, html[data-theme="dark"] .notification-summary strong, html[data-theme="dark"] .notification-row h3, html[data-theme="dark"] .notification-meta, html[data-theme="dark"] .notification-row time { color: #f7f8fb; }
html[data-theme="dark"] .notification-tabs button, html[data-theme="dark"] .notification-lock-note, html[data-theme="dark"] .notification-read-state { color: #f7f8fb; background: #02040a; }
html[data-theme="dark"] .notification-tabs button:hover, html[data-theme="dark"] .notification-tabs button:focus-visible, html[data-theme="dark"] .notification-tabs button.is-active { border-color: #515b69; background: #353d49; }
@media (max-width: 48rem) { .notification-summary { grid-template-columns: 1fr; } .notification-row { grid-template-columns: .72rem minmax(0, 1fr); } .notification-row .row-action, .notification-read-state { grid-column: 2; justify-self: start; } }
@media (max-width: 38rem) { .notification-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; } .notification-page-heading, .notification-panel-heading { display: grid; } .notification-page-heading h2 { font-size: 1.75rem; } .notification-header-actions .dashboard-button { width: 100%; } }

/* Admin statistics preview. */
.statistics-screen { position: relative; z-index: 1; display: grid; gap: 1rem; max-width: 72rem; min-height: calc(100vh - 8rem); margin: 1.35rem auto; padding: clamp(1.25rem, 3.5vw, 2.5rem); border: 1px solid rgba(174,117,31,.62); border-radius: .7rem; color: var(--gold-deep); background: #fffdf8; box-shadow: 0 .9rem 2rem rgba(111,72,10,.07); }
.statistics-screen[hidden] { display: none !important; }
.statistics-page-heading, .stats-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.statistics-page-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 500; }
.statistics-page-heading > div:first-child > p:not(.section-label), .stats-panel-heading p { max-width: 43rem; margin: .48rem 0 0; font-size: .9rem; line-height: 1.55; }
.statistics-header-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6rem; }
.stats-last-sync, .stats-period-tag, .chart-key { display: inline-flex; align-items: center; min-height: 2.3rem; padding: .35rem .6rem; border: 1px solid rgba(174,117,31,.45); border-radius: 999px; color: var(--gold-deep); background: #fffefb; font-size: .65rem; font-weight: 800; letter-spacing: .025rem; white-space: nowrap; }
.stats-scope-panel, .equity-panel, .stats-metrics-section, .trade-history-panel { display: grid; gap: .9rem; padding: 1rem; border: 1px solid rgba(174,117,31,.52); border-radius: .55rem; background: #fffefb; }
.stats-panel-heading h3 { margin: 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(1.3rem, 2.8vw, 1.75rem); font-weight: 500; }
#stats-scope-name { align-self: center; margin: 0; color: var(--gold-deep); font-size: .72rem; font-weight: 800; text-align: right; }
.stats-scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.stats-time-range { display: flex; flex-wrap: wrap; align-items: end; gap: .7rem; padding-top: .75rem; border-top: 1px solid rgba(174,117,31,.32); }
.stats-time-range label, .stats-scope-grid label, .trade-history-filters label { display: grid; gap: .3rem; color: var(--gold-deep); font-size: .68rem; font-weight: 800; letter-spacing: .05rem; text-transform: uppercase; }
.stats-time-range input, .stats-scope-grid select, .trade-history-filters input, .trade-history-filters select { width: 100%; min-height: 2.7rem; padding: .5rem .7rem; border: 1px solid rgba(174,117,31,.72); border-radius: .38rem; outline: none; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: 0; text-transform: none; }
.stats-time-range input:focus, .stats-scope-grid select:focus, .trade-history-filters input:focus, .trade-history-filters select:focus { box-shadow: 0 0 0 .2rem rgba(190,134,42,.16); }
.stats-time-range label { width: min(15rem, 100%); }
.stats-time-range .dashboard-button { min-height: 2.7rem; }
.stats-profit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.stats-profit-card { display: grid; gap: .34rem; min-height: 8rem; padding: 1.1rem; border: 1px solid rgba(174,117,31,.62); border-radius: .55rem; background: linear-gradient(135deg, #fffefb, #f6eddb); }
.stats-profit-card span { font-size: .75rem; font-weight: 800; }
.stats-profit-card strong { color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 500; line-height: 1; }
.stats-profit-card small { font-size: .7rem; font-weight: 600; opacity: .82; }
.stats-profit-card b { color: #286c4c; font-size: .72rem; }
.stats-profit-card--overall { background: linear-gradient(135deg, #fffdf8, #efe2c8); }
.chart-key { gap: .35rem; }
.chart-key i { width: 1.4rem; height: .2rem; border-radius: 999px; background: var(--gold); }
.equity-chart-wrap { overflow-x: auto; padding: .25rem; border: 1px solid rgba(174,117,31,.32); border-radius: .45rem; background: #fffdf8; }
.equity-chart { display: block; min-width: 38rem; width: 100%; height: auto; }
.equity-grid-lines { fill: none; stroke: rgba(174,117,31,.22); stroke-width: 1; }
.equity-axis-labels { fill: var(--gold-deep); font-size: 12px; font-weight: 700; }
.equity-area { fill: rgba(195,140,45,.13); }
.equity-line { fill: none; stroke: var(--gold); stroke-linecap: round; stroke-linejoin: round; stroke-width: 4; }
.equity-points circle { fill: #fffdf8; stroke: var(--gold-deep); stroke-width: 3; }
.stats-metrics-columns { display: grid; grid-template-columns: 1fr; gap: .75rem; }
.stats-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.stats-metric-card { display: grid; gap: .34rem; min-height: 8.2rem; padding: .84rem; border: 1px solid rgba(174,117,31,.42); border-radius: .45rem; background: #fffdf8; }
.stats-metric-card span { font-size: .69rem; font-weight: 800; }
.stats-metric-card strong { color: var(--gold-deep); font-family: var(--serif); font-size: 1.35rem; font-weight: 500; line-height: 1.1; }
.stats-metric-card strong em { color: #9d5d12; font-size: .9em; font-style: normal; }
.stats-metric-card small { font-size: .65rem; font-weight: 600; opacity: .82; }
.stats-split-bar, .stats-risk-bar { display: flex; height: .45rem; margin-top: auto; overflow: hidden; border-radius: 999px; background: #e7dfd1; }
.stats-split-bar i, .stats-risk-bar i { display: block; height: 100%; }
.stats-split-bar .is-profit { background: #2f8057; }
.stats-split-bar .is-loss { background: #bd4b45; }
.stats-risk-bar i { border-radius: inherit; background: linear-gradient(90deg, #c98d27, #bd4b45); }
.trade-history-filters { display: grid; grid-template-columns: minmax(15rem, 1fr) minmax(8rem, .4fr) minmax(8rem, .4fr); gap: .7rem; padding: .8rem; border: 1px solid rgba(174,117,31,.38); border-radius: .48rem; background: #fffdf8; }
.trade-table-wrap { overflow-x: auto; border: 1px solid rgba(174,117,31,.42); border-radius: .45rem; }
.trade-table-wrap table { width: 100%; min-width: 54rem; border-collapse: collapse; color: var(--gold-deep); font-size: .75rem; }
.trade-table-wrap th, .trade-table-wrap td { padding: .75rem .8rem; border-bottom: 1px solid rgba(174,117,31,.28); text-align: left; vertical-align: middle; }
.trade-table-wrap th { background: #f6eddb; font-size: .64rem; letter-spacing: .055rem; text-transform: uppercase; }
.trade-table-wrap tbody tr:last-child td { border-bottom: 0; }
.trade-table-wrap td small { font-size: .64rem; font-weight: 700; opacity: .75; }
.trade-side { display: inline-flex; padding: .22rem .45rem; border: 1px solid currentColor; border-radius: 999px; font-size: .62rem; font-weight: 800; letter-spacing: .025rem; text-transform: uppercase; }
.trade-side.is-long, .trade-profit { color: #286c4c; font-weight: 800; }
.trade-side.is-short, .trade-loss { color: #ae423d; font-weight: 800; }
.stats-empty { margin: 0; padding: 1rem; border: 1px dashed rgba(174,117,31,.55); border-radius: .45rem; text-align: center; }
.stats-retention-note { margin: 0; padding-top: .15rem; font-size: .72rem; font-weight: 600; line-height: 1.5; opacity: .86; }

html[data-theme="dark"] .statistics-screen, html[data-theme="dark"] .stats-scope-panel, html[data-theme="dark"] .equity-panel, html[data-theme="dark"] .stats-metrics-section, html[data-theme="dark"] .trade-history-panel, html[data-theme="dark"] .stats-profit-card, html[data-theme="dark"] .stats-metric-card, html[data-theme="dark"] .equity-chart-wrap, html[data-theme="dark"] .trade-history-filters { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.58); box-shadow: none; }
html[data-theme="dark"] .statistics-page-heading h2, html[data-theme="dark"] .stats-panel-heading h3, html[data-theme="dark"] #stats-scope-name, html[data-theme="dark"] .stats-profit-card strong, html[data-theme="dark"] .stats-metric-card strong, html[data-theme="dark"] .stats-scope-grid label, html[data-theme="dark"] .trade-history-filters label, html[data-theme="dark"] .equity-axis-labels, html[data-theme="dark"] .trade-table-wrap table { color: #f7f8fb; }
html[data-theme="dark"] .stats-last-sync, html[data-theme="dark"] .stats-period-tag, html[data-theme="dark"] .chart-key, html[data-theme="dark"] .stats-time-range input, html[data-theme="dark"] .stats-scope-grid select, html[data-theme="dark"] .trade-history-filters input, html[data-theme="dark"] .trade-history-filters select, html[data-theme="dark"] .equity-chart-wrap, html[data-theme="dark"] .stats-metric-card { color: #f7f8fb; background: #02040a; border-color: rgba(174,117,31,.72); }
html[data-theme="dark"] .stats-profit-card, html[data-theme="dark"] .stats-profit-card--overall { background: #02040a; }
html[data-theme="dark"] .trade-table-wrap th { background: #02040a; }
html[data-theme="dark"] .trade-table-wrap th, html[data-theme="dark"] .trade-table-wrap td { border-color: rgba(174,117,31,.36); }
html[data-theme="dark"] .equity-points circle { fill: #02040a; }
html[data-theme="dark"] .stats-split-bar, html[data-theme="dark"] .stats-risk-bar { background: #02040a; }
html[data-theme="dark"] .stats-profit-card b, html[data-theme="dark"] .trade-side.is-long, html[data-theme="dark"] .trade-profit { color: #8ce1ad; }
html[data-theme="dark"] .trade-side.is-short, html[data-theme="dark"] .trade-loss { color: #ffaaa4; }

@media (max-width: 60rem) {
  .stats-metrics-columns { grid-template-columns: 1fr; }
}

@media (max-width: 48rem) {
  .stats-scope-grid { grid-template-columns: 1fr 1fr; }
  .trade-history-filters { grid-template-columns: 1fr 1fr; }
  .trade-history-filters > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 38rem) {
  .statistics-screen { min-height: calc(100dvh - 7.3rem); margin: .8rem 0; padding: .85rem; }
  .statistics-page-heading, .stats-panel-heading { display: grid; }
  .statistics-page-heading h2 { font-size: 1.75rem; }
  .statistics-header-actions { justify-content: stretch; }
  .statistics-header-actions > * { flex: 1; text-align: center; }
  #stats-scope-name { text-align: left; }
  .stats-scope-grid, .stats-profit-grid, .stats-metric-grid, .trade-history-filters { grid-template-columns: 1fr; }
  .stats-time-range { display: grid; }
  .stats-time-range label, .stats-time-range .dashboard-button { width: 100%; }
  .trade-history-filters > :first-child { grid-column: auto; }
  .chart-key { width: fit-content; }
  .equity-chart { min-width: 33rem; }
}

/* Real member communication workspace. It starts empty until someone creates
   a server, category, channel, or sends an invitation. */
.workspace-screen { position: relative; z-index: 1; display: grid; gap: 1.25rem; width: 100%; max-width: none; min-height: calc(100vh - 3.5rem); margin: 0; padding: clamp(.6rem, 1.8vw, 1.25rem) 0; border: 0; border-radius: 0; color: var(--gold-deep); background: transparent; box-shadow: none; }
.dashboard-detail:has(.workspace-screen) { max-width: none; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.workspace-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.workspace-heading h2 { margin: .15rem 0 0; color: var(--gold-deep); font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 500; }
.workspace-heading p:not(.section-label) { max-width: 45rem; margin: .45rem 0 0; font-size: .86rem; line-height: 1.5; }
.workspace-shell { display: grid; grid-template-columns: 3.4rem 18rem minmax(31rem, 1fr) 15rem; min-height: min(68vh, 48rem); overflow: hidden; border: 0; border-radius: 0; background: #fffefb; }
.workspace-server-rail { display: flex; flex-direction: column; gap: .6rem; align-items: center; padding: .7rem .45rem; border-right: 0; background: #f6eddb; }
.workspace-server-list { display: grid; gap: .55rem; width: 100%; overflow-y: auto; }
.workspace-server-list button, .workspace-create-server { display: grid; place-items: center; width: 2.2rem; min-height: 2.2rem; margin: 0 auto; overflow: hidden; border: 0; border-radius: 999px; color: var(--gold-deep); background: transparent; font: inherit; font-size: .72rem; font-weight: 900; cursor: pointer; text-align: center; word-break: break-word; }
.workspace-server-list button img { width:100%; height:100%; object-fit:cover; }
.workspace-server-list button.is-active, .workspace-server-list button:hover, .workspace-server-list button:focus-visible, .workspace-create-server:hover, .workspace-create-server:focus-visible { color: #fff; background: var(--gold-deep); outline: none; }
.workspace-server-list .dashboard-empty { display: none; }
.workspace-create-server { margin-top: auto; font-size: 1.6rem; line-height: 1; }
.workspace-create-server[hidden] { display: none; }
.workspace-channel-rail { display: grid; align-content: start; gap: .7rem; min-width: 0; border-right: 1px solid rgba(174,117,31,.34); background: #fffdf8; }
.workspace-server-title { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: .45rem; min-height: 4rem; padding: .8rem; border-bottom: 1px solid rgba(174,117,31,.34); }
.workspace-server-profile { display:flex; align-items:center; min-width:0; gap:.55rem; }
.workspace-server-profile img { width:2rem; height:2rem; flex:0 0 auto; border:1px solid rgba(174,117,31,.58); border-radius:50%; object-fit:cover; background:#070b12; }
.workspace-server-profile strong { min-width:0; }
.workspace-server-title strong { overflow: hidden; color: var(--gold-deep); font-family: var(--serif); font-size: 1.16rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-server-controls { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.3rem; }
.workspace-server-controls .row-action { max-width:5.8rem; padding:.38rem .48rem; font-size:.61rem; line-height:1.15; text-align:center; white-space:normal; }
.workspace-server-controls [hidden] { display:none !important; }
.workspace-server-photo-upload { cursor:pointer; }
.workspace-delete-server { color:#a3332a; border-color:rgba(163,51,42,.55); }
.workspace-delete-server:hover, .workspace-delete-server:focus-visible { color:#fff; background:#a3332a; border-color:#a3332a; }
.workspace-channel-actions { display:grid; gap:.35rem; padding: 0 .7rem; }
.workspace-channel-actions button { padding: .45rem 0; border: 0; color: var(--gold-deep); background: transparent; font: inherit; font-size: .68rem; font-weight: 800; text-align: left; cursor: pointer; }
.workspace-channel-actions button:disabled { opacity: .45; cursor: not-allowed; }
.workspace-channel-list { display: grid; gap: .3rem; max-height: 28rem; padding: 0 .65rem .85rem; overflow-y: auto; }
.workspace-category { display: grid; gap: .3rem; }
.workspace-category > button { display:flex; justify-content:space-between; width:100%; padding:.38rem .2rem; border:0; color:var(--gold-deep); background:transparent; font:inherit; font-size:.64rem; font-weight:900; letter-spacing:.045rem; text-transform:uppercase; cursor:pointer; }
.workspace-category-header { display:flex; align-items:center; justify-content:space-between; gap:.25rem; min-width:0; }
.workspace-category-header > [data-comms-category-toggle] { display:flex; align-items:center; gap:.32rem; min-width:0; flex:1; padding:.38rem .2rem; border:0; color:var(--gold-deep); background:transparent; font:inherit; font-size:.64rem; font-weight:900; letter-spacing:.045rem; text-align:left; text-transform:uppercase; cursor:pointer; }
.workspace-category-header > [data-comms-category-toggle] > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-category-header > [data-comms-category-toggle] > b { width:.65rem; font-size:1rem; line-height:1; }
.workspace-item-actions { display:flex; align-items:center; gap:.08rem; }
.workspace-item-actions button { display:grid; place-items:center; width:1.35rem; height:1.35rem; padding:0; border:0; border-radius:.24rem; color:var(--gold-deep); background:transparent; font:inherit; font-size:.82rem; cursor:pointer; }
.workspace-item-actions button:hover, .workspace-item-actions button:focus-visible { color:#fff; background:var(--gold-deep); outline:none; }
.workspace-category-channels { display:grid; gap:.18rem; }
.workspace-category-channels[hidden] { display:none; }
.workspace-channel { display:flex; width:100%; align-items:center; gap:.2rem; padding:.12rem; border:1px solid transparent; border-radius:.35rem; color:var(--gold-deep); background:transparent; font:inherit; font-size:.86rem; font-weight:700; text-align:left; }
.workspace-channel > [data-comms-channel] { display:flex; min-width:0; flex:1; align-items:center; gap:.45rem; padding:.48rem; border:0; border-radius:.28rem; color:inherit; background:transparent; font:inherit; font-size:inherit; font-weight:inherit; cursor:pointer; text-align:left; }
.workspace-channel > [data-comms-channel] b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-channel [data-comms-channel] span { font-size:1rem; font-weight:400; }
.workspace-channel:hover, .workspace-channel.is-active { border-color:rgba(174,117,31,.55); background:#f3e8d1; }
.workspace-channel > [data-comms-channel]:focus-visible { outline:1px solid var(--gold); background:#f3e8d1; }
.workspace-channel.is-dragging { opacity:.42; }
.workspace-category-channels.is-drop-target { outline:1px dashed var(--gold); outline-offset:2px; background:rgba(213,164,75,.12); }
.workspace-chat { display:grid; grid-template-rows:auto minmax(0,1fr) auto; min-width:0; min-height:min(68vh, 48rem); }
.workspace-chat > header { display:flex; align-items:center; justify-content:space-between; gap:.75rem; min-height:4rem; padding:.8rem 1rem; border-bottom:1px solid rgba(174,117,31,.34); }
.workspace-chat > header > div { display:flex; align-items:center; gap:.45rem; min-width:0; }
.workspace-chat > header span { color:var(--gold); font-size:1.3rem; }
.workspace-chat > header strong { color:var(--gold-deep); font-size:1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-chat > header small { max-width:17rem; font-size:.66rem; font-weight:700; text-align:right; }
.workspace-message-list { display:grid; align-content:start; gap:.65rem; min-height:0; padding:1rem; overflow-y:auto; }
.workspace-message { display:grid; grid-template-columns:2rem minmax(0,1fr); gap:.6rem; max-width:82%; cursor:pointer; }
.workspace-message.is-own { grid-template-columns:minmax(0,1fr) 2rem; justify-self:end; text-align:right; }
.workspace-message.is-own .workspace-message-avatar { grid-column:2; }
.workspace-message.is-own > div { grid-column:1; grid-row:1; }
.workspace-message.is-own .workspace-message-files { justify-content:flex-end; }
.workspace-message.is-reply-target > div { padding:.45rem .6rem; border:1px solid rgba(213,164,75,.8); border-radius:.45rem; background:rgba(213,164,75,.10); }
.workspace-message-avatar, .workspace-member-avatar { display:grid; place-items:center; flex:0 0 auto; width:2rem; height:2rem; overflow:hidden; padding:0; border:1px solid rgba(174,117,31,.58); border-radius:999px; color:#fff; background:var(--gold-deep); font:inherit; font-size:.7rem; font-weight:900; }
button.workspace-message-avatar, button.workspace-member { cursor:pointer; }
.workspace-message-avatar:hover, .workspace-message-avatar:focus-visible, button.workspace-member:hover, button.workspace-member:focus-visible { outline:2px solid rgba(213,164,75,.8); outline-offset:2px; }
.workspace-message-avatar img, .workspace-member-avatar img { width:100%; height:100%; object-fit:cover; }
.workspace-message h4 { margin:0; color:var(--gold-deep); font-size:.76rem; }
.workspace-message-name { padding:0; border:0; color:inherit; background:transparent; font:inherit; font-weight:inherit; cursor:pointer; }
.workspace-message-name:hover, .workspace-message-name:focus-visible { color:var(--gold); outline:none; text-decoration:underline; }
.workspace-message time { margin-left:.35rem; font-size:.61rem; font-weight:600; opacity:.72; }
.workspace-message p { margin:.22rem 0 0; font-size:.78rem; font-weight:600; line-height:1.5; overflow-wrap:anywhere; white-space:pre-wrap; }
.workspace-reply-context { display:block; width:100%; margin:.15rem 0 .4rem; padding:.32rem .4rem; overflow:hidden; border:0; border-left:2px solid var(--gold); color:inherit; background:rgba(213,164,75,.1); font:inherit; font-size:.65rem; font-weight:700; text-align:left; text-overflow:ellipsis; white-space:nowrap; cursor:pointer; }
.workspace-message.is-own .workspace-reply-context { text-align:right; border-right:2px solid var(--gold); border-left:0; }
.workspace-message-files { display:flex; flex-wrap:wrap; gap:.35rem; margin-top:.42rem; }
.workspace-message-files a { display:inline-flex; align-items:center; min-height:1.8rem; padding:.25rem .45rem; border:1px solid rgba(174,117,31,.52); border-radius:.32rem; color:var(--gold-deep); font-size:.65rem; font-weight:800; text-decoration:none; }
.workspace-composer { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:.55rem; align-items:center; padding:.75rem; border-top:1px solid rgba(174,117,31,.34); background:#f6eddb; }
.workspace-reply-bar { grid-column:2 / -1; display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.4rem .55rem; border-left:2px solid var(--gold); color:var(--gold-deep); background:rgba(213,164,75,.14); font-size:.67rem; font-weight:800; }
.workspace-reply-bar[hidden] { display:none; }
.workspace-reply-bar span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-reply-bar button { width:1.5rem; height:1.5rem; padding:0; border:0; border-radius:.25rem; color:inherit; background:transparent; font:inherit; font-size:1rem; cursor:pointer; }
.workspace-reply-bar button:hover, .workspace-reply-bar button:focus-visible { color:#fff; background:var(--gold-deep); outline:none; }
.workspace-composer textarea { width:100%; min-height:2.65rem; max-height:8rem; resize:vertical; padding:.6rem; border:1px solid rgba(174,117,31,.62); border-radius:.4rem; color:var(--gold-deep); background:#fffdf8; font:inherit; font-size:.76rem; font-weight:600; }
.workspace-attach { display:grid; place-items:center; width:2.55rem; height:2.55rem; border:1px solid rgba(174,117,31,.62); border-radius:.4rem; color:var(--gold-deep); background:#fffdf8; font-size:1.25rem; font-weight:700; cursor:pointer; }
.workspace-composer small { grid-column:2 / -1; color:var(--gold-deep); font-size:.62rem; font-weight:700; }
.workspace-member-rail { min-width:0; padding:.85rem; border-left:1px solid rgba(174,117,31,.34); background:#fffdf8; }
.workspace-member-rail h3 { margin:0 0 .6rem; color:var(--gold-deep); font-family:var(--serif); font-size:1.15rem; font-weight:500; }
.workspace-member-list { display:grid; gap:.4rem; }
.workspace-member { display:grid; grid-template-columns:2rem minmax(0,1fr); align-items:center; gap:.5rem; width:100%; padding:.5rem 0; border:0; border-top:1px solid rgba(174,117,31,.2); background:transparent; text-align:left; }
.workspace-member > span { display:grid; gap:.12rem; min-width:0; }
.workspace-member strong { color:var(--gold-deep); font-size:.72rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.workspace-member small { font-size:.61rem; font-weight:700; opacity:.72; }
.workspace-invites { display:flex; flex-wrap:wrap; gap:.55rem; padding:.7rem; border:1px solid rgba(174,117,31,.55); border-radius:.5rem; background:#f6eddb; }
.workspace-invites[hidden] { display: none !important; }
.workspace-invite { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; padding:.35rem .5rem; border:1px solid rgba(174,117,31,.43); border-radius:.35rem; background:#fffdf8; font-size:.68rem; font-weight:750; }
.workspace-invite strong { color:var(--gold-deep); }
html[data-theme="dark"] .workspace-screen, html[data-theme="dark"] .workspace-shell, html[data-theme="dark"] .workspace-channel-rail, html[data-theme="dark"] .workspace-member-rail, html[data-theme="dark"] .workspace-server-list button, html[data-theme="dark"] .workspace-create-server, html[data-theme="dark"] .workspace-composer textarea, html[data-theme="dark"] .workspace-attach, html[data-theme="dark"] .workspace-invite { color:#f7f8fb; background:#02040a; border-color:rgba(174,117,31,.58); box-shadow:none; }
html[data-theme="dark"] .workspace-server-rail, html[data-theme="dark"] .workspace-composer, html[data-theme="dark"] .workspace-invites { background:#16140e; border-color:rgba(174,117,31,.58); }
html[data-theme="dark"] .workspace-heading h2, html[data-theme="dark"] .workspace-server-title strong, html[data-theme="dark"] .workspace-category > button, html[data-theme="dark"] .workspace-category-header > [data-comms-category-toggle], html[data-theme="dark"] .workspace-item-actions button, html[data-theme="dark"] .workspace-channel, html[data-theme="dark"] .workspace-chat > header strong, html[data-theme="dark"] .workspace-message h4, html[data-theme="dark"] .workspace-member-rail h3, html[data-theme="dark"] .workspace-member strong, html[data-theme="dark"] .workspace-invite strong { color:#f7f8fb; }
html[data-theme="dark"] .workspace-message-name { color:#f7f8fb; }
html[data-theme="dark"] .workspace-reply-bar, html[data-theme="dark"] .workspace-reply-context { color:#f7f8fb; background:rgba(213,164,75,.14); }
html[data-theme="dark"] .workspace-channel:hover, html[data-theme="dark"] .workspace-channel:focus-visible, html[data-theme="dark"] .workspace-channel.is-active { background:#353d49; }
@media (max-width: 70rem) { .workspace-shell { grid-template-columns:4.2rem 13rem minmax(20rem,1fr); } .workspace-member-rail { display:none; } }
@media (max-width: 52rem) { .workspace-screen { min-height:calc(100dvh - 7rem); margin:.8rem 0; padding:.85rem; } .workspace-heading { display:grid; } .workspace-shell { grid-template-columns:3.8rem minmax(12rem, .62fr) minmax(18rem,1fr); overflow-x:auto; } .workspace-channel-rail { min-height:37rem; } }
@media (max-width: 38rem) { .workspace-chat > header { display:grid; } .workspace-chat > header small { text-align:left; } .workspace-composer { grid-template-columns:auto minmax(0,1fr); } .workspace-composer .dashboard-button { grid-column:2; } }

/* Full dashboard menu collapse. The small menu control lives beside the logo
   while the sidebar is open; after collapse a matching control remains in the
   far-left corner solely to restore the menu. */
.dashboard-sidebar { position: relative; }
.sidebar-toggle { display: grid; place-items: center; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: .35rem; color: var(--gold-deep); background: transparent; font: inherit; font-size: 1.12rem; line-height: 1; cursor: pointer; }
.sidebar-toggle:hover, .sidebar-toggle:focus-visible { color: #c48320; background: rgba(190,134,42,.12); outline: none; transform: none; }
.sidebar-toggle--inside { position: absolute; top: .75rem; left: .65rem; z-index: 3; }
.sidebar-toggle--reopen { display: none; }
.sidebar-brand { padding-top: 1.1rem; }
.dashboard-layout.is-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.dashboard-layout.is-collapsed .dashboard-sidebar { width: 0; min-width: 0; padding: 0; overflow: hidden; border: 0; box-shadow: none; }
.dashboard-layout.is-collapsed .dashboard-sidebar > :not(.sidebar-toggle--inside) { display: none; }
.dashboard-layout.is-collapsed .sidebar-toggle--inside { display: none; }
.dashboard-layout.is-collapsed .sidebar-toggle--reopen { display: grid; position: fixed; z-index: 30; top: .75rem; left: .75rem; width: 2rem; height: 2rem; border: 1px solid rgba(174,117,31,.58); background: #fffdf8; box-shadow: 0 .25rem .7rem rgba(55,35,5,.16); }
.dashboard-layout.is-collapsed .dashboard-toolbar { padding-left: 3rem; }
.dashboard-toolbar { grid-template-columns: minmax(0, 1fr); }
.dashboard-toolbar .dashboard-search { width: 100%; }
.dashboard-toolbar .dashboard-search[hidden], .dashboard-toolbar .logout-tool[hidden] { display: none !important; }
html[data-theme="dark"] .dashboard-layout.is-collapsed .sidebar-toggle--reopen { color: #f7f8fb; background: #101621; }

/* Theme and sign-out are deliberately kept in Settings, not in the toolbar. */
.settings-preferences-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.settings-preference-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .7rem; }
.settings-preferences-card .logout-tool { min-height: 2.25rem; }

/* Fixed, non-collapsible presence sections in Mount Ex Hub. */
.workspace-member-rail { display: grid; align-content: start; gap: .85rem; }
.workspace-presence-group { display: grid; gap: .35rem; }
.workspace-presence-group h4 { display: flex; align-items: center; gap: .38rem; margin: 0; color: var(--gold-deep); font-size: .7rem; font-weight: 900; letter-spacing: .055rem; text-transform: uppercase; }
.workspace-presence-group h4 i { width: .48rem; height: .48rem; border-radius: 50%; background: #37aa6d; box-shadow: 0 0 .5rem rgba(55,170,109,.72); }
.workspace-presence-group + .workspace-presence-group h4 i { background: #8b8b8b; box-shadow: none; }
.workspace-member { position: relative; padding-left: .8rem; }
.workspace-member::before { content: ''; position: absolute; top: .8rem; left: .02rem; width: .45rem; height: .45rem; border-radius: 50%; background: #37aa6d; box-shadow: 0 0 .42rem rgba(55,170,109,.64); }
.workspace-presence-group + .workspace-presence-group .workspace-member::before { background: #8b8b8b; box-shadow: none; }
html[data-theme="dark"] .workspace-presence-group h4 { color: #f7f8fb; }
@media (max-width: 70rem) { .workspace-shell { grid-template-columns: 3.4rem 14rem minmax(20rem,1fr) 11.5rem; } .workspace-member-rail { display: grid; } }
@media (max-width: 38rem) { .settings-preferences-card { align-items: flex-start; flex-direction: column; } }

/* Keep the Hub member-status rail visible instead of letting it slip outside
   a normal desktop dashboard window. */
.workspace-shell { grid-template-columns: 3.4rem minmax(12rem, 15rem) minmax(0, 1fr) minmax(10.5rem, 12rem); }
.workspace-member-rail { display: grid; min-width: 10.5rem; }
@media (max-width: 70rem) { .workspace-shell { grid-template-columns: 3.4rem minmax(10rem, 12rem) minmax(0, 1fr) 10.5rem; } }

/* Persistent customer support workspace. */
.support-screen { position: relative; z-index: 1; display: grid; gap: 1rem; width: min(100%, 84rem); margin: 0 auto; padding: clamp(.8rem, 2vw, 1.5rem) 0 2rem; color: var(--gold-deep); }
.support-heading, .support-thread-heading, .support-form-row, .support-thread-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.support-heading h2 { margin: .12rem 0 .35rem; font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); font-weight: 500; }
.support-heading p:not(.section-label) { max-width: 48rem; margin: 0; line-height: 1.55; }
.support-layout { display: grid; grid-template-columns: minmax(19rem, .78fr) minmax(20rem, 1.22fr); gap: 1rem; align-items: start; }
.support-create-panel, .support-list-panel, .support-thread-panel { padding: 1.1rem; border: 1px solid rgba(174,117,31,.5); border-radius: .75rem; background: rgba(255,253,248,.92); box-shadow: 0 .5rem 1.5rem rgba(66,45,9,.07); }
.support-create-panel form, .support-reply-form { display: grid; gap: .82rem; margin-top: .9rem; }
.support-create-panel label, .support-reply-form label, .support-form-row label, .support-thread-actions label { display: grid; gap: .36rem; color: var(--gold-deep); font-size: .7rem; font-weight: 850; letter-spacing: .03rem; }
.support-create-panel input, .support-create-panel select, .support-create-panel textarea, .support-reply-form textarea, .support-thread-actions select { width: 100%; box-sizing: border-box; padding: .68rem; border: 1px solid rgba(174,117,31,.55); border-radius: .42rem; color: var(--gold-deep); background: #fffdf8; font: inherit; font-size: .82rem; font-weight: 600; }
.support-create-panel textarea, .support-reply-form textarea { resize: vertical; }
.support-form-row { align-items: end; }
.support-form-row label { flex: 1; }
.support-ticket-list { display: grid; gap: .55rem; max-height: 30rem; margin-top: .9rem; overflow-y: auto; }
.support-ticket { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .28rem .55rem; width: 100%; padding: .7rem; border: 1px solid rgba(174,117,31,.33); border-radius: .48rem; color: var(--gold-deep); background: #fffdf8; font: inherit; text-align: left; cursor: pointer; }
.support-ticket:hover, .support-ticket:focus-visible, .support-ticket.is-active { border-color: var(--gold); background: #f5ead4; outline: none; }
.support-ticket strong { overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.support-ticket small { grid-column: 1 / -1; font-size: .68rem; font-weight: 700; opacity: .78; }
.support-ticket-status, .support-status { display: inline-flex; align-items: center; width: fit-content; min-height: 1.35rem; padding: .08rem .38rem; border: 1px solid currentColor; border-radius: 999px; font-size: .6rem; font-weight: 900; letter-spacing: .04rem; text-transform: uppercase; }
.support-ticket-status--open { color: #90600e; }.support-ticket-status--in_progress { color: #376ca8; }.support-ticket-status--resolved { color: #207049; }.support-ticket-status--closed { color: #7b5151; }
.support-thread-panel { display: grid; gap: .95rem; }
.support-thread-panel[hidden] { display: none !important; }
.support-thread-heading { align-items: center; padding-bottom: .82rem; border-bottom: 1px solid rgba(174,117,31,.28); }
.support-thread-heading h3 { margin: .18rem 0 0; font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.support-thread-actions { align-items: end; }
.support-reply-list { display: grid; gap: .65rem; max-height: 27rem; overflow-y: auto; }
.support-reply { padding: .8rem; border-left: 3px solid rgba(174,117,31,.56); border-radius: .25rem .5rem .5rem .25rem; background: #faf5e9; }
.support-reply.is-own { border-left-color: #2d8057; background: #eff9f2; }
.support-reply header { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; }.support-reply strong { font-size: .76rem; }.support-reply small { font-size: .63rem; font-weight: 700; opacity: .7; }.support-reply p { margin: .42rem 0 0; font-size: .8rem; font-weight: 600; line-height: 1.52; white-space: pre-wrap; overflow-wrap: anywhere; }
html[data-theme="dark"] .support-screen { color: #f7f8fb; }.support-screen .dashboard-panel { color: inherit; }
html[data-theme="dark"] .support-create-panel, html[data-theme="dark"] .support-list-panel, html[data-theme="dark"] .support-thread-panel, html[data-theme="dark"] .support-ticket, html[data-theme="dark"] .support-create-panel input, html[data-theme="dark"] .support-create-panel select, html[data-theme="dark"] .support-create-panel textarea, html[data-theme="dark"] .support-reply-form textarea, html[data-theme="dark"] .support-thread-actions select { color:#f7f8fb; background:#02040a; border-color:rgba(174,117,31,.58); box-shadow:none; }.support-screen .panel-title h3, html[data-theme="dark"] .support-heading h2, html[data-theme="dark"] .support-thread-heading h3, html[data-theme="dark"] .support-ticket, html[data-theme="dark"] .support-create-panel label, html[data-theme="dark"] .support-reply-form label, html[data-theme="dark"] .support-thread-actions label { color:#f7f8fb; }html[data-theme="dark"] .support-ticket:hover, html[data-theme="dark"] .support-ticket:focus-visible, html[data-theme="dark"] .support-ticket.is-active { background:#353d49; }html[data-theme="dark"] .support-reply { background:#16140e; }html[data-theme="dark"] .support-reply.is-own { background:#10281b; }
@media (max-width: 52rem) { .support-layout { grid-template-columns: 1fr; }.support-heading, .support-thread-heading { display: grid; }.support-thread-actions { justify-content: space-between; }.support-ticket-list { max-height: 20rem; } }

/* Preserve the functional Vault refinements while retaining the original
   Mount Ex cream/light and black/gold themes above. */
.theme-toggle { display: inline-flex !important; }
.vault-page-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: .42rem; }
.vault-delete-page { color: #a13535; }
.vault-editor-panel,
html[data-theme="dark"] .vault-editor-panel,
html[data-theme="dark"] .vault-workspace {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.vault-editor-panel .vault-editor,
.vault-editor-panel .vault-editor:focus,
html[data-theme="dark"] .vault-editor-panel .vault-editor,
html[data-theme="dark"] .vault-editor-panel .vault-editor:focus {
  min-height: 18rem;
  padding: .15rem 0 1rem;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
}
.vault-editor-panel .vault-child-pages {
  display: block;
  width: 100%;
  margin: .05rem 0 .8rem;
  padding: 0;
  text-align: left;
  user-select: none;
}
.vault-editor-panel .vault-child-page-grid {
  display: grid;
  justify-content: start;
  justify-items: start;
  gap: .18rem;
  width: min(100%, 22rem);
}
.vault-editor-panel .vault-child-page-card,
.vault-editor-panel .vault-child-page-card:hover,
.vault-editor-panel .vault-child-page-card:focus-visible {
  display: block;
  width: 100%;
  max-width: 22rem;
  min-height: auto;
  padding: .42rem 0;
  border: 0;
  border-bottom: 1px solid rgba(174, 117, 31, .42);
  border-radius: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.vault-editor-panel .vault-line-plus,
html[data-theme="dark"] .vault-editor-panel .vault-line-plus {
  width: 1.45rem;
  height: 1.45rem;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.vault-editor-panel .vault-line-menu,
html[data-theme="dark"] .vault-editor-panel .vault-line-menu {
  display: grid;
  width: min(20rem, calc(100% - 2rem));
  max-height: min(22rem, 58vh);
  overflow: auto;
  gap: .12rem;
  padding: .35rem;
  border-color: rgba(174, 117, 31, .58);
  background: #fffdf8;
}
html[data-theme="dark"] .vault-editor-panel .vault-line-menu { background: #02040a; }
.vault-editor-panel .vault-line-menu button,
.vault-editor-panel .vault-line-menu label {
  justify-content: flex-start;
  border: 0;
  border-bottom: 1px solid rgba(174, 117, 31, .3);
  border-radius: 0;
  background: transparent;
}
.vault-editor-panel .vault-attachments,
html[data-theme="dark"] .vault-editor-panel .vault-attachments {
  border-color: rgba(174, 117, 31, .42);
  background: transparent;
  box-shadow: none;
}

/* The collapsed-menu button receives its own clear lane above page content. */
.dashboard-layout.is-collapsed .sidebar-toggle--reopen {
  top: .8rem;
  left: .8rem;
  width: 2rem;
  height: 2rem;
}
.dashboard-layout.is-collapsed .dashboard-greeting {
  margin-top: 3.65rem;
}
@media (max-width: 38rem) {
  .dashboard-layout.is-collapsed .dashboard-greeting { margin-top: 3.2rem; }
}

