/* =============================================================
   MyFXcal – Unified Style Sheet
   wp-content/themes/fxcal/css/style-custom.css
   ============================================================= */


/* ============================================================
   1. Design Tokens
   ============================================================ */
:root {
  /* Palette */
  --mfx-bg:            #f5f7ff;
  --mfx-surface:       #ffffff;
  --mfx-border:        rgba(0,0,0,0.07);
  --mfx-border-mid:    rgba(0,0,0,0.13);
  --mfx-text:          #17171a;
  --mfx-text-2:        #5f5f6e;
  --mfx-text-3:        #9898a8;

  /* Brand */
  --mfx-blue:          #2563eb;
  --mfx-blue-bg:       #eff4ff;
  --mfx-blue-border:   #c7d7fd;
  --mfx-green:         #16a34a;
  --mfx-green-bg:      #f0fdf4;
  --mfx-green-border:  #86efac;
  --mfx-yellow:        #b45309;
  --mfx-yellow-bg:     #fffbeb;
  --mfx-yellow-border: #fde68a;
  --mfx-red:           #dc2626;
  --mfx-red-bg:        #fef2f2;

  /* Shape & type */
  --mfx-r:             14px;
  --mfx-r-sm:          9px;
  --mfx-mono:          'DM Mono', monospace;
  --mfx-shadow:        0 2px 20px rgba(0,0,0,.07);

  /* Chart legacy */
  --color-positive:    #2b97fa;
  --color-negative:    #e23546;
}


/* ============================================================
   2. Login Page – Body Base
   (applies to pages using header-login.php / body.login-page)
   ============================================================ */
body.login-page {
  font-family: 'DM Sans', sans-serif;
  background: var(--mfx-bg);
  color: var(--mfx-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ============================================================
   3. Auth Layout
   ============================================================ */

/* setup / thankyou page wrapper */
.setup-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 16px 72px;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* register page wrapper */
.mfx-register-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px 80px;
}

.mfx-register-wrap {
  width: 100%;
  max-width: 420px;
}

@media (max-width: 480px) {
  .mfx-register-page { padding-top: 24px; padding-bottom: 48px; }
}


/* ============================================================
   4. Logo  (unified – BEM)
   ============================================================ */

/* Base: the <a> tag */
.mfx-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

/* Icon square */
.mfx-logo__icon {
  width: 32px; height: 32px;
  background: var(--mfx-blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mfx-logo__icon svg { width: 18px; height: 18px; }

/* Text */
.mfx-logo__text {
  font-size: 17px;
  font-weight: 600;
  color: var(--mfx-text);
  letter-spacing: -.3px;
}
.mfx-logo__text em { color: var(--mfx-blue); font-style: normal; }

/* Page variant: centered wrapper above card */
.mfx-logo--page {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

/* Sidebar variant: smaller, left-aligned, bottom border */
.mfx-logo--sidebar {
  display: flex;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mfx-border);
  margin-bottom: 8px;
}
.mfx-logo--sidebar .mfx-logo__icon {
  width: 28px; height: 28px;
  border-radius: 7px;
}
.mfx-logo--sidebar .mfx-logo__icon svg { width: 15px; height: 15px; }
.mfx-logo--sidebar .mfx-logo__text { font-size: 15px; }


/* ============================================================
   5. Card  (login pages – scoped to avoid Bootstrap conflict)
   ============================================================ */
body.login-page .card {
  width: 100%;
  background: var(--mfx-surface);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r);
  padding: 28px;
  box-shadow: var(--mfx-shadow);
}

.card-head {
  text-align: center;
  margin-bottom: 22px;
}
.card-head h1 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.3px;
  margin-bottom: 4px;
  color: var(--mfx-text);
}
.card-head p {
  font-size: 13px;
  color: var(--mfx-text-2);
  margin: 0;
}

/* register page card */
.mfx-card {
  background: var(--mfx-surface);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r);
  padding: 28px 28px 24px;
  margin-bottom: 16px;
}

.mfx-card-head {
  text-align: center;
  margin-bottom: 24px;
}
.mfx-card-head h1 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -.3px;
  color: var(--mfx-text);
}
.mfx-card-head p {
  font-size: 13px;
  color: var(--mfx-text-2);
  margin: 0;
}

@media (max-width: 480px) {
  .mfx-card { padding: 22px 18px 18px; }
  body.login-page .card { padding: 22px 18px; }
  .setup-page { padding-top: 28px; padding-bottom: 48px; }
}


