﻿:root{
  --bg:#0b0f17;
  --panel:#111827;
  --panel2:#0f172a;
  --text:#e5e7eb;
  --muted:#94a3b8;
  --border:#1f2937;
  --green:#22c55e;
  --red:#ef4444;
  --white:#e5e7eb;
  --blue:#3b82f6;
}

*{box-sizing:border-box}
html,body{height:100%; margin:0; background:var(--bg); color:var(--text); font-family:ui-sans-serif,system-ui,Segoe UI,Roboto,Arial}
a{color:inherit; text-decoration:none}

.app{
  display:grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: 56px 1fr;
  grid-template-areas:
    "top top"
    "side main";
  height:100vh;
}

.topbar{
  grid-area:top;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 14px;
  border-bottom:1px solid var(--border);
  background:linear-gradient(180deg, rgba(17,24,39,0.9), rgba(15,23,42,0.9));
}
.brand{font-weight:700; letter-spacing:.5px}
.topbar-right{display:flex; gap:10px}

.sidebar{
  grid-area:side;
  border-right:1px solid var(--border);
  padding:12px;
  background:var(--panel2);
  display:flex;
  flex-direction:column;
  gap:12px;
}
.nav{display:flex; flex-direction:column; gap:6px}
.nav-item{
  padding:10px 10px;
  border:1px solid transparent;
  border-radius:10px;
  background:rgba(255,255,255,0.03);
}
.nav-item.active{border-color:rgba(59,130,246,0.5); background:rgba(59,130,246,0.12)}
.small{font-size:12px}
.muted{color:var(--muted)}
.nav-auth-status{
  margin:2px 2px 0 2px;
  padding:6px 8px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:8px;
  background:rgba(255,255,255,0.02);
}
.nav-engine-status{
  margin:2px 2px 8px 2px;
  padding:6px 8px;
  font-size:12px;
  font-weight:700;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:8px;
  background:rgba(255,255,255,0.02);
}
#engineStatus.engine-running{color:var(--green); font-weight:700}
#engineStatus.engine-stopped{color:var(--red); font-weight:700}
.sidebar-extra{
  margin-top:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,0.08);
}
.sidebar-extra .btn{
  width:100%;
  text-align:center;
}

.main{
  grid-area:main;
  padding:12px;
}

.btn{
  border:1px solid var(--border);
  background:rgba(255,255,255,0.06);
  color:var(--text);
  padding:8px 10px;
  border-radius:10px;
  cursor:pointer;
}
.btn:hover{filter:brightness(1.05)}
.btn.primary{background:rgba(59,130,246,0.22); border-color:rgba(59,130,246,0.5)}
.btn.danger{background:rgba(239,68,68,0.16); border-color:rgba(239,68,68,0.45)}

.page{height:100%}
.page-title{font-size:18px; font-weight:700; margin:6px 0 12px}

.dash-toolbar{
  display:grid;
  grid-template-columns: repeat(2, minmax(180px, 220px)) auto;
  gap:10px;
  align-items:end;
}

.dash-toolbar-actions{
  display:flex;
  align-items:end;
}

.dash-cards{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:12px;
  margin:12px 0;
}

.dash-card{
  min-height:160px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.dash-kpi-value{
  font-size:28px;
  font-weight:800;
  line-height:1.1;
  font-variant-numeric:tabular-nums;
}

.dash-period-tags{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.dash-period-btn.active{
  border-color:rgba(59,130,246,0.55);
  background:rgba(59,130,246,0.22);
}

.dash-period-values{
  margin-top:auto;
}

.dash-pie-chart{
  width:130px;
  height:130px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at center, rgba(11,15,23,0.95) 0 38%, transparent 39%),
    conic-gradient(
      #22c55e 0% 25%,
      #3b82f6 25% 50%,
      #f59e0b 50% 75%,
      #ef4444 75% 100%
    );
}

.dash-pie-legend{
  display:grid;
  grid-template-columns:1fr;
  gap:6px;
  margin-top:6px;
}

.dash-pie-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
}

.dash-pie-left{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}

.dash-pie-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  flex:0 0 auto;
}

