/* SignalByTeDi — dashboards Copy / Compte MT */
.dash-view {
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-btn-ghost {
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(100, 116, 139, 0.45);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.5);
  transition: background 0.15s, border-color 0.15s;
}
.dash-btn-ghost:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(148, 163, 184, 0.5);
}

.dash-page-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}
.dash-page-head h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f8fafc;
}
.dash-page-head p {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #94a3b8;
}

.dash-card {
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: linear-gradient(165deg, rgba(18, 24, 38, 0.95) 0%, rgba(11, 14, 20, 0.98) 100%);
  box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.45);
}
.dash-card-pad {
  padding: 1.25rem 1.5rem;
}
@media (min-width: 640px) {
  .dash-card-pad {
    padding: 1.5rem 1.75rem;
  }
}

.dash-card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}
.dash-card-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
  line-height: 1.45;
}

.dash-account-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.2) 0%, rgba(11, 14, 20, 0.6) 50%, rgba(15, 23, 42, 0.4) 100%);
  box-shadow: 0 0 40px -12px rgba(16, 185, 129, 0.15);
}
.dash-account-hero h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f8fafc;
}
.dash-account-hero .dash-meta {
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}
.dash-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6ee7b7;
}
.dash-live-dot::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: dash-pulse 2s ease-in-out infinite;
}
@keyframes dash-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dash-badge-demo {
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.dash-badge-live {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1024px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.dash-kpi {
  padding: 1rem 1.1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
  background: rgba(2, 6, 23, 0.45);
  transition: border-color 0.15s, transform 0.15s;
}
.dash-kpi:hover {
  border-color: rgba(100, 116, 139, 0.45);
  transform: translateY(-1px);
}
.dash-kpi-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.dash-kpi-value {
  margin-top: 0.35rem;
  font-size: 1.125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
}
.dash-kpi-accent-emerald .dash-kpi-value { color: #6ee7b7; }
.dash-kpi-accent-sky .dash-kpi-value { color: #7dd3fc; }

.dash-balance-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}
.dash-chart-period-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.dash-chart-period-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(51, 65, 85, 0.65);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.dash-chart-period-btn:hover {
  color: #e2e8f0;
  border-color: rgba(167, 139, 250, 0.45);
}
.dash-chart-period-btn.is-active {
  color: #f5f3ff;
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 12px -4px rgba(139, 92, 246, 0.45);
}
.dash-chart-custom-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.dash-chart-date {
  font-size: 0.6875rem;
  padding: 0.3rem 0.45rem;
  border-radius: 0.375rem;
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.7);
  color: #e2e8f0;
}
.dash-chart-apply {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 0.375rem;
  color: #c4b5fd;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(139, 92, 246, 0.12);
}
.dash-chart-apply:hover {
  background: rgba(139, 92, 246, 0.22);
}
.dash-chart-reset-zoom {
  margin-left: auto;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  line-height: 1;
  color: #94a3b8;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.6);
}
.dash-chart-reset-zoom:hover {
  color: #e9d5ff;
  border-color: rgba(167, 139, 250, 0.45);
}
.dash-chart-interact-hint {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.4;
}

.dash-equity-card {
  overflow: hidden;
}
.dash-equity-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.dash-equity-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
}
.dash-equity-stat strong {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
  margin-bottom: 0.15rem;
}
.dash-equity-stat span {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
}
.dash-equity-stat--up span {
  color: #6ee7b7;
}
.dash-equity-stat--down span {
  color: #fca5a5;
}

.dash-chart-wrap {
  position: relative;
  border-radius: 0.75rem;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(30, 41, 59, 0.8);
  padding: 0.75rem;
  min-height: 11rem;
}
.dash-chart-wrap--equity.dash-chart-loading {
  opacity: 0.72;
  pointer-events: none;
}
.dash-chart-wrap--equity.dash-chart-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(2, 6, 14, 0.35);
  border-radius: 0.75rem;
}

.dash-chart-wrap--equity {
  min-height: 22rem;
  padding: 0.5rem 0.65rem 0.75rem 0.35rem;
  background: linear-gradient(180deg, rgba(12, 10, 28, 0.95) 0%, rgba(2, 6, 14, 0.98) 100%);
  border-color: rgba(139, 92, 246, 0.28);
  cursor: crosshair;
}
@media (min-width: 768px) {
  .dash-chart-wrap--equity {
    min-height: 26rem;
  }
}
.dash-chart-wrap canvas {
  width: 100%;
  height: 10rem;
  display: block;
  border-radius: 0.5rem;
}
.dash-chart-wrap--equity canvas {
  height: 20rem;
}
@media (min-width: 768px) {
  .dash-chart-wrap--equity canvas {
    height: 24rem;
  }
}
.dash-chart-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 1rem;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
  pointer-events: none;
}
.dash-chart-wrap--empty canvas {
  opacity: 0.15;
}
.dash-chart-wrap--equity .chartjs-render-monitor {
  border-radius: 0.35rem;
}

.dash-table-wrap {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid rgba(30, 41, 59, 0.7);
  background: rgba(2, 6, 23, 0.35);
}
.dash-table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
}
.dash-table thead {
  background: rgba(15, 23, 42, 0.85);
}
.dash-table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  white-space: nowrap;
}
.dash-table td {
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
}
.dash-table tbody tr:hover td {
  background: rgba(30, 41, 59, 0.25);
}
.dash-table-empty td {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  border-top: none;
}
.dash-table-empty-icon {
  display: block;
  margin: 0 auto 0.5rem;
  font-size: 1.5rem;
  opacity: 0.4;
}

