*{box-sizing:border-box} :root{--bg:#080e18;--panel:#0d1725;--panel2:#111e2e;--line:#26384e;--text:#e4edf8;--muted:#93a6bd;--cyan:#32c8ed;--green:#14d7a0;--red:#ff4567;--amber:#ffc247;--purple:#c59cff}
html,body{height:100%;width:100%;margin:0;overflow:hidden;background:var(--bg);color:var(--text);font:13px/1.35 "Segoe UI",Arial,sans-serif}button,input,select{font:inherit;color:inherit}button,select,input{border:1px solid var(--line);background:#101c2b;border-radius:6px;min-width:0}button{cursor:pointer}button:hover{filter:brightness(1.12)}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--cyan);outline-offset:1px}
.app{height:100dvh;min-width:0;display:grid;grid-template-rows:48px 68px minmax(0,1fr) 25px;gap:7px;padding:7px 9px 0}
.topbar{display:flex;align-items:center;gap:20px;min-width:0;border-bottom:1px solid var(--line);padding:0 4px}.brand{display:flex;align-items:center;gap:9px;white-space:nowrap;font-weight:650;font-size:16px}.brand-mark{color:var(--cyan);font-size:24px}.nav{display:flex;gap:3px;align-self:stretch;min-width:0;overflow:hidden}.nav-item{background:transparent;border:0;border-radius:0;padding:0 11px;white-space:nowrap;color:#bdcadd;border-bottom:2px solid transparent}.nav-item.active{color:var(--cyan);border-bottom-color:var(--cyan)}.top-right{display:flex;align-items:center;gap:7px;margin-left:auto;min-width:0}.top-right select{max-width:135px;padding:7px}.connection{display:flex;align-items:center;gap:6px;color:var(--green);white-space:nowrap}.connection i,.green-dot,.live-dot{width:8px;height:8px;border-radius:50%;background:var(--green);display:inline-block}.icon-button{height:31px;width:32px}
.metrics{display:grid;grid-template-columns:repeat(7,minmax(70px,1fr)) minmax(100px,.9fr) minmax(110px,.9fr);gap:7px;min-width:0;border:1px solid var(--line);border-radius:9px;background:var(--panel);padding:7px 10px}.metric,.status-tile{display:flex;flex-direction:column;justify-content:center;min-width:0;gap:2px}.metric span,.status-tile span{font-size:11px;color:var(--muted);white-space:nowrap}.metric strong{font-size:14px;white-space:nowrap}.status-tile{border:1px solid var(--line);border-radius:6px;padding:5px 9px}.status-tile strong{font-size:12px}.green{color:var(--green)!important}.red{color:var(--red)!important}.cyan{color:var(--cyan)!important}.amber{color:var(--amber)!important}.purple{color:var(--purple)!important}.muted{color:var(--muted)}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,30%);gap:8px;min-height:0;min-width:0}.left-pane{display:grid;grid-template-rows:43px 35px minmax(130px,1fr) minmax(130px,30%);gap:5px;min-height:0;min-width:0}.chart-toolbar{display:flex;align-items:center;gap:6px;padding:4px 6px;border:1px solid var(--line);border-radius:8px;background:var(--panel);min-width:0;overflow:hidden}.symbol-select{width:145px;padding:7px}.timeframes{display:flex;gap:3px;min-width:0}.timeframes button{padding:6px 8px;background:#101d2c;white-space:nowrap}.timeframes button.selected,.tabs button.selected,.control-tabs button.selected,.quick-values button.selected{background:#087fc8;border-color:#168fe0;color:white}.quote{display:flex;align-items:center;gap:6px;padding-left:9px;border-left:1px solid var(--line);white-space:nowrap}.quote strong{color:var(--cyan);font-size:14px}.quote span,.spread span{font-size:11px}.spread{display:flex;flex-direction:column;padding-left:8px;border-left:1px solid var(--line);font-size:11px;white-space:nowrap}.indicator-strip{display:flex;gap:5px;align-items:stretch;min-width:0;overflow:hidden}.indicator{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:4px 9px;border:1px solid var(--line);background:var(--panel);border-radius:6px;min-width:0;flex:1;white-space:nowrap}.indicator span{font-size:11px;color:var(--muted)}.indicator strong{font-size:12px;font-weight:600}
.chart-area{position:relative;min-height:0;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:8px;background:#08111d}.chart-heading{position:absolute;z-index:1;left:12px;top:8px;display:flex;align-items:center;gap:8px;font-size:12px;pointer-events:none}.chart-watermark{position:absolute;bottom:12px;left:12px;border:1px solid #30425a;color:#7b91ac;border-radius:50%;height:30px;width:30px;display:grid;place-items:center;font-weight:700;opacity:.65;pointer-events:none}#chart{width:100%;height:100%;display:block}
.positions{min-height:0;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--panel);display:flex;flex-direction:column;overflow:hidden}.tabs{display:flex;gap:4px;padding:5px 7px;border-bottom:1px solid var(--line);overflow:hidden;flex-shrink:0}.tabs button{padding:8px 12px;white-space:nowrap;background:#101b2a;flex:0 1 auto}.table-wrap{min-height:0;overflow:auto}table{border-collapse:collapse;width:100%;font-size:11px;white-space:nowrap}th{text-align:left;color:var(--muted);font-weight:500;background:#0b1421}td,th{padding:9px 10px;border-bottom:1px solid #1c2b3e}.empty{text-align:center;padding:25px 10px;color:var(--muted)}
.controls{display:grid;grid-template-rows:39px minmax(0,1fr);min-width:0;min-height:0;border:1px solid var(--line);border-radius:9px;background:var(--panel);overflow:hidden}.control-tabs{display:flex;gap:2px;border-bottom:1px solid var(--line);padding:4px;overflow:hidden}.control-tabs button{flex:1;padding:6px 4px;background:transparent;border-color:transparent;white-space:nowrap;font-size:12px}.control-scroll{min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#405975 #0c1522;padding:0 8px 10px}.control-section{padding:10px 2px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:8px}.control-section h3{margin:0 0 1px;font-size:13px;font-weight:600;color:#d9e8fa}.control-section h3:before{content:"";display:inline-block;width:3px;height:12px;background:var(--cyan);margin-right:7px;border-radius:2px}label{display:flex;flex-direction:column;gap:4px;color:#b9c9dc;font-size:11px;min-width:0}input,select{padding:8px 9px;width:100%;min-height:32px}input[readonly]{color:var(--cyan)}.field-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.field-row.three{grid-template-columns:1.15fr 1fr 1fr}.quick-values{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}.quick-values button{padding:6px 1px;font-size:11px}.trade-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.trade-buttons button{padding:10px 5px;font-weight:700;font-size:15px;border:0}.trade-buttons small{display:block;font-size:11px;font-weight:400}.buy,.green-button{background:#08b982;color:#fff}.sell,.danger-button{background:#ed3153;color:white}.notice{font-size:10px;line-height:1.35;color:#9eafc4;margin:0}.toggle-row{display:flex;flex-direction:row;align-items:center;justify-content:space-between;position:relative;min-height:23px}.toggle-row input{position:absolute;right:0;width:35px;height:19px;min-height:0;opacity:0;cursor:pointer}.toggle-row b{width:35px;height:19px;background:#34465c;border-radius:20px;position:relative}.toggle-row b:after{content:"";position:absolute;top:3px;left:3px;width:13px;height:13px;background:white;border-radius:50%;transition:.15s}.toggle-row input:checked+b{background:#087fc8}.toggle-row input:checked+b:after{left:19px}.arm-row{display:flex;align-items:center;justify-content:space-between}.arm-row strong{border:1px solid currentColor;border-radius:5px;padding:4px 8px;font-size:11px}.wide-button{width:100%;padding:9px 8px;font-weight:650}.risk-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.risk-summary div{display:flex;flex-direction:column;gap:3px;background:#111e2e;border:1px solid var(--line);border-radius:6px;padding:8px}.risk-summary span,.small{font-size:11px;color:var(--muted)}.risk-summary strong{font-size:13px}.statusbar{display:flex;align-items:center;gap:17px;border-top:1px solid var(--line);white-space:nowrap;overflow:hidden;color:var(--muted);font-size:10px;padding:0 4px}.statusbar b{color:#d8e4f3;font-weight:500}.statusbar span{display:flex;align-items:center;gap:5px}.statusbar #clock{margin-left:auto}
@media(max-width:1250px){.app{grid-template-rows:45px 62px minmax(0,1fr) 24px;gap:5px;padding:5px 6px 0}.topbar{gap:10px}.brand{font-size:14px}.nav-item{padding:0 7px;font-size:12px}.metrics{gap:4px;padding:6px}.metric span{font-size:10px}.metric strong{font-size:12px}.workspace{grid-template-columns:minmax(0,1fr) minmax(300px,32%)}.timeframes button{padding:6px 5px}.indicator{padding:4px 6px;gap:5px}.indicator span{font-size:10px}.indicator strong{font-size:11px}.quote span{display:none}}
@media(max-width:950px){.nav-item:nth-child(n+5){display:none}.metrics{grid-template-columns:repeat(5,minmax(60px,1fr))}.status-tile:nth-last-child(2){display:none}.workspace{grid-template-columns:minmax(0,1fr) minmax(280px,35%)}.indicator:nth-child(n+7){display:none}.symbol-select{width:112px}.timeframes button{font-size:11px;padding:5px 4px}.spread{display:none}}
@media(max-height:720px){.app{grid-template-rows:42px 55px minmax(0,1fr) 22px;gap:4px;padding-top:4px}.metrics{padding:4px 7px}.left-pane{grid-template-rows:38px 31px minmax(110px,1fr) minmax(105px,27%);gap:4px}.control-section{padding:7px 2px;gap:6px}.control-scroll{padding-bottom:6px}.indicator{padding:3px 5px}.tabs button{padding:6px 9px}}
@media(max-width:700px){.top-right select:first-of-type,.nav-item:nth-child(n+3){display:none}.workspace{grid-template-columns:minmax(0,1fr) minmax(255px,42%)}.brand span:last-child{display:none}.metrics{grid-template-columns:repeat(4,minmax(55px,1fr))}.metric:nth-child(n+5){display:none}.indicator:nth-child(n+5){display:none}.quote{display:none}.tabs button:nth-child(n+4){display:none}}


/* Positions Table Header Title Visibility */
.positions table {
  width: 100% !important;
  border-collapse: collapse !important;
}
.positions table thead,
.table-wrap table thead {
  display: table-header-group !important;
  visibility: visible !important;
  background: #181c27 !important;
}
.positions table th,
.table-wrap table th {
  display: table-cell !important;
  visibility: visible !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 8px 10px !important;
  text-align: left !important;
  background: #181c27 !important;
  border-bottom: 1px solid #2a2e39 !important;
  white-space: nowrap !important;
}
.positions table td,
.table-wrap table td {
  padding: 8px 10px !important;
  font-size: 12px !important;
  border-bottom: 1px solid rgba(42, 46, 57, 0.4) !important;
  white-space: nowrap !important;
}


/* ENFORCED POSITIONS TABLE HEADERS */
.positions table thead,
.table-wrap thead,
.positions table thead {
  display: table-header-group !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #1e293b !important;
}
.positions table thead tr,
.table-wrap thead tr,
.positions table thead tr {
  display: table-row !important;
  visibility: visible !important;
  background-color: #1e293b !important;
}
.positions table th,
.table-wrap th,
.positions table th {
  display: table-cell !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #f8fafc !important;
  background-color: #1e293b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 10px 8px !important;
  text-align: left !important;
  border-bottom: 2px solid #334155 !important;
}


/* ENFORCED POSITIONS TABLE HEADER VISIBILITY */
.positions table,
.table-wrap table,
table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
}
.positions table thead,
.table-wrap table thead,
.positions thead,
.table-wrap thead,
.positions table thead {
  display: table-header-group !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #1e293b !important;
}
.positions table thead tr,
.table-wrap table thead tr,
.positions table thead tr {
  display: table-row !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #1e293b !important;
}
.positions table th,
.table-wrap table th,
.positions table th {
  display: table-cell !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  background-color: #1e293b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 10px 10px !important;
  text-align: left !important;
  border-bottom: 2px solid #3b82f6 !important;
  white-space: nowrap !important;
}
.positions table td,
.table-wrap table td,
.positions table td {
  padding: 9px 10px !important;
  font-size: 12px !important;
  border-bottom: 1px solid rgba(51, 65, 85, 0.4) !important;
  white-space: nowrap !important;
}


/* SPACIOUS TOOLBAR & CHART TIMING SEPARATION */
.chart-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px 14px !important;
  padding: 8px 12px !important;
  background: #131722 !important;
  border-bottom: 1px solid #2a2e39 !important;
}
.chart-toolbar .toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
.chart-toolbar .timeframes {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-wrap: nowrap !important;
}
.chart-toolbar .timeframes button {
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.chart-toolbar .price-pill {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: #1e293b !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #334155 !important;
  flex-shrink: 0 !important;
}

/* POSITIONS TABLE HEADERS */
.positions table thead,
.table-wrap thead {
  display: table-header-group !important;
  visibility: visible !important;
  background-color: #1e293b !important;
}
.positions table th,
.table-wrap th {
  display: table-cell !important;
  visibility: visible !important;
  color: #ffffff !important;
  background-color: #1e293b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 10px 8px !important;
  text-align: left !important;
  border-bottom: 2px solid #3b82f6 !important;
  white-space: nowrap !important;
}


/* ENFORCED TOOLBAR & TIMING GEOMETRY */
.chart-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 8px 12px !important;
  background: #131722 !important;
  border-bottom: 1px solid #2a2e39 !important;
  overflow: visible !important;
}
.chart-toolbar .toolbar-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}
.chart-toolbar .symbol-select {
  max-width: 170px !important;
  min-width: 150px !important;
  flex-shrink: 0 !important;
  text-overflow: ellipsis !important;
}
.chart-toolbar .timeframes {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
}
.chart-toolbar .timeframes button {
  padding: 4px 7px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.chart-toolbar .price-pill {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: #1e293b !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
  border: 1px solid #334155 !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
}

/* ENFORCED POSITIONS TABLE HEADER TITLES */
.positions table,
.table-wrap table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
}
.positions table thead,
.table-wrap table thead {
  display: table-header-group !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #1e293b !important;
}
.positions table thead tr,
.table-wrap table thead tr {
  display: table-row !important;
  visibility: visible !important;
  background-color: #1e293b !important;
}
.positions table th,
.table-wrap table th {
  display: table-cell !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  background-color: #1e293b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 10px 8px !important;
  text-align: left !important;
  border-bottom: 2px solid #3b82f6 !important;
  white-space: nowrap !important;
}


/* --- MASTER LAYOUT OVERRIDES (v=1791747616) --- */
.chart-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  padding: 8px 14px !important;
  background: #131722 !important;
  border-bottom: 1px solid #2a2e39 !important;
}
.chart-toolbar .timing-group {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-shrink: 0 !important;
}
.chart-toolbar .timeframes {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}
.chart-toolbar .timeframes button {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border: 1px solid #334155 !important;
  border-radius: 4px !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
}
.chart-toolbar .timeframes button.selected {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
.chart-toolbar .price-group {
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  background: #1e293b !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  border: 1px solid #334155 !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
}

/* POSITIONS TABLE HEADERS */
.positions table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse !important;
}
.positions table thead,
.table-wrap thead {
  display: table-header-group !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #1e293b !important;
}
.positions table thead tr,
.table-wrap thead tr {
  display: table-row !important;
  visibility: visible !important;
  background-color: #1e293b !important;
}
.positions table th,
.table-wrap th {
  display: table-cell !important;
  visibility: visible !important;
  opacity: 1 !important;
  color: #ffffff !important;
  background-color: #1e293b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 10px 8px !important;
  text-align: left !important;
  border-bottom: 2px solid #3b82f6 !important;
  white-space: nowrap !important;
}


