/* =========================================================
   🌑 DARK ELEGANT THEME (Improved Clean Version)
   ========================================================= */

/* === Global === */
body {
  background-color: #E9E8E3;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #2E2F2C;
  margin: 0;
}

.main-content {
  background: linear-gradient(
    180deg,
    #F2F7F8,
    #E9F1F3
  );
  min-height: 100vh;
}


.btn-success {
  background-color: #e34100 !important;
  border-color: #e34100 !important;
  color: #fff;
  font-weight: 500;
  border-radius: 999px; /* pill */
  transition: all 0.2s ease-in-out;
}

#wrapper {
  min-height: 100vh;
  display: flex;
}

#sidebar {
  width: 260px;
  min-height: 100vh;
  position: relative;
  color: #EAF7FA;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* 🔒 BACKGROUND DIKUNCI */
#sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,132,150,1),
    rgb(0, 150, 136)
  );
  z-index: 0;
}

/* isi sidebar di atas background */
#sidebar > * {
  position: relative;
  z-index: 1;
}

#sidebar {
  transition: margin-left 0.25s ease;
}


.sidebar-header {
  background: rgba(255,255,255,0.14);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid rgba(255,255,255,0.12);
}


.sidebar-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;

  background: #ffffff;
  padding: 6px;
  border-radius: 10px;

  box-shadow: 0 6px 14px rgba(0,0,0,0.18);

  animation: spinSlow 18s linear infinite;
}

/* animasi */
@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}





#sidebar.collapsed {
  margin-left: -260px;
}



#sidebar .components {
  padding-left: 0;
  margin-top: 1rem;
}

#sidebar .components li {
  list-style: none;
  margin-bottom: 6px;
}

/* Menu */
#sidebar .menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255,255,255,.85);
  transition: all .2s ease;
}

#sidebar .menu-item:hover {
  background: rgba(255,255,255,.18);
  color: #ffffff;
}

#sidebar .menu-item.active {
  background: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}


/* #sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.12), transparent 45%);
  opacity: 0.6;
  pointer-events: none;
} */




#sidebar .active i,
#sidebar .active span {
  color: #ffffff;
  font-weight: 600;
}

/* Submenu */
.submenu > a.menu-item {
  justify-content: space-between;
  padding-right: 20px;
}

.submenu .dropdown-toggle::after {
  display: none !important;
}

.submenu > a.menu-item:hover {
  background-color: #2C3430;
  color: #A6E3B8;
}

.submenu ul {
  margin-top: 4px;
  padding-left: 10px;
}

.submenu ul li {
  list-style: none;
}