/* ============================================================
   6. Stepper
   ============================================================ */

/* ── New stepper (page-setup.php, page-thankyou new) ── */
.stepper {
  display: flex;
  margin-bottom: 24px;
}
.step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px; left: 50%;
  width: 100%; height: 1px;
  background: var(--mfx-border-mid);
  z-index: 0;
}
.step.done:not(:last-child)::after { background: var(--mfx-green); }
.step-node {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--mfx-border-mid);
  background: var(--mfx-surface);
  color: var(--mfx-text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  position: relative; z-index: 1;
  transition: all .2s;
}
.step.done   .step-node { background: var(--mfx-green); border-color: var(--mfx-green); color: #fff; }
.step.active .step-node { border-color: var(--mfx-blue); color: var(--mfx-blue); box-shadow: 0 0 0 3px var(--mfx-blue-bg); }
.step-label {
  font-size: 10px;
  color: var(--mfx-text-3);
  margin-top: 5px;
  white-space: nowrap;
}
.step.done   .step-label { color: var(--mfx-green); }
.step.active .step-label { color: var(--mfx-blue); font-weight: 600; }

/* ── Legacy stepper (page-thankyou.php – mfx-steps variant) ── */
.mfx-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
  position: relative;
}
.mfx-step {
  flex: 1 1 0; min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 .25rem;
}
.mfx-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 16px); right: -50%;
  height: 2px;
  background: var(--mfx-border-mid);
  opacity: .9;
}
.mfx-step-node {
  width: 28px; height: 28px;
  border-radius: 9999px;
  border: 2px solid var(--mfx-border-mid);
  color: var(--mfx-text-3);
  display: flex; align-items: center; justify-content: center;
  background: var(--mfx-surface);
  transition: all .2s ease;
  flex: 0 0 auto;
}
.mfx-step-node.is-current { border-color: var(--mfx-blue); color: var(--mfx-blue); box-shadow: 0 0 0 3px var(--mfx-blue-bg); }
.mfx-step-node.done { border-color: var(--mfx-green); background: var(--mfx-green); color: #fff; }
.mfx-step-index { font-size: .85rem; font-weight: 600; line-height: 1; }
.mfx-step-check { display: none; font-weight: 700; font-size: .9rem; }
.mfx-step-node.done .mfx-step-index { display: none; }
.mfx-step-node.done .mfx-step-check { display: block; }
.mfx-step-label {
  margin-top: .25rem;
  font-size: .75rem;
  color: var(--mfx-text-3);
  white-space: nowrap;
}
@media (max-width: 576px) { .mfx-step-label { display: none; } }

/* ── Register stepper (page-register.php – mfx-step-item variant) ── */
.mfx-stepper {
  display: flex;
  align-items: flex-start;
  margin-bottom: 28px;
  position: relative;
}
.mfx-step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.mfx-step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px; left: 50%;
  width: 100%; height: 1px;
  background: var(--mfx-border-mid);
  z-index: 0;
}
.mfx-step-item.done:not(:last-child)::after { background: var(--mfx-green); }
.mfx-step-item .mfx-step-node {
  width: 26px; height: 26px;
  border-radius: 50%;
  z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 500;
  border: 1px solid var(--mfx-border-mid);
  background: var(--mfx-surface);
  color: var(--mfx-text-3);
  position: relative;
  /* override the mfx-step-node defaults above */
  box-shadow: none;
}
.mfx-step-item.done   .mfx-step-node { background: var(--mfx-green); border-color: var(--mfx-green); color: #fff; }
.mfx-step-item.active .mfx-step-node { border-color: var(--mfx-blue); color: var(--mfx-blue); box-shadow: 0 0 0 3px var(--mfx-blue-bg); }
.mfx-step-item .mfx-step-label {
  font-size: 10px;
  color: var(--mfx-text-3);
  margin-top: 6px;
  white-space: nowrap;
}
.mfx-step-item.done   .mfx-step-label { color: var(--mfx-green); }
.mfx-step-item.active .mfx-step-label { color: var(--mfx-blue); font-weight: 500; }


/* ============================================================
   7. Form Elements  (login pages)
   ============================================================ */

/* ── New style (page-setup.php) ── */
.fg { margin-bottom: 14px; }
.fl {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--mfx-text-2);
  margin-bottom: 5px;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.fi {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--mfx-border-mid);
  border-radius: var(--mfx-r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--mfx-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
  background: var(--mfx-surface);
}
.fi:focus { border-color: var(--mfx-blue); box-shadow: 0 0 0 3px var(--mfx-blue-bg); }
.fi.with-icon { padding-left: 38px; }
.fi-wrap { position: relative; }
.fi-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  pointer-events: none;
}
.pw-wrap { display: flex; }
.pw-wrap .fi { border-radius: var(--mfx-r-sm) 0 0 var(--mfx-r-sm); flex: 1; }
.pw-toggle {
  padding: 0 13px;
  border: 1.5px solid var(--mfx-border-mid);
  border-left: none;
  border-radius: 0 var(--mfx-r-sm) var(--mfx-r-sm) 0;
  background: #f8f8f6;
  color: var(--mfx-text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.fh { font-size: 11px; color: var(--mfx-text-3); margin-top: 4px; line-height: 1.4; }
.fi.is-error { border-color: var(--mfx-red); box-shadow: 0 0 0 3px var(--mfx-red-bg); }

.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--mfx-text-3);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--mfx-text-2);
}
.check-row input { width: 15px; height: 15px; accent-color: var(--mfx-blue); cursor: pointer; }
.check-row a { color: var(--mfx-blue); text-decoration: none; }