/* --- SURGICAL GEOMETRY OVERRIDES (v=1791748362) --- */
.left-pane {
  grid-template-rows: 42px 34px minmax(220px, 1fr) minmax(140px, auto) !important;
}
.chart-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  padding: 4px 8px !important;
  overflow: hidden !important;
}
.chart-toolbar .timeframes button {
  padding: 3px 6px !important;
  font-size: 11px !important;
}
.chart-area {
  height: 100% !important;
  min-height: 220px !important;
  max-height: none !important;
  margin-bottom: 6px !important;
}
.positions table th,
.table-wrap th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background-color: #1e293b !important;
  color: #ffffff !important;
  padding: 8px 8px !important;
}


/* --- APPROACH 1: COMPACT TOOLBAR GEOMETRY (v=1791783529) --- */
.left-pane {
  grid-template-rows: 38px 34px minmax(200px, 1fr) minmax(130px, auto) !important;
}
.chart-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  padding: 3px 8px !important;
  overflow: hidden !important;
  background: #131722 !important;
  border-bottom: 1px solid #2a2e39 !important;
  height: 38px !important;
  box-sizing: border-box !important;
}
.chart-toolbar .symbol-select {
  width: 125px !important;
  min-width: 110px !important;
  max-width: 130px !important;
  padding: 3px 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
}
.chart-toolbar .timeframes {
  display: flex !important;
  gap: 2px !important;
  flex-shrink: 0 !important;
}
.chart-toolbar .timeframes button {
  padding: 3px 5px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  min-width: 23px !important;
  background: #1e293b !important;
  color: #94a3b8 !important;
  border: 1px solid #334155 !important;
  border-radius: 3px !important;
}
.chart-toolbar .timeframes button.selected {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
}
.chart-toolbar .price-pill {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  background: #1e293b !important;
  padding: 3px 10px !important;
  border-radius: 5px !important;
  border: 1px solid #334155 !important;
  font-size: 11px !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}