.dash-side-buy { color: #6ee7b7; font-weight: 500; }
.dash-side-sell { color: #fca5a5; font-weight: 500; }
.dash-pill {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
}
.dash-pill-copy {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
}
.dash-pill-manual {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
}

.dash-input,
.dash-select,
.dash-textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  color: #f1f5f9;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 0.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-input:focus,
.dash-select:focus,
.dash-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.dash-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.dash-field-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .dash-field-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .dash-field-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.dash-connected {
  padding: 1rem 1.15rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(90deg, rgba(6, 78, 59, 0.25), rgba(6, 78, 59, 0.05));
}
.dash-connected strong { color: #a7f3d0; }

.dash-btn-primary {
  padding: 0.55rem 1.15rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  transition: filter 0.15s, transform 0.1s;
}
.dash-btn-primary:hover { filter: brightness(1.08); }
.dash-btn-primary:active { transform: scale(0.98); }
.dash-btn-emerald { background: linear-gradient(180deg, #059669, #047857); box-shadow: 0 2px 12px -2px rgba(16, 185, 129, 0.45); }
.dash-btn-rose { background: linear-gradient(180deg, #e11d48, #be123c); box-shadow: 0 2px 12px -2px rgba(244, 63, 94, 0.35); }
.dash-btn-sky { background: linear-gradient(180deg, #0284c7, #0369a1); }

.dash-sync {
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: #64748b;
}
.dash-sync.ok { color: #6ee7b7; }

.dash-manual-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .dash-manual-row {
    grid-template-columns: 1.2fr 0.9fr 0.7fr 0.7fr auto;
    align-items: end;
  }
}

#brokerDashboard > .rounded-xl,
#copyTradingView .rounded-xl.border-slate-800 {
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: linear-gradient(165deg, rgba(18, 24, 38, 0.95) 0%, rgba(11, 14, 20, 0.98) 100%);
  box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.45);
}

#brokerDashboard table,
#copyTradingView table {
  width: 100%;
  font-size: 0.8125rem;
  border-collapse: collapse;
}
#brokerDashboard table thead,
#copyTradingView table thead {
  background: rgba(15, 23, 42, 0.85);
}
#brokerDashboard table th,
#copyTradingView table th {
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}
#brokerDashboard table td,
#copyTradingView table td {
  padding: 0.7rem 1rem;
  border-top: 1px solid rgba(30, 41, 59, 0.6);
  color: #cbd5e1;
}
#brokerDashboard table tbody tr:hover td,
#copyTradingView table tbody tr:hover td {
  background: rgba(30, 41, 59, 0.25);
}

#copyTradingView input:not([type="checkbox"]):not([type="radio"]):not([type="date"]),
#copyTradingView select,
#copyTradingView textarea,
#copyBrokerPanel input:not([type="checkbox"]):not([type="radio"]),
#copyBrokerPanel select {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  color: #f1f5f9;
  background: rgba(2, 6, 23, 0.65);
  border: 1px solid rgba(71, 85, 105, 0.55);
  border-radius: 0.5rem;
}
#copyTradingView input:focus,
#copyTradingView select:focus,
#copyTradingView textarea:focus {
  outline: none;
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1);
}

#copySaveBtn.dash-btn-primary {
  margin-top: 0.5rem;
}

.copy-layout {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.copy-subnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(15, 23, 42, 0.65);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.copy-subnav-btn {
  flex: 1 0 auto;
  min-width: 5.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.copy-subnav-btn:hover {
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.8);
}

.copy-subnav-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.35), rgba(190, 18, 60, 0.2));
  border-color: rgba(244, 63, 94, 0.45);
}

.copy-panel {
  animation: copy-panel-in 0.2s ease-out;
}

@keyframes copy-panel-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.copy-details {
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  background: rgba(15, 23, 42, 0.45);
}

.copy-details__summary {
  cursor: pointer;
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #94a3b8;
  list-style: none;
}

.copy-details__summary::-webkit-details-marker {
  display: none;
}

.copy-details[open] .copy-details__summary {
  color: #e2e8f0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
}

.copy-details__body {
  padding: 0.85rem 1rem 1rem;
}

.copy-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 42rem;
}

.copy-section {
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
}

.copy-section:first-child {
  padding-top: 0;
  border-top: none;
}

.copy-section__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0 0 0.35rem;
}

.copy-section__lead {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.copy-card-list .copy-channel-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: rgba(2, 6, 23, 0.55);
}

.copy-card-list .copy-channel-card:hover {
  border-color: rgba(100, 116, 139, 0.6);
}

.copy-kw-grid textarea {
  font-size: 0.8125rem;
}

/* BE — prix de référence (label flex = même modèle que les cases à cocher Copy) */
.copy-be-price {
  margin: 0.75rem 0 0;
  padding: 0 0 0 0.75rem;
  border-left: 2px solid rgba(71, 85, 105, 0.85);
  max-width: 42rem;
}

.copy-be-price__title {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.copy-be-option {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.45rem;
}

.copy-be-option input[type="radio"] {
  width: 1rem;
  height: 1rem;
  min-width: 1rem;
  margin: 0.2rem 0 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: #f43f5e;
}

.copy-be-option span {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.45;
}

.copy-be-price__hint {
  margin: 0.35rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: #64748b;
}

/* Activation copy par canal */
.copy-map-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.copy-map-toggle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(2, 6, 23, 0.6);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.copy-map-toggle:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(8, 47, 73, 0.2);
}

.copy-map-toggle__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.copy-map-toggle__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.3;
}

