/* Login page -- MT5 Manager style (user request 2026-10-30: "login panel bhi
   change karo, Meta jaisa karo"). Loaded AFTER login.css and only restyles:
   every id / form / OTP / password-reset / intro-video behaviour in login.js
   is unchanged. A small title bar + status bar are added in login.html. */

:root {
  --m5-bg: #1b1f27;
  --m5-grid: rgba(255, 255, 255, 0.035);
  --m5-panel: #232833;
  --m5-panel-2: #1d222b;
  --m5-head: #2b313d;
  --m5-input: #161a21;
  --m5-border: #3a4150;
  --m5-border-soft: #2f3541;
  --m5-text: #e6e9ef;
  --m5-muted: #9aa3b2;
  --m5-accent: #11a36f;
  --m5-accent-2: #0d8a5d;
  --m5-focus: #2f80ed;
  --m5-error: #ef5350;
}

[data-theme="light"] {
  --m5-bg: #e9ecf1;
  --m5-grid: rgba(20, 30, 50, 0.05);
  --m5-panel: #ffffff;
  --m5-panel-2: #f5f6f8;
  --m5-head: #f0f2f5;
  --m5-input: #ffffff;
  --m5-border: #c5cbd5;
  --m5-border-soft: #dde1e7;
  --m5-text: #1d2430;
  --m5-muted: #5f6a7a;
  --m5-accent: #0f9b6a;
  --m5-accent-2: #0b8158;
  --m5-focus: #1f6fd8;
  --m5-error: #d32f2f;
}

html,
body {
  background: var(--m5-bg) !important;
  color: var(--m5-text) !important;
  font-family: "Segoe UI", Tahoma, "Outfit", Arial, sans-serif !important;
}

/* workspace background: thin chart grid + a faint price line */
body {
  background-image:
    linear-gradient(var(--m5-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--m5-grid) 1px, transparent 1px) !important;
  background-size: 48px 48px, 48px 48px !important;
}

.login-scene {
  background: none !important;
  animation: none !important;
}
.login-scene::before,
.login-scene::after { display: none !important; }

.login-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 400' preserveAspectRatio='none'%3E%3Cpolyline fill='none' stroke='%2311a36f' stroke-opacity='0.16' stroke-width='2' points='0,300 60,280 120,290 180,240 240,250 300,200 360,215 420,170 480,190 540,140 600,160 660,120 720,150 780,110 840,130 900,90 960,115 1020,80 1080,100 1140,70 1200,85'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center 70% !important;
  background-size: 100% 45% !important;
}

.login-shell {
  min-height: 100vh;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 16px !important;
}

/* the dialog */
.login-card {
  width: min(420px, 100%) !important;
  padding: 0 !important;
  border: 1px solid var(--m5-border) !important;
  border-radius: 3px !important;
  background: var(--m5-panel) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: none !important;
  overflow: hidden;
  animation: none !important;
  transform: none !important;
}
[data-theme="light"] .login-card { box-shadow: 0 14px 40px rgba(20, 30, 50, 0.18) !important; }
.login-card::before,
.login-card::after { display: none !important; }

/* title bar (added in login.html) */
.m5-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 4px 0 10px;
  background: var(--m5-head);
  border-bottom: 1px solid var(--m5-border);
  font-size: 12px;
  font-weight: 600;
  color: var(--m5-text);
  user-select: none;
}
.m5-titlebar svg { width: 15px; height: 15px; flex: 0 0 auto; }
.m5-titlebar .m5-tb-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m5-titlebar .m5-tb-btns { display: flex; gap: 2px; }
.m5-titlebar .m5-tb-btns i {
  display: inline-block;
  width: 26px;
  height: 22px;
  border-radius: 2px;
  position: relative;
  opacity: 0.6;
}
.m5-titlebar .m5-tb-btns i::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 11px;
  border-top: 1.5px solid var(--m5-muted);
}
.m5-titlebar .m5-tb-btns i:nth-child(2)::before { top: 6px; bottom: 6px; border: 1.5px solid var(--m5-muted); }
.m5-titlebar .m5-tb-btns i:nth-child(3)::before { border: none; content: "\00D7"; left: 0; right: 0; top: 0; text-align: center; font-style: normal; font-size: 16px; line-height: 22px; color: var(--m5-muted); }