.chart-area {
  height: 100% !important;
  min-height: 200px !important;
  overflow: hidden !important;
}
.positions table th, .table-wrap th {
  position: sticky !important;
  top: 0 !important;
  background: #1e293b !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 8px 8px !important;
}


/* --- LIGHTWEIGHT CHARTS TABLE ISOLATION (v=1791783930) --- */
#tradingChart table,
.tv-lightweight-charts table {
  display: table !important;
  width: 100% !important;
  height: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
#tradingChart table tr,
.tv-lightweight-charts table tr {
  display: table-row !important;
  background: transparent !important;
  border: none !important;
}
#tradingChart table td,
.tv-lightweight-charts table td {
  display: table-cell !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
}


/* --- COCKPIT TAB ROUTING (v=1791784701) --- */
.control-tabs {
  display: flex !important;
  gap: 3px !important;
  padding: 5px !important;
  background: #111e2e !important;
  border-bottom: 1px solid #2a3d54 !important;
}
.control-tabs button {
  flex: 1 !important;
  padding: 6px 2px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  color: #94a3b8 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  text-align: center !important;
}
.control-tabs button:hover {
  color: #f8fafc !important;
  background: #1e293b !important;
}
.control-tabs button.selected {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}


/* --- STABLE CHART HEIGHT & INTERNAL TABLE SCROLL (v=1791786811) --- */
.left-pane {
  display: grid !important;
  grid-template-rows: 38px 34px minmax(0, 1fr) 165px !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.chart-area {
  height: 100% !important;
  min-height: 0 !important;
  position: relative !important;
  overflow: hidden !important;
}

.positions {
  min-height: 0 !important;
  height: 165px !important;
  max-height: 165px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--panel) !important;
}

.positions .tabs {
  flex-shrink: 0 !important;
}

.positions .table-wrap,
.table-wrap {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: #3b82f6 #0f172a !important;
}

.table-wrap::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.table-wrap::-webkit-scrollbar-track {
  background: #0f172a;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #3b82f6;
}

.positions table th,
.table-wrap th {
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
  background: #1e293b !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  padding: 8px 8px !important;
  border-bottom: 2px solid #3b82f6 !important;
}


/* --- BOTTOM POSITIONS TABS (v=1791787167) --- */
.positions .tabs button {
  cursor: pointer !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  border-radius: 4px !important;
  border: 1px solid transparent !important;
  transition: all 0.15s ease !important;
  background: #101b2a !important;
  color: #94a3b8 !important;
}
.positions .tabs button:hover {
  color: #ffffff !important;
  background: #1e293b !important;
}
.positions .tabs button.selected {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}
.positions .tab-view {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
}

/* --- PURE COLOR AI STATUS BADGE (v=1791803314) --- */
#aiStatusBadge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 58px !important;
  height: 24px !important;
  padding: 0 10px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85) !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

