/* ========== LOGIN PAGE ========== */
.login-body {
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  position: relative;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.login-card {
  background: rgba(12, 16, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 48px 36px;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
}

.login-logo .logo-text {
  color: var(--color-white);
}

.login-logo .logo-qt {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-password-wrap input {
  width: 100%;
  padding-right: 44px !important;
}

.login-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.15s;
}

.login-password-toggle:hover {
  color: var(--color-accent);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 60px #0d1117 inset !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  transition: background-color 5000s ease-in-out 0s;
}

.login-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-subtitle {
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-group input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--color-white);
  font-family: var(--font-family);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-group input::placeholder {
  color: #4b5563;
}

.form-group input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.1);
}

.login-error {
  color: #f87171;
  font-size: 0.85rem;
  min-height: 20px;
  text-align: center;
}

.login-btn {
  background: var(--gold-btn);
  color: #0f172a;
  border: none;
  border-radius: 10px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-family);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.login-btn:hover:not(:disabled) {
  background: var(--gold-btn-hover);
}

.login-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-btn-loader {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(15, 23, 42, 0.3);
  border-top-color: #0f172a;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.login-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -6px;
}

.login-forgot-link {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.login-forgot-link:hover {
  color: var(--color-accent);
}

.login-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-top: 24px;
  opacity: 0.7;
  line-height: 1.6;
}

/* ========== DASHBOARD LAYOUT ========== */
.dashboard-body {
  background: var(--color-bg);
  min-height: 100vh;
  font-family: var(--font-family);
  display: flex;
  overflow-x: hidden;
}

.dash-sidebar {
  width: 272px;
  min-width: 272px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  background: #060810;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dash-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--color-border);
}

.dash-logo {
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
}

.dash-logo .logo-text {
  color: var(--color-white);
}

.dash-logo .logo-qt {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
}

.dash-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}

.dash-nav-link.active {
  background: rgba(234, 179, 8, 0.08);
  color: var(--color-accent);
}

.dash-nav-link.active svg {
  stroke: var(--color-accent);
}

.dash-nav-link.dash-nav-hidden {
  display: none;
}

.dash-nav-link .lock-icon {
  margin-left: auto;
  opacity: 0.4;
}

.dash-sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--color-border);
}

.dash-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dash-user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ca8a04, #fde68a 50%, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}

.dash-user-avatar.has-photo {
  background: none;
}

.dash-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.dash-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dash-user-email {
  font-size: 0.8rem;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-user-tier {
  font-size: 0.7rem;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.dash-logout-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-family);
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.2);
}

/* ========== MAIN CONTENT ========== */
.dash-main {
  margin-left: 272px;
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 32px;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.dash-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 4px;
}

.dash-page-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.3px;
}

.dash-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-tier-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(234, 179, 8, 0.1);
  color: var(--color-accent);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.dash-content {
  flex: 1;
  padding: 32px;
}

.dash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 35;
}

/* ========== DASHBOARD PAGES ========== */
.dash-page {
  max-width: 960px;
}

.dash-welcome {
  margin-bottom: 32px;
}

.dash-welcome h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.dash-welcome p {
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.dash-stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px;
}

.dash-stat-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}

.dash-stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.dash-stat-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ========== LOCKED/UPGRADE STATE ========== */
.dash-locked-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dash-locked-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.dash-locked-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--color-accent);
}

.dash-locked-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 8px;
}

.dash-locked-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.dash-upgrade-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gold-btn);
  color: #0f172a;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-family);
  text-decoration: none;
  transition: transform 0.15s ease;
  box-shadow: 0 0 24px rgba(234, 179, 8, 0.2), 0 0 48px rgba(234, 179, 8, 0.08);
  animation: upgradeGlow 2.5s ease-in-out infinite alternate;
}

.dash-upgrade-btn:hover {
  background: var(--gold-btn-hover);
  transform: translateY(-1px);
}

@keyframes upgradeGlow {
  0% { box-shadow: 0 0 24px rgba(234, 179, 8, 0.2), 0 0 48px rgba(234, 179, 8, 0.08); }
  100% { box-shadow: 0 0 32px rgba(234, 179, 8, 0.35), 0 0 64px rgba(234, 179, 8, 0.15); }
}