/* brand row */
.login-brand-wrap {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px;
  margin: 0 !important;
  padding: 16px 20px 10px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
}
.login-brand-wrap::before { display: none !important; }
.login-brand-logo {
  width: 64px !important;
  height: auto !important;
  max-height: 64px;
  margin: 0 !important;
  filter: none !important;
  animation: none !important;
}

.login-card h1 {
  margin: 0 !important;
  padding: 0 20px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  color: var(--m5-text) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  text-align: left !important;
}
.login-card .sub {
  margin: 3px 0 0 !important;
  padding: 0 20px 12px !important;
  font-size: 12px !important;
  color: var(--m5-muted) !important;
  text-align: left !important;
  border-bottom: 1px solid var(--m5-border-soft);
}

/* form: MT5 dialog rows -- label on the left, field on the right */
.login-form,
.otp-section {
  padding: 14px 20px 6px !important;
  margin: 0 !important;
  gap: 10px !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}
.login-card label {
  display: grid !important;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--m5-text) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.login-card input,
.login-card .otp-input {
  height: 32px !important;
  padding: 0 10px !important;
  margin: 0 !important;
  border: 1px solid var(--m5-border) !important;
  border-radius: 2px !important;
  background: var(--m5-input) !important;
  color: var(--m5-text) !important;
  font-size: 13px !important;
  font-family: inherit !important;
  box-shadow: none !important;
  transition: border-color 0.1s !important;
}
.login-card input::placeholder { color: var(--m5-muted) !important; opacity: 0.7; }
.login-card input:focus,
.login-card .otp-input:focus {
  outline: none !important;
  border-color: var(--m5-focus) !important;
  box-shadow: 0 0 0 1px var(--m5-focus) inset !important;
}

/* buttons */
.login-btn {
  height: 34px !important;
  margin: 6px 0 0 102px !important;
  width: calc(100% - 102px) !important;
  padding: 0 16px !important;
  border: 1px solid var(--m5-accent-2) !important;
  border-radius: 2px !important;
  background: var(--m5-accent) !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.2px !important;
  box-shadow: none !important;
  transform: none !important;
  text-transform: none !important;
}
.login-btn::before { display: none !important; }
.login-btn:hover { background: var(--m5-accent-2) !important; transform: none !important; }
.login-btn:disabled { opacity: 0.6 !important; }

.back-btn {
  height: 30px !important;
  margin: 2px 0 0 102px !important;
  width: calc(100% - 102px) !important;
  border: 1px solid var(--m5-border) !important;
  border-radius: 2px !important;
  background: var(--m5-panel-2) !important;
  color: var(--m5-text) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}
.back-btn:hover { border-color: var(--m5-focus) !important; color: var(--m5-focus) !important; }

/* OTP / password reset steps */
.otp-icon { display: none !important; }
.otp-label {
  margin: 0 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: var(--m5-text) !important;
  text-align: left !important;
}
.otp-section > .otp-input {
  width: 100% !important;
  height: 40px !important;
  text-align: center !important;
  letter-spacing: 8px !important;
  font-family: "JetBrains Mono", Consolas, monospace !important;
  font-size: 20px !important;
}
.otp-section .login-btn,
.otp-section .back-btn { margin-left: 0 !important; width: 100% !important; }
.otp-timer { margin: 0 !important; font-size: 12px !important; color: var(--m5-muted) !important; text-align: left !important; }
.otp-timer.expired { color: var(--m5-error) !important; }
.otp-setup-block {
  border: 1px solid var(--m5-border-soft) !important;
  border-radius: 2px !important;
  background: var(--m5-panel-2) !important;
  padding: 10px !important;
}
.otp-setup-qr { border-radius: 2px !important; }