.dash-pie-symbol{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.dash-weekly-chart{
  height:240px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  overflow:hidden;
}

.dash-table-wrap{
  max-height:420px !important;
}

.grid-rows{
  display:flex;
  flex-direction:column;
  gap:12px;
  height:calc(100vh - 56px - 24px);
}

.row{background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:16px; padding:10px}
.row-top{flex:0 0 75%; display:grid; grid-template-columns: 3fr 1fr; gap:10px}
.row-bottom{flex:1 1 25%}

.col{background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06); border-radius:14px; padding:10px; display:flex; flex-direction:column}
.section-head{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
.title{font-weight:700}
.controls{display:flex; align-items:center; gap:10px}

.chart-box{
  flex:1;
  min-height:240px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,0.22);
  background:radial-gradient(120% 140% at 10% 0%, rgba(30,41,59,0.75) 0%, rgba(10,14,24,0.92) 52%, rgba(5,8,15,0.98) 100%);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.04), 0 16px 40px rgba(2,6,23,0.45);
}
.chart-box-pro{
  position:relative;
  min-height:360px;
}
.chart-pro-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  padding:8px 10px;
  border:1px solid rgba(148,163,184,0.18);
  border-radius:12px;
  background:linear-gradient(180deg, rgba(15,23,42,0.72), rgba(10,15,27,0.78));
}
.chart-pro-title{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.chart-pro-symboltf{
  font-size:13px;
  font-weight:700;
  letter-spacing:0.2px;
  color:#e2e8f0;
}
.chart-pro-strategies{
  font-size:11px;
  color:#94a3b8;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}
.chart-pro-consensus{
  font-size:11px;
  font-weight:700;
  letter-spacing:0.4px;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid rgba(148,163,184,0.32);
  color:#cbd5e1;
  background:rgba(51,65,85,0.45);
  white-space:nowrap;
}
.chart-pro-consensus.buy{
  color:#22c55e;
  border-color:rgba(34,197,94,0.45);
  background:rgba(22,101,52,0.18);
}
.chart-pro-consensus.sell{
  color:#ef4444;
  border-color:rgba(239,68,68,0.45);
  background:rgba(127,29,29,0.2);
}
.chart-pro-consensus.neutral{
  color:#cbd5e1;
}
.chart-pro-actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.chart-fs-btn{
  padding:5px 10px;
  font-size:11px;
  border-radius:10px;
  border:1px solid rgba(148,163,184,0.28);
  background:rgba(15,23,42,0.85);
  color:#cbd5e1;
}
.chart-fs-btn:hover{
  filter:brightness(1.08);
}
.chart-legend{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  margin:0 0 8px 0;
  min-height:22px;
}
.chart-panel-controls{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:0 0 8px 0;
}
.chart-panel-controls.hidden{
  display:none;
}
.chart-panel-toggle{
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.28);
  background:rgba(15,23,42,0.68);
  color:#cbd5e1;
  font-size:11px;
  padding:3px 9px;
  cursor:pointer;
}
.chart-panel-toggle.off{
  opacity:0.58;
  color:#94a3b8;
  background:rgba(15,23,42,0.45);
}
.chart-panel-toggle.on{
  border-color:rgba(56,189,248,0.45);
}
.chart-legend-item{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.22);
  background:rgba(15,23,42,0.65);
  font-size:11px;
  color:#e2e8f0;
  font-variant-numeric:tabular-nums;
}
.chart-legend-dot{
  width:7px;
  height:7px;
  border-radius:50%;
  display:inline-block;
  flex:0 0 7px;
}
.chart-legend-empty{
  font-size:11px;
  color:#94a3b8;
}
.chart-state-overlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:20px;
  color:#cbd5e1;
  font-size:13px;
  background:linear-gradient(180deg, rgba(2,6,23,0.5), rgba(2,6,23,0.72));
  z-index:4;
  pointer-events:none;
}
.chart-state-overlay.hidden{
  display:none;
}
.chart-panel-overlay{
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
}
.chart-panel-separator{
  position:absolute;
  left:0;
  right:0;
  height:1px;
  background:linear-gradient(90deg, rgba(56,189,248,0.08), rgba(148,163,184,0.35), rgba(56,189,248,0.08));
}
.chart-panel-title{
  position:absolute;
  left:8px;
  font-size:10px;
  letter-spacing:0.3px;
  text-transform:uppercase;
  color:rgba(148,163,184,0.92);
  background:rgba(2,6,23,0.55);
  border:1px solid rgba(148,163,184,0.2);
  border-radius:8px;
  padding:1px 6px;
}
.chart-box-pro canvas{
  image-rendering:auto;
}
#dashboardChartCol:fullscreen{
  width:100vw;
  height:100vh;
  max-width:none;
  max-height:none;
  margin:0;
  border-radius:0;
  padding:10px;
  background:rgba(2,6,23,0.98);
}
#dashboardChartCol:-webkit-full-screen{
  width:100vw;
  height:100vh;
  max-width:none;
  max-height:none;
  margin:0;
  border-radius:0;
  padding:10px;
  background:rgba(2,6,23,0.98);
}
#dashboardChartCol:fullscreen .chart-box-pro{
  min-height:calc(100vh - 220px);
}
#dashboardChartCol:-webkit-full-screen .chart-box-pro{
  min-height:calc(100vh - 220px);
}
#dashboardChartCol.chart-force-fullscreen{
  position:fixed;
  inset:0;
  z-index:11000;
  border-radius:0;
  background:rgba(2,6,23,0.98);
  margin:0;
  padding:10px;
}
#dashboardChartCol.chart-force-fullscreen .chart-box-pro{
  min-height:calc(100vh - 220px);
}
.chart-pair-meta{
  margin-bottom:8px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  padding:8px 10px;
  background:rgba(255,255,255,0.02);
}
.chart-pair-main{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.chart-pair-symbol{
  font-size:13px;
  color:var(--muted);
  font-weight:700;
  letter-spacing:0.2px;
}
.chart-pair-price{
  font-size:18px;
  font-weight:800;
  color:var(--white);
  font-variant-numeric:tabular-nums;
}
.chart-pair-stats{
  margin-top:8px;
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:8px;
}
.chart-pair-stat{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:6px 8px;
  background:rgba(15,23,42,0.55);
  min-width:0;
}
.chart-pair-stat span{
  display:block;
  font-size:11px;
  color:var(--muted);
  margin-bottom:2px;
}
.chart-pair-stat strong{
  display:block;
  font-size:13px;
  color:var(--text);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.pair-trades-wrap{
  margin-top:8px;
  max-height:180px !important;
}
.pair-trades-wrap.collapsed{
  display:none;
}
.pair-trades-head{
  margin-top:8px;
}
.pair-trades-toggle{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  font-size:12px;
}
.pair-trades-toggle #pairTradesToggleIcon{
  width:12px;
  text-align:center;
  color:var(--muted);
}
.pair-trades-wrap .table th,
.pair-trades-wrap .table td{
  padding:6px 8px;
  font-size:12px;
}
.ticker-list{display:flex; flex-direction:column; gap:8px; overflow:auto; padding-right:4px; max-height: 600px !important; overflow-y: scroll !important; }
.ticker-item{
  padding:10px;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:12px;
  background:rgba(17,24,39,0.6);
  cursor:default;
}
.ticker-top{display:flex; justify-content:space-between; align-items:center; gap:10px}
.ticker-price{font-variant-numeric:tabular-nums}
.badge{
  padding:2px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  font-size:12px;
  color:var(--muted);
}

.table-wrap{overflow-y:scroll !important; max-height:300px !important}
.table{width:100%; border-collapse:collapse}
.table th,.table td{padding:8px 10px; border-bottom:1px solid rgba(255,255,255,0.06); font-size:13px}
.table th{color:var(--muted); font-weight:600; text-align:left}

.input,.textarea,select{
  width:100%;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(17,24,39,0.5);
  color:var(--text);
  padding:10px;
}

.form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:8px;
}
.field{background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06); border-radius:14px; padding:10px}
.label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px}
.actions{margin-top:12px; display:flex; gap:10px}