.copy-map-toggle__channel {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-map-toggle__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.copy-map-toggle__tag {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(51, 65, 85, 0.55);
  color: #94a3b8;
}

.copy-map-toggle__tag.is-on {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.copy-map-toggle__tag.is-off {
  background: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
}

.copy-map-toggle__tag--profile {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
}

.copy-map-toggle__tag--risk {
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
  font-size: 0.6875rem;
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.45);
}

.copy-map-toggle__switch {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.copy-map-toggle__checkbox {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #f43f5e;
  cursor: pointer;
}

.copy-save-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  position: sticky;
  bottom: 0.75rem;
  z-index: 20;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.copy-save-bar.is-hidden {
  display: none;
}

#copyMappingPanel.dash-card {
  border-color: rgba(56, 189, 248, 0.2);
  background: linear-gradient(180deg, rgba(8, 47, 73, 0.15), rgba(15, 23, 42, 0.5));
}

@media (min-width: 1280px) {
  .copy-layout-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
  }
  .copy-layout-main .copy-settings-col {
    grid-column: 1 / -1;
  }
  .copy-settings-grid {
    max-width: none;
  }
  #copyPanelAccount .copy-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
  }
  #copyPanelAccount .copy-settings-grid > label,
  #copyPanelAccount .copy-settings-grid > #copyAcceptTermsWrap {
    grid-column: 1 / -1;
  }
  #copyPanelAccount #copyBrokerPanel {
    grid-column: 1 / -1;
  }
  #copyPanelAccount .copy-section {
    grid-column: 1 / -1;
  }
}

.dash-alert-risk {
  border-radius: 0.75rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.2), transparent);
  color: #fecdd3;
}

.copy-dev-banner {
  border-radius: 0.75rem;
  padding: 0.9rem 1.15rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: linear-gradient(90deg, rgba(12, 74, 110, 0.4), rgba(15, 23, 42, 0.55));
  color: #e0f2fe;
}

.copy-dev-banner strong {
  color: #7dd3fc;
}

.copy-dev-banner a {
  font-weight: 500;
}

.mkt-hero__affiliate {
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #94a3b8;
  max-width: 36rem;
}

.affiliate-disclaimer {
  border-radius: 0.75rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: linear-gradient(90deg, rgba(76, 29, 149, 0.25), rgba(15, 23, 42, 0.5));
  color: #e9d5ff;
}

.affiliate-disclaimer strong {
  color: #c4b5fd;
}

.affiliate-how {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.affiliate-how__step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(15, 23, 42, 0.45);
}

.affiliate-how__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: #ddd6fe;
  background: rgba(109, 40, 217, 0.35);
  border: 1px solid rgba(167, 139, 250, 0.45);
}

.affiliate-how__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #cbd5e1;
}

.affiliate-how__kbd {
  display: inline-block;
  margin: 0 0.15rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(71, 85, 105, 0.8);
  white-space: nowrap;
}

.affiliate-how__hl {
  font-weight: 600;
  color: #f1f5f9;
}

.affiliate-table td,
.affiliate-table th {
  vertical-align: top;
}

/* ——— Programme affilié (hub influenceurs) ——— */
.aff-hub {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  max-width: 52rem;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.aff-hub__toolbar {
  margin-bottom: -0.25rem;
}

.aff-hero {
  position: relative;
  padding: 1.5rem 1.35rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(244, 63, 94, 0.14), transparent 55%),
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(109, 40, 217, 0.35), transparent 50%),
    linear-gradient(165deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.92));
  overflow: hidden;
}

.aff-hero__badge {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fce7f3;
  background: rgba(244, 63, 94, 0.25);
  border: 1px solid rgba(244, 63, 94, 0.45);
}

.aff-hero__title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #f8fafc;
}

.aff-hero__lead {
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  max-width: 40rem;
}

.aff-hero__highlight {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #e9d5ff;
}

.aff-hero__highlight strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fda4af;
}

.aff-hero__disclaimer {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #94a3b8;
}

.aff-kpi {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

@media (max-width: 640px) {
  .aff-kpi {
    grid-template-columns: 1fr;
  }
}

.aff-kpi__card {
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.65);
  text-align: center;
}

.aff-kpi__card--accent {
  border-color: rgba(167, 139, 250, 0.45);
  background: linear-gradient(160deg, rgba(76, 29, 149, 0.35), rgba(15, 23, 42, 0.7));
}

