/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.light-style .menu .app-brand.demo {
  height: 64px;
}

.dark-style .menu .app-brand.demo {
  height: 64px;
}

.app-brand-logo.demo svg {
  width: 38px;
  height: 20px;
}

.app-brand-text.demo {
  font-size: 1.25rem;
}

/* ! For .layout-navbar-fixed added fix padding top tpo .layout-page */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
  padding-top: 64px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
  z-index: auto;
}

/*
* Content
******************************************************************************/

.demo-blocks > * {
  display: block !important;
}

.demo-inline-spacing > * {
  margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing > * {
  margin-top: 1.25rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-lg > * {
  margin-top: 1.875rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-lg.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.demo-vertical-spacing-xl > * {
  margin-top: 5rem !important;
  margin-bottom: 0 !important;
}
.demo-vertical-spacing-xl.demo-only-element > :first-child {
  margin-top: 0 !important;
}

.rtl-only {
  display: none !important;
  text-align: left !important;
  direction: ltr !important;
}

[dir='rtl'] .rtl-only {
  display: block !important;
}

/*
* Dashboard Charts - Modern Professional Style
******************************************************************************/
.stats-card-modern {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  animation: statsCardFadeIn 0.5s ease-out backwards;
}
.stats-row > div:nth-child(1) .stats-card-modern { animation-delay: 0.05s; }
.stats-row > div:nth-child(2) .stats-card-modern { animation-delay: 0.1s; }
.stats-row > div:nth-child(3) .stats-card-modern { animation-delay: 0.15s; }
.stats-row > div:nth-child(4) .stats-card-modern { animation-delay: 0.2s; }
@keyframes statsCardFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stats-card-modern:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}
.stats-card-modern .stats-card-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  opacity: 0.08;
  transition: transform 0.5s ease;
}
.stats-card-modern:hover .stats-card-bg {
  transform: scale(1.5);
}
.stats-card-primary .stats-card-bg { background: var(--bs-primary); }
.stats-card-success .stats-card-bg { background: var(--bs-success); }
.stats-card-warning .stats-card-bg { background: var(--bs-warning); }
.stats-card-danger .stats-card-bg { background: var(--bs-danger); }
.stats-number { transition: transform 0.3s ease; }
.stats-card-modern:hover .stats-number { transform: scale(1.05); }
.stats-icon { transition: transform 0.3s ease; }
.stats-card-modern:hover .stats-icon { transform: rotate(5deg) scale(1.1); }

/* Live indicator - real-time feel */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #22c55e;
  font-weight: 500;
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Chart cards modern */
.chart-card-modern {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  animation: chartCardFadeIn 0.6s ease-out backwards;
}
.charts-row .col-12:nth-child(1) .chart-card-modern { animation-delay: 0.1s; }
.charts-row .col-12:nth-child(2) .chart-card-modern { animation-delay: 0.2s; }
.charts-row .col-12:nth-child(3) .chart-card-modern { animation-delay: 0.3s; }
.charts-row .col-12:nth-child(4) .chart-card-modern { animation-delay: 0.4s; }
.chart-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.chart-card-modern .card-header {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: transparent;
}
@keyframes chartCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*
* Dashboard Mobile Responsive - PC, Android, iPhone
******************************************************************************/
html, body {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
body {
  -webkit-text-size-adjust: 100%;
}
/* Safe area untuk iPhone notch */
.layout-wrapper {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.content-wrapper {
  min-width: 0;
  overflow-x: hidden;
}
.layout-page {
  min-width: 0;
  overflow-x: hidden;
}
/* Chart responsive di mobile */
.chart-container-mobile {
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 767.98px) {
  .chart-container-mobile {
    height: 300px !important;
    min-height: 250px !important;
  }
  .chart-wrapper {
    position: relative;
    height: 200px;
    min-height: 180px;
  }
  .chart-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
  }
  .container-p-y {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
}
/* Stat cards lebih compact di mobile */
@media (max-width: 576px) {
  .content-wrapper .card-body.p-2 {
    padding: 0.5rem !important;
  }
  h4.fw-bold.small {
    font-size: 0.95rem;
  }
}

/*
* Member page - Mobile/iPhone responsive
******************************************************************************/
.member-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
}
@media (max-width: 767.98px) {
  .member-table-responsive {
    min-height: 200px;
  }
  .member-table-responsive .dataTables_wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .action-buttons-cell .btn {
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
  }
  .action-buttons-cell .btn i {
    font-size: 1rem;
  }
}
/* Modal view member di mobile - Fix layar hitam Android/iPhone */
/* z-index harus di atas navbar (1080), layout overlay (1100), dan menu */
.modal {
  z-index: 1200 !important;
}
.modal-backdrop {
  z-index: 1195 !important;
}
.modal-fullscreen-sm-down .modal-body .row .col-md-6 {
  flex: 0 0 100%;
  max-width: 100%;
}
@media (max-width: 575.98px) {
  .modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
  .modal .modal-dialog {
    margin: 0.5rem;
    max-height: calc(100vh - 1rem);
  }
  .modal .modal-content {
    max-height: calc(100vh - 1rem);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  }
  .modal .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
  #dropdown-variation-demo .btn-group .text-truncate {
    width: 300px;
    position: relative;
  }
  #dropdown-variation-demo .btn-group .text-truncate::after {
    position: absolute;
    top: 45%;
    right: 0.65rem;
  }
}
/*
* Layout demo
******************************************************************************/

.layout-demo-wrapper {
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-direction: column;
  flex-direction: column;
  margin-top: 1.25rem;
}
.layout-demo-placeholder img {
  width: 900px;
}
.layout-demo-info {
  text-align: center;
  margin-top: 1.25rem;
}