.settings-layout{
  align-items:start;
}

.settings-card{
  padding:10px;
  background:linear-gradient(180deg, rgba(17,24,39,0.72), rgba(15,23,42,0.45));
  border:1px solid rgba(148,163,184,0.18);
}

.settings-card-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  padding-bottom:6px;
  margin-bottom:8px;
  border-bottom:1px solid rgba(148,163,184,0.16);
}

.settings-card-title{
  font-size:14px;
  font-weight:700;
  letter-spacing:0.2px;
}

.settings-card-meta{
  font-size:11px;
  color:var(--muted);
}

.settings-card-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px;
}

.settings-global-layout{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  grid-template-rows:auto auto auto;
  gap:12px;
  align-items:start;
}

.settings-global-card .settings-card-head{
  padding-bottom:8px;
  margin-bottom:10px;
}

.settings-global-limits{
  grid-column:1;
  grid-row:1;
}

.settings-global-limits .settings-card-grid{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.settings-global-credentials{
  grid-column:1;
  grid-row:2 / span 2;
}

.settings-global-credentials .settings-card-grid{
  grid-template-columns:1fr;
}

.settings-global-openai{
  grid-column:2;
  grid-row:1;
}

.settings-global-deepseek{
  grid-column:2;
  grid-row:2;
}

.settings-global-grok{
  grid-column:2;
  grid-row:3;
}

.settings-global-openai .settings-card-grid,
.settings-global-deepseek .settings-card-grid,
.settings-global-grok .settings-card-grid{
  grid-template-columns:1fr;
}

.settings-item{
  min-width:0;
}

.settings-item.full{
  grid-column:1 / -1;
}

.settings-item-hidden{
  display:none !important;
}

.settings-control{
  width:100%;
}

.settings-item.is-bool .label{
  margin-bottom:4px;
}

.settings-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(17,24,39,0.5);
  color:var(--text);
  font-size:12px;
}

.settings-toggle input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--blue);
}

.settings-card.settings-card-ai{
  padding:12px;
}

.settings-ai-layout{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.settings-ai-global{
  border:1px solid rgba(59,130,246,0.26);
  border-radius:12px;
  background:rgba(15,23,42,0.56);
  padding:10px;
}

.settings-ai-extra{
  border-style:dashed;
}

.settings-ai-block-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  padding-bottom:6px;
  margin-bottom:8px;
  border-bottom:1px solid rgba(148,163,184,0.14);
}

.settings-ai-block-title{
  font-size:12px;
  font-weight:700;
  color:#bfdbfe;
  letter-spacing:0.3px;
  text-transform:uppercase;
}

.settings-ai-block-note{
  font-size:11px;
  color:var(--muted);
}