.submenu ul li a {
  display: block;
  font-size: 0.93rem;
  color: #A5A8A3;
  padding: 8px 16px 8px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.submenu ul li a:hover {
  background-color: #2C3430;
  color: #A6E3B8;
}

.submenu ul li a.active {
  background-color: #4CAF50;
  color: #FFFFFF;
}

.submenu .chevron {
  transition: transform 0.25s ease;
  font-size: 0.9rem;
  color: #888;
}

.submenu .menu-item[aria-expanded="true"] .chevron {
  transform: rotate(90deg);
  color: #A6E3B8;
}

/* =========================================================
   === Supplier & Product Dropdown Fix (existing)
   ========================================================= */
select.form-select,
select {
  position: relative !important;
  z-index: 20 !important;
}

.produkSelect {
  width: 100%;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999 !important;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.produkSelect.show {
  display: block;
  z-index: 9999 !important;
}

.suggestionList {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.suggestionList .list-group-item {
  cursor: pointer;
  font-size: 0.9rem;
}

.suggestionList .list-group-item:hover {
  background-color: #f1f1f1;
}

/* =========================================================
   === 📌 FIX BARU: Dropdown Satuan Tidak Melebar
   ========================================================= */
#produkTable td,
#produkBody td {
  position: relative;
}

/* Dropdown satuan */
.unitSelect {
  position: absolute;
  top: 100%;
  left: 0;
  width: 120px !important;
  max-height: 200px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow-y: auto;
  z-index: 9999;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.unitSelect.show {
  display: block;
}

.unitSelect .list-group-item {
  padding: 6px 12px;
  cursor: pointer;
}

.unitSelect .list-group-item:hover {
  background: #f1f1f1;
}

.satuanInput {
  width: 100%;
  min-width: 60px;
  text-align: center;
}

/* === Table Fix (agar dropdown tidak terpotong) === */
.table-responsive,
.card,
.container {
  overflow: visible !important;
}

/* === Buttons === */

/* === Buttons === */
.btn-primary {
  height: 42px;
  border: none !important;
  border-radius: 14px;
  font-weight: 600;
  color: #ffffff !important;

  /* 🔵 TEAL (turunan dari rgba(0,150,136,0.35)) */
  background: linear-gradient(
    180deg,
    rgb(0, 150, 136),
    rgb(0, 121, 107)
  ) !important;

  box-shadow: 0 5px 5px rgba(0, 150, 136, 0.35);
  transition: transform .08s ease, filter .12s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(1px);
}


/* === Nav Tabs === */
.nav-tabs .nav-link {
  color: #2C3430;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
}

.nav-tabs .nav-link:hover {
  color: #78b30b;
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 2px solid #78b30b;
}

.nav-tabs .nav-link.active {
  color: #78b30b;
  background-color: rgba(120, 179, 11, 0.1);
  border-bottom: 2px solid #78b30b;
}

/* === Cards === */
.card {
  border: none;
  border-radius: 20px;
  background: #ffffff;
  box-shadow:
    0 10px 30px rgba(18, 26, 44, 0.08);
}

.card:hover {
  transform: translateY(-4px);
  transition: 0.2s ease;
}

.topbar {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* === Table === */
.table {
  color: #2E2F2C;
}

.table thead {
  background-color: #F3F3F1;
}

.table tbody tr:hover {
  background-color: #F0F0EE;
  transition: background 0.3s ease;
}

.hidden {
  display: none !important;
}


.input-readonly-yellow[readonly] {
  background-color: #eeeee4 !important; /* kuning telur lembut */
  cursor: not-allowed;
}

#tabelCustomer td:nth-child(3) {
  max-width: 240px;
  white-space: normal;
  word-wrap: break-word;
  word-break: break-word;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1E2320;
}

::-webkit-scrollbar-thumb {
  background: #2C3430;
  border-radius: 8px;
}

.col-price,
.col-subtotal {
  display: none !important;
}

/* ===== PAGE BASE ===== */
.auth-login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #e0f7fa, #b2ebf2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  position: relative;
}

/* ===== BACKGROUND AIR ===== */
.fish-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ===== WAVES ===== */
.wave {
  position: absolute;
  width: 220%;
  height: 240px;
  background: rgba(255,255,255,0.18);
  border-radius: 45%;
  animation: waveMove 24s ease-in-out infinite alternate;
}


.wave1 {
  bottom: -60px;
  animation-duration: 22s;
}

.wave2 {
  bottom: -90px;
  opacity: 0.4;
  animation-duration: 30s;
}

/* ===== IKAN ===== */
.fish {
  position: absolute;
  font-size: 42px;
  color: rgba(0, 150, 136, 0.35);
  animation: swim 20s linear infinite;
}

.f1 { top: 25%; left: -60px; animation-delay: 0s; }
.f2 { top: 45%; left: -80px; font-size: 34px; animation-delay: 5s; }
.f3 { top: 65%; left: -100px; font-size: 38px; animation-delay: 10s; }

/* ===== BUBBLE ===== */
.bubble {
  position: absolute;
  bottom: -40px;
  width: 14px;
  height: 14px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  animation: bubbleUp 10s infinite ease-in;
}

.b1 { left: 20%; animation-delay: 0s; }
.b2 { left: 40%; animation-delay: 3s; width: 10px; height: 10px; }
.b3 { left: 60%; animation-delay: 6s; }
.b4 { left: 80%; animation-delay: 1.5s; width: 8px; height: 8px; }

/* ===== LOGIN CARD ===== */
.login-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 20px;
  padding: 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* ===== ANIMATIONS ===== */
@keyframes swim {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 200px)); }
}

