/* ===== Nota App - Custom Styles ===== */

/* Bottom Nav */
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  color: #9ca3af;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}
.bottom-nav-item.active {
  color: #3b82f6;
}
.bottom-nav-item.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  background: #3b82f6;
  border-radius: 0 0 4px 4px;
}

/* Card animations */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}
.card-hover:active {
  transform: translateY(0);
}

/* Slide up modal */
.modal-slide {
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-slide.show {
  transform: translateY(0);
}

/* Fade in animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out forwards;
}

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 0.4s ease-out forwards;
}
.stagger-children > *:nth-child(1) {
  animation-delay: 0.05s;
}
.stagger-children > *:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger-children > *:nth-child(3) {
  animation-delay: 0.15s;
}
.stagger-children > *:nth-child(4) {
  animation-delay: 0.2s;
}
.stagger-children > *:nth-child(5) {
  animation-delay: 0.25s;
}
.stagger-children > *:nth-child(6) {
  animation-delay: 0.3s;
}

/* Toast */
.toast {
  animation:
    slideInRight 0.3s ease-out,
    fadeOut 0.3s ease-in 2.7s;
  animation-fill-mode: forwards;
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* FAB */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
  z-index: 40;
  transition: all 0.3s ease;
  cursor: pointer;
}
.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}
.fab:active {
  transform: scale(0.95);
}

/* Rupiah input */
.rupiah-input {
  position: relative;
}

/* Status badges */
.badge-lunas {
  background: #dcfce7;
  color: #16a34a;
}
.badge-utang {
  background: #fee2e2;
  color: #dc2626;
}
.badge-sebagian {
  background: #fef3c7;
  color: #d97706;
}

/* Tab underline */
.tab-item {
  position: relative;
  padding: 10px 0;
  font-weight: 500;
  color: #9ca3af;
  transition: color 0.2s;
  cursor: pointer;
}
.tab-item.active {
  color: #3b82f6;
}
.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #3b82f6;
  border-radius: 3px 3px 0 0;
}

/* Print receipt */
@media print {
  body * {
    visibility: hidden;
  }
  .struk-area,
  .struk-area * {
    visibility: visible;
  }
  .struk-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
  }
  .no-print {
    display: none !important;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Pulse dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

/* Chart container */
.chart-container {
  position: relative;
  width: 100%;
  height: 200px;
}