/* ── mfx-prefixed style (page-register.php) ── */
.mfx-form-group { margin-bottom: 16px; }

.mfx-form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--mfx-text-2);
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.mfx-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--mfx-border-mid);
  border-radius: var(--mfx-r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--mfx-text);
  background: var(--mfx-surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.mfx-input:focus {
  border-color: var(--mfx-blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

.mfx-form-hint {
  font-size: 11px;
  color: var(--mfx-text-3);
  margin-top: 5px;
  line-height: 1.4;
}

.mfx-pw-row { display: flex; }
.mfx-pw-row .mfx-input {
  border-radius: var(--mfx-r-sm) 0 0 var(--mfx-r-sm);
  border-right: none;
  flex: 1;
}
.mfx-pw-toggle {
  padding: 0 14px;
  border: 1px solid var(--mfx-border-mid);
  border-radius: 0 var(--mfx-r-sm) var(--mfx-r-sm) 0;
  background: #f8f7f4;
  color: var(--mfx-text-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
  flex-shrink: 0;
}
.mfx-pw-toggle:hover { color: var(--mfx-text); }

.mfx-check-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mfx-check-row input[type=checkbox] {
  width: 15px; height: 15px;
  accent-color: var(--mfx-blue);
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}
.mfx-check-row label {
  font-size: 13px;
  color: var(--mfx-text-2);
  cursor: pointer;
  line-height: 1.4;
}
.mfx-check-row a { color: var(--mfx-blue); text-decoration: none; }
.mfx-check-row a:hover { text-decoration: underline; }

/* Error block */
.mfx-error {
  background: var(--mfx-red-bg);
  border: 1px solid #fecaca;
  border-radius: var(--mfx-r-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--mfx-red);
  line-height: 1.5;
}
.mfx-error div + div { margin-top: 4px; }


/* ============================================================
   8. Buttons  (login pages)
   ============================================================ */

/* Base .btn for login pages (doesn't override Bootstrap on main pages) */
body.login-page .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: var(--mfx-r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  gap: 6px;
  text-decoration: none;
  letter-spacing: -.1px;
}
.btn-dark {
  background: var(--mfx-text);
  color: #fff;
  border: none;
}
.btn-dark:hover { background: #2a2a30; color: #fff; }
.btn-dark:disabled { opacity: .4; cursor: not-allowed; }
.btn-blue-outline {
  background: var(--mfx-blue-bg);
  color: var(--mfx-blue);
  border: 1.5px solid var(--mfx-blue-border);
}
.btn-blue-outline:hover { background: #dce8ff; color: var(--mfx-blue); }
.btn-ghost {
  background: transparent;
  color: var(--mfx-text-2);
  border: 1.5px solid var(--mfx-border-mid);
}
.btn-ghost:hover { background: var(--mfx-bg); }
.btn-skip {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--mfx-text-3);
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 0;
  width: 100%;
  text-align: center;
  display: block;
}

/* mfx-prefixed submit button (page-register.php) */
.mfx-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  background: var(--mfx-text);
  color: #fff;
  border: none;
  border-radius: var(--mfx-r-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, transform .1s;
  margin-bottom: 14px;
  letter-spacing: -.1px;
}
.mfx-btn-submit:hover { background: #2a2a26; }
.mfx-btn-submit:active { transform: scale(.99); }


/* ============================================================
   9. Alerts  (login pages)
   ============================================================ */
.alert {
  border-radius: var(--mfx-r-sm);
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 14px;
}
body.login-page .alert-info    { background: var(--mfx-blue-bg);   border: 1px solid var(--mfx-blue-border);   color: #1d4ed8; }
body.login-page .alert-warn    { background: var(--mfx-yellow-bg); border: 1px solid var(--mfx-yellow-border); color: var(--mfx-yellow); }
body.login-page .alert-success { background: var(--mfx-green-bg);  border: 1px solid var(--mfx-green-border);  color: var(--mfx-green); }
body.login-page .alert-error   { background: var(--mfx-red-bg);    border: 1px solid #fecaca;                  color: var(--mfx-red); }
.alert-title { font-weight: 700; margin-bottom: 3px; }


/* ============================================================
   10. Copy Box
   ============================================================ */
.copy-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f4f4f0;
  border: 1px solid var(--mfx-border-mid);
  border-radius: var(--mfx-r-sm);
  padding: 9px 12px;
}
.copy-val {
  flex: 1;
  font-family: var(--mfx-mono);
  font-size: 12px;
  color: var(--mfx-text);
  word-break: break-all;
}
.copy-btn {
  padding: 4px 10px;
  border: 1px solid var(--mfx-border-mid);
  border-radius: 6px;
  background: var(--mfx-surface);
  color: var(--mfx-text-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'DM Sans', sans-serif;
  flex-shrink: 0;
}
.copy-btn:hover  { background: var(--mfx-blue-bg);  color: var(--mfx-blue);  }
.copy-btn.copied { background: var(--mfx-green-bg); color: var(--mfx-green); border-color: var(--mfx-green-border); }


/* ============================================================
   11. Polling
   ============================================================ */
.polling {
  text-align: center;
  padding: 16px 0 8px;
}
.polling-dots {
  display: inline-flex;
  gap: 5px;
  margin-bottom: 10px;
}
.polling-dots span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--mfx-blue);
  animation: mfxDotPulse 1.4s ease-in-out infinite;
}
.polling-dots span:nth-child(2) { animation-delay: .2s; }
.polling-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes mfxDotPulse {
  0%,80%,100% { opacity: .2; transform: scale(.7); }
  40%         { opacity: 1;  transform: scale(1);  }
}
.polling-label { font-size: 13px; color: var(--mfx-text-2); }
.polling ol, .polling p { text-align: left; }


/* ============================================================
   12. Broker Components
   ============================================================ */
.broker-item {
  border: 1px solid var(--mfx-border-mid);
  border-radius: var(--mfx-r-sm);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.broker-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--mfx-text-2);
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.broker-checks {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.broker-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mfx-text-2);
  cursor: pointer;
}
.broker-check input { accent-color: var(--mfx-blue); }


/* ============================================================
   13. Misc  (divider / chips / links / footer)
   ============================================================ */
.divider { border: none; border-top: 1px solid var(--mfx-border); margin: 18px 0; }

.flow-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.chip {
  font-size: 11px;
  font-weight: 600;
  background: #efefeb;
  color: var(--mfx-text-2);
  border-radius: 20px;
  padding: 2px 9px;
}
.chip-arrow { font-size: 10px; color: var(--mfx-text-3); }

.sub-link {
  text-align: center;
  font-size: 12px;
  color: var(--mfx-text-3);
  margin-top: 14px;
}
.sub-link a { color: var(--mfx-blue); text-decoration: none; font-weight: 500; }

.copy-right {
  font-size: 11px;
  color: var(--mfx-text-3);
  text-align: center;
  margin-top: 20px;
}

/* register footer / login link */
.mfx-login-link {
  text-align: center;
  font-size: 12px;
  color: var(--mfx-text-3);
}
.mfx-login-link a { color: var(--mfx-blue); text-decoration: none; }
.mfx-login-link a:hover { text-decoration: underline; }

.mfx-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--mfx-text-3);
  line-height: 1.9;
}
.mfx-footer-note code {
  font-family: var(--mfx-mono);
  font-size: 11px;
  background: #ebe9e3;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--mfx-text-2);
}

.mfx-copyright {
  text-align: center;
  font-size: 11px;
  color: var(--mfx-text-3);
  margin-top: 24px;
}


/* ============================================================
   14. Thankyou Page  – check icon + countdown
   ============================================================ */
.mfx-ty-check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--mfx-green-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.mfx-countdown {
  font-size: .8rem;
  color: var(--mfx-text-3);
  text-align: center;
  margin-top: 12px;
}


/* ============================================================
   15. Onboarding Banner  (page-mypage.php)
   ============================================================ */

/* Banner wrapper */
.ob-banner { border: 1px solid var(--mfx-blue-border); border-radius: 12px; overflow: hidden; margin-bottom: 24px; }
.ob-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; background: var(--mfx-blue-bg); cursor: pointer; }
.ob-header-left strong { font-size: 14px; font-weight: 700; color: #1e293b; display: block; }
.ob-header-left span   { font-size: 12px; color: var(--mfx-text-2); }
.ob-toggle-btn { font-size: 12px; background: none; border: 1px solid var(--mfx-border-mid); border-radius: 20px; padding: 4px 12px; cursor: pointer; color: var(--mfx-text-2); white-space: nowrap; }
.ob-body { background: var(--mfx-surface); padding: 20px 24px; }

/* Stepper */
.ob-stepper { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.ob-step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.ob-step:not(:last-child)::after { content: ''; position: absolute; top: 13px; left: 50%; width: 100%; height: 1.5px; background: var(--mfx-border-mid); }
.ob-step.done:not(:last-child)::after { background: var(--mfx-green); }
.ob-step-node { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--mfx-border-mid); background: var(--mfx-surface); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--mfx-text-3); position: relative; z-index: 1; }
.ob-step.done   .ob-step-node { background: var(--mfx-green); border-color: var(--mfx-green); color: #fff; }
.ob-step.active .ob-step-node { border-color: var(--mfx-blue); color: var(--mfx-blue); box-shadow: 0 0 0 3px var(--mfx-blue-bg); }
.ob-step-label { font-size: 10px; color: var(--mfx-text-3); margin-top: 5px; white-space: nowrap; }
.ob-step.done   .ob-step-label { color: var(--mfx-green); }
.ob-step.active .ob-step-label { color: var(--mfx-blue); font-weight: 700; }

/* Step cards */
.ob-step-card { border: 1px solid var(--mfx-border-mid); border-radius: 10px; padding: 16px 18px; margin-bottom: 10px; }
.ob-step-card.locked { opacity: .5; pointer-events: none; }
.ob-step-card-title { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ob-step-card-desc { font-size: 12px; color: var(--mfx-text-2); line-height: 1.65; }

/* Copy box (mypage variant) */
.ob-copy-box { display: flex; align-items: center; gap: 10px; background: #f8fafc; border: 1px solid var(--mfx-border-mid); border-radius: 8px; padding: 10px 14px; margin: 10px 0; }
.ob-copy-box code { font-family: monospace; font-size: 13px; flex: 1; color: #1e293b; }
.ob-copy-btn { font-size: 11px; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--mfx-border-mid); background: var(--mfx-surface); color: var(--mfx-blue); cursor: pointer; }
.ob-copy-btn:hover { background: var(--mfx-blue-bg); }

/* Waiting indicator */
.ob-waiting { display: flex; align-items: center; gap: 10px; background: var(--mfx-yellow-bg); border: 1px solid var(--mfx-yellow-border); border-radius: 8px; padding: 10px 14px; margin-top: 10px; font-size: 12px; color: var(--mfx-yellow); }
.ob-dots span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #d97706; animation: obBlink 1.2s infinite; margin-right: 2px; }
.ob-dots span:nth-child(2) { animation-delay: .2s; }
.ob-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes obBlink { 0%,80%,100% { opacity: .2; } 40% { opacity: 1; } }

/* Filter table */
.ob-filter-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.ob-filter-table th { font-size: 10px; color: #94a3b8; text-align: left; padding: 6px 10px; border-bottom: 1px solid #f1f5f9; text-transform: uppercase; letter-spacing: .05em; }
.ob-filter-table td { padding: 9px 10px; border-bottom: 1px solid #f1f5f9; color: var(--mfx-text-2); }
.ob-filter-table tr:last-child td { border-bottom: none; }
.ob-filter-table .broker { font-weight: 700; color: #1e293b; width: 80px; }
.ob-filter-table .condition { font-family: monospace; font-size: 11px; }
.ob-status-pill { font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.s-ok   { background: var(--mfx-green-bg); color: #065f46; }
.s-wait { background: #f1f5f9; color: var(--mfx-text-2); }

/* Warning box */
.ob-warn { background: var(--mfx-yellow-bg); border: 1px solid var(--mfx-yellow-border); border-radius: 8px; padding: 10px 14px; margin-top: 10px; font-size: 12px; color: var(--mfx-yellow); line-height: 1.6; }
.ob-warn code { font-family: monospace; font-size: 11px; background: rgba(0,0,0,.04); padding: 1px 4px; border-radius: 3px; }

/* Status badges */
.badge-blue  { font-size: 10px; background: var(--mfx-blue-bg);  color: #1d4ed8; padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.badge-gray  { font-size: 10px; background: #f1f5f9; color: var(--mfx-text-2); padding: 2px 8px; border-radius: 20px; font-weight: 700; }
.badge-green { font-size: 10px; background: var(--mfx-green-bg); color: #065f46;  padding: 2px 8px; border-radius: 20px; font-weight: 700; }


/* ============================================================
   16. Main Site – Typography & Base
   (page-mypage.php scoped tokens)
   ============================================================ */
:root {
  --fs-body:  clamp(14px, 0.93rem, 0.95rem);
  --fs-label: 0.82rem;
  --fs-help:  0.85rem;
  --fs-table: 0.9rem;
  --fs-btn:   0.9rem;
  --fs-h1:    1.25rem;
  --fs-h2:    1.125rem;
  --lh-body:  1.6;
  --lh-tight: 1.35;
  --tap-min:  44px;
}

/* Apply only on main (non-login) pages */
body:not(.login-page) {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
}
.pagetitle h1        { font-size: var(--fs-h1); font-weight: 700; line-height: var(--lh-tight); margin-bottom: .25rem; }
.card-header h5      { font-size: var(--fs-h2); font-weight: 700; line-height: var(--lh-tight); margin: 0; }
.text-muted.small,.small { font-size: var(--fs-label); }
.table th,.table td  { font-size: var(--fs-table); vertical-align: middle; }
.table thead th      { font-weight: 700; }

@media (max-width: 768px) {
  .pagetitle nav { display: none; }
  .card-body p   { margin-bottom: .75rem; }
  .account-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}


/* ============================================================
   17. Chart & Revenue Table
   ============================================================ */
.revenue-table { width: 90%; max-width: 600px; margin: 20px auto; border-collapse: collapse; border-spacing: 0; }
.revenue-table th, .revenue-table td { padding: 10px; text-align: center; border-bottom: 1px solid #ddd; }
.revenue-table th { background: #f4f4f4; }
.revenue-table td { border-right: none; }
.positive { color: var(--color-positive); font-weight: bold; }
.negative { color: var(--color-negative); font-weight: bold; }
#total-revenue { font-size: 18px; font-weight: bold; margin-top: 10px; }


/* ============================================================
   18. Profit Canvas
   ============================================================ */
#tag-filter  { margin-top: 10px; }
canvas { width: 100%; max-width: 800px; margin: auto; }
#view-mode { margin-top: 15px; }
.view-btn {
  display: inline-block;
  padding: 8px 15px;
  margin: 5px;
  background-color: #007bff;
  color: white;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}
.view-btn.active { background-color: #0056b3; }


/* ============================================================
   19. Sidebar  (management pages)
   ============================================================ */

/* No top-navbar layout: sidebar fills full height from top */
body.mfx-no-topnav .sidebar {
  top: 0 !important;
  height: 100vh !important;
}
body.mfx-no-topnav #main {
  margin-top: 0 !important;
  padding-top: 28px !important;
}

/* Visual overrides for the sidebar (layout kept from assets/css/style.css) */
.sidebar {
  background: var(--mfx-surface) !important;
  border-right: 1px solid var(--mfx-border) !important;
  font-family: 'DM Sans', sans-serif;
}

/* Logo block → uses .mfx-logo--sidebar (§4) */

/* Section headings */
.sidebar .nav-heading {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: 14px 20px 5px;
  font-size: 10px;
  font-weight: 700;
  color: var(--mfx-text-3);
  letter-spacing: .08em;
  text-transform: uppercase;
  position: relative;
  margin-top: 4px;
}
.sidebar .nav-heading .jp {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--mfx-text-3);
}
.sidebar .nav-heading .en {
  font-size: 10px;
  font-weight: 600;
  opacity: .7;
  letter-spacing: .1em;
}
.sidebar .nav-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--mfx-border);
  margin-left: .5rem;
}

/* Nav links */
.sidebar .nav-item .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mfx-text-2);
  border-left: 3px solid transparent;
  border-radius: 0 !important;
  margin: 1px 0 !important;
  transition: background .12s, color .12s;
  text-decoration: none;
}
.sidebar .nav-item .nav-link .bi {
  font-size: 15px;
  flex-shrink: 0;
  line-height: 1;
}
.sidebar .nav-item .nav-link:hover {
  background: var(--mfx-bg) !important;
  color: var(--mfx-text) !important;
}
.sidebar .nav-item .nav-link.active {
  background: var(--mfx-blue-bg) !important;
  color: var(--mfx-blue) !important;
  border-left-color: var(--mfx-blue) !important;
  font-weight: 600;
}
.sidebar .nav-item .right-badge { margin-left: auto; }

/* Main content area */
#main {
  background: var(--mfx-bg) !important;
  font-family: 'DM Sans', sans-serif;
}

/* Page title in management pages */
.pagetitle h1 {
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: -.3px;
  color: var(--mfx-text);
}
.pagetitle .breadcrumb { font-size: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar .nav-item .nav-link { padding: 10px 14px; }
}


/* ============================================================
   20. Dashboard Cards  (page-mypage.php)
   ============================================================ */
.mfx-dash-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.mfx-dash-card {
  background: var(--mfx-surface);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r);
  padding: 16px 18px;
  box-shadow: var(--mfx-shadow);
}
.mfx-dash-card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mfx-text-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.mfx-dash-card-value {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--mfx-text);
}
.mfx-dash-card-sub {
  font-size: 11px;
  color: var(--mfx-text-3);
  margin-top: 3px;
}
@media (max-width: 768px) {
  .mfx-dash-cards { grid-template-columns: 1fr; }
}

/* Completed onboarding collapse */
.mfx-ob-done {
  background: var(--mfx-surface);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r);
  margin-bottom: 20px;
  overflow: hidden;
}
.mfx-ob-done summary {
  padding: 13px 18px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  color: var(--mfx-text-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mfx-ob-done-body {
  padding: 14px 18px;
  font-size: 12px;
  color: var(--mfx-text-2);
  line-height: 1.8;
}


/* ============================================================
   21. Settings Page
   ============================================================ */
.mfx-settings-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mfx-text-2);
  margin-bottom: 5px;
  display: block;
}
.mfx-settings-hint {
  font-size: 11px;
  color: var(--mfx-text-3);
  margin-top: 4px;
  line-height: 1.5;
}

/* Card overrides on management pages (not login-page) */
body:not(.login-page) .card {
  border-color: var(--mfx-border) !important;
  border-radius: var(--mfx-r) !important;
  box-shadow: var(--mfx-shadow) !important;
}
body:not(.login-page) .card-header {
  background: var(--mfx-surface) !important;
  border-bottom: 1px solid var(--mfx-border) !important;
  font-family: 'DM Sans', sans-serif;
}
body:not(.login-page) .card-header h5 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--mfx-text);
}
body:not(.login-page) .card-body {
  background: var(--mfx-surface);
  font-family: 'DM Sans', sans-serif;
}


/* ============================================================
   22. Account Detail Page  (/accounts/{id})
   ============================================================ */
.chart-account {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* フルwidth カード */
.chart-account .card--full {
  background: var(--mfx-surface);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r);
  box-shadow: var(--mfx-shadow);
  padding: 24px;
}
.chart-account .card--full h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--mfx-text);
  margin: 0 0 4px;
}
.chart-account .muted {
  font-size: 11px;
  color: var(--mfx-text-3);
  margin-bottom: 16px;
}

/* 3カラムKPIグリッド */
.chart-account .grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.chart-account .kpi {
  background: var(--mfx-bg);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r-sm);
  padding: 12px 14px;
  font-size: 11px;
  color: var(--mfx-text-3);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chart-account .kpi strong {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--mfx-text);
  margin-top: 4px;
  font-family: var(--mfx-mono);
  letter-spacing: -.01em;
  text-transform: none;
}
.chart-account .kpi.blue strong { color: var(--mfx-blue); }
.chart-account .kpi.right { text-align: right; }

/* 区切り線 */
.chart-account .hr-thin {
  border: none;
  border-top: 1px solid var(--mfx-border);
  margin: 12px 0;
}

/* info-row (元本・ROI・レート・前日比) */
.chart-account .info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--mfx-border);
  font-size: 13px;
}
.chart-account .info-row:last-child { border-bottom: none; }
.chart-account .info-label {
  color: var(--mfx-text-3);
  font-weight: 500;
}
.chart-account .info-value {
  color: var(--mfx-text);
  font-weight: 600;
  font-family: var(--mfx-mono);
  font-size: 13px;
}