@keyframes bubbleUp {
  0% { transform: translateY(0); opacity: 0; }
  20% { opacity: 0.8; }
  100% { transform: translateY(-110vh); opacity: 0; }
}

@keyframes waveMove {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}



/* ===== PRINT MODE ===== */
.print-only {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  #printAreaDO,
  #printAreaDO * {
    visibility: visible;
  }

  #printAreaDO {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 20px;
    font-size: 12px;
  }

  .btn,
  button {
    display: none !important;
  }
}

/* ===== PRINT STYLE ===== */
.print-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.print-logo {
  width: 80px;
}

.print-header-center {
  text-align: center;
}

.print-header-right {
  text-align: right;
}

.print-info {
  width: 100%;
  margin-bottom: 12px;
}

.print-info td {
  padding: 4px;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
}

.print-table th,
.print-table td {
  border: 1px solid #000;
  padding: 6px;
  text-align: center;
}

.print-footer {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}


/* === Responsiveness === */
@media (max-width: 992px) {
  #sidebar {
    position: absolute;
    z-index: 999;
    height: 100%;
  }
}

  /* DO list styling */
#tblDetailSOView tbody tr.do-head-row td {
    vertical-align: top;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .do-badge {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
  }

  .do-meta {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.35;
  }

  .do-items-wrap {
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 12px;
    padding: 10px 12px;
  }

  .do-items-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .do-items-table th, .do-items-table td {
    font-size: 12px;
    padding: 6px 8px;
    vertical-align: top;
  }

  .do-items-table thead th {
    background: rgba(255,255,255,.9);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  }

  .hidden { display: none !important; }

.customer-autocomplete {
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  overflow: hidden;
}

.customer-autocomplete .list-group-item {
  border: 0;
  background: #fff;
}

.customer-autocomplete .list-group-item:hover {
  background: rgba(0,0,0,.04);
}


/* =========================================================
   MENJALA • LOGIN PAGE THEME
   + animasi background + corak minimalis (dots/lines + blobs)
   ========================================================= */

:root{
  --mj-teal:#07A0C3;
  --mj-orange:#E34300;
  --mj-navy:#14294F;
  --mj-bg1:#F8F5EF;
  --mj-bg2:#F3EEE7;
}

/* Scope khusus login */
body.auth-login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.35), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.25), transparent 45%),
    linear-gradient(180deg, #006d77, #83c5be);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}


/* ===== Layer 1: BG Image ===== */
body.auth-login-page::before,
body.auth-login-page::after {
  display: none !important;
}

/* ===== Card login ===== */
body.auth-login-page .login-card{
  width: 100%;
  max-width: 420px;
  border-radius: 20px;
  padding: 2rem 2rem 1.5rem;

  position: relative;
  z-index: 10;

  background: rgba(255,255,255,.86);
  border: 1px solid rgba(20,41,79,.10);
  box-shadow: 0 28px 70px rgba(18, 26, 44, .18);
  backdrop-filter: blur(10px);

  animation: menjalaFadeIn .55s ease-in-out;
}

/* brand */
body.auth-login-page .brand{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 10px;
  margin-bottom: 18px;
  text-align: center;
}

body.auth-login-page .brand-logo-wide{
  width: min(360px, 92%);
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(18,26,44,.18));
}

body.auth-login-page .brand-sub{
  margin: -4px 0 0;
  font-size: 13px;
  color: rgba(20,41,79,.60);
}

/* label & input */
body.auth-login-page .form-label{
  font-weight: 600;
  font-size: 13px;
  color: rgba(20,41,79,.72);
}

body.auth-login-page .form-control{
  border-radius: 12px;
  padding: 0.78rem 1rem;
  border: 1px solid rgba(20,41,79,.14);
  background: rgba(255,255,255,.78);
  box-shadow: 0 6px 14px rgba(18,26,44,.06);
}

/* eye icon */
body.auth-login-page #togglePassword{
  top: 43px;
  right: 16px;
  cursor: pointer;
  color: rgba(20,41,79,.55);
}

