/* BluDragon Trading Journal — dark console theme */

/* The theme's width caps are removed below, so plain 100% fills the screen. */
.bdutj { width: 100%; max-width: 100%; }
/* Full-screen dark app: drop the theme chrome on this page only. */
.bdutj-page .wp-block-post-title,
.bdutj-page .entry-title,
.bdutj-page .wp-block-post-featured-image,
.bdutj-page > header,
.bdutj-page > footer,
.bdutj-page .wp-site-blocks > header,
.bdutj-page .wp-site-blocks > footer,
.bdutj-page header.wp-block-template-part,
.bdutj-page footer.wp-block-template-part,
.bdutj-page .site-header,
.bdutj-page .site-footer { display: none !important; }

.bdutj-page .entry-content,
.bdutj-page .wp-block-post-content,
.bdutj-page main,
.bdutj-page article,
.bdutj-page .wp-block-group,
.bdutj-page .wp-site-blocks,
.bdutj-page .is-layout-constrained {
  max-width: none !important;
  width: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
/* neutralise the block theme's centring on constrained children */
.bdutj-page .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.bdutj-page .wp-site-blocks { gap: 0 !important; }
.bdutj-page .wp-site-blocks > * + * { margin-block-start: 0 !important; }
html:has(body.bdutj-page) { background: #0f1115; }
.bdutj-page {
  background: #0f1115 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bdutj {
  --bg: #0f1115;
  --panel: #161a20;
  --panel-2: #1b2027;
  --line: #262c36;
  --text: #e6e9ee;
  --muted: #8b94a3;
  --green: #22c55e;
  --green-dim: #14532d;
  --red: #ef4444;
  --red-dim: #4c1d1d;
  --accent: #387ed1;
  --radius: 10px;

  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 24px clamp(16px, 3vw, 44px) 44px;
  min-height: 100vh;
  box-sizing: border-box;
}
/* keep the console readable on very wide screens */
.bdutj > * { max-width: 1560px; margin-left: auto; margin-right: auto; }
.bdutj *, .bdutj *::before, .bdutj *::after { box-sizing: border-box; }

.bdutj__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.bdutj__title { margin: 0; font-size: 19px; font-weight: 650; letter-spacing: .2px; }
.bdutj__sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.bdutj__challenge {
  display: inline-block; margin-top: 9px; padding: 6px 12px;
  border: 1px solid rgba(56,126,209,.45); background: rgba(56,126,209,.13);
  border-radius: 999px; font-size: 12.5px; color: var(--text);
}
.bdutj__challenge strong { color: #7fb3ee; }

/* bottom action bar on the upload page */
.bdutj-savebar {
  display: flex; align-items: center; justify-content: flex-start; gap: 16px;
  flex-wrap: wrap; padding: 16px 18px; margin-top: 4px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.bdutj-savebar__msg { flex: 1 1 260px; order: 2; }
.bdutj-savebar .bdutj-btn { order: 1; }
.bdutj-savebar__msg a { color: var(--accent); }
.bdutj-savebar__msg .bdutj-note { margin-top: 0; }
.bdutj__headright { display: flex; align-items: center; gap: 8px; }

/* ---------- stat tiles ---------- */
.bdutj__tiles {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.bdutj-tile {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px;
}
.bdutj-tile__label {
  color: var(--muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .8px; font-weight: 600;
}
.bdutj-tile__value { font-size: 23px; font-weight: 650; margin-top: 6px; font-variant-numeric: tabular-nums; }
.bdutj-tile__foot { color: var(--muted); font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.bdutj-pos { color: var(--green); }
.bdutj-neg { color: var(--red); }
.bdutj-flat { color: var(--muted); }

/* ---------- panels ---------- */
.bdutj-panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
}
.bdutj-panel__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.bdutj-panel__title { font-size: 13.5px; font-weight: 620; }
.bdutj-panel__body { padding: 16px; }

.bdutj__grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .bdutj__grid2 { grid-template-columns: 1.35fr 1fr; } }

/* ---------- financial-year bar + month strip ---------- */
.bdutj-fybar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px;
}
.bdutj-fybar__label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
  color: var(--muted); font-weight: 600;
}
.bdutj-fybar .bdutj-select { width: auto; min-width: 240px; }

.bdutj-months {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px; margin-top: 12px; width: 100%;
}
@media (min-width: 900px) { .bdutj-months { grid-template-columns: repeat(12, minmax(0, 1fr)); } }
.bdutj-mchip {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 4px; border-radius: 7px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--text); font-family: inherit;
}
.bdutj-mchip:hover { border-color: var(--accent); }
.bdutj-mchip--on { border-color: var(--accent); background: rgba(56,126,209,.15); }
.bdutj-mchip--win { box-shadow: inset 0 -2px 0 rgba(34,197,94,.55); }
.bdutj-mchip--loss { box-shadow: inset 0 -2px 0 rgba(239,68,68,.55); }
.bdutj-mchip__name {
  font-size: 10.5px; font-weight: 650; letter-spacing: .2px;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.bdutj-mchip__val {
  font-size: 10.5px; font-variant-numeric: tabular-nums;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- equity curve ---------- */
.bdutj-chart__cap { color: var(--muted); font-size: 11.5px; margin-top: 8px; text-align: right; }
.bdutj-chart { width: 100%; height: 240px; display: block; }
.bdutj-chart__empty, .bdutj__empty {
  color: var(--muted); text-align: center; padding: 32px 12px; font-size: 13px;
}

/* ---------- calendar ---------- */
.bdutj-cal__nav { display: flex; align-items: center; gap: 8px; }
.bdutj-cal__month { font-size: 13px; font-weight: 600; min-width: 130px; text-align: center; }
.bdutj-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.bdutj-cal__dow {
  text-align: center; font-size: 10.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; font-weight: 600; padding-bottom: 2px;
}
.bdutj-cal__cell {
  border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2);
  min-height: 58px; padding: 6px; display: flex; flex-direction: column;
  justify-content: space-between; font-size: 11px; cursor: default;
}
.bdutj-cal__cell--empty { background: transparent; border-color: transparent; }
.bdutj-cal__cell--has { cursor: pointer; }
.bdutj-cal__cell--has:hover { border-color: var(--accent); }
.bdutj-cal__cell--win { background: rgba(34,197,94,.13); border-color: rgba(34,197,94,.34); }
.bdutj-cal__cell--loss { background: rgba(239,68,68,.13); border-color: rgba(239,68,68,.34); }
.bdutj-cal__day { color: var(--muted); font-weight: 600; }
.bdutj-cal__pnl { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 11.5px; }

/* ---------- locked (past month) ---------- */
.bdutj-locked {
  text-align: center; padding: 30px 16px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--panel-2);
}
.bdutj-locked__icon { font-size: 26px; line-height: 1; margin-bottom: 8px; opacity: .8; }
.bdutj-locked__title { font-size: 13.5px; font-weight: 620; }
.bdutj-locked__sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bdutj-locked__total {
  font-size: 26px; font-weight: 650; margin-top: 14px; font-variant-numeric: tabular-nums;
}

/* ---------- table ---------- */
.bdutj-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bdutj-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.bdutj-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.bdutj-table tr:last-child td { border-bottom: none; }
.bdutj-table tbody tr:hover { background: var(--panel-2); }
.bdutj-table .num { text-align: right; }
.bdutj__scroll { overflow-x: auto; }

.bdutj-pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}

/* ---------- forms / buttons ---------- */
.bdutj-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.bdutj-field > label { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.bdutj-input, .bdutj-select, .bdutj-textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 7px; padding: 9px 11px; font-size: 13px; width: 100%;
  font-family: inherit;
  /* makes the native date/month picker icon light instead of near-black */
  color-scheme: dark;
}
/* color-scheme already gives a light glyph — just make it bigger and brighter,
   do NOT invert it or it goes black again. */
.bdutj-input[type="date"]::-webkit-calendar-picker-indicator,
.bdutj-input[type="month"]::-webkit-calendar-picker-indicator {
  opacity: 1; cursor: pointer;
  padding: 3px; border-radius: 4px;
  transform: scale(1.25); transform-origin: right center;
}
.bdutj-input[type="date"]::-webkit-calendar-picker-indicator:hover,
.bdutj-input[type="month"]::-webkit-calendar-picker-indicator:hover {
  background: rgba(255,255,255,.14);
}
.bdutj-input:focus, .bdutj-select:focus, .bdutj-textarea:focus {
  outline: none; border-color: var(--accent);
}
.bdutj-textarea { min-height: 62px; resize: vertical; }

.bdutj-btn {
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  border-radius: 7px; padding: 9px 15px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  text-decoration: none; display: inline-block; line-height: 1.35;
}
/* The theme colours all <a> tags; force button colours so links used as
   buttons stay legible instead of inheriting the olive link colour. */
.bdutj a.bdutj-btn,
.bdutj a.bdutj-btn:hover,
.bdutj a.bdutj-btn:focus,
.bdutj a.bdutj-btn:visited { text-decoration: none; color: #fff !important; }

.bdutj a.bdutj-btn--outline,
.bdutj a.bdutj-btn--outline:visited,
.bdutj a.bdutj-btn--ghost,
.bdutj a.bdutj-btn--ghost:visited { color: var(--text) !important; }
.bdutj a.bdutj-btn--outline:hover,
.bdutj a.bdutj-btn--ghost:hover { color: #fff !important; }

.bdutj a.bdutj-home,
.bdutj a.bdutj-home:visited { color: var(--muted) !important; text-decoration: none; }
.bdutj a.bdutj-home:hover { color: var(--accent) !important; }
.bdutj-btn:hover { filter: brightness(1.08); }
.bdutj-btn:disabled { opacity: .55; cursor: not-allowed; }
.bdutj-btn--ghost { background: transparent; color: var(--text); border-color: var(--line); }
.bdutj-btn--ghost:hover { border-color: var(--accent); filter: none; }

/* clearly legible header actions */
.bdutj-btn--solid {
  background: var(--accent); border-color: var(--accent); color: #fff;
  padding: 10px 16px; font-size: 13.5px;
}
.bdutj-btn--outline {
  background: var(--panel-2); color: var(--text);
  border: 1px solid #3d4552; padding: 10px 16px; font-size: 13.5px;
}
.bdutj-btn--outline:hover { border-color: var(--accent); color: #fff; filter: none; }
.bdutj-btn--danger { background: transparent; color: var(--red); border-color: rgba(239,68,68,.4); }
.bdutj-btn--sm { padding: 5px 10px; font-size: 12px; }

.bdutj-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.bdutj-tab {
  padding: 7px 13px; border-radius: 7px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  font-family: inherit;
}
.bdutj-tab--on { color: var(--text); border-color: var(--accent); background: rgba(56,126,209,.12); }

.bdutj-note {
  font-size: 12px; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 6px; padding: 9px 11px; margin-top: 10px;
}
.bdutj-note--warn { border-left-color: #eab308; }
.bdutj-note--err { border-left-color: var(--red); color: #fca5a5; }
.bdutj-note--ok { border-left-color: var(--green); }

.bdutj-preview {
  max-width: 100%; max-height: 220px; border-radius: 7px;
  border: 1px solid var(--line); margin-top: 8px; display: block;
}

.bdutj-row { display: flex; gap: 12px; flex-wrap: wrap; }
.bdutj-row > * { flex: 1 1 170px; }

.bdutj-spinner {
  width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.28);
  border-top-color: #fff; border-radius: 50%; display: inline-block;
  vertical-align: -2px; margin-right: 7px; animation: bdutj-spin .7s linear infinite;
}
@keyframes bdutj-spin { to { transform: rotate(360deg); } }

/* ---------- login (full-width, two columns) ---------- */
.bdutj-login {
  display: grid; gap: 26px; align-items: center;
  grid-template-columns: 1fr;
  width: 100%; margin: 3vh 0 0;
}
@media (min-width: 900px) {
  .bdutj-login { grid-template-columns: 1.25fr .75fr; gap: 48px; margin-top: 5vh; }
}
.bdutj-login__hero { padding: 8px 0; }
.bdutj-login__blurb {
  color: var(--muted); font-size: 14.5px; line-height: 1.65;
  max-width: 620px; margin: 14px 0 22px;
}
.bdutj-login__meta { color: var(--muted); font-size: 12px; margin-top: 10px; }
.bdutj-login__card { margin-bottom: 0; }
.bdutj-login .bdutj-panel__body { padding: 22px; }
.bdutj-btn--lg { padding: 13px 22px; font-size: 14.5px; }
.bdutj-home {
  display: inline-block; color: var(--muted); text-decoration: none;
  font-size: 12.5px; margin-bottom: 10px;
}
.bdutj-home:hover { color: var(--accent); }
.bdutj-login__logo {
  font-size: clamp(30px, 5vw, 52px); font-weight: 750;
  letter-spacing: -.5px; line-height: 1.08; margin-bottom: 6px;
}
.bdutj-login__tag { color: var(--muted); font-size: 14px; letter-spacing: .2px; }
.bdutj-login__paren { color: var(--muted); }
.bdutj-login__divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 14px; color: var(--muted); font-size: 11px;
  text-transform: uppercase; letter-spacing: .8px;
}
.bdutj-login__divider::before,
.bdutj-login__divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}
.bdutj-btn--block {
  display: block; width: 100%; text-align: center;
}
.bdutj-login__logo span { color: var(--accent); }