/* ROI chip */
.roi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--mfx-mono);
}
.roi-chip.pos { background: var(--mfx-green-bg); color: var(--mfx-green); }
.roi-chip.neg { background: var(--mfx-red-bg);   color: var(--mfx-red); }
.roi-chip__sub {
  font-size: 11px;
  font-weight: 500;
  opacity: .8;
}

/* 前日比 */
.chart-account .delta { font-family: var(--mfx-mono); font-weight: 700; }
.chart-account .delta.green { color: var(--mfx-green); }
.chart-account .delta.red   { color: var(--mfx-red); }
.chart-account .green { color: var(--mfx-green); }
.chart-account .red   { color: var(--mfx-red); }

/* セクション */
.chart-account .section--full {
  background: var(--mfx-surface);
  border: 1px solid var(--mfx-border);
  border-radius: var(--mfx-r);
  box-shadow: var(--mfx-shadow);
  padding: 20px 24px;
}
.chart-account .section--full h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--mfx-text-2);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

/* チャート */
.chart-account .chart-wrap--full {
  width: 100%;
  height: 240px;
  margin-bottom: 20px;
}

/* スナップ履歴テーブル */
.chart-account .snap--full {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.chart-account .snap--full th {
  font-size: 10px;
  font-weight: 600;
  color: var(--mfx-text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--mfx-border);
  text-align: right;
}
.chart-account .snap--full th:first-child { text-align: left; }
.chart-account .snap--full td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--mfx-border);
  color: var(--mfx-text-2);
  font-family: var(--mfx-mono);
  font-size: 13px;
  text-align: right;
}
.chart-account .snap--full td:first-child {
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  color: var(--mfx-text-3);
}
.chart-account .snap--full tr:last-child td { border-bottom: none; }