.settings-ai-providers{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.settings-ai-provider{
  min-width:0;
  border:1px solid rgba(148,163,184,0.2);
  border-radius:12px;
  background:rgba(17,24,39,0.5);
  padding:10px;
}

.settings-ai-provider-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  padding-bottom:6px;
  margin-bottom:8px;
  border-bottom:1px solid rgba(148,163,184,0.14);
}

.settings-ai-provider-title{
  font-size:13px;
  font-weight:700;
}

.settings-ai-provider-meta{
  font-size:11px;
  color:var(--muted);
}

.settings-ai-provider-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

.settings-ptp-editor{
  border:1px dashed rgba(148,163,184,0.34);
  border-radius:12px;
  background:rgba(17,24,39,0.44);
  padding:10px;
}

.settings-ptp-editor.is-disabled{
  opacity:0.72;
}

.settings-ptp-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.settings-ptp-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.settings-ptp-row{
  display:grid;
  grid-template-columns:64px 1fr 1fr auto;
  gap:8px;
  align-items:center;
}

.settings-ptp-tag{
  font-size:12px;
  color:#bfdbfe;
  font-weight:700;
}

.settings-ptp-input{
  min-width:0;
}

.settings-ptp-summary{
  margin-top:8px;
}

.wh-grid{display:grid; grid-template-columns: 1fr 1fr; gap:12px}
.select-multi{height:420px}
.wh-toolbar{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0;
}
.wh-search{margin:0}

.wl-meta-grid{
  align-items:start;
}

.wl-strategy-picker{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
}

.wl-active-toggle{
  margin-top:10px;
}

.wl-chip-list{
  margin-top:8px;
  min-height:34px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.wl-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(59,130,246,0.45);
  background:rgba(59,130,246,0.14);
  color:var(--text);
  border-radius:999px;
  padding:4px 8px;
  font-size:12px;
}

.wl-chip-btn{
  border:0;
  background:transparent;
  color:#bfdbfe;
  font-size:13px;
  line-height:1;
  cursor:pointer;
  padding:0 2px;
}

.wl-chip-btn:hover{
  color:#ffffff;
}

.wl-chip-empty{
  color:var(--muted);
  font-size:12px;
  padding:6px 0;
}

.wl-table-strats{
  max-width:420px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.wl-create-row{
  display:grid;
  grid-template-columns:minmax(260px, 420px) auto;
  gap:10px;
  align-items:end;
}

.wl-create-action{
  display:flex;
  align-items:end;
}

.wl-active-cell{
  display:flex;
  align-items:center;
  gap:10px;
}

.wl-edit-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.wl-edit-meta{
  display:grid;
  grid-template-columns:minmax(240px, 1fr) minmax(220px, 300px);
  gap:12px;
  align-items:end;
}

.wl-edit-name{
  min-height:42px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(17,24,39,0.5);
  color:var(--text);
  padding:10px 12px;
  font-weight:600;
  display:flex;
  align-items:center;
}

.wl-edit-layout{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:12px;
}

.wl-zone{
  background:linear-gradient(180deg, rgba(17,24,39,0.72), rgba(15,23,42,0.46));
  border:1px solid rgba(148,163,184,0.18);
  border-radius:14px;
}

.wl-zone-execution{grid-column:1 / span 3; grid-row:1;}
.wl-zone-consensus{grid-column:1 / span 3; grid-row:2;}
.wl-zone-engine{grid-column:4 / span 3; grid-row:1 / span 2;}
.wl-zone-ai-controls{grid-column:1 / span 6; grid-row:3;}
.wl-zone-deepseek{grid-column:1 / span 2; grid-row:4;}
.wl-zone-openai{grid-column:3 / span 2; grid-row:4;}
.wl-zone-grok{grid-column:5 / span 2; grid-row:4;}
.wl-zone-strategies{grid-column:1 / span 3; grid-row:5;}
.wl-zone-symbols{grid-column:4 / span 3; grid-row:5;}

.wl-zone-settings-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}

.wl-zone-settings-grid-engine{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.wl-zone-settings-grid-ai-controls{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.wl-zone-settings-grid-provider{
  grid-template-columns:1fr;
}

.wl-settings-item{
  min-width:0;
}

.wl-settings-item.full{
  grid-column:1 / -1;
}

.wl-settings-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(17,24,39,0.5);
  color:var(--text);
  font-size:12px;
}

.wl-settings-toggle input[type="checkbox"]{
  width:16px;
  height:16px;
  margin:0;
  accent-color:var(--blue);
}

.wl-settings-toggle-state{
  color:var(--muted);
}

.wl-edit-settings-multi{
  min-height:120px;
}

.wl-edit-inline{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  margin-bottom:8px;
}

.wl-edit-symbols-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.wl-consensus-badge{
  display:inline-block;
  border:1px solid rgba(34,197,94,0.45);
  background:rgba(34,197,94,0.14);
  color:#bbf7d0;
  border-radius:999px;
  padding:2px 8px;
  font-size:11px;
}

.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.6);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.modal.hidden{display:none}
.modal-card{
  width:min(900px, 100%);
  height:min(600px, 90vh);
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  display:flex;
  flex-direction:column;
}
.modal-head{
  padding:10px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.logs{
  padding:10px;
  margin:0;
  overflow:auto;
  flex:1;
  background:#0a0d14;
  border-radius:0 0 18px 18px;
}

.modal-alert-card{
  width:min(560px, 100%);
  height:auto;
  min-height:0;
}

.modal-alert-body{
  padding:16px;
  color:var(--text);
  white-space:pre-wrap;
  line-height:1.5;
}

.modal-alert-actions{
  padding:0 16px 16px;
  display:flex;
  justify-content:flex-end;
}

.hidden{display:none}

/* Backtest stats */
.kv{ background: rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06); border-radius:14px; padding:10px; }
.kv .k{ font-size:12px; opacity:.75; }
.kv .v{ font-size:16px; font-weight:700; margin-top:4px; }


