/* layout_eyd.css */

/* ===================================================
FOOTER
=================================================== */
/* bottom footer layar hp mobile */
.appBottomMenu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #FFC300 !important;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 3px 0; /* Padding lebih kecil */
    min-height: 35px; /* Dibuat lebih pendek */
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    padding-bottom: calc(env(safe-area-inset-bottom) + 5px);
}

.appBottomMenu a {
    text-align: center;
    color: white;
    flex: 1;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.appBottomMenu .col {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px; /* Teks tetap kecil */
    gap: 2px;
}

.appBottomMenu i {
    font-size: 24px; /* Ukuran ikon tetap besar tapi lebih proporsional */
    transition: transform 0.2s;
}

.appBottomMenu a:hover i {
    transform: scale(1.15);
}

/* Tombol Tengah (Kasir) */
.appBottomMenu .center-button {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 3px;
}

.appBottomMenu .center-button .circle {
    width: 55px; /* Lebih kecil agar tidak terlalu mencolok */
    height: 55px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-25px); /* Tidak terlalu naik */
    border: 3px solid #FEB200;
    transition: all 0.2s ease-in-out;
}

.appBottomMenu .center-button .circle:hover {
    transform: translateY(-26px) scale(1.05);
}

.appBottomMenu .center-button i {
    font-size: 28px; /* Ikon kasir lebih proporsional */
    color: #FEB200;
}

/* Responsif */
@media (max-width: 768px) {
    .appBottomMenu {
        min-height: 40px;
    }
    .appBottomMenu i {
        font-size: 22px; /* Ikon tetap besar */
    }
    .appBottomMenu .col {
        font-size: 9px;
    }
    .appBottomMenu .center-button .circle {
        width: 50px;
        height: 50px;
        transform: translateY(-22px);
    }
    .appBottomMenu .center-button i {
        font-size: 26px;
    }
}
@media (max-width: 400px) {
    .appBottomMenu {
        min-height: 38px;
    }
    .appBottomMenu i {
        font-size: 20px;
    }
    .appBottomMenu .col {
        font-size: 8px;
    }
    .appBottomMenu .center-button .circle {
        width: 48px;
        height: 48px;
        transform: translateY(-20px);
    }
    .appBottomMenu .center-button i {
        font-size: 24px;
    }
}
/* Sembunyikan di layar besar */
@media (min-width: 769px) {
    .appBottomMenu {
        display: none !important;
    }
}
.appBottomMenu a:hover i,
.appBottomMenu a:hover strong,
.appBottomMenu a.active i,
.appBottomMenu a.active strong {
    color: #8e4a00; /* Warna ikon & teks berubah saat di-hover atau aktif */
}

body {
    background-color: transparent;
}

/* ===================================================
SIDEBAR
=================================================== */
/* Animasi running text */
.running-text {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  width: 100%;
  padding: 0;
}

.running-text span {
  display: inline-block;
  font-weight: bold;
  color: white;
  animation: runText 20s linear infinite;
}

@keyframes runText {
  from { transform: translateX(45%); }
  to { transform: translateX(-100%); }
}

/* -------------------------------------------------------------------------- */
/* Sidebar */
#sidebar {
  width: 250px;
  min-height: 100vh;
  background-color: #FFC300;
  color: black;
  transition: width 0.3s;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 999;
  overflow-y: auto;
}

#sidebar {
  padding-top: 55px; /* atur sesuai kebutuhan */
}

#sidebar.collapsed {
  width: 60px;
}

#sidebar.collapsed * {
  font-size: 0 !important;
  line-height: 0 !important;
}

#sidebar.collapsed i {
  font-size: 1.2rem !important;
  line-height: normal !important;
}

/* Sembunyikan semua ikon bi-arrow-right di nav-link saat sidebar collapsed */
#sidebar.collapsed .nav-link i.bi-arrow-right {
  display: none !important;
}

/* Panel user normal */
.user-panel {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.5rem;
  transition: all 0.3s;
}

/* Saat sidebar collapsed */
#sidebar.collapsed .user-panel {
  justify-content: center; /* center horizontal */
  padding: 0.5rem 0;
}