.aff-kpi__icon {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.aff-kpi__label {
  margin: 0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.aff-kpi__value {
  margin: 0.2rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: #e9d5ff;
}

.aff-kpi__card--accent .aff-kpi__value {
  color: #fda4af;
}

.aff-share {
  padding: 1.15rem 1.2rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: linear-gradient(180deg, rgba(12, 74, 110, 0.2), rgba(15, 23, 42, 0.5));
}

.aff-share__head {
  margin-bottom: 1rem;
}

.aff-share__title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.aff-share__sub {
  margin: 0;
  font-size: 0.8rem;
  color: #94a3b8;
}

.aff-share__grid {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .aff-share__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.aff-share__label {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.aff-share__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.aff-share__row--link {
  align-items: flex-start;
}

.aff-share__code {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: clamp(1.25rem, 4vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #c4b5fd;
}

.aff-share__link {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-all;
  color: #7dd3fc;
}

@media (min-width: 640px) {
  .aff-share__row--link {
    flex-wrap: nowrap;
  }
  .aff-share__link {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.aff-share__btn {
  flex-shrink: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: #0f172a;
  background: linear-gradient(135deg, #f472b6, #c084fc);
  transition: opacity 0.15s, transform 0.1s;
}

.aff-share__btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.aff-share__btn--wide {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.55rem 1rem;
}

.aff-share__pitch {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
}

.aff-share__pitch-text {
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(51, 65, 85, 0.6);
  white-space: pre-wrap;
}

.aff-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}

.aff-benefits__grid {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .aff-benefits__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.aff-benefit {
  padding: 0.9rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(15, 23, 42, 0.5);
}

.aff-benefit__icon {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.35rem;
}

.aff-benefit__title {
  margin: 0 0 0.3rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f1f5f9;
}

.aff-benefit__text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94a3b8;
}

.aff-comm__foot {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.75rem;
  color: #64748b;
}

.aff-comm__grid {
  display: grid;
  gap: 0.65rem;
}

@media (min-width: 768px) {
  .aff-comm__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.aff-comm-card {
  position: relative;
  padding: 0.9rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(51, 65, 85, 0.7);
  background: rgba(15, 23, 42, 0.55);
}

.aff-comm-card--featured {
  border-color: rgba(244, 63, 94, 0.45);
  background: linear-gradient(165deg, rgba(76, 29, 149, 0.4), rgba(30, 27, 75, 0.85));
  box-shadow: 0 8px 28px rgba(109, 40, 217, 0.2);
}

.aff-comm-card__tag {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fce7f3;
  background: rgba(244, 63, 94, 0.35);
}

.aff-comm-card__plan {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
}

.aff-comm-card__rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.aff-comm-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: #94a3b8;
}

.aff-comm-card__row strong {
  font-size: 1rem;
  font-weight: 800;
  color: #c4b5fd;
}

.aff-comm-card__row--max strong {
  font-size: 1.2rem;
  color: #fda4af;
}

.aff-activity__breakdown {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.65rem;
}

.aff-activity__breakdown p {
  margin: 0.2rem 0;
}

.aff-activity__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: #94a3b8;
}

.aff-activity__list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

.aff-activity__list li:last-child {
  border-bottom: none;
}

.aff-activity__empty {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  font-style: italic;
}

.aff-activity__empty.hidden,
.aff-activity__list.hidden,
.aff-activity__breakdown.hidden {
  display: none;
}

.aff-payout {
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.aff-payout__inner {
  padding: 1.15rem 1.25rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.35), rgba(244, 63, 94, 0.15));
}

.aff-payout__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.aff-payout__text {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.aff-payout__cta {
  display: inline-block;
  padding: 0.55rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(135deg, #f9a8d4, #e9d5ff);
  transition: opacity 0.15s;
}

.aff-payout__cta:hover {
  opacity: 0.9;
}

.aff-rules {
  padding: 1.1rem 1.15rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.45));
}

.aff-rules__head {
  margin-bottom: 0.85rem;
}

.aff-rules__head .aff-section-title {
  margin-bottom: 0.25rem;
}

.aff-rules__intro {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #94a3b8;
}

.aff-rules__grid {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 640px) {
  .aff-rules__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .aff-rule--wide {
    grid-column: 1 / -1;
  }
}

.aff-rule {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(2, 6, 23, 0.35);
}

.aff-rule__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: #e9d5ff;
  background: rgba(109, 40, 217, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.aff-rule__text {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.aff-rule__text strong {
  color: #f1f5f9;
  font-weight: 600;
}

.aff-rules__contact {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  color: #94a3b8;
}

.aff-rules__contact a {
  color: #7dd3fc;
  font-weight: 600;
  text-decoration: none;
}

.aff-rules__contact a:hover {
  text-decoration: underline;
}

/* ——— En-tête site (logo | liens centrés | langue + profil) ——— */
.site-nav__bar {
  position: relative;
}
.site-nav__links {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: max(6.5rem, 10%);
  right: max(6.5rem, 10%);
  z-index: 5;
  max-width: none;
  flex-wrap: nowrap;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.site-nav__links .sh-nav-link {
  pointer-events: auto;
}
.site-nav__end {
  gap: 0.65rem;
}
body.sh-logged-in .site-nav__end {
  gap: 0.85rem;
}
.site-nav__lang {
  margin-left: 0.35rem;
  margin-right: 0.15rem;
}
body.sh-logged-in .site-nav__lang {
  margin-left: 0;
  margin-right: 0.65rem;
}
@media (min-width: 1024px) {
  .site-nav__brand {
    min-width: 7.5rem;
  }
  .site-nav__end {
    min-width: 7.5rem;
    justify-content: flex-end;
  }
  /* Invité : plus de place à droite (langue + Connexion + Inscription) */
  body:not(.sh-logged-in) .site-nav__links {
    left: 8.25rem;
    right: 17.25rem;
  }
  body.sh-logged-in .site-nav__links {
    left: 8.25rem;
    right: 10.5rem;
  }
}
@media (min-width: 1280px) {
  body:not(.sh-logged-in) .site-nav__links {
    right: 19rem;
  }
}

/* ——— Navigation publique (vitrine) ——— */
.sh-nav-link {
  position: relative;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  font-weight: 500;
  color: #94a3b8;
  transition: color 0.15s, background 0.15s;
}
.sh-nav-link:hover {
  color: #f8fafc;
  background: rgba(51, 65, 85, 0.35);
}
.sh-nav-link.is-active {
  color: #fff;
  background: rgba(244, 63, 94, 0.18);
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.35);
}
#mobileNav .sh-nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

/* ——— Barre d’onglets app (connecté) ——— */
.app-hub-nav {
  position: sticky;
  top: 3.5rem;
  z-index: 90;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.5rem;
  margin: -0.25rem -0.5rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: linear-gradient(180deg, rgba(18, 23, 34, 0.98) 0%, rgba(11, 14, 20, 0.95) 100%);
  box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.55);
}
.app-hub-nav::-webkit-scrollbar {
  height: 4px;
}
.app-hub-nav-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #94a3b8;
  border: 1px solid transparent;
  background: rgba(15, 23, 42, 0.45);
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.app-hub-nav-btn:hover {
  color: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.45);
  background: rgba(30, 41, 59, 0.75);
}
.app-hub-nav-btn.is-active {
  color: #fff;
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 2px 12px -4px rgba(0, 0, 0, 0.5);
}
.app-hub-nav-btn[data-hub-nav="hub"].is-active {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.9), rgba(51, 65, 85, 0.85));
}
.app-hub-nav-btn[data-hub-nav="journal"].is-active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.55), rgba(3, 105, 161, 0.4));
  border-color: rgba(56, 189, 248, 0.45);
}
.app-hub-nav-btn[data-hub-nav="trading"].is-active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.7), rgba(14, 165, 233, 0.45));
  border-color: rgba(56, 189, 248, 0.5);
}
.app-hub-nav-btn[data-hub-nav="broker"].is-active {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.65), rgba(4, 120, 87, 0.45));
  border-color: rgba(52, 211, 153, 0.45);
}
.app-hub-nav-btn[data-hub-nav="copy"].is-active {
  background: linear-gradient(135deg, rgba(190, 18, 60, 0.65), rgba(159, 18, 57, 0.45));
  border-color: rgba(251, 113, 133, 0.45);
}
.app-hub-nav-btn[data-hub-nav="affiliate"].is-active {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.5), rgba(76, 29, 149, 0.35));
  border-color: rgba(167, 139, 250, 0.45);
}
.app-hub-nav-icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.app-hub-nav--header {
  position: static;
  top: auto;
  z-index: auto;
  margin: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
  background: rgba(11, 14, 20, 0.6);
  box-shadow: none;
  padding-top: 0.35rem;
  padding-bottom: 0.5rem;
  gap: 0.4rem;
}
/* Centre les onglets visibles (varie selon plan Pro/Premium, copy, admin). */
.app-hub-nav--header.app-hub-nav--centered {
  justify-content: center;
}
@media (max-width: 640px) {
  .app-hub-nav--header.app-hub-nav--centered {
    justify-content: flex-start;
  }
}
.app-hub-nav-btn--secondary {
  font-weight: 500;
  color: #7c8da3;
}
.app-hub-nav-btn--ghost {
  margin-left: auto;
  background: transparent;
  border-color: transparent;
  color: #64748b;
  font-weight: 500;
  font-size: 0.75rem;
}
.app-hub-nav-btn--ghost:hover {
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.35);
  border-color: transparent;
}