/* 入出金テーブル */
.chart-account .table-cf-wrapper { overflow-x: auto; }
.chart-account .table-cf {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 400px;
}
.chart-account .table-cf th {
  font-size: 10px;
  font-weight: 600;
  color: var(--mfx-text-3);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 8px 8px;
  border-bottom: 1px solid var(--mfx-border);
  text-align: left;
}
.chart-account .table-cf td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--mfx-border);
  color: var(--mfx-text-2);
  font-family: var(--mfx-mono);
  vertical-align: middle;
}
.chart-account .table-cf tr:last-child td { border-bottom: none; }

/* 入出金 chips */
.chart-account .chip.dep { background: var(--mfx-green-bg); color: var(--mfx-green); }
.chart-account .chip.wdr { background: var(--mfx-red-bg);   color: var(--mfx-red); }
.chart-account .chip.fee { background: var(--mfx-yellow-bg); color: var(--mfx-yellow); }
.chart-account .chip.bns { background: var(--mfx-blue-bg);  color: var(--mfx-blue); }

@media (max-width: 600px) {
  .chart-account .grid3 { grid-template-columns: 1fr 1fr; }
  .chart-account .kpi.right { grid-column: 1 / -1; text-align: left; }
  .chart-account .card--full,
  .chart-account .section--full { padding: 16px; }
}

/* ============================================================
   23. Tag Edit Page
   ============================================================ */
.mfx-account-row td {
  padding-top: 16px;
  border-top: 2px solid var(--mfx-border);
}
.mfx-account-number {
  font-family: var(--mfx-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--mfx-text);
}

/* Table overrides on management pages */
body:not(.login-page) .table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--mfx-text-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--mfx-border);
}
body:not(.login-page) .table td {
  color: var(--mfx-text-2);
  border-bottom: 1px solid var(--mfx-border);
  vertical-align: middle;
}

/* Form controls on management pages */
body:not(.login-page) .form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--mfx-text-2);
}
body:not(.login-page) .form-control,
body:not(.login-page) .form-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  border-color: var(--mfx-border-mid);
  border-radius: var(--mfx-r-sm);
}
body:not(.login-page) .form-control:focus,
body:not(.login-page) .form-select:focus {
  border-color: var(--mfx-blue);
  box-shadow: 0 0 0 3px var(--mfx-blue-bg);
}
body:not(.login-page) .text-muted {
  color: var(--mfx-text-3) !important;
}
