/* ══════════════════════════════════════════════════════════════════════
   QUICK SCALP INTELLIGENCE - Wide Structured No-Icon Terminal Card
   ══════════════════════════════════════════════════════════════════════ */

.quick-scalp-card {
  position: fixed;
  z-index: 10005;
  width: 530px;
  max-width: 96vw;
  background: rgba(13, 17, 23, 0.98);
  border: 1px solid #334155;
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 1px 1px rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
  user-select: none;
  backdrop-filter: blur(10px);
  animation: scalpCardIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scalpCardIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Header */
.scalp-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #1e293b;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border-bottom: 1px solid #334155;
}

.scalp-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13px;
}

.scalp-ticker {
  color: #38bdf8;
  letter-spacing: 0.5px;
  font-size: 14px;
}

.scalp-price {
  font-weight: 700;
}

.scalp-price.up { color: #34d399; }
.scalp-price.down { color: #f87171; }
.scalp-price.neutral { color: #94a3b8; }

.scalp-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
  background: #7f1d1d;
  color: #fecaca;
  border: 1px solid #ef4444;
}

.scalp-tag.fca {
  background: #78350f;
  color: #fef3c7;
  border-color: #f59e0b;
}

.scalp-btn-close {
  background: #0f172a;
  border: 1px solid #475569;
  color: #94a3b8;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.scalp-btn-close:hover {
  background: #334155;
  color: #ffffff;
  border-color: #64748b;
}

/* Body / Sections */
.scalp-card-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 84vh;
  overflow-y: auto;
}

.scalp-card-body::-webkit-scrollbar {
  width: 5px;
}
.scalp-card-body::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 2px;
}

/* Sections */
.scalp-section {
  border-bottom: 1px solid #1e293b;
  padding-bottom: 7px;
}

.scalp-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.scalp-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.scalp-sec-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #64748b;
  text-transform: uppercase;
}

/* Separation Group Headers (Hari Ini vs EOD) */
.scalp-group-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 4px;
  margin-top: 4px;
  margin-bottom: 6px;
}

.scalp-group-hdr.live {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.35);
}

.scalp-group-hdr.eod {
  background: rgba(100, 116, 139, 0.12);
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.scalp-group-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
}

.scalp-group-hdr.live .scalp-group-title {
  color: #38bdf8;
}

.scalp-group-hdr.eod .scalp-group-title {
  color: #94a3b8;
}

.scalp-group-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 3px;
  letter-spacing: 0.4px;
}

.scalp-group-hdr.live .scalp-group-badge {
  background: rgba(34, 197, 94, 0.2);
  color: #34d399;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.scalp-group-hdr.eod .scalp-group-badge {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

/* Dual Color Power HAKA vs HAKI Bar */
.haka-haki-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
}

.haka-haki-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  font-family: inherit;
}

.haka-haki-bar-track {
  display: flex;
  height: 8px;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #1e293b;
}