body.sh-logged-in #siteNav .site-nav__bar {
  flex-wrap: wrap;
  height: auto;
  min-height: 3.5rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  row-gap: 0.25rem;
}
body.sh-logged-in #navLinks .sh-nav-link {
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
}
body.sh-logged-in #mainContent {
  padding-top: 8rem;
}
@media (min-width: 1024px) {
  body.sh-logged-in #mainContent {
    padding-top: 8.25rem;
  }
}

.hub-config-banner {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(18, 24, 38, 0.6);
}
.hub-config-banner h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #f1f5f9;
}
.hub-config-banner p {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.hub-setup-checklist {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(12, 30, 48, 0.55);
}
.hub-setup-checklist__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}
.hub-setup-checklist__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hub-setup-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}
.hub-setup-step__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  border: 1px solid #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}
.hub-setup-step.is-done {
  color: #cbd5e1;
}
.hub-setup-step.is-done .hub-setup-step__icon {
  border-color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}
.hub-setup-step.is-done .hub-setup-step__icon::before {
  content: "✓";
}
.hub-setup-step.is-done .hub-setup-step__icon {
  font-size: 0;
}
.hub-setup-step.is-done .hub-setup-step__icon::before {
  font-size: 0.75rem;
}
.hub-setup-step--optional.is-done .hub-setup-step__text strong {
  color: #7dd3fc;
}
.hub-setup-checklist__hint {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
}
.hub-setup-checklist__ready {
  display: none;
  color: #6ee7b7;
  font-weight: 500;
}
.hub-setup-checklist.is-complete .hub-setup-checklist__ready {
  display: inline;
}

/* ——— Onglets internes (trading, auth) ——— */
.sh-tab-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.25rem;
  border-bottom: 2px solid rgba(51, 65, 85, 0.55);
}
.sh-tab-btn {
  flex: 0 0 auto;
  padding: 0.6rem 1.1rem;
  border-radius: 0.625rem 0.625rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-bottom: none;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.sh-tab-btn:hover {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.75);
}
.sh-tab-btn.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.85) 0%, rgba(3, 105, 161, 0.75) 100%);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 -2px 16px -4px rgba(56, 189, 248, 0.35);
}
.sh-tab-btn--rose.is-active {
  background: linear-gradient(180deg, rgba(190, 18, 60, 0.85), rgba(159, 18, 57, 0.75));
  border-color: rgba(251, 113, 133, 0.5);
  box-shadow: 0 -2px 16px -4px rgba(244, 63, 94, 0.35);
}

.auth-promo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    155deg,
    rgba(136, 19, 55, 0.42) 0%,
    rgba(30, 27, 75, 0.55) 38%,
    rgba(11, 14, 20, 0.98) 100%
  );
}
.auth-promo::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -20%;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.22) 0%, transparent 68%);
  pointer-events: none;
}
.auth-promo::after {
  content: "";
  position: absolute;
  bottom: -25%;
  left: -15%;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.14) 0%, transparent 70%);
  pointer-events: none;
}
.auth-promo > * {
  position: relative;
  z-index: 1;
}
.auth-promo__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #fecdd3;
  background: rgba(190, 18, 60, 0.2);
  border: 1px solid rgba(251, 113, 133, 0.35);
}
.auth-promo__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
}
.auth-promo__lead {
  margin: 0 0 1.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #94a3b8;
}
.auth-promo__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.auth-promo__feat {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.8rem;
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  backdrop-filter: blur(6px);
}
.auth-promo__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  color: #fb7185;
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.28), rgba(190, 18, 60, 0.12));
  border: 1px solid rgba(251, 113, 133, 0.25);
}
.auth-promo__icon--sky {
  color: #38bdf8;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(2, 132, 199, 0.12));
  border-color: rgba(56, 189, 248, 0.25);
}
.auth-promo__icon--emerald {
  color: #34d399;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(5, 150, 105, 0.12));
  border-color: rgba(52, 211, 153, 0.25);
}
.auth-promo__feat strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #f1f5f9;
}
.auth-promo__feat p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
}
.auth-promo__foot {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #7dd3fc;
}