/* Fix modal overlay above chart canvas */
.modal{z-index:9999}
.chart-box canvas{z-index:1}
.chart-box iframe{z-index:1}

/* Consensus expand details */
.pair-actions{display:flex; align-items:center; gap:8px}
.btn-mini{
  width:22px; height:22px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:var(--text);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-weight:700;
}
.btn-mini:hover{filter:brightness(1.08)}
.pair-details{
  margin-top:8px;
  border-top:1px solid rgba(255,255,255,0.06);
  padding-top:8px;
  display:none;
}
.ticker-item.expanded .pair-details{display:block}
.detail-row{display:flex; justify-content:space-between; gap:10px; font-size:12px; padding:3px 0}
.detail-side{color:var(--muted)}
.detail-score{font-variant-numeric:tabular-nums}

.modal-card{position:relative; z-index:10000}

.modal *{pointer-events:auto}


/* ===== Live consensus card redesign (mock style) ===== */
.ticker-item{ border-radius:18px; padding:14px 14px; }
.ticker-top{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.ticker-symbol{ font-size:16px; font-weight:600; letter-spacing:.1px; }
.ticker-cons{ margin-top:6px; font-size:15px; color:var(--text); opacity:.95; }
.ticker-cons-strats{ margin-top:6px; font-size:12px; color:var(--text); opacity:.75; }
.ticker-cons-line{ line-height:1.25; }
.ticker-right{ display:flex; align-items:center; gap:12px; }
.ticker-price{ font-size:18px; font-weight:700; font-variant-numeric:tabular-nums; margin-top:2px; }
.btn-expand{
  width:34px;height:34px;border-radius:999px;border:0 !important;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  font-weight:900;
  color:#061221;
  background:rgba(59,130,246,0.95) !important;
  box-shadow:0 8px 18px rgba(0,0,0,0.35);
}
.ticker-price::before {
  content: "$";
  margin-right: 2px;
}
.ticker-item.expanded .btn-expand{ background:rgba(239,68,68,0.95); color:#fff; }
.pair-details{ margin-top:10px; padding-top:0; border-top:0; display:none; }
.ticker-item.expanded .pair-details{ display:block; }
.detail-row{ display:flex; justify-content:space-between; gap:12px; padding:4px 0; font-size:15px; }
.detail-left{ display:flex; align-items:flex-start; gap:8px; min-width:0; }
.detail-name-wrap{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}
.detail-side{ color:rgba(255,255,255,0.88); font-weight:600; }
.detail-meta{
  color:rgba(147,197,253,0.9);
  font-size:11px;
  line-height:1.2;
  opacity:0.95;
}
.detail-reason{
  color:rgba(148,163,184,0.95);
  font-size:11px;
  line-height:1.25;
  white-space:normal;
  word-break:break-word;
  max-width:100%;
}
.detail-score{ color:rgba(255,255,255,0.9); font-variant-numeric:tabular-nums; }
.detail-chart-btn{
  width:20px;
  height:20px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.16);
  background:rgba(255,255,255,0.06);
  color:#9ca3af;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  cursor:pointer;
}
.detail-chart-btn svg{
  width:12px;
  height:12px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.detail-chart-btn:hover{ filter:brightness(1.1); color:#e5e7eb; }
.detail-chart-btn.active{
  border-color:rgba(34,197,94,0.55);
  background:rgba(34,197,94,0.15);
  color:#22c55e;
}

/* Per-strategy coloring (BUY/SELL/neutral) */
.detail-row.buy .detail-score{ color:#22c55e; }
.detail-row.sell .detail-score{ color:#ef4444; }
.detail-row.neutral .detail-score{ color:#9ca3af; }
.detail-empty{ color:#9ca3af; font-size:12px; padding:6px 0; }

.btn-expand{appearance:none; -webkit-appearance:none;}

/* ===== Open trades extras ===== */
.pnl-win{ color:#22c55e; font-weight:700; }
.pnl-loss{ color:#ef4444; font-weight:700; }
.pnl-flat{ color:#9ca3af; font-weight:700; }

.btn-close-trade{
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.06);
  color:var(--text);
  padding:6px 10px;
  border-radius:10px;
  cursor:pointer;
  font-weight:700;
}
.btn-close-trade:hover{ filter:brightness(1.08); }

/* ===== Strategy settings ===== */
.strategy-switch{
  position:relative;
  display:inline-block;
  width:46px;
  height:24px;
}

.strategy-switch input{
  opacity:0;
  width:0;
  height:0;
}

.strategy-slider{
  position:absolute;
  inset:0;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(148,163,184,0.25);
  transition:all .2s ease;
  cursor:pointer;
}

.strategy-slider::before{
  content:"";
  position:absolute;
  width:18px;
  height:18px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:#e5e7eb;
  transition:transform .2s ease;
}

.strategy-switch input:checked + .strategy-slider{
  background:rgba(34,197,94,0.35);
  border-color:rgba(34,197,94,0.75);
}

.strategy-switch input:checked + .strategy-slider::before{
  transform:translateX(22px);
}

.strategy-remove-btn{
  background:rgba(239,68,68,0.14);
  border-color:rgba(239,68,68,0.45);
}

/* ===== Visual strategy creator ===== */
.vc-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns: minmax(380px, 1fr) minmax(520px, 1.15fr);
  gap:12px;
  align-items:start;
}

.vc-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.vc-block{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.vc-presets{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.vc-preset{
  border-color:rgba(59,130,246,0.35);
  background:rgba(59,130,246,0.12);
}

.vc-preset.active{
  border-color:rgba(34,197,94,0.8);
  background:rgba(34,197,94,0.18);
}

.vc-inline{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.vc-toggle-row{
  font-size:13px;
  color:var(--text);
}

.vc-toggle-row input{
  margin-right:6px;
  transform:translateY(1px);
}

.vc-range{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.vc-range label{
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:var(--muted);
}

.vc-range input[type="range"]{
  width:100%;
}

.vc-summary{
  display:grid;
  gap:6px;
  font-size:13px;
  line-height:1.35;
}

.vc-summary-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px dashed rgba(255,255,255,0.08);
  padding-bottom:4px;
}

.vc-summary-key{
  color:var(--muted);
}

.vc-summary-val{
  color:var(--text);
  text-align:right;
}

.vc-code-block{
  min-height:420px;
}

.vc-code{
  min-height:420px;
  font-family:Consolas, "Courier New", monospace;
  font-size:12px;
  line-height:1.35;
  background:#0a0d14;
}

@media (max-width: 1200px){
  .vc-grid{
    grid-template-columns:1fr;
  }
}

/* ===== Advanced strategy creator ===== */
.asc-grid{
  margin-top:12px;
  display:grid;
  grid-template-columns:minmax(0, 4fr) minmax(280px, 1fr);
  gap:12px;
  align-items:start;
}

#page-backtester .asc-grid{
  grid-template-columns:minmax(0, 1fr);
}

.asc-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.asc-block{
  display:flex;
  flex-direction:column;
  gap:10px;
  background:linear-gradient(180deg, rgba(17,24,39,0.75), rgba(15,23,42,0.75));
  border:1px solid rgba(255,255,255,0.07);
}

.asc-block-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.asc-top-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.asc-top-actions .btn{
  white-space:nowrap;
}

.asc-inline2{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:end;
}

.asc-inline3{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  align-items:end;
}

.asc-inline4{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  align-items:end;
}

.asc-center{
  display:flex;
  align-items:flex-end;
  justify-content:flex-start;
}

.asc-input{
  width:100%;
}

.asc-param-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}

.asc-param-item{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.asc-table-wrap{
  overflow:auto;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:12px;
}

.asc-table th,
.asc-table td{
  white-space:nowrap;
}

.asc-rules{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.asc-rule-row{
  display:grid;
  grid-template-columns:minmax(120px, 1.2fr) minmax(90px, .8fr) minmax(90px, .8fr) minmax(180px, 2fr) auto;
  gap:8px;
  align-items:center;
  padding:8px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:12px;
  background:rgba(255,255,255,0.02);
}

.asc-rule-cell{
  min-width:0;
}

.asc-rule-input{
  width:100%;
}

.asc-rule-right{
  display:flex;
  align-items:center;
  gap:8px;
}

.asc-toggle{
  display:flex;
  align-items:center;
  min-height:40px;
  color:var(--text);
  font-size:13px;
}

.asc-toggle input{
  margin-right:8px;
  transform:translateY(1px);
}

.asc-validation{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:13px;
}

.asc-val-error{
  color:#fecaca;
  border:1px solid rgba(239,68,68,0.4);
  background:rgba(239,68,68,0.12);
  border-radius:10px;
  padding:8px 10px;
}

.asc-val-warn{
  color:#fde68a;
  border:1px solid rgba(245,158,11,0.45);
  background:rgba(245,158,11,0.12);
  border-radius:10px;
  padding:8px 10px;
}

.asc-val-ok{
  color:#bbf7d0;
  border:1px solid rgba(34,197,94,0.45);
  background:rgba(34,197,94,0.12);
  border-radius:10px;
  padding:8px 10px;
}

.asc-summary{
  display:grid;
  gap:6px;
  font-size:13px;
}

.asc-summary-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px dashed rgba(255,255,255,0.08);
  padding-bottom:4px;
}

.asc-summary-key{
  color:var(--muted);
}

.asc-summary-val{
  color:var(--text);
  text-align:right;
  max-width:72%;
  word-break:break-word;
}

.asc-json{
  min-height:340px;
  font-family:Consolas, "Courier New", monospace;
  font-size:12px;
  line-height:1.35;
  background:#0a0d14;
}

.asc-backtest{
  min-height:220px;
  max-height:360px;
}

.asc-quick-stats{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
}

.asc-quick-consensus-stats{
  margin-top:8px;
}

.asc-quick-stat{
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:8px 10px;
  background:rgba(255,255,255,0.02);
}

.asc-quick-stat-k{
  font-size:11px;
  color:var(--muted);
  margin-bottom:2px;
}

.asc-quick-stat-v{
  font-size:14px;
  color:var(--text);
  font-weight:600;
}

.asc-quick-card{
  padding:10px;
}

.asc-backtest-status{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:22px;
}

.asc-backtest-spinner{
  width:12px;
  height:12px;
  border-radius:999px;
  border:2px solid rgba(148,163,184,0.35);
  border-top-color:var(--blue);
  animation:asc-backtest-spin .8s linear infinite;
  display:none;
  flex:0 0 auto;
}

.asc-backtest-progress{
  margin-top:4px;
  display:none;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.asc-backtest-progress-main{
  min-width:220px;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.asc-backtest-progress-bar{
  width:100%;
  height:7px;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,0.28);
  background:rgba(148,163,184,0.14);
}

.asc-backtest-progress-fill{
  display:block;
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, #22c55e 0%, #3b82f6 100%);
  transition:width .2s ease;
}

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

.asc-quick-chart-shell{
  margin-top:8px;
  height:260px;
  position:relative;
}

.asc-quick-chart{
  height:100%;
}

.asc-quick-chart-placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  text-align:center;
  color:var(--muted);
  font-size:12px;
  border:1px dashed rgba(148,163,184,0.28);
  border-radius:10px;
  background:rgba(11,15,23,0.45);
}

.asc-quick-chart-placeholder.hidden{
  display:none;
}

.asc-quick-table-wrap{
  margin-top:8px;
  max-height:220px;
  overflow:auto;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:10px;
}

.asc-quick-table th,
.asc-quick-table td{
  white-space:nowrap;
}

.asc-quick-pagination{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
}

.asc-quick-pagination .small{
  min-width:190px;
  text-align:right;
}

.asc-backtest-strategy-list{
  margin-top:8px;
  max-height:220px;
  overflow:auto;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:8px;
  background:rgba(255,255,255,0.02);
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:8px;
}

.asc-backtest-strategy-item{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid rgba(255,255,255,0.08);
  border-radius:10px;
  padding:6px 8px;
  background:rgba(15,23,42,0.45);
  min-width:0;
}

.asc-backtest-strategy-item input{
  margin:0;
}

.asc-backtest-strategy-name{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-size:12px;
  flex:1;
}

.asc-backtest-strategy-tag{
  font-size:10px;
  color:var(--muted);
  border:1px solid rgba(255,255,255,0.14);
  border-radius:999px;
  padding:1px 6px;
}

.asc-consensus-pill{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:2px 8px;
  font-size:11px;
  border:1px solid rgba(255,255,255,0.2);
}

.asc-consensus-pill.buy{
  color:#22c55e;
  border-color:rgba(34,197,94,0.45);
  background:rgba(34,197,94,0.14);
}

.asc-consensus-pill.sell{
  color:#ef4444;
  border-color:rgba(239,68,68,0.45);
  background:rgba(239,68,68,0.14);
}

.asc-consensus-pill.flat{
  color:#94a3b8;
  border-color:rgba(148,163,184,0.35);
  background:rgba(148,163,184,0.12);
}

.asc-preset-shell{
  margin-top:12px;
}

.asc-presets{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}

.asc-preset{
  border-color:rgba(59,130,246,0.35);
  background:rgba(59,130,246,0.12);
}

.asc-preset.active{
  border-color:rgba(34,197,94,0.8);
  background:rgba(34,197,94,0.18);
}

.asc-flow-nav{
  margin-top:12px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
  gap:8px;
}

.asc-step-panel{
  display:none;
}

.asc-step-panel.is-active{
  display:flex;
}

.asc-step-btn{
  border:1px solid rgba(255,255,255,0.12);
  border-radius:12px;
  background:rgba(255,255,255,0.03);
  color:var(--text);
  padding:8px 10px;
  cursor:pointer;
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.asc-step-btn.is-active{
  border-color:rgba(59,130,246,0.75);
  background:rgba(59,130,246,0.18);
}

.asc-step-btn[data-state="ok"]{
  border-color:rgba(34,197,94,0.65);
}

.asc-step-btn[data-state="warn"]{
  border-color:rgba(245,158,11,0.65);
}

.asc-step-title{
  font-size:12px;
  font-weight:600;
  color:var(--text);
}

.asc-step-meta{
  font-size:11px;
  color:var(--muted);
  min-height:14px;
}

.asc-side-col{
  position:sticky;
  top:12px;
  align-self:start;
}

.asc-side-card{
  border-color:rgba(255,255,255,0.12);
}

.asc-json-live{
  min-height:280px;
  max-height:420px;
  resize:vertical;
}

.asc-actions-bar{
  position:sticky;
  bottom:0;
  z-index:15;
  padding:10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.10);
  background:linear-gradient(180deg, rgba(17,24,39,0.95), rgba(15,23,42,0.95));
  backdrop-filter:blur(4px);
}

.asc-actions-bar .btn{
  white-space:nowrap;
}

.asc-input-error{
  border-color:rgba(239,68,68,0.75) !important;
  box-shadow:0 0 0 2px rgba(239,68,68,0.2);
}

@media (max-width: 1380px){
  .dash-cards{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .settings-ai-providers{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .chart-pair-stats{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
  .asc-grid{
    grid-template-columns:1fr;
  }
  .asc-flow-nav{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
  .asc-quick-stats{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .asc-backtest-strategy-list{
    grid-template-columns:1fr;
  }
  .asc-side-col{
    position:static;
  }
  .wl-zone-settings-grid-ai-controls{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px){
  .row-top{
    grid-template-columns:1fr;
  }
  .dash-toolbar{
    grid-template-columns:1fr;
  }
  .dash-cards{
    grid-template-columns:1fr;
  }
  .form-grid.settings-layout{
    grid-template-columns:1fr;
  }
  .settings-global-layout{
    grid-template-columns:1fr;
    grid-template-rows:auto;
  }
  .settings-global-limits,
  .settings-global-credentials,
  .settings-global-openai,
  .settings-global-deepseek,
  .settings-global-grok{
    grid-column:1;
    grid-row:auto;
  }
  .settings-card-grid{
    grid-template-columns:1fr;
  }
  .settings-ai-providers{
    grid-template-columns:1fr;
  }
  .settings-ai-block-head,
  .settings-ai-provider-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .chart-pair-stats{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .chart-pro-head{
    flex-direction:column;
    align-items:flex-start;
  }
  .chart-box-pro{
    min-height:300px;
  }
  .chart-legend{
    gap:5px;
  }
  .asc-inline2,
  .asc-inline3,
  .asc-inline4,
  .asc-param-grid,
  .wl-strategy-picker,
  .wl-create-row,
  .wl-edit-meta,
  .wl-zone-settings-grid,
  .wl-edit-inline{
    grid-template-columns:1fr;
  }
  .wl-edit-layout{
    grid-template-columns:1fr;
  }
  .wl-zone-execution,
  .wl-zone-consensus,
  .wl-zone-engine,
  .wl-zone-ai-controls,
  .wl-zone-deepseek,
  .wl-zone-openai,
  .wl-zone-grok,
  .wl-zone-strategies,
  .wl-zone-symbols{
    grid-column:1;
    grid-row:auto;
  }
  .wl-meta-grid{
    grid-template-columns:1fr;
  }
  .asc-rule-row{
    grid-template-columns:1fr;
  }
  .asc-summary-val{
    max-width:100%;
  }
  .asc-quick-stats{
    grid-template-columns:1fr;
  }
  .asc-backtest-strategy-list{
    grid-template-columns:1fr;
  }
  .asc-flow-nav{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .asc-block-head{
    flex-direction:column;
    align-items:stretch;
  }
  .asc-top-actions{
    justify-content:flex-start;
  }
  .asc-actions-bar{
    gap:8px;
  }
}

.topbar-user{
  padding:0 6px;
}

.auth-shell,
.profile-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.auth-card,
.profile-card{
  width:min(460px, 100%);
}

.auth-title{
  font-size:22px;
  font-weight:700;
  margin-bottom:6px;
}

.auth-subtitle{
  margin-bottom:14px;
}

.auth-msg{
  min-height:20px;
  margin-top:10px;
}

.auth-msg-error{
  color:var(--red);
}

.auth-hint{
  margin-top:10px;
}

.profile-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:12px;
}

.profile-head-actions{
  display:flex;
  gap:8px;
}

/* TradingView Import Center */
.tvimp-shell{display:flex;flex-direction:column;gap:12px}
.tvimp-tabs{display:flex;gap:8px;flex-wrap:wrap}
.tvimp-tab.is-active{background:rgba(37,99,235,.22);border-color:rgba(59,130,246,.7);color:#dbeafe}
.tvimp-editor{
  width:100%;
  min-height:320px;
  max-height:540px;
  resize:vertical;
  font-family:Consolas,"Courier New",monospace;
  font-size:12px;
  line-height:1.45;
}
.tvimp-actions{display:flex;gap:8px;flex-wrap:wrap}
.tvimp-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tvimp-box{min-height:94px;max-height:180px;overflow:auto;margin:0}
.tvimp-preview{min-height:180px;max-height:380px;overflow:auto;margin:0}
@media (max-width:1100px){
  .tvimp-grid{grid-template-columns:1fr}
}