/* status bar at the bottom of the dialog */
.login-card .status-line {
  margin: 14px 0 0 !important;
  padding: 7px 20px !important;
  border-top: 1px solid var(--m5-border) !important;
  background: var(--m5-head) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--m5-muted) !important;
  text-align: left !important;
  border-radius: 0 !important;
}
.login-card .status-line::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--m5-accent);
  vertical-align: 0;
}
.login-card .status-line.error { color: var(--m5-error) !important; }
.login-card .status-line.error::before { background: var(--m5-error); }
.login-card .hint {
  margin: 0 !important;
  padding: 0 20px 9px !important;
  background: var(--m5-head) !important;
  font-size: 11px !important;
  color: var(--m5-muted) !important;
  text-align: left !important;
}

/* long login notice popup: square like the dialog */
#loginNoticeOverlay > div {
  border-radius: 3px !important;
  background: var(--m5-panel) !important;
  border-color: var(--m5-border) !important;
}
#loginNoticeOverlay > div > div:first-child { display: none !important; }
#loginNoticeOverlay p { color: var(--m5-text) !important; }

@media (max-width: 480px) {
  .login-card label { grid-template-columns: 1fr; gap: 4px; }
  .login-btn,
  .back-btn { margin-left: 0 !important; width: 100% !important; }
}

/* brand row: bigger logo on the left, title + sub-line beside it
   (2026-10-30, user: "logo side me jagah hai, udhar bada karo") */
.login-card {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-content: start;
}
.login-card > * { grid-column: 1 / -1; }
.login-card > .login-brand-wrap {
  grid-column: 1;
  grid-row: 2 / span 2;
  padding: 14px 14px 14px 20px !important;
  border-bottom: 1px solid var(--m5-border-soft) !important;
}
.login-card > .login-brand-wrap .login-brand-logo {
  width: 104px !important;
  max-height: 104px;
}
.login-card > h1 {
  grid-column: 2;
  grid-row: 2;
  align-self: end;
  padding: 18px 20px 0 4px !important;
  font-size: 17px !important;
}
.login-card > .sub {
  grid-column: 2;
  grid-row: 3;
  align-self: stretch;
  padding: 4px 20px 14px 4px !important;
}
@media (max-width: 480px) {
  .login-card > .login-brand-wrap .login-brand-logo { width: 80px !important; max-height: 80px; }
  .login-card > h1 { font-size: 15px !important; }
}

/* MT5 dialogs don't animate in: show everything at once (intro video untouched) */
.login-card,
.login-card * {
  animation: none !important;
}
.login-card h1,
.login-card .sub,
.login-card .login-form,
.login-card label,
.login-card .login-btn,
.login-card .status-line,
.login-card .hint,
.login-card .login-brand-wrap,
.login-card .login-brand-logo {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* bigger logo (2026-10-30, user: "thoda aur bada karo") */
.login-card { width: min(460px, 100%) !important; }
.login-card > .login-brand-wrap .login-brand-logo {
  width: 140px !important;
  max-height: 140px;
}
.login-card > h1 { font-size: 18px !important; }
@media (max-width: 480px) {
  .login-card > .login-brand-wrap .login-brand-logo { width: 104px !important; max-height: 104px; }
}

/* font: same Inter as inside the CRM, normal spacing everywhere
   (2026-10-30, user: "font sahi karo") */
html body,
.login-card,
.login-card *,
.m5-titlebar,
#loginNoticeOverlay * {
  font-family: "Inter", "Segoe UI", Tahoma, Arial, sans-serif !important;
  letter-spacing: normal !important;
  -webkit-font-smoothing: antialiased;
}
.m5-titlebar { font-size: 12.5px; font-weight: 600; }
.login-card > h1 { font-weight: 700 !important; }
.login-card .sub { font-weight: 400 !important; }
.login-card label { font-weight: 500 !important; }
.login-card input { font-weight: 500 !important; }
.login-btn { font-weight: 600 !important; }
.login-card .status-line { font-weight: 600 !important; }
.otp-section > .otp-input { font-family: "JetBrains Mono", Consolas, monospace !important; letter-spacing: 8px !important; }