.auth-tab-bar {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
}
.auth-tab-bar .auth-tab {
  flex: 1;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #94a3b8;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
}
.auth-tab-bar .auth-tab:hover {
  color: #e2e8f0;
}
.auth-tab-bar .auth-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  box-shadow: 0 2px 12px -4px rgba(14, 165, 233, 0.5);
}
.auth-tab-bar .auth-tab.is-active.auth-tab--signup {
  background: linear-gradient(135deg, #e11d48, #be123c);
  box-shadow: 0 2px 12px -4px rgba(244, 63, 94, 0.45);
}

.auth-pw-field {
  position: relative;
}
.auth-pw-field .auth-pw-input {
  width: 100%;
}
.auth-pw-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.auth-pw-toggle:hover {
  color: #e2e8f0;
  background: rgba(51, 65, 85, 0.35);
}
.auth-pw-toggle:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}
.auth-pw-icon {
  display: block;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  #navUserRow .nav-header-shortcut {
    display: none;
  }
}

/* Toasts (remplace alert) */
.toast-root {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
  box-shadow: 0 12px 40px -16px rgba(0, 0, 0, 0.65);
  animation: toast-in 0.22s ease-out;
}
.toast--success {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(6, 78, 59, 0.92);
}
.toast--error {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.92);
}
.toast--warn {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(120, 53, 15, 0.92);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bannière état copy */
.copy-health-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(15, 23, 42, 0.65);
}
.copy-health-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border: 1px solid rgba(71, 85, 105, 0.6);
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
}
.copy-health-pill.is-ok {
  border-color: rgba(52, 211, 153, 0.45);
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.35);
}
.copy-health-pill.is-bad {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.35);
}
.copy-health-pill.is-warn {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.35);
}

/* Checklist cliquable */
.hub-setup-step--clickable {
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.35rem 0.5rem;
  margin: -0.35rem -0.5rem;
  transition: background 0.15s;
}
.hub-setup-step--clickable:hover {
  background: rgba(51, 65, 85, 0.35);
}
.hub-setup-step--clickable:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

/* Accordéons hub */
.hub-accordion {
  border-radius: 0.75rem;
  border: 1px solid rgb(30 41 59);
  background: rgb(15 23 42);
  overflow: hidden;
}
.hub-accordion__summary {
  list-style: none;
  cursor: pointer;
  padding: 1.25rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: #f1f5f9;
}
.hub-accordion__summary::-webkit-details-marker {
  display: none;
}
.hub-accordion__summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.5rem;
  color: #64748b;
  transition: transform 0.15s;
}
.hub-accordion[open] > .hub-accordion__summary::before {
  transform: rotate(90deg);
}
.hub-accordion__body {
  padding: 0 1.5rem 1.5rem;
  border-top: 1px solid rgba(51, 65, 85, 0.45);
}
.hub-accordion__body > p:first-child {
  margin-top: 1rem;
}

/* Journal relais — panneau & cartes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.journal-panel {
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(11, 14, 20, 0.98) 55%, rgba(15, 23, 42, 0.92) 100%);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.04) inset,
    0 20px 50px -24px rgba(0, 0, 0, 0.65);
  padding: 1.35rem 1.35rem 1.5rem;
}

.journal-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}

.journal-panel__title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f8fafc;
  margin: 0;
}

.journal-panel__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.journal-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.journal-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.journal-btn--ghost {
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.75);
  background: rgba(30, 41, 59, 0.5);
}
.journal-btn--ghost:hover {
  background: rgba(51, 65, 85, 0.75);
  color: #f8fafc;
}
.journal-btn--primary {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.65);
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 4px 14px -4px rgba(99, 102, 241, 0.55);
}
.journal-btn--primary:hover {
  filter: brightness(1.08);
}

.journal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}
@media (max-width: 520px) {
  .journal-stats {
    grid-template-columns: 1fr;
  }
}
.journal-stat {
  padding: 0.75rem 0.85rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(2, 6, 23, 0.45);
}
.journal-stat__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.journal-stat__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}
.journal-stat--ok .journal-stat__value {
  color: #6ee7b7;
}
.journal-stat--skip .journal-stat__value {
  color: #fcd34d;
}
.journal-stat--err .journal-stat__value {
  color: #fca5a5;
}

.journal-advanced {
  margin-bottom: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.45);
  padding: 0.35rem 0.65rem 0.65rem;
}
.journal-advanced__summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  list-style: none;
  user-select: none;
}
.journal-advanced__summary::-webkit-details-marker {
  display: none;
}
.journal-advanced[open] .journal-advanced__summary {
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}
.journal-advanced__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.55rem 0.75rem;
}
.journal-advanced__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.journal-advanced__label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.journal-advanced__input,
.journal-advanced__select {
  width: 100%;
  font-size: 0.8rem;
}

.journal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}
.journal-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.journal-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 9999px;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: rgba(15, 23, 42, 0.65);
  color: #94a3b8;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.journal-pill:hover {
  color: #e2e8f0;
  border-color: rgba(100, 116, 139, 0.85);
}
.journal-pill.is-active {
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.55);
  background: rgba(51, 65, 85, 0.65);
}
.journal-pill--ok.is-active {
  border-color: rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
  background: rgba(6, 78, 59, 0.35);
}
.journal-pill--skip.is-active {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.35);
}
.journal-pill--err.is-active {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
  background: rgba(127, 29, 29, 0.35);
}

.journal-toolbar__select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.journal-toolbar__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.journal-select {
  font-size: 0.8125rem;
  padding: 0.4rem 2rem 0.4rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: rgba(2, 6, 23, 0.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 0.55rem center;
  color: #e2e8f0;
  max-width: 14rem;
}

.journal-legend {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0 0 1rem;
  line-height: 1.45;
}

/* Listes scrollables + recherche (journal, copy, compte MT) */
.dash-scroll-board {
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(2, 6, 23, 0.45);
  padding: 0.65rem 0.75rem;
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}
.dash-scroll-search {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.45rem 0.65rem 0.45rem 2rem;
  font-size: 0.8125rem;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.1a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") no-repeat 0.55rem center;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 0.5rem;
}
.dash-scroll-search:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}
.copy-exec-board .dash-scroll-search:focus {
  border-color: rgba(244, 63, 94, 0.45);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.1);
}
.dash-scroll-count {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  white-space: nowrap;
}
.dash-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 16rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .dash-scroll-list {
    max-height: 18rem;
  }
}
.dash-scroll-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
  padding: 1rem 0.5rem;
}