#sidebar.collapsed .user-panel .image img {
  width: 35px;   /* kecilkan ukuran photo */
  height: 35px;
}

#sidebar.collapsed .nav-link {
  justify-content: center !important;
  align-items: center !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: center;
}

#sidebar.collapsed .sidebar-bank {
  display: none;
}

#sidebar.collapsed .sidebar-map {
  display: none;
}

#sidebar.collapsed .sidebar-logo img {
  width: 40px !important;
  height: auto !important;
}

#toggleIcon.rotate {
  transform: rotate(180deg);
  transition: transform 0.3s;
}

/* Sidebar link style */
#sidebar, #sidebar .sidebar-item,
#sidebar a, #sidebar a i {
  color: black !important;
}

#sidebar a:hover, #sidebar a:hover i {
  color: white !important;
  background-color: #8e4a00 !important;
}

/* Layar kecil: sidebar default tersembunyi */
@media (max-width: 767.98px) {
  #sidebar {
    width: 0 !important;
    background: transparent !important;
    overflow-y: hidden; /* sembunyikan scroll saat tertutup */
    pointer-events: none;
  }

  /* sidebar terbuka */
  body.sidebar-open #sidebar {
    width: 250px !important;
    background: #FFC300 !important;
    overflow-y: auto !important;  /* aktifkan scroll */
    pointer-events: auto;           /* aktifkan interaksi */
  }
}

  /* untuk matikan hover label / section title misal kontak & bantuan */
/* Matikan hover, active, focus */
.no-hover,
.no-hover:hover,
.no-hover:focus,
.no-hover:active {
  background: transparent !important;
  color: #8e4a00 !important; /* muted */
  cursor: default !important;
  pointer-events: none; /* tidak bisa di-hover / klik */
}

/* -------------------------------------------------------------------------- */
/* Highlight menu aktif + icon */
#sidebar .nav-link.active,
#sidebar .nav-link.active i {
    background: #8e4a00;   /* background link */
    color: #fff !important; /* icon dan teks putih */
}

/* Hover tetap berfungsi untuk link biasa & yang aktif + icon */
#sidebar .nav-link:hover,
#sidebar .nav-link:hover i {
    background: #8e4a00;
    color: #fff !important;
}

/* Submenu yang aktif + icon */
#sidebar .collapse .nav-link.active,
#sidebar .collapse .nav-link.active i {
    background: #8e4a00;
    font-weight: 600;
    color: #fff !important;
    border-radius: 6px;
}

/* Hover untuk submenu + icon */
#sidebar .collapse .nav-link:hover,
#sidebar .collapse .nav-link:hover i {
    background: #8e4a00;
    color: #fff !important;
}

/* ===================================================
NAVBAR
=================================================== */
/* Navbar */
.navbar-custom {
  position: fixed;
  top: 0;
  left: 0;          /* full di kiri */
  right: 0;         /* full di kanan */
  height: 50px;
  background-color: #FFC300 !important;
  border-bottom: 1px solid #dee2e6 !important;
  display: flex;
  align-items: center;
  padding: 0 15px;
  z-index: 1000;
  color: black !important;
}

@media (max-width: 767.98px) {
  #sidebar {
    position: fixed;     /* overlay di atas konten */
    top: 0;
    left: -250px;        /* tersembunyi di kiri */
    width: 250px;
    height: 100%;
    background: #FFC300;
    z-index: 2000;       /* lebih tinggi dari navbar 1000 */
    transition: left 0.3s;
    overflow-y: auto;
  }

  body.sidebar-open #sidebar {
    left: 0;             /* muncul saat toggle */
  }

  /* overlay gelap opsional */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 1990;       /* di bawah sidebar */
  }

  /* navbar tetap full-width */
  .navbar-custom {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000;       /* tetap di bawah sidebar */
  }
}

/* -------------------------------------------------------------------------- */
/* ===== Content ===== */
.page-content {
  padding: 20px;
  margin-bottom: 40px; /* ruang footer */
  transition: margin-left 0.3s, width 0.3s;
  margin-left: 250px;          /* sidebar normal */
  width: calc(100% - 250px);   /* lebar mengikuti sisa layar */
}