.haka-bar-fill {
  background: linear-gradient(90deg, #10b981, #059669);
  height: 100%;
  transition: width 0.3s ease;
}

.haki-bar-fill {
  background: linear-gradient(90deg, #dc2626, #ef4444);
  height: 100%;
  transition: width 0.3s ease;
}

.haka-haki-sub-detail {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  color: #94a3b8;
}

/* Status Badges */
.scalp-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.scalp-status-badge.accum {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid #059669;
}

.scalp-status-badge.dist {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid #dc2626;
}

.scalp-status-badge.neutral {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid #d97706;
}

/* Structured Key-Value Table */
.scalp-table {
  width: 100%;
  border-collapse: collapse;
}

.scalp-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.scalp-table tr:last-child {
  border-bottom: none;
}

.scalp-table td {
  padding: 2.5px 0;
  font-size: 11px;
}

.scalp-table .scalp-col-lbl {
  color: #94a3b8;
  width: 140px;
  white-space: nowrap;
}

.scalp-table .scalp-col-val {
  color: #e2e8f0;
  text-align: right;
  word-break: break-word;
}

/* 2-Column Broksum Comparison Table */
.scalp-broksum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.scalp-brok-side {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  border-radius: 4px;
  padding: 4px 6px;
}

.scalp-brok-side.buyer {
  border-top: 2px solid #059669;
}

.scalp-brok-side.seller {
  border-top: 2px solid #dc2626;
}

.scalp-brok-hdr {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  padding-bottom: 3px;
  border-bottom: 1px solid #1e293b;
  margin-bottom: 3px;
}

.scalp-brok-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.scalp-brok-table th {
  text-align: left;
  font-size: 8.5px;
  color: #64748b;
  font-weight: 700;
  padding: 1px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scalp-brok-table th:nth-child(3),
.scalp-brok-table th:nth-child(4) {
  text-align: right;
}

.scalp-brok-table td {
  padding: 2px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.scalp-brok-table tr:last-child td {
  border-bottom: none;
}

.scalp-brok-table .td-num {
  color: #64748b;
  width: 14px;
}

.scalp-brok-table .td-code {
  font-weight: 700;
  width: 32px;
}

.scalp-brok-table .td-code.buyer {
  color: #34d399;
}

.scalp-brok-table .td-code.seller {
  color: #f87171;
}

.scalp-brok-table .td-lot {
  text-align: right;
  color: #e2e8f0;
}

.scalp-brok-table .td-avg {
  text-align: right;
  color: #94a3b8;
}

/* 5-Day Volume Grid */
.scalp-vol-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-top: 4px;
}

.scalp-vol-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #1e293b;
  border-radius: 3px;
  padding: 3px 4px;
  text-align: center;
}

.scalp-vol-box-date {
  font-size: 8.5px;
  color: #64748b;
}

.scalp-vol-box-val {
  font-size: 10px;
  font-weight: 700;
  color: #e2e8f0;
  margin-top: 1px;
}

.scalp-vol-box-price {
  font-size: 9px;
  color: #94a3b8;
}

/* Levels Tri-Grid */
.scalp-levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.scalp-level-box {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid #1e293b;
  border-radius: 3px;
  padding: 4px 6px;
}

.scalp-level-box-lbl {
  font-size: 8.5px;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.scalp-level-box-val {
  font-size: 10.5px;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 1px;
}

.scalp-level-box-sub {
  font-size: 9px;
  color: #94a3b8;
}

/* Color Accents */
.c-green { color: #34d399 !important; font-weight: 600; }
.c-red { color: #f87171 !important; font-weight: 600; }
.c-yellow { color: #fbbf24 !important; font-weight: 600; }
.c-cyan { color: #38bdf8 !important; }
.c-muted { color: #64748b !important; }

/* Action Footer */
.scalp-card-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 12px;
  background: #0f172a;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  border-top: 1px solid #1e293b;
}

.scalp-action-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 9.5px;
  font-weight: 700;
  padding: 5px 2px;
  text-align: center;
  border-radius: 3px;
  cursor: pointer;
  letter-spacing: 0.4px;
  transition: all 0.12s;
  text-transform: uppercase;
}

.scalp-action-btn:hover {
  background: #334155;
  color: #38bdf8;
  border-color: #64748b;
}

.scalp-loading {
  padding: 24px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 11px;
}

/* Light Mode Support */
body.theme-light .quick-scalp-card {
  background: rgba(255, 255, 255, 0.98);
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

body.theme-light .scalp-card-header {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

body.theme-light .scalp-ticker {
  color: #0284c7;
}

body.theme-light .scalp-btn-close {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
}

body.theme-light .scalp-btn-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

body.theme-light .scalp-section {
  border-bottom-color: #e2e8f0;
}

body.theme-light .scalp-table tr {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.theme-light .scalp-table .scalp-col-lbl {
  color: #0f172a;
  font-weight: 800;
}

body.theme-light .scalp-table .scalp-col-val {
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .scalp-group-hdr {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-light .scalp-group-title {
  color: #0f172a;
  font-weight: 900;
}

body.theme-light .scalp-sec-title {
  color: #0f172a;
  font-weight: 900;
}

body.theme-light .scalp-brok-side {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-light .scalp-brok-table th {
  color: #0f172a;
  font-weight: 900;
  border-bottom-color: #cbd5e1;
}

body.theme-light .scalp-brok-table td {
  border-bottom-color: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .scalp-brok-table .td-lot {
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .scalp-vol-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-light .scalp-vol-box-date {
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .scalp-vol-box-val {
  color: #0f172a;
  font-weight: 900;
}

body.theme-light .scalp-vol-box-price {
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .scalp-level-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

body.theme-light .scalp-level-box-lbl {
  color: #0f172a;
  font-weight: 800;
}

body.theme-light .scalp-level-box-val {
  color: #0f172a;
  font-weight: 900;
}

body.theme-light .scalp-level-box-sub {
  color: #0f172a;
  font-weight: 600;
}

body.theme-light .scalp-card-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body.theme-light .scalp-action-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  font-weight: 800;
}

body.theme-light .scalp-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

body.theme-light .c-green { color: #059669 !important; }
body.theme-light .c-red { color: #dc2626 !important; }
body.theme-light .c-yellow { color: #d97706 !important; }


/* ========================================================================== */
/* Scalp 1M Mini Chart & Support / Resistance                                  */
/* ========================================================================== */
.scalp-chart-wrap {
  position: relative;
  width: 100%;
  height: 215px;
  background: rgba(10, 15, 29, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
}

body.theme-light .scalp-chart-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
}

.scalp-sr-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  flex-wrap: wrap;
}

.scalp-sr-pill {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.scalp-sr-pill.r2 { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.scalp-sr-pill.r1 { background: rgba(251, 146, 60, 0.15); color: #fb923c; border: 1px solid rgba(251, 146, 60, 0.3); }
.scalp-sr-pill.vwap { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.scalp-sr-pill.s1 { background: rgba(74, 222, 128, 0.15); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.3); }
.scalp-sr-pill.s2 { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

body.theme-light .scalp-sr-pill.r2 { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
body.theme-light .scalp-sr-pill.r1 { background: #ffedd5; color: #ea580c; border-color: #fdba74; }
body.theme-light .scalp-sr-pill.vwap { background: #e0f2fe; color: #0284c7; border-color: #7dd3fc; }
body.theme-light .scalp-sr-pill.s1 { background: #dcfce7; color: #16a34a; border-color: #86efac; }
body.theme-light .scalp-sr-pill.s2 { background: #d1fae5; color: #059669; border-color: #6ee7b7; }

.scalp-zoom-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.scalp-zoom-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border-color: #38bdf8;
}
body.theme-light .scalp-zoom-btn {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}
body.theme-light .scalp-zoom-btn:hover {
  background: #e2e8f0;
  color: #0284c7;
  border-color: #0284c7;
}

body.theme-light #scalpChartHud {
  background: rgba(241, 245, 249, 0.9) !important;
  color: #0284c7 !important;
  border-color: #cbd5e1 !important;
}
body.theme-light #scalpHudVwapVal {
  color: #0f172a !important;
}

.scalp-sr-pill.resist {
  background: rgba(34, 197, 94, 0.16) !important;
  color: #22c55e !important;
  border: 1px solid rgba(34, 197, 94, 0.4) !important;
}
.scalp-sr-pill.support {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.4) !important;
}
body.theme-light .scalp-sr-pill.resist {
  background: #dcfce7 !important;
  color: #16a34a !important;
  border-color: #86efac !important;
}
body.theme-light .scalp-sr-pill.support {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
}