.journal-feed-board .dash-scroll-search:focus {
  border-color: rgba(99, 102, 241, 0.55);
}

.journal-feed {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.journal-feed--scroll {
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}
@media (min-width: 768px) {
  .journal-feed--scroll {
    max-height: 18rem;
  }
}

.journal-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.25rem 0.65rem;
  align-items: start;
  padding: 0.5rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  border-left-width: 3px;
}
.journal-entry:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(100, 116, 139, 0.55);
}
.journal-entry--ok {
  border-left-color: #34d399;
}
.journal-entry--skipped {
  border-left-color: #fbbf24;
}
.journal-entry--error {
  border-left-color: #f87171;
}
.journal-entry--highlight {
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 24px -8px rgba(56, 189, 248, 0.35);
  background: rgba(2, 132, 199, 0.12);
}

.journal-entry__badge {
  grid-row: 1 / 3;
  align-self: center;
}
.journal-entry__main {
  grid-column: 2;
  min-width: 0;
}
.journal-entry__route {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.15rem;
  line-height: 1.3;
}
.journal-entry__mapping {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.journal-entry__preview {
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.journal-entry__meta {
  grid-column: 3;
  grid-row: 1;
  text-align: right;
  flex-shrink: 0;
}
.journal-entry__time {
  font-size: 0.6875rem;
  color: #64748b;
  white-space: nowrap;
}
.journal-entry__id {
  display: block;
  font-size: 0.625rem;
  color: #475569;
  font-family: ui-monospace, monospace;
  margin-top: 0.15rem;
}
.journal-entry__error {
  grid-column: 2 / -1;
  font-size: 0.75rem;
  color: #fca5a5;
  padding: 0.35rem 0.5rem;
  border-radius: 0.35rem;
  background: rgba(127, 29, 29, 0.25);
  border: 1px solid rgba(248, 113, 113, 0.2);
}
.journal-entry__error--muted {
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.45);
  border-color: rgba(71, 85, 105, 0.45);
}
.journal-entry__media {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.75rem;
  opacity: 0.85;
}

.journal-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.journal-badge--ok {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(6, 78, 59, 0.4);
}
.journal-badge--skipped {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.4);
}
.journal-badge--error {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.4);
}

.journal-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px dashed rgba(71, 85, 105, 0.65);
  background: rgba(2, 6, 23, 0.35);
}
.journal-empty__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}
.journal-empty__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0 0 0.35rem;
}
.journal-empty__hint {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.45;
}

.journal-load-more {
  margin-top: 1rem;
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
  border-radius: 0.65rem;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: rgba(15, 23, 42, 0.65);
  transition: background 0.12s;
}
.journal-load-more:hover:not(:disabled) {
  background: rgba(51, 65, 85, 0.55);
  color: #f8fafc;
}
.journal-load-more:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Modal détail journal */
.journal-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.journal-modal.hidden {
  display: none;
}
.journal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}
.journal-modal__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: min(90vh, 640px);
  overflow-y: auto;
  border-radius: 1rem;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: linear-gradient(180deg, #121a2b 0%, #0b0e14 100%);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75);
  padding: 1.25rem 1.35rem 1.35rem;
}
.journal-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.55);
}
.journal-modal__head-text {
  flex: 1;
  min-width: 0;
}
.journal-modal__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f8fafc;
  margin: 0;
}
.journal-modal__id {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  color: #94a3b8;
  font-weight: 500;
}
.journal-modal__when {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #64748b;
}
.journal-modal__close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(71, 85, 105, 0.65);
  background: rgba(30, 41, 59, 0.65);
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.12s, color 0.12s;
}
.journal-modal__close:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #f8fafc;
}
.journal-modal__meta {
  margin-bottom: 1rem;
}
.journal-modal__message-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 0 0 0.4rem;
}
.log-detail-dl {
  display: grid;
  grid-template-columns: minmax(5.5rem, auto) 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.8125rem;
}
.log-detail-dl dt {
  color: #64748b;
  font-weight: 500;
}
.log-detail-dl dd {
  color: #e2e8f0;
  margin: 0;
  word-break: break-word;
}
.log-detail-body {
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.65);
  border-radius: 0.5rem;
  padding: 0.85rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  margin: 0;
}