/* theme toggle (built by theme.js) -- MT5-style small square button, one-colour
   icon instead of the emoji (2026-10-30, user: "isko bhi sahi karo").
   The emoji text is hidden (font-size 0) and redrawn with ::before / ::after;
   clicking still runs theme.js exactly as before. */
#globalThemeToggle.global-theme-toggle {
  top: 12px !important;
  right: 12px !important;
  height: 30px !important;
  min-width: 0 !important;
  padding: 0 12px 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  border: 1px solid var(--m5-border) !important;
  border-radius: 2px !important;
  background: var(--m5-panel) !important;
  color: var(--m5-text) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: none !important;
  font-size: 0 !important;
  line-height: 1 !important;
  transform: none !important;
  cursor: pointer;
}
#globalThemeToggle.global-theme-toggle:hover {
  border-color: var(--m5-focus) !important;
  color: var(--m5-focus) !important;
  transform: none !important;
}
#globalThemeToggle.global-theme-toggle::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: var(--m5-theme-icon) center / contain no-repeat;
  mask: var(--m5-theme-icon) center / contain no-repeat;
}
#globalThemeToggle.global-theme-toggle::after {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
}
/* dark theme on -> button offers "Light" (sun); light on -> "Dark" (moon) */
html[data-theme="dark"] #globalThemeToggle.global-theme-toggle::after { content: "Light"; }
html[data-theme="light"] #globalThemeToggle.global-theme-toggle::after { content: "Dark"; }
html[data-theme="dark"] #globalThemeToggle.global-theme-toggle {
  --m5-theme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}
html[data-theme="light"] #globalThemeToggle.global-theme-toggle {
  --m5-theme-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z'/%3E%3C/svg%3E");
}

