/* =======================================================
   WATCHLIST PER GRUP (CLEAN PROFESSIONAL THEME)
   Smart Running Trade - Multi-Group Personal Watchlist
   Clean minimal monochrome UI - No colorful icons
   ======================================================= */

.watchlist-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9990;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.watchlist-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.watchlist-drawer {
  position: fixed;
  top: 0;
  right: 44px;
  bottom: 0;
  width: 500px;
  max-width: calc(100vw - 44px);
  height: 100vh;
  background: #080d22;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.85);
  z-index: 9995;
  display: flex;
  flex-direction: column;
  transform: translateX(calc(100% + 44px));
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: #f1f5f9;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  user-select: none;
  overflow: hidden;
}

body.sidebar-hidden .watchlist-drawer {
  right: 0 !important;
  max-width: 100vw;
}

.watchlist-drawer.open {
  transform: translateX(0);
}

/* Header */
.watchlist-header {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0a0f28;
}

.watchlist-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.watchlist-title-main {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.watchlist-title-sub {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.3px;
}

.watchlist-btn-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}

.watchlist-btn-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Group Selector Box (Vertical Selection - No Cutoff) */
.watchlist-group-selector-box {
  padding: 10px 18px 8px 18px;
  background: rgba(11, 17, 44, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watchlist-picker-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.watchlist-picker-label {
  font-size: 10px;
  font-weight: 800;
  color: #94a3b8;
  letter-spacing: 0.6px;
}

.btn-new-group-simple {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-new-group-simple:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

.watchlist-group-select-field {
  width: 100%;
  background: #060a1c;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 4px;
  color: #f8fafc;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  outline: none;
  cursor: pointer;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.watchlist-group-select-field:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.watchlist-group-select-field optgroup {
  background: #090e24;
  color: #94a3b8;
  font-weight: 800;
  font-size: 10.5px;
  padding: 6px 4px;
}

.watchlist-group-select-field option {
  background: #070c20;
  color: #f8fafc;
  padding: 5px 8px;
  font-size: 12px;
}

/* Active Group Info Card (Rapikan Kebawah) */
.watchlist-active-group-card {
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.active-group-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.active-group-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-group-title-text {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.active-group-count-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

.active-group-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-group-action-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-group-action-sm:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-group-action-sm.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #ef4444;
}

.active-group-details-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #cbd5e1;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.45;
  word-break: break-word;
}

.group-owner-line {
  color: #e2e8f0;
}

.group-desc-line {
  color: #94a3b8;
  font-size: 10.5px;
}

.dim-label {
  color: #64748b;
  font-weight: 600;
  font-size: 10px;
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Add Ticker Bar */
.watchlist-add-bar {
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 8px;
}

.watchlist-input-add {
  flex: 1;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 6px 12px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  text-transform: uppercase;
  letter-spacing: 1px;
  outline: none;
  transition: all 0.15s;
}

.watchlist-input-add:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.watchlist-btn-add {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 11px;
  font-weight: 800;
  padding: 0 14px;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.15s;
}

.watchlist-btn-add:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #fff;
}

/* Quick Filter Apply Bar */
.watchlist-apply-bar {
  padding: 8px 18px;
  background: rgba(11, 17, 44, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-apply-group-live {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-apply-group-live:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

/* Tickers List in Drawer - Clean Vertical List (Tidak Kepotong) */
.watchlist-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 18px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.watchlist-row {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.15s ease;
  cursor: pointer;
}

.watchlist-row:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(-2px);
}

.watchlist-row-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.watchlist-row-topline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.watchlist-ticker-code {
  font-size: 13.5px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  color: #f8fafc;
  letter-spacing: 0.5px;
}

.watchlist-company-name {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}

.watchlist-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 9.5px;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  padding: 4px 7px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-card-action:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.btn-card-remove {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  transition: all 0.15s;
}

.btn-card-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fff;
  border-color: rgba(239, 68, 68, 0.5);
}

.watchlist-empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.6;
}

/* Group Popover Menu on ALL / Group Button in Toolbar */
.all-fav-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: #0b112c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.85);
  z-index: 10020;
  padding: 5px 0;
  display: flex;
  flex-direction: column;
}

.all-fav-item {
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s;
}

.all-fav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.all-fav-item.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.all-fav-item-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
}

.all-fav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
}

.all-fav-chips-wrap {
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 120px;
  overflow-y: auto;
}

.all-fav-chip {
  font-size: 10px;
  font-weight: 800;
  font-family: var(--font-mono, monospace);
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.15s;
}

.all-fav-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* =======================================================
   PRESET GROUPS & CATEGORY STYLES
   ======================================================= */

.watchlist-category-filter-bar {
  padding: 8px 16px 6px 16px;
  background: rgba(10, 15, 40, 0.95);
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.watchlist-category-filter-bar::-webkit-scrollbar {
  display: none;
}

.watchlist-cat-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.watchlist-cat-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.watchlist-cat-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
}

.watchlist-cat-pill.konglo.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.25);
}

.watchlist-cat-pill.sektor.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

.watchlist-cat-pill.pribadi.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  color: #c084fc;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.25);
}

/* Badges & Subtitle */
.group-category-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.group-category-badge.konglo {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.group-category-badge.sektor {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.group-category-badge.pribadi {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.group-subtitle-desc {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.4;
  display: block;
}

.watchlist-col-dropdown {
  background: rgba(2, 6, 23, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #f8fafc;
  font-size: 10px;
  font-family: var(--font-mono, monospace);
  padding: 3px 6px;
  border-radius: 3px;
  outline: none;
}

.ticker-sector-pill {
  font-size: 8.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid currentColor;
  opacity: 0.85;
  white-space: nowrap;
}

/* =======================================================
   WATCHLIST DRAWER - LIGHT THEME (MODE SIANG)
   ======================================================= */
body.theme-light .watchlist-drawer-backdrop {
  background: rgba(15, 23, 42, 0.35);
}

body.theme-light .watchlist-drawer {
  background: #ffffff;
  border-left: 1px solid #cbd5e1;
  box-shadow: -12px 0 36px rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

body.theme-light .watchlist-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-light .watchlist-title-main {
  color: #0f172a;
}

body.theme-light .watchlist-title-sub {
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .watchlist-btn-close {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 800;
}

body.theme-light .watchlist-btn-close:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

body.theme-light .watchlist-group-selector-box {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body.theme-light .watchlist-picker-label {
  color: #0f172a;
  font-weight: 800;
}

body.theme-light .watchlist-group-select-field {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .watchlist-active-group-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

body.theme-light .group-owner-line,
body.theme-light .group-desc-line {
  color: #0f172a;
}

body.theme-light .dim-label {
  color: #0f172a;
  font-weight: 800;
}

body.theme-light .watchlist-company-name {
  color: #0f172a;
  font-weight: 600;
}

body.theme-light .watchlist-col-dropdown {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .watchlist-body {
  background: #f8fafc;
}

body.theme-light .watchlist-card,
body.theme-light .group-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.theme-light .watchlist-item,
body.theme-light .watchlist-row {
  border-bottom-color: #f1f5f9;
}

body.theme-light .watchlist-item:hover,
body.theme-light .watchlist-row:hover {
  background: #f8fafc;
}

body.theme-light .group-subtitle-desc {
  color: #0f172a;
  font-weight: 600;
}

body.theme-light .watchlist-input-add {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

body.theme-light .watchlist-apply-bar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

body.theme-light .watchlist-cat-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-weight: 700;
}

body.theme-light .watchlist-cat-pill.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