/* Historique compte MT — liste scrollable + recherche */
.dash-broker-hist-card .dash-card-title {
  margin-bottom: 0;
}
.broker-hist-board {
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}
.broker-hist-board.dash-scroll-board .dash-scroll-search:focus {
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
}
.broker-hist-list.dash-scroll-list {
  max-height: 16rem;
}
@media (min-width: 768px) {
  .broker-hist-list.dash-scroll-list {
    max-height: 18rem;
  }
}
.copy-exec-row {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}
.copy-exec-row__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
}
.copy-exec-row__detail {
  margin: 0;
  font-size: 0.6875rem;
  color: #64748b;
  line-height: 1.35;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.copy-exec-pill--ok {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.3);
}
.copy-exec-pill--skip {
  color: #fcd34d;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.3);
}
.copy-exec-pill--err {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.25);
}
.copy-exec-latency {
  font-size: 0.6875rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(51, 65, 85, 0.5);
  background: rgba(15, 23, 42, 0.65);
}
.copy-exec-latency__label {
  color: #64748b;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.625rem;
}
.copy-exec-latency--ok {
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.35);
}
.copy-exec-latency--na {
  color: #64748b;
}
.broker-hist-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(51, 65, 85, 0.55);
  background: rgba(15, 23, 42, 0.5);
  font-size: 0.8125rem;
  transition: border-color 0.12s, background 0.12s;
}
.broker-hist-row:hover {
  border-color: rgba(100, 116, 139, 0.65);
  background: rgba(30, 41, 59, 0.65);
}
.broker-hist-row__main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  min-width: 0;
}
.broker-hist-row__sym {
  font-weight: 600;
  color: #f1f5f9;
}
.broker-hist-row__type {
  font-size: 0.6875rem;
  color: #94a3b8;
}
.broker-hist-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-left: auto;
}
.broker-hist-row__date {
  font-size: 0.6875rem;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.broker-hist-pill {
  flex-shrink: 0;
  padding: 0.12rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.broker-hist-pill--up {
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.3);
}
.broker-hist-pill--down {
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.25);
}
.broker-hist-pill--flat {
  color: #94a3b8;
  border: 1px solid rgba(51, 65, 85, 0.6);
  background: rgba(15, 23, 42, 0.5);
}
.broker-hist-empty {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
  padding: 1.25rem 0.5rem;
}

/* Serveurs Discord — liste avec statut bot */
.dc-guild-board {
  box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.06);
}
.dc-guild-list {
  scrollbar-width: thin;
}
.dc-guild-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  font-size: 0.8125rem;
  transition: border-color 0.15s, background 0.15s;
}
.dc-guild-row:hover {
  border-color: rgba(100, 116, 139, 0.75);
  background: rgba(30, 41, 59, 0.75);
}
.dc-guild-row.is-selected {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(2, 132, 199, 0.12);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2);
}
.dc-guild-row__name {
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dc-guild-pill {
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dc-guild-pill--ok {
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(6, 78, 59, 0.35);
}
.dc-guild-pill--off {
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.4);
  background: rgba(120, 53, 15, 0.35);
}

/* Actions routage */
.mapping-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}
.mapping-actions__btn {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(71, 85, 105, 0.75);
  background: rgba(30, 41, 59, 0.65);
  color: #cbd5e1;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.mapping-actions__btn:hover {
  background: rgba(51, 65, 85, 0.85);
  color: #f8fafc;
}
.mapping-actions__btn--edit {
  border-color: rgba(99, 102, 241, 0.55);
  color: #a5b4fc;
}
.mapping-actions__btn--edit:hover {
  background: rgba(67, 56, 202, 0.35);
  color: #e0e7ff;
}
.mapping-actions__btn--danger {
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}
.mapping-actions__btn--danger:hover {
  background: rgba(127, 29, 29, 0.4);
  color: #fecaca;
}

/* Admin — graphiques visites (courbes lisses) */
.analytics-line-chart-box {
  position: relative;
  border-radius: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.65);
  background: #0b0f1a;
  padding: 0.75rem 0.5rem 0.5rem;
}
.analytics-line-chart-box canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.analytics-line-chart-box--hourly {
  margin-top: 0.25rem;
}

.analytics-doughnut-wrap {
  position: relative;
  max-width: 12rem;
  margin-left: auto;
  margin-right: auto;
}
.analytics-doughnut-wrap canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: 11rem;
}
@media (min-width: 640px) {
  .analytics-doughnut-wrap {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .journal-entry {
    grid-template-columns: auto 1fr;
  }
  .journal-entry__meta {
    grid-column: 2;
    grid-row: auto;
    text-align: left;
    margin-top: 0.15rem;
  }
  .journal-toolbar__select-wrap {
    margin-left: 0;
    width: 100%;
  }
  .journal-select {
    flex: 1;
    max-width: none;
  }
  .toast-root {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

.td-cal-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(71, 85, 105, 0.8);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  font-size: 1.1rem;
  line-height: 1;
  transition: background 0.12s, border-color 0.12s;
}
.td-cal-nav-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.6);
}
.td-cal-nav-btn--ghost {
  font-size: 0.72rem;
  font-weight: 600;
  min-width: auto;
  padding: 0 0.55rem;
  margin-left: 0.25rem;
  color: #94a3b8;
}

/* Modal édition routage — hors accordéon hub (overflow:hidden), plein écran */
.mapping-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

body.mapping-edit-modal-open {
  overflow: hidden;
}

.mapping-edit-modal.hidden {
  display: none;
}

@media (min-height: 520px) {
  .mapping-edit-modal:not(.hidden) {
    align-items: center;
  }
}

.mapping-edit-modal__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: min(92dvh, calc(100vh - 2rem));
  margin: auto 0;
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  border: 1px solid rgb(51 65 85);
  background: rgb(15 23 42);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.mapping-edit-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.mapping-edit-modal__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgb(51 65 85);
  background: rgb(15 23 42);
  border-radius: 0 0 0.75rem 0.75rem;
}

/* ——— Admin : onglets défilables au doigt (mobile) ——— */
.admin-tabs-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 116, 139, 0.55) transparent;
  border-radius: 0.5rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.65);
  touch-action: pan-x;
}
.admin-tabs-scroll::-webkit-scrollbar {
  height: 4px;
}
.admin-tabs-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.55);
  border-radius: 999px;
}
.admin-tabs-scroll__track {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  min-width: min-content;
}
.admin-tab-btn {
  flex: 0 0 auto;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
}
.admin-tab-btn:first-child {
  border-radius: 0.45rem 0 0 0.45rem;
}
.admin-tab-btn:last-child {
  border-radius: 0 0.45rem 0.45rem 0;
}
.admin-tabs-scroll-hint {
  margin: 0;
  padding-left: 0.15rem;
}
@media (min-width: 640px) {
  .admin-tabs-scroll-hint {
    display: none;
  }
}
