html, body {
    background: #000 !important;
    color: #e2e2e2 !important;
    font-family: -apple-system,BlinkMacSystemFont,"San Francisco","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    min-height: 100vh;
    font-size: 16px;
    width: 100vw;
    max-width: 100vw;
    /*overflow-x: hidden;*/
}

body.mterminal-dark, html {
    background: #000 !important;
    color: #e2e2e2 !important;
    min-height: 100vh;
}



/* Navbar style */
.bg-bloomberg { background: #151823 !important; border-bottom: 2.2px solid #22242c; box-shadow: 0 3px 10px 0 rgba(28,35,56,0.11);}
.bg-bloomberg-dark { background: #191b25 !important; }
.text-yellow { color: #ffe374 !important; }
.navbar-brand { font-size: 1.22em; text-shadow:0 1px 3px #0002; letter-spacing: 0.04em; }
.nav-link, .dropdown-item {
  font-weight: 500; font-size: 1.07em; color: #ffe374 !important; transition: color 0.18s, background 0.15s;
}
.nav-link:hover, .dropdown-item:hover, .nav-link:focus { color: #000 !important; background: #ffe374 !important; }
.dropdown-menu { border-radius: 7px; border: 0; padding: 0.45em 0 0.25em 0; }
.navbar .dropdown-menu a { padding: 0.68em 1.4em; }
@media (max-width: 991.98px) {
  .navbar .navbar-collapse { background: #181c22; border-radius: 0 0 12px 12px; }
}



@media (max-width: 991.98px) {
  .navbar { font-size: 1.12em; }
  .dropdown-menu { font-size: 1.07em !important; }
  .offcanvas { font-size: 1.09em !important; }
  .badge, .btn, .btn-sm, .btn-lg {
    font-size: 1.08em !important;
    min-height: 38px;
  }
}

/* ------- MOBILE FRIENDLY ------- */
@media (max-width: 767.98px) {
  html, body {
    font-size: 16px !important;
    /* Jaga supaya text tetap proporsional dan mudah dibaca */
    line-height: 1.4;
  }
  h1, h2, h3 { font-size: 1.5em !important; }
  h4 { font-size: 1.18em !important; }
  h5 { font-size: 1.05em !important; }
  .navbar-brand { font-size: 1.08em !important; }
  .card, .summary-block, .kurs-info, .toggle-columns, .table {
    font-size: 1.03em !important;
  }
  .card-body { min-height: 100px !important; padding: 1.2rem 1.05rem !important; }
  .btn, .btn-warning, .btn-primary, .btn-secondary {
    font-size: 1.13em !important;
    padding: 0.82em 1.25em !important;
    min-height: 44px !important;
    border-radius: 0.7em !important;
  }
  .table, .portfolio-table th, .portfolio-table td {
    padding: 0.62em 0.9em !important;
    font-size: 1.02em !important;
  }
  .form-control, input, select {
    font-size: 1.09em !important;
    padding: 0.72em 0.9em !important;
    border-radius: 0.6em !important;
  }
  #quickRangeButtons .btn { min-width: 56px; }
  .toggle-columns label, #columnToggles label { font-size: 1.02em !important; padding-left: 8px; }
}

/* --------- CARD & BLOCKS ---------- */
.card, .table-dark, .summary-block, .kurs-info, .toggle-columns {
    background: #191c1e !important;
    color: #ffe374 !important;
    border-radius: 9px;
    border: 1.5px solid #23262e;
}
.card-body { min-height: 125px; }

/* Table improvements */
.table, .portfolio-table th, .portfolio-table td {
    background: transparent !important;
    color: #e2e2e2 !important;
    font-size: 1.05em;
}
@media (max-width: 767.98px) {
  .table, .portfolio-table th, .portfolio-table td {
    font-size: 1.13em !important;
    padding: 0.60em 0.7em !important;
  }
}

h1, h5 { color: #ffe374 !important; font-weight: 600; letter-spacing: 0.02em; }

.pnl-pos { color: #16c784 !important; }
.pnl-neg { color: #ea3943 !important; }
.text-blue { color: #4fd3ff !important; }
.text-green { color: #d4ffb4 !important; }

/* Buttons */
.btn-secondary, .btn-primary {
    background: #ffe374 !important; color: #191a1f !important;
    border: none !important;
}
.btn-secondary:hover, .btn-primary:hover {
    background: #fff303 !important; color: #111 !important;
}

/* Toggle Columns */
#columnToggles label, .toggle-columns label {
    margin-left: 8px;
    padding-left: 12px;
    border-left: 1.5px solid #ffe374;
    font-size: 1.01em;
}
#columnToggles label:first-child, .toggle-columns label:first-child {
    border-left: none;
    padding-left: 0;
}

/* Sortable TH */
th.sortable { cursor: pointer; user-select: none; position: relative; }
th.sortable:after { content: ' ⇅'; font-size: 0.95em; color: #ffe374; }
th.sorted-asc:after { content: ' ↑'; color: #ffe374; }
th.sorted-desc:after { content: ' ↓'; color: #ffe374; }

footer { background: transparent !important; color: #ffe374 !important; }

.kurs-info {
    background: #25272b;
    color: #ffe374;
    padding: 9px 18px;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 0;
}




/* === Striped Table Dark: Selang-seling warna row === */

/* Untuk semua tabel dark, bisa juga spesifik ke .portfolio-table atau #portfolioTableCrypto */
.table-dark tbody tr:nth-child(odd),
.portfolio-table tbody tr:nth-child(odd) {
  background-color: #23262e !important;
}

.table-dark tbody tr:nth-child(even),
.portfolio-table tbody tr:nth-child(even) {
  background-color: #191c1e !important;
}

/* Jika ingin efek hover tetap konsisten di atas striping */
.table-dark tbody tr:hover,
.portfolio-table tbody tr:hover {
  background-color: #232b42 !important;
  color: #ffe374 !important;
}





/* SUMMARY BLOCK */
.summary-block, .summary-block-saham {
    background: #191c1e;
    border-radius: 9px;
    border: 1.5px solid #23262e;
    color: #ffe374;
    margin-top: 1.25rem;
    padding: 1rem !important;
    font-weight: 500;
    font-size: 1.08rem;
    letter-spacing: 0.01em;
}

/* PNL styling */
td.pnl-pos, span.pnl-pos { color: #16c784 !important; font-weight: bold; }
td.pnl-neg, span.pnl-neg { color: #ea3943 !important; font-weight: bold; }

/* Currency style */
.curr { font-size: 0.97em; font-weight: 500; margin-right: 2px; opacity: 0.88; letter-spacing: 0.3px; }

.table-dark thead th {
    background-color: #202944 !important;
    color: #ffe374 !important;
    border-color: #353b48;
}
.table-dark tfoot td, .table-dark tfoot th {
    background-color: #1e222d !important;
    color: #f1f1f1 !important;
    border-color: #353b48;
}
.table-dark tbody tr:hover {
    background-color: #232b42 !important;
    color: #ffe374 !important;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

/* Responsive Table Scroll */
.table-responsive-custom {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}
.table-responsive-custom table {
  min-width: 950px;
  width: max-content;
}
.table-responsive-custom th,
.table-responsive-custom td { 
  white-space: nowrap;
  font-size: 1.05em; /* default desktop, bisa kamu adjust */
}
.table-responsive-custom { 
  box-shadow: 0 2px 12px rgba(0,0,0,0.09); 
}
.table-responsive-custom thead th {
  position: sticky; 
  top: 0; 
  z-index: 2; 
  background: #2c2e3c;
}




/* --- MOBILE: Reduce table font size, tighter padding --- */
@media (max-width: 767.98px) {
  .table-responsive-custom th,
  .table-responsive-custom td {
    font-size: 0.98em !important;   /* lebih kecil dan proporsional */
    padding: 0.53em 0.7em !important; /* lebih padat */
  }
  .table-responsive-custom table {
    min-width: 800px; /* biar lebih fleksibel di mobile */
  }
}



.badge.bg-success { background: #16c784 !important; color:#fff; }
.badge.bg-danger { background: #ea3943 !important; color:#fff; }
.badge.bg-info { background: #4fd3ff !important; color:#181b22 !important; }
.offcanvas { width: 265px !important; }



/* Tema warna card */
.card.bg-dark-blue { background: #232848; color: #eaf6fb; }
.card.bg-dark-green { background: #203a43; color: #c1f7d3; }
.card.bg-dark-yellow { background: #403820; color: #ffe374; }
.card.bg-dark-cyan { background: #163741; color: #4fd3ff; }
.card.bg-dark-purple { background: #312040; color: #d2a4ff; }
.card.bg-dark-grey { background: #24292f; color: #d3dae3; }
.card.bg-dark-brown { background: #2d2320; color: #ffe4b2; }
.card.bg-dark-orange { background: #332214; color: #ffb366; }
.card.bg-dark-pink { background: #2c1e26; color: #fc5185; }

.card:hover, .card:focus {
  box-shadow: 0 0 20px 0 #ffe37455, 0 4px 20px 0 #16c78422;
  transform: translateY(-2px) scale(1.016);
  transition: box-shadow 0.18s, transform 0.15s;
  cursor: pointer;
  z-index:2;
}

.card-body { min-height: 125px; }
.card .curr { font-size: 1em; font-weight: 500; opacity: 0.87; margin-right: 2px;}



/* --- PIE CHART CARD TABLE RESPONSIVE STYLE --- */

/* Umum, desktop: tetap normal, slightly smaller for compact table */
.card .table-sm {
  font-size: 0.97em;
  /* font lebih kecil dari table utama, tetap mudah dibaca */
  margin-bottom: 0;
}

/* Head, supaya lebih jelas */
.card .table-sm thead th {
  font-weight: 600;
  font-size: 1em;
  padding-top: 0.45em;
  padding-bottom: 0.45em;
  background: #232848 !important;
  color: #ffe374 !important;
  border-bottom: 1.2px solid #333;
}

/* Body, sedikit rapat tapi tidak mepet */
.card .table-sm td, 
.card .table-sm th {
  padding-top: 0.38em;
  padding-bottom: 0.38em;
  padding-left: 0.7em;
  padding-right: 0.7em;
  vertical-align: middle;
}

/* --- MOBILE ADJUSTMENTS --- */
@media (max-width: 767.98px) {
  .card .table-sm {
    font-size: 0.95em !important;  /* cukup compact, tidak terlalu kecil */
    margin-bottom: 0;
  }
  .card .table-sm thead th {
    font-size: 0.98em !important;
    padding-top: 0.38em;
    padding-bottom: 0.38em;
  }
  .card .table-sm td, 
  .card .table-sm th {
    padding-top: 0.33em !important;
    padding-bottom: 0.33em !important;
    padding-left: 0.4em !important;
    padding-right: 0.4em !important;
  }
  /* Card body: tambahkan sedikit padding agar tidak terlalu sempit */
  .card-body {
    padding: 1rem 0.65rem 0.75rem 0.65rem !important;
  }
  /* Canvas pie chart: biar tidak terlalu kecil di mobile */
  #pieKomposisi, #pieCryptoExchange, #pieStockSekuritas {
    width: 100% !important;
    height: auto !important;
    max-width: 165px;
    display: block;
    margin: 0 auto;
  }
}

/* Table: hilangkan border jika ingin lebih flat look, optional */
.card .table-sm, .card .table-sm th, .card .table-sm td {
  border-color: #2a2e42 !important;
}


/* PIE CHART CANVAS RESPONSIVE BESAR DI MOBILE */

/* --- MOBILE BESARIN PIE CHART --- */
@media (max-width: 767.98px) {
  #pieKomposisi,
  #pieCryptoExchange,
  #pieStockSekuritas {
    max-width: 98vw;     /* Hampir selebar layar */
    min-width: 220px;    /* Minimal tetap besar di layar kecil */
    width: 98vw !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
  }
  /* Optional: kasih margin bawah sedikit supaya ga nempel table */
  #pieKomposisi,
  #pieCryptoExchange,
  #pieStockSekuritas {
    margin-bottom: 10px !important;
  }
}


#quickRangeButtons .btn.active {
    background: #16c784;
    color: #fff;
    border-color: #16c784;
}