/* ========== BROKER SETUP PAGE ========== */
.dash-section {
  margin-bottom: 40px;
}

.dash-section-header {
  margin-bottom: 20px;
}

.dash-section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.dash-section-header p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.broker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.broker-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px;
  transition: border-color 0.2s ease;
}

.broker-card:hover {
  border-color: rgba(234, 179, 8, 0.2);
}

.broker-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.broker-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
}

.broker-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.broker-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.broker-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.broker-spec {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.broker-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.broker-link:hover {
  color: var(--color-accent-hover);
}

.prop-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.prop-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 8px;
}

.prop-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.prop-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 5px;
  margin-right: 6px;
  margin-bottom: 4px;
}

.prop-tag.allowed {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
}

.prop-tag.restricted {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.prop-tag.check {
  background: rgba(251, 191, 36, 0.1);
  color: #FBBF24;
}

/* ========== SIGNALS PAGE ========== */
.signal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.signal-pair {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  min-width: 100px;
}

.signal-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 6px;
}

.signal-type.buy {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.signal-type.sell {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.signal-detail {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.signal-detail strong {
  color: var(--color-text);
}

.signal-status {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(234, 179, 8, 0.1);
  color: var(--color-accent);
}

/* ========== SIGNALS FEED V2 ========== */
.signals-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.signals-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 60px 24px;
  color: var(--color-text-muted);
}

.signals-empty svg {
  opacity: 0.4;
  margin-bottom: 8px;
}

.signals-empty p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.signals-empty span {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  max-width: 320px;
  line-height: 1.6;
}

.signals-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.signal-card--v2 {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.15s;
}

.signal-card--v2.sig-outcome--active  { border-left-color: var(--color-accent); }
.signal-card--v2.sig-outcome--tp      { border-left-color: #4ade80; }
.signal-card--v2.sig-outcome--sl      { border-left-color: #f87171; }
.signal-card--v2.sig-outcome--cancelled { border-left-color: rgba(255,255,255,0.2); }

.signal-card--v2.sig-card--closed {
  opacity: 0.6;
  background: rgba(255,255,255,0.02);
}

.signal-card--v2.sig-card--closed:hover {
  opacity: 0.85;
}

.sig-pips--pos {
  background: rgba(74,222,128,0.12);
  color: #4ade80;
  font-weight: 700;
}

.sig-pips--neg {
  background: rgba(248,113,113,0.12);
  color: #f87171;
  font-weight: 700;
}

.sig-closed-at {
  color: rgba(255,255,255,0.3);
  font-size: 0.7rem;
}

.sig-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sig-pair {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  flex: 1;
}

.sig-dir {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 3px 9px;
  border-radius: 6px;
}

.sig-dir--buy {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
}

.sig-dir--sell {
  background: rgba(248, 113, 113, 0.12);
  color: #f87171;
}

.sig-outcome {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 6px;
}

.sig-outcome--active    { background: rgba(234,179,8,0.12); color: var(--color-accent); }
.sig-outcome--tp        { background: rgba(74,222,128,0.12); color: #4ade80; }
.sig-outcome--sl        { background: rgba(248,113,113,0.12); color: #f87171; }
.sig-outcome--cancelled { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.35); }

.sig-levels {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.sig-level {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sig-level-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.sig-level-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.sig-level-val--tp { color: #4ade80; }
.sig-level-val--sl { color: #f87171; }

.sig-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sig-timestamp {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: auto;
}

.sig-meta-pill {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.15);
  padding: 2px 8px;
  border-radius: 20px;
}

.sig-comment {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(255,255,255,0.025);
  border-radius: 7px;
  border-left: 2px solid rgba(234,179,8,0.2);
}

.sig-comment svg {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.5;
}

.sig-outcome-note {
  font-size: 0.78rem;
  color: #4ade80;
  padding: 4px 10px;
  background: rgba(74,222,128,0.05);
  border-radius: 6px;
}

.spin-icon {
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== BILLING PAGE ========== */
.billing-plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-accent-border);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  max-width: 480px;
}

.billing-plan-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 4px;
}

.billing-plan-price {
  font-size: 2rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.billing-plan-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.dash-support-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.dash-support-link:hover {
  color: var(--color-accent-hover);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .dash-sidebar {
    transform: translateX(-100%);
  }

  .dash-sidebar.open {
    transform: translateX(0);
  }

  .dash-sidebar-close {
    display: block;
  }

  .dash-hamburger {
    display: block;
  }

  .dash-main {
    margin-left: 0;
  }

  .dash-topbar {
    padding: 14px 20px;
  }

  .dash-content {
    padding: 24px 20px;
  }

  .dash-overlay.active {
    display: block;
  }

  .signal-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .signal-status {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 36px 24px;
  }

  .dash-content {
    padding: 20px 16px;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  .broker-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== PROFILE PAGE — EDIT MODE ========== */
.profile-card {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
}

.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.profile-avatar-wrap {
  width: 84px;
  height: 84px;
  min-width: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ca8a04, #fde68a 50%, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.9rem;
  color: #0f172a;
  overflow: hidden;
  border: 2px solid rgba(234,179,8,0.3);
  flex-shrink: 0;
}

.profile-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

.profile-avatar-initial {
  font-size: 1.9rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.profile-avatar-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-avatar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.22);
  border-radius: 8px;
  padding: 7px 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.profile-avatar-btn:hover {
  background: rgba(234,179,8,0.15);
  border-color: rgba(234,179,8,0.38);
}

.profile-avatar-remove {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  white-space: nowrap;
}

.profile-avatar-remove:hover { color: #f87171; }

.profile-avatar-hint {
  font-size: 0.73rem;
  color: rgba(255,255,255,0.25);
  line-height: 1.5;
  margin: 0;
}

/* ---------- form grid ---------- */
.profile-form {
  padding: 22px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.profile-form-row--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-field--full { grid-column: 1 / -1; }

.profile-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(156,163,175,0.9);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.profile-field-opt {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
  opacity: 0.65;
}

/* ---------- dark inputs ---------- */
.profile-field input,
.profile-field select,
.profile-field textarea {
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f1f5f9;
  font-family: var(--font-family);
  font-size: 0.9rem;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.profile-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.profile-field select option {
  background: #1a1d24;
  color: #f1f5f9;
}

.profile-field textarea {
  resize: vertical;
  min-height: 68px;
}

.profile-field input::placeholder,
.profile-field textarea::placeholder {
  color: rgba(255,255,255,0.2);
}

.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(234,179,8,0.12);
}

.profile-input-readonly {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.profile-form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.profile-save-btn {
  background: var(--gold-gradient);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 10px;
  padding: 11px 28px;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  letter-spacing: 0.1px;
}

.profile-save-btn:hover {
  opacity: 0.92;
  box-shadow: 0 0 18px rgba(234,179,8,0.25);
}

.profile-save-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.profile-cancel-btn {
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  font-size: 0.88rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 11px 24px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.profile-cancel-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}

.profile-save-msg {
  font-size: 0.83rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
}

.profile-save-msg--success {
  background: rgba(74,222,128,0.1);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.2);
}

.profile-save-msg--error {
  background: rgba(248,113,113,0.1);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.2);
}

.profile-save-msg--info {
  background: rgba(180,140,30,0.1);
  color: #e5c96a;
  border: 1px solid rgba(180,140,30,0.25);
}

@media (max-width: 640px) {
  .profile-form-row--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .profile-form-row,
  .profile-form-row--3 { grid-template-columns: 1fr; }
  .profile-avatar-section { padding: 20px; }
  .profile-form { padding: 18px 20px 24px; }
}

/* ========== PROFILE VIEW CARD ========== */
.pv-card {
  background: #0d1117;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
}

.pv-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pv-avatar-wrap {
  width: 72px;
  height: 72px;
  min-width: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ca8a04, #fde68a 50%, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.6rem;
  color: #0f172a;
  overflow: hidden;
  border: 2px solid rgba(234,179,8,0.3);
  flex-shrink: 0;
}

.pv-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }

.pv-identity {
  flex: 1;
  min-width: 0;
}

.pv-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pv-email {
  font-size: 0.8rem;
  color: rgba(156,163,175,0.8);
  margin-top: 2px;
}

.pv-since {
  font-size: 0.75rem;
  color: rgba(156,163,175,0.5);
  margin-top: 4px;
}

.pv-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.22);
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.pv-edit-btn:hover {
  background: rgba(234,179,8,0.14);
  border-color: rgba(234,179,8,0.38);
  box-shadow: 0 0 14px rgba(234,179,8,0.12);
}

/* 6-column data grid (cells span 3=half, 2=third, 6=full) */
.pv-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.045);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.pv-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 16px 22px;
  background: #0d1117;
  grid-column: span 3;
}

.pv-cell--full {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.045);
}

.pv-cell--two-third {
  grid-column: span 4;
}

.pv-cell--third {
  grid-column: span 2;
}

.pv-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(156,163,175,0.7);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pv-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: #f1f5f9;
  line-height: 1.5;
  word-break: break-word;
}

.pv-empty {
  color: rgba(156,163,175,0.35);
  font-style: italic;
  font-weight: 400;
}

@media (max-width: 600px) {
  .pv-top { flex-wrap: wrap; gap: 12px; }

  .pv-grid { grid-template-columns: 1fr 1fr; }
  .pv-cell { grid-column: span 1; }
  .pv-cell--full, .pv-cell--two-third { grid-column: 1 / -1; border-top: none; }
  .pv-cell--third { grid-column: span 1; }
}

@media (max-width: 400px) {
  .pv-grid { grid-template-columns: 1fr; }
  .pv-cell, .pv-cell--third { grid-column: 1; }
}

/* ========== ONBOARDING MODAL ========== */
.ob-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 40px;
  overflow-y: auto;
}

.ob-panel {
  background: #111116;
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
}

.ob-header {
  padding: 32px 32px 24px;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.ob-logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.ob-logo .logo-text {
  color: var(--color-white);
}

.ob-logo .logo-qt {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ob-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.ob-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
}

.ob-avatar-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--color-border);
}

.ob-avatar-wrap {
  width: 76px;
  height: 76px;
  min-width: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ca8a04, #fde68a 50%, #b45309);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.8rem;
  color: #0f172a;
  overflow: hidden;
  border: 3px solid rgba(234,179,8,0.25);
  flex-shrink: 0;
}

.ob-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ob-avatar-initial {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.ob-avatar-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(234,179,8,0.08);
  border: 1px solid rgba(234,179,8,0.2);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.ob-avatar-btn:hover {
  background: rgba(234,179,8,0.14);
  border-color: rgba(234,179,8,0.35);
}

.ob-optional {
  font-weight: 400;
  opacity: 0.65;
}

.ob-avatar-hint {
  font-size: 0.74rem;
  color: var(--color-text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.ob-form {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ob-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ob-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.ob-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.ob-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ob-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(156,163,175,0.85);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.ob-field input,
.ob-field select,
.ob-field textarea {
  background: #1a1d24;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f1f5f9;
  font-family: var(--font-family);
  font-size: 0.9rem;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.ob-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.ob-field select option { background: #1a1d24; color: #f1f5f9; }

.ob-field textarea {
  resize: vertical;
  min-height: 68px;
}

.ob-field input::placeholder,
.ob-field textarea::placeholder {
  color: rgba(255,255,255,0.2);
}

.ob-field input:focus,
.ob-field select:focus,
.ob-field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(234,179,8,0.12);
}

.ob-error {
  font-size: 0.83rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(248,113,113,0.1);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.2);
}

.ob-submit-btn {
  width: 100%;
  background: var(--gold-gradient);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.ob-submit-btn:hover { opacity: 0.9; }
.ob-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 640px) {
  .ob-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .ob-panel { border-radius: 16px; }
  .ob-header, .ob-form, .ob-avatar-row { padding-left: 20px; padding-right: 20px; }
  .ob-row-2,
  .ob-row-3 { grid-template-columns: 1fr; }
  .ob-avatar-row { flex-wrap: wrap; }
}