/* Sidebar collapsed: kiri ikut mengecil, kanan tetap menempel */
body.sidebar-collapsed #content {
  margin-left: 60px;           /* sidebar collapsed */
  width: calc(100% - 60px);    /* content melebar */
}

/* Mobile responsive */
@media (max-width: 767.98px) {
  #content {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* ===== icon profil ===== */
  /* Rapetin jarak antar ikon navbar kanan */
  .navbar-nav.ms-auto .nav-item {
    margin-right: 2px !important;
  }

  /* Ikon terakhir (photo profil) nggak dikasih margin kanan biar nggak kepotong */
  .navbar-nav.ms-auto .nav-item:last-child {
    margin-right: 0 !important;
  }

  /* Rapetin padding dalam tiap link ikon */
  .navbar-nav.ms-auto .nav-link {
    padding-left: 0px !important;
    padding-right: 12px !important;
  }

/* ===== box icon profil ===== */
.custom-img-circle {
    border-radius: 50%;
}

.custom-elevation {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-header.bg-primary {
    background-color: #FFC300 !important;
    color: white;
    text-align: center;
    width: 280px;       /* lebar header spesifik */
    margin: 0 auto;     /* supaya header di tengah dropdown */
    padding: 1rem;      /* jarak atas-bawah */
}

/* ===================================================
FOOTER
=================================================== */
/* ===== Footer ===== */
#footer {
  position: relative;
  bottom: 0;
  height: 40px;
  color: black !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 999;
  border-top: 0px solid #dee2e6;
  transition: margin-left 0.3s, width 0.3s; /* smooth saat sidebar collapse */
  
  margin-left: 250px;               /* offset sidebar normal */
  width: calc(100% - 250px);        /* menempel di ujung kanan viewport */
}

#footer * {
  color: black !important;
}

/* Sidebar collapsed: kiri menyesuaikan */
body.sidebar-collapsed #footer {
  margin-left: 60px;          /* offset sidebar collapsed */
  width: calc(100% - 60px);   /* tetap menempel di ujung kanan */
}

@media (max-width: 767.98px) {
  /* Sidebar mobile */
  #sidebar {
    position: fixed;      /* overlay di atas konten */
    top: 0;
    left: -250px;         /* sembunyi di kiri */
    width: 250px;
    height: 100%;
    background: #FFC300;
    z-index: 500;         /* lebih rendah dari footer */
    transition: left 0.3s;
    overflow-y: auto;
  }

  body.sidebar-open #sidebar {
    left: 0;              /* muncul saat toggle */
  }

  /* overlay gelap opsional */
  body.sidebar-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    z-index: 490;         /* di bawah sidebar, di bawah footer */
  }
}

/* ===== Footer homepage ===== */
#footer-homepage {
  position: relative;
  bottom: 0;
  min-height: 40px;   /* ganti dari height */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0px;

  margin-left: 250px;
  width: calc(100% - 250px);
  transition: margin-left 0.3s, width 0.3s;
}

/* ikut collapse sidebar */
body.sidebar-collapsed #footer-homepage {
  margin-left: 60px;
  width: calc(100% - 60px);
}

@media (max-width: 767.98px) {

  #footer-homepage {
    margin-left: 0;
    width: 100%;
    padding: 10px;
  }

  body.sidebar-collapsed #footer-homepage {
    margin-left: 0;
    width: 100%;
  }

}

/* -------------------------------------------------------------------------- */
/* Tampilan TRX */
/* -------------------------------------------------------------------------- */
/* GLOBAL FIX (hilangkan scroll horizontal) */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden !important;  /* cegah scroll horizontal */
    box-sizing: border-box;
}

/* Terapkan ke seluruh elemen */
*, *::before, *::after {
    box-sizing: inherit;
}