/* ---- forex background (login-fx.js) -- decorative, no prices ---- */
.login-scene { background-image: none !important; } /* old single price line */
.m5-fx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(17, 163, 111, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(47, 128, 237, 0.08), transparent 50%);
}
.login-shell { position: relative; z-index: 2; }
#globalThemeToggle { z-index: 5 !important; }
.m5-fx-chart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 42px;
  width: 100%;
  height: 62%;
  opacity: 0.32;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 30%, #000 85%, transparent 100%);
}
[data-theme="light"] .m5-fx-chart { opacity: 0.26; }
.m5-fx-chart .w { stroke-width: 1.4; }
.m5-fx-chart .w.up { stroke: #19b37a; }
.m5-fx-chart .w.dn { stroke: #e5484d; }
.m5-fx-chart .b.up { fill: #19b37a; }
.m5-fx-chart .b.dn { fill: #e5484d; }
.m5-fx-chart .ma { fill: none; stroke: #f5b83d; stroke-width: 2.2; stroke-linejoin: round; opacity: 0.9; }

/* slow symbol strip at the bottom */
.m5-fx-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  border-top: 1px solid var(--m5-border-soft);
  background: color-mix(in srgb, var(--m5-panel) 82%, transparent);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.m5-fx-track {
  display: flex;
  white-space: nowrap;
  animation: m5FxScroll 70s linear infinite;
}
.m5-fx-sym {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 22px;
  font: 600 12px "Inter", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.3px;
  color: var(--m5-muted);
  border-right: 1px solid var(--m5-border-soft);
}
.m5-fx-sym i {
  width: 6px;
  height: 12px;
  border-radius: 1px;
  position: relative;
}
.m5-fx-sym i::before {
  content: "";
  position: absolute;
  left: 2.5px;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: currentColor;
}
.m5-fx-sym i.up { background: #19b37a; color: #19b37a; }
.m5-fx-sym i.dn { background: #e5484d; color: #e5484d; }
@keyframes m5FxScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .m5-fx-track { animation: none; } }

/* keep the dialog clear of the strip on short screens */
@media (max-height: 640px) { .m5-fx-ticker { display: none; } .m5-fx-chart { bottom: 0; } }

/* ======== background v2 (2026-10-30, user: "background achha design karo") ======== */
html[data-theme="dark"] body {
  background-color: #0a111c !important;
}
.m5-fx-bg {
  background:
    radial-gradient(1200px 700px at 72% 38%, rgba(25, 192, 138, 0.13), transparent 60%),
    radial-gradient(900px 600px at 12% 80%, rgba(47, 128, 237, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(10, 17, 28, 0) 0%, rgba(10, 17, 28, 0.55) 100%) !important;
}
[data-theme="light"] .m5-fx-bg {
  background:
    radial-gradient(1200px 700px at 72% 38%, rgba(25, 192, 138, 0.12), transparent 60%),
    radial-gradient(900px 600px at 12% 80%, rgba(47, 128, 237, 0.10), transparent 60%) !important;
}
.m5-fx-glow {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at 50% 45%, #000 0%, transparent 75%);
}
[data-theme="light"] .m5-fx-glow { background-image: radial-gradient(rgba(20, 40, 70, 0.09) 1px, transparent 1.2px); }

.m5-fx-chart { opacity: 1 !important; height: 66% !important; }
.m5-fx-chart .candles { opacity: 0.22; }
[data-theme="light"] .m5-fx-chart .candles { opacity: 0.18; }
.m5-fx-chart .line { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; opacity: 0.85; }
.m5-fx-chart .area { opacity: 0.9; }
.m5-fx-chart .dot { fill: #7cf0c3; }
.m5-fx-chart .ring { fill: none; stroke: #7cf0c3; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: m5FxPing 2.4s ease-out infinite; }
@keyframes m5FxPing { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(4.5); opacity: 0; } }

.m5-fx-glyph {
  position: absolute;
  font: 700 40px "Inter", "Segoe UI", Arial, sans-serif;
  color: rgba(124, 240, 195, 0.07);
  animation: m5FxFloat 22s ease-in-out infinite alternate;
  user-select: none;
}
[data-theme="light"] .m5-fx-glyph { color: rgba(15, 123, 95, 0.08); }
@keyframes m5FxFloat { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-36px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .m5-fx-glyph, .m5-fx-chart .ring { animation: none; } }

/* left brand panel on wide screens */
.m5-hero { display: none; }
@media (min-width: 1100px) {
  .login-shell { gap: 72px !important; }
  .m5-hero {
    display: block;
    width: 440px;
    color: var(--m5-text);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
  }
  .m5-hero .m5-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border: 1px solid rgba(25, 192, 138, 0.45);
    border-radius: 2px;
    background: rgba(25, 192, 138, 0.10);
    color: #19c08a;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }
  .m5-hero .m5-hero-tag::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #19c08a;
    box-shadow: 0 0 0 3px rgba(25, 192, 138, 0.25);
  }
  .m5-hero h2 {
    margin: 18px 0 10px;
    font-size: 40px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.5px;
  }
  .m5-hero h2 span {
    background: linear-gradient(90deg, #19c08a, #7cf0c3 60%, #2f80ed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .m5-hero p {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--m5-muted);
  }
  .m5-hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
  .m5-hero li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
  }
  .m5-hero li svg {
    width: 34px;
    height: 34px;
    padding: 8px;
    flex: 0 0 auto;
    border: 1px solid var(--m5-border);
    border-radius: 2px;
    background: var(--m5-panel);
    color: #19c08a;
  }
  .m5-hero li small { display: block; font-weight: 400; color: var(--m5-muted); font-size: 12.5px; margin-top: 2px; }
}

/* ======== polish v3 (2026-10-30, user: "thoda aur achha karo, mobile + desktop") ======== */

/* chart lives in the lower part of the screen, so the hero text stays clean */
.m5-fx-chart {
  height: 44% !important;
  bottom: 34px !important;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 92%, transparent 100%) !important;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 35%, #000 92%, transparent 100%) !important;
}

/* dialog: thin accent line on top + soft green glow */
.login-card {
  position: relative;
  box-shadow:
    0 0 0 1px rgba(25, 192, 138, 0.10),
    0 24px 60px rgba(0, 0, 0, 0.50),
    0 0 80px rgba(25, 192, 138, 0.10) !important;
}
[data-theme="light"] .login-card {
  box-shadow: 0 0 0 1px rgba(15, 123, 95, 0.08), 0 20px 50px rgba(20, 40, 70, 0.16), 0 0 70px rgba(25, 192, 138, 0.10) !important;
}
.login-card > .m5-titlebar { position: relative; }
.login-card > .m5-titlebar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, #2f80ed, #19c08a 55%, #7cf0c3);
}
.login-btn { transition: background 0.12s, box-shadow 0.12s !important; }
.login-btn:hover { box-shadow: 0 6px 18px rgba(25, 192, 138, 0.28) !important; }

/* trust badges */
.m5-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.m5-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--m5-border);
  border-radius: 2px;
  background: color-mix(in srgb, var(--m5-panel) 80%, transparent);
  color: var(--m5-muted);
  font: 600 12px "Inter", "Segoe UI", Arial, sans-serif;
}
.m5-trust svg { width: 14px; height: 14px; color: #19c08a; }

/* hero: readable over the background */
@media (min-width: 1100px) {
  .login-shell { gap: 88px !important; }
  .m5-hero { width: 470px; }
  .m5-hero h2 { font-size: 44px; }
  .m5-hero li > div { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35); }
  [data-theme="light"] .m5-hero li > div { text-shadow: none; }
}

/* mobile / tablet: short brand block above the dialog */
@media (max-width: 1099px) {
  .login-shell {
    flex-direction: column !important;
    justify-content: center !important;
    gap: 18px !important;
    padding: 64px 16px 56px !important;
  }
  .m5-hero {
    display: block !important;
    width: 100%;
    max-width: 460px;
    text-align: center;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: var(--m5-text);
  }
  .m5-hero .m5-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 9px;
    border: 1px solid rgba(25, 192, 138, 0.45);
    border-radius: 2px;
    background: rgba(25, 192, 138, 0.10);
    color: #19c08a;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
  }
  .m5-hero .m5-hero-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #19c08a; }
  .m5-hero h2 {
    margin: 10px 0 0;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.3px;
  }
  .m5-hero h2 span {
    background: linear-gradient(90deg, #19c08a, #7cf0c3 60%, #2f80ed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .m5-hero p,
  .m5-hero ul { display: none; }
  .m5-hero .m5-trust { justify-content: center; margin-top: 12px; gap: 6px; }
  .m5-hero .m5-trust span { height: 24px; padding: 0 8px; font-size: 11px; }
  .login-card { width: 100% !important; max-width: 460px; }
  .m5-fx-chart { height: 38% !important; }
}
@media (max-width: 480px) {
  .login-shell { padding: 60px 12px 50px !important; }
  .m5-hero h2 { font-size: 21px; }
  .login-card > .login-brand-wrap { padding: 12px 10px 12px 14px !important; }
  .login-card > .login-brand-wrap .login-brand-logo { width: 84px !important; max-height: 84px; }
  .login-card > h1 { padding: 14px 14px 0 2px !important; font-size: 16px !important; }
  .login-card > .sub { padding: 3px 14px 12px 2px !important; font-size: 11.5px !important; }
  .login-form, .otp-section { padding: 12px 14px 4px !important; }
  .login-card input { height: 40px !important; font-size: 15px !important; }
  .login-btn { height: 42px !important; font-size: 14px !important; }
  .login-card .status-line { padding: 7px 14px !important; }
  .login-card .hint { padding: 0 14px 9px !important; }
  .m5-fx-glyph { font-size: 26px !important; }
}