/* button */
body.auth-login-page .btn-login{
  height: 48px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  color: #fff;

  box-shadow: 0 12px 28px rgba(18,26,44,.12);
  background: linear-gradient(180deg, rgb(7, 157, 195), rgba(0,132,150,1));
  transition: transform .08s ease, filter .12s ease;
}
body.auth-login-page .btn-login:hover{ filter: brightness(1.02); }
body.auth-login-page .btn-login:active{ transform: translateY(1px); }

body.auth-login-page .small-muted{
  color: rgba(20,41,79,.55);
}

/* ===== Animations ===== */
@keyframes menjalaFadeIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes menjalaBgFloat{
  0%   { transform: translateY(-10px) scale(1.02); }
  50%  { transform: translateY(10px)  scale(1.03); }
  100% { transform: translateY(-10px) scale(1.02); }
}

@keyframes menjalaOverlayDrift{
  0%   { transform: translate3d(-10px, 10px, 0); }
  50%  { transform: translate3d(10px, -12px, 0); }
  100% { transform: translate3d(-10px, 10px, 0); }
}

@keyframes menjalaBlobLeft{
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(40px, -20px, 0) scale(1.05); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes menjalaBlobRight{
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-45px, 25px, 0) scale(1.06); }
  100% { transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes swimReverse {
  0% { transform: translateX(120vw) scaleX(-1); }
  100% { transform: translateX(-200px) scaleX(-1); }
}

.f4 {
  top: 35%;
  right: -80px;
  font-size: 36px;
  animation: swimReverse 26s linear infinite;
  opacity: .35;
}

/* Mobile */
@media (max-width: 520px){
  body.auth-login-page .login-card{
    padding: 1.5rem 1.25rem 1.2rem;
    border-radius: 18px;
  }
  body.auth-login-page .brand-logo-wide{
    width: min(320px, 92%);
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  body.auth-login-page::before,
  body.auth-login-page::after,
  body.auth-login-page .menjala-blob{
    animation: none !important;
  }
}

/* ===== View Tabs ===== */
.view-tabs{
  display:inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(20,41,79,.10);
  box-shadow: 0 10px 22px rgba(18,26,44,.06);
}

.view-tab{
  border: 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  color: rgba(20,41,79,.70);
  background: transparent;
  transition: transform .08s ease, filter .12s ease, background .12s ease;
}
.view-tab:hover{ filter: brightness(1.02); }
.view-tab:active{ transform: translateY(1px); }

.view-tab.active{
  background: linear-gradient(180deg, rgb(0,150,136), rgb(0,121,107));
  color: #fff;
  box-shadow: 0 10px 20px rgba(0,150,136,.22);
}

/* ===== Chart Cards polish ===== */
.card.chart-card{
  border-radius: 22px;
  border: 1px solid rgba(20,41,79,.10);
  box-shadow: 0 14px 40px rgba(18,26,44,.10);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(0,150,136,.13), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.96), #fff);
}

.card.chart-card-blue{
  background:
    radial-gradient(circle at 18% 12%, rgba(7,160,195,.14), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.96), #fff);
}

.card.chart-card-orange{
  background:
    radial-gradient(circle at 18% 12%, rgba(227,67,0,.14), transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,.96), #fff);
}

.card.chart-card .chart-head{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 8px;
}

.card.chart-card .chart-title{
  font-weight: 900;
  color: rgba(20,41,79,.88);
  margin: 0;
  letter-spacing: .2px;
}

.card.chart-card .chart-sub{
  font-size: 12px;
  color: rgba(20,41,79,.55);
  margin: 0;
}

.card.chart-card .chart-body{
  padding: 8px 16px 16px;
  height: 270px;
}
.card.chart-card canvas{
  width: 100% !important;
  height: 100% !important;
}

.chart-pill{
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(20,41,79,.12);
  background: rgba(255,255,255,.72);
  color: rgba(20,41,79,.70);
  font-weight: 900;
  white-space: nowrap;
}

/* ===== KPI ===== */
.chart-kpi{ display:flex; gap:12px; align-items:stretch; }
.kpi-item{
  min-width: 150px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(20,41,79,.10);
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 22px rgba(18,26,44,.06);
}
.kpi-label{
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .3px;
  color: rgba(20,41,79,.55);
  text-transform: uppercase;
}
.kpi-value{
  margin-top: 4px;
  font-size: 16px;
  font-weight: 900;
  color: rgba(20,41,79,.90);
  line-height: 1.15;
}
.kpi-badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  margin-top: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  border: 1px solid rgba(20,41,79,.12);
  background: rgba(255,255,255,.85);
  color: rgba(20,41,79,.75);
  white-space: nowrap;
}
.kpi-badge.up{
  border-color: rgba(0,150,136,.30);
  background: rgba(0,150,136,.10);
  color: rgb(0,150,136);
}
.kpi-badge.down{
  border-color: rgba(227,67,0,.30);
  background: rgba(227,67,0,.10);
  color: rgb(227,67,0);
}

