/* public/css/app.css */

/* Reset sederhana */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Font dan background global */
body {
  font-family: Arial, sans-serif;
  background-color: #f8f9fa;
  color: #212529;
}

/* Container utilitas */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem;
}

/* Card sederhana */
.card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  padding: 1rem;
}

/* Tombol */
.btn {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  background-color: #007bff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0069d9;
}


/* Slide-up saat modal tampil */
.modal.fade .modal-dialog {
  transform: translateY(50px);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.modal.show .modal-dialog {
  transform: translateY(0);
  opacity: 1;
}

/* confirm-modal.css */
.confirm-modal .modal-content {
  border: none;
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}

.confirm-modal .icon-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  border: 4px solid #28a745;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal.error .icon-circle {
  border-color: #dc3545;
}

.confirm-modal .icon-circle i {
  font-size: 2rem;
  color: #28a745;
}

.confirm-modal.error .icon-circle i {
  color: #dc3545;
}

.confirm-modal .modal-body h5 {
  margin-bottom: .5rem;
  font-weight: 600;
}

.confirm-modal .modal-body p {
  color: #666;
  margin-bottom: 1.5rem;
}

.confirm-modal .btn {
  min-width: 100px;
}

.confirm-modal .modal-content {
  border: none;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.confirm-modal .icon-circle {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border: 4px solid #28a745;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-modal.error .icon-circle {
  border-color: #dc3545;
}

.confirm-modal .icon-circle i {
  font-size: 2rem;
  color: #28a745;
}

.confirm-modal.error .icon-circle i {
  color: #dc3545;
}

/* Animasi elegan muncul dari bawah */
@keyframes slideBounceIn {
  0% {
    transform: translateY(50px) scale(0.95);
    opacity: 0;
  }

  60% {
    transform: translateY(-10px) scale(1.02);
    opacity: 1;
  }

  100% {
    transform: translateY(0) scale(1);
  }
}

.modal.show .modal-dialog {
  animation: slideBounceIn 0.4s ease;
}

.modal-content {
  border-radius: 16px !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.confirm-modal .modal-content {
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  animation: slideBounceIn 0.4s ease;
}


/* ========================================
   Animations for Modal Slide In/Out
   ======================================== */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideOutDown {
  from {
    transform: translateY(0);
    opacity: 1;
  }

  to {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* ========================================
     Modal: full-screen slide from bottom
     ======================================== */
.manual-modal .modal-dialog {
  max-width: 100%;
  /* 80% layar */
  margin: 1rem auto;
  /* vertikal + horisontal centering */
}

.manual-modal .modal-content {
  border-radius: 0.25rem;
  overflow: hidden;
  animation-duration: 0.4s;
  animation-fill-mode: both;
}

.manual-modal.show .modal-content {
  animation-name: slideInUp;
}

.manual-modal .modal-content.slide-out {
  animation-name: slideOutDown;
}

/* ========================================
     Manual-Row Container Styling
     ======================================== */
.manual-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  background: #fff;
  align-items: flex-end;
  /* tombol di ujung bawah */
}

/* ========================================
     Form-Group Wrapper & Labels
     ======================================== */
.manual-row .form-group {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.manual-row .form-group label {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}


/* Make sure inputs & selects fill their container */
.manual-row .form-control,
.manual-row .form-select {
  width: 100%;
  box-sizing: border-box;
}

/* ========================================
     Row-Level Buttons
     ======================================== */
.manual-row .btn-cancel-row,
.manual-row .btn-ok-row {
  flex: 0 0 auto;
  margin-top: 1.75rem;
  /* sejajar bawah input */
  white-space: nowrap;
}

/* ========================================
     Responsive Fallback
     ======================================== */
@media (max-width: 768px) {
  .manual-row .form-group {
    flex: 1 1 100%;
    /* isi full di mobile */
  }

  .manual-row .btn-cancel-row,
  .manual-row .btn-ok-row {
    flex: 1 1 45%;
    /* dua tombol berdampingan */
    margin-top: 0.5rem;
  }
}

/* Override ukuran teks SweetAlert2 */
.swal2-title-sm {
  font-size: 1rem !important;
  /* judul lebih kecil */
}

.swal2-html-container-sm {
  font-size: 0.875rem !important;
  /* teks body lebih kecil */
}

.modal-backdrop {
  z-index: 1040 !important;
}

.modal {
  z-index: 1050 !important;
}

/* input bobot & harga */
.col-bobot,
.col-harga {
  width: 80px;
}

.modal .form-control {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.table td {
  padding: 0.3rem 0.5rem;
}

body.modal-open {
  overflow: auto !important;
}

#modalPilihPetani~.modal-backdrop {
  z-index: 508 !important;
}

#modalPilihPetani .modal-dialog {
  z-index: 1109 !important;
}

/* sidebar paten */
/* Di file utama CSS Anda */
body.sidebar-collapsed aside.sidebar {
  transform: translateX(-100%);
}

aside.sidebar {
  transition: transform .3s ease;
}

/* Pastikan <main> atau .dashboard-main tidak menggunakan margin:left otomatis.
   Jadi saat sidebar-collapsed, main tetap full width. */
html,
body {
  overflow-x: visible !important;
}

#nota-snapshot {
  width: auto;
  max-width: none;
  overflow: visible;
}

.table-elegant-glass input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0 auto;
}

.table-elegant-glass input[type="checkbox"]:disabled {
  opacity: 0.6;        /* sedikit lebih gelap */
  cursor: not-allowed; /* icon “no-drop” */
}