#aiStatusBadge.badge-buy, #aiStatusBadge.green, #aiStatusBadge[data-signal="BUY"] {
  background: #00c853 !important;
  border: 1px solid #00e676 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(0, 200, 83, 0.65) !important;
}

#aiStatusBadge.badge-sell, #aiStatusBadge.red, #aiStatusBadge[data-signal="SELL"] {
  background: #d50000 !important;
  border: 1px solid #ff1744 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(213, 0, 0, 0.65) !important;
}

#aiStatusBadge.badge-wait, #aiStatusBadge.yellow, #aiStatusBadge[data-signal="WAIT"] {
  background: #eab308 !important;
  border: 1px solid #facc15 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.55) !important;
}

#aiConfidenceBadge {
  font-size: 13px !important;
  font-weight: 800 !important;
  transition: color 0.2s ease !important;
}

/* --- EMERGENCY CLOSE ALL BUTTON --- */
.emergency-close-btn {
  display: block !important;
  width: 100% !important;
  margin-top: 8px !important;
  margin-bottom: 8px !important;
  padding: 8px 12px !important;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%) !important;
  border: 1px solid #f87171 !important;
  border-radius: 4px !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.4) !important;
  transition: all 0.2s ease !important;
}
.emergency-close-btn:hover {
  background: #b91c1c !important;
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.7) !important;
}