@media (max-width: 768px){
  .card.chart-card .chart-head{ flex-direction: column; }
  .chart-kpi{ width:100%; }
  .kpi-item{ flex:1; min-width: 0; }
}

/* =========================================================
   ✅ DASHBOARD LAYOUT FIX (sidebar aman + anti geser)
   Tempel di PALING BAWAH file CSS
   ========================================================= */

/* cegah horizontal scroll yang bikin sidebar ketarik */
html, body{
  width: 100%;
  overflow-x: hidden;
}

/* wrapper wajib full width */
#wrapper{
  width: 100%;
  display: flex;
  min-height: 100vh;
  overflow-x: hidden; /* kunci */
}

/* sidebar jangan pernah ikut "melar" */
#sidebar{
  flex: 0 0 260px;     /* kunci lebar di flex */
  width: 260px;
  max-width: 260px;
  z-index: 1000;
}

/* area konten: harus boleh menyusut agar tidak mendorong sidebar */
.main-content,
#content{
  flex: 1 1 auto;
  min-width: 0;        /* INI KUNCI utama flex agar chart/card tidak maksa lebar */
  overflow-x: hidden;
  padding: 18px 22px;
}

/* row/col bootstrap kadang bikin overflow: pastikan aman */
.main-content .row,
.main-content .col,
.main-content .container,
.main-content .container-fluid{
  min-width: 0;
}

/* card/chart jangan bikin overflow */
.card,
.chart-card{
  min-width: 0;
}

/* canvas jangan bikin layout melebar */
.chart-body{
  min-width: 0;
  overflow: hidden; /* penting untuk chart */
}

.chart-card canvas,
canvas{
  display: block;
  max-width: 100% !important;
}

/* =========================================================
   ✅ OVERRIDE: overflow visible yg bikin layout gampang melebar
   - kamu sebelumnya set .card/.container overflow: visible !important
   - itu bagus untuk dropdown, tapi jelek untuk chart/dashboard
   - jadi kita batasi: khusus dashboard/chart harus hidden
   ========================================================= */

.dashboard-page .card,
.dashboard-page .chart-card,
.dashboard-page .container,
.dashboard-page .container-fluid,
.dashboard-page .table-responsive{
  overflow: hidden !important; /* biar chart tidak dorong layout */
}

/* dropdown tetap boleh visible untuk halaman lain
   (aturan lama kamu sudah ada di atas, jadi tidak perlu ditulis ulang di sini) */


/* =========================================================
   ✅ OPTIONAL: Kasih class pada body halaman dashboard:
   <body class="dashboard-page">
   agar override di atas hanya berlaku di dashboard
   ========================================================= */


/* =========================================================
   ✅ RESPONSIVE: sidebar overlay di mobile tetap aman
   ========================================================= */
@media (max-width: 992px){
  #sidebar{
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
  }
  .main-content,
  #content{
    padding: 16px;
  }
}

#dashViewTabs { 
  position: relative;
  z-index: 5;
  pointer-events: auto;
}

#dashViewTabs .view-tab{
  pointer-events: auto;
}