/* AREA KONTEN UTAMA */
#content-trx {
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 10px 15px;
    height: calc(100vh - 120px);
    overflow-y: hidden;
    overflow-x: hidden !important;  /* cegah horizontal scroll */
    width: 100%;                    /* aman, tidak lebih dari layar */
    max-width: 100%;                /* cegah melebar */
    transition: 0.3s;
}

/* Sidebar normal */
body.sidebar-trx:not(.sidebar-collapsed) #content-trx {
    margin-left: 250px;
    width: calc(100% - 250px);
    max-width: calc(100% - 250px);
}

/* Sidebar collapse */
body.sidebar-trx.sidebar-collapsed #content-trx {
    margin-left: 60px;
    width: calc(100% - 60px);
    max-width: calc(100% - 60px);
}

/* MOBILE: tetap scroll dan tetap tidak horizontal */
@media (max-width: 767.98px) {

    html, body {
        overflow-y: auto !important;
        overflow-x: hidden !important; /* tetap cegah horizontal */
        height: auto;
    }

    #content-trx {
        height: auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* -------------------------------------------------------------------------- */
/* Navbar TRX */
#navbar-trx {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background-color: #FFC300 !important;
  border-bottom: 1px solid #dee2e6 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  z-index: 1100;
  color: black !important;
}

/* Icon di navbar */
#navbar-trx .nav-link i {
  font-size: 24px;
  vertical-align: middle;
}

/* Tombol di navbar */
#navbar-trx .btn {
  min-width: 70px;
  height: 30px;
  font-size: 0.8rem;
}

/* ===== DESKTOP: FULL LAYAR TANPA SCROLL ===== */
#page-content-trx {
  margin-top: 60px;         /* ruang navbar */
  margin-bottom: 60px;      /* ruang footer */
  padding: 20px;
  overflow-x: hidden !important; /* tetap tanpa horizontal scroll */

  height: calc(100vh - 120px);   /* 50 navbar + 10 gap + 60 footer */
  overflow-y: hidden;            /* tidak scroll */
}

/* ===== MOBILE: tetap scroll normal ===== */
@media (max-width: 767.98px) {
  #page-content-trx {
    height: auto;          /* konten bebas */
    overflow-y: auto;      /* scroll normal */
    overflow-x: hidden !important; /* tetap tanpa horizontal scroll */
  }
}

/* -------------------------------------------------------------------------- */
/* ===== Footer TRX ===== */
#footer-trx {
  position: fixed;        /* tetap di bawah layar */
  bottom: 0;
  left: 0;                /* mulai dari ujung kiri */
  right: 0;               /* sampai ujung kanan */
  height: 40px;
  background-color: #FFC300;
  color: black !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1050;          /* di atas konten dan sidebar */
  border-top: 1px solid #dee2e6;
}

/* semua elemen di dalam footer tetap hitam */
#footer-trx * {
  color: black !important;
}

/* ===================================================
HEADER WRAPPER
=================================================== */
/* Wrapper Responsif Full Layar */
#content {
    margin-top: 60px;
    margin-left: 0;
    padding: 10px 15px;
    box-sizing: border-box;
    min-height: calc(100vh - 60px - 40px);
    overflow-x: hidden;     /* biar tidak ada horizontal scroll */
    /* overflow-y: auto;  <-- HAPUS supaya tidak ada scroll ganda */
    transition: margin-left 0.3s, padding 0.3s;
    background: transparent;
    width: 100%;
}

@media (min-width: 768px) {
    #content {
        margin-left: 250px;
        width: calc(100% - 250px);
        padding: 10px 20px;
    }
}

#content img, 
#content table, 
#content iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================================
hover global
=================================================== */
.btn:hover {
    background-color: #8e4a00 !important;
    border-color: #8e4a00 !important;
    color: #fff !important;
}

.dropdown-item:hover {
    background-color: #8e4a00 !important;
    color: #fff !important;
}

.toggle-actions:hover {
    background-color: #8e4a00 !important;
    border-color: #8e4a00 !important;
    color: #fff !important;
}


/* ===================================================
swall alert
=================================================== */
  .swal2-styled.swal2-confirm {
      background-color: #FFC300 !important;
      color: #000 !important;
  }
