/* ================================== */
/* GAYA GLOBAL & DASAR                */
/* ================================== */
:root {
  --primary-color: #2a7854;
  --secondary-color: #d9eee1;
  --background-color: #f0f4f2;
  --text-color: #333333;
  --subtle-text-color: #888;
  --white-color: #ffffff;
  --trend-up-color: #28a745;
  --trend-down-color: #dc3545;
  --border-color: #e0e0e0;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #e9ecef; /* Latar belakang luar kontainer */
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================================== */
/* LAYOUT UTAMA                     */
/* ================================== */
.mobile-container {
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  background-color: var(--background-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.main-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  /* 90px untuk nav-bottom + ruang aman di bawahnya */
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* ================================== */
/* HEADER                           */
/* ================================== */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.home-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
}

.notification-icon {
  position: relative;
  font-size: 1.8rem;
  color: var(--primary-color);
}

.notification-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  background-color: var(--trend-down-color);
  border-radius: 50%;
  border: 2px solid var(--background-color);
}

/* ================================== */
/* SEARCH BAR                       */
/* ================================== */
.search-bar {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-bar iconify-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--subtle-text-color);
}

.search-bar input {
  width: 100%;
  padding: 14px 14px 14px 50px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-size: 1rem;
  background-color: var(--white-color);
}
.search-bar input::placeholder {
  color: var(--subtle-text-color);
}

/* ================================== */
/* MENU SECTION                     */
/* ================================== */
.menu-section {
  margin-bottom: 2rem;
}

.menu-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.25rem;
  background-color: var(--white-color);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.menu-item iconify-icon {
  font-size: 2rem;
  color: var(--primary-color);
}

/* ================================== */
/* TRENDS SECTION                   */
/* ================================== */
.trends-section {
  margin-bottom: 1rem;
}

.trends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.trends-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.trends-header a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--primary-color);
}

.trends-list .trend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--white-color);
  border-radius: 12px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border-color);
}

.item-icon-name {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 500;
}

.item-icon-name iconify-icon {
  font-size: 2rem;
  color: var(--subtle-text-color);
}

.item-price-trend {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.item-price-trend > iconify-icon {
  font-size: 2.5rem;
}

.price-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-details .price {
  font-weight: 600;
  font-size: 1rem;
}

.price-details .change {
  font-size: 0.8rem;
}

.trend-up {
  color: var(--trend-up-color);
}

.trend-down {
  color: var(--trend-down-color);
}

/* ================================== */
/* BOTTOM NAVIGATION                */
/* ================================== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  background-color: var(--white-color);
  border-top: 1px solid var(--border-color);
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--subtle-text-color);
  padding: 0.5rem;
  border-radius: 8px;
}

.nav-item span {
  font-size: 0.75rem;
  font-weight: 500;
}

.nav-item iconify-icon {
  font-size: 1.5rem;
}

.nav-item.active {
  color: var(--primary-color);
  background-color: var(--secondary-color);
}

/* =========================================== */
/* GAYA HEADER HALAMAN (DIPERBARUI)            */
/* =========================================== */
/* =========================================== */
/* GAYA HEADER HALAMAN (KONSISTEN)             */
/* =========================================== */
.page-header {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background-color: var(--white-color); /* Latar belakang putih solid */
  border-bottom: 1px solid var(--border-color); /* Garis batas bawah */
  flex-shrink: 0;
}

.page-header h1 {
  flex-grow: 1;
  text-align: center;
  font-size: 1.125rem; /* Ukuran standar */
  font-weight: 600;
  margin-left: -28px; /* Kompensasi agar judul tetap di tengah */
}

.back-button svg {
  width: 28px;
  height: 28px;
}

/* TAMBAHKAN KODE INI DI BAWAHNYA */
.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px; /* KUNCI: Menambah area klik di sekitar ikon */
  border-radius: 50%; /* Membuat area sentuh menjadi bulat */
  transition: background-color 0.2s ease;
}

.back-button:hover {
  background-color: #f0f0f0; /* Efek visual saat disentuh */
}

.back-button svg {
  width: 28px;
  height: 28px;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN KEMITRAAN (DIPERBARUI) */
/* =========================================== */
.page-main-title {
  font-size: 1.75rem; /* DIUBAH: Lebih besar */
  font-weight: 700; /* DIUBAH: Lebih tebal */
  margin-bottom: 1.5rem;
  padding: 0 1.5rem;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0 1.5rem;
}

.info-card {
  background-color: #ffffff; /* DIUBAH: Latar belakang menjadi putih */
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08); /* DIUBAH: Menambah bayangan lembut */
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.card-icon {
  width: 28px;
  height: 28px;
}
.card-icon img {
  width: 100%;
  height: 100%;
}

.card-meta {
  font-size: 0.85rem;
  color: #888;
  margin-top: 1rem;
}

.card-title {
  font-size: 1.3rem; /* DIUBAH: Lebih besar */
  font-weight: 700; /* DIUBAH: Lebih tebal */
  color: #222;
  margin-top: 0.25rem;
  line-height: 1.4;
}

.card-body-text {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.card-media {
  margin-top: 1rem;
}

.card-media img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0; /* Garis lebih samar */
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #f5f5f5; /* DIUBAH: Latar abu-abu muda */
  border: none; /* DIUBAH: Tanpa border */
  padding: 8px 16px;
  border-radius: 999px;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #555;
  cursor: pointer;
}
.action-btn img {
  width: 16px;
  height: 16px;
}

/* =========================================== */
/* GAYA KHUSUS HALAMAN KALKULATOR TANI       */
/* =========================================== */
.calculator-page {
  /* Gradien latar belakang dihapus agar tidak menyatu dengan header */
  background-color: #eaf6f0;
}

/* Style .calculator-page .page-header sudah dihapus 
  sehingga akan menggunakan gaya .page-header standar di atas.
*/

.calculator-menu {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-card-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background-color: var(--white-color);
  border: 1px solid #c9dbd1;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.menu-card-icon {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.menu-card-text {
  flex-grow: 1;
  font-weight: 500;
  font-size: 1rem;
}

.menu-card-arrow {
  font-size: 1.5rem;
  color: var(--subtle-text-color);
}

/* ================================== */
/* GAYA HALAMAN HARGA PASAR           */
/* ================================== */

.page-title-main {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  padding-top: 1rem;
}

/* --- Tab Navigasi --- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 0.8rem;
  font-weight: 500;
  color: var(--subtle-text-color);
  position: relative;
  transition: color 0.2s ease;
}

.tab-item.active {
  color: var(--primary-color);
  font-weight: 600;
}

.tab-item.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

/* --- Search Bar Kustom --- */
.market-search-bar {
  position: relative;
  /* margin-bottom: 2rem; */
  margin-bottom: 0.75rem;
}

.market-search-bar iconify-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--primary-color);
}

.market-search-bar input {
  width: 100%;
  padding: 14px 14px 14px 50px;
  border-radius: 99px; /* Membuatnya bulat penuh */
  border: none;
  font-size: 1rem;
  background-color: var(--secondary-color);
}

.market-search-bar input::placeholder {
  color: var(--primary-color);
  opacity: 0.7;
}

/* --- Kategori Produk --- */
.category-section {
  margin-bottom: 1.5rem;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.category-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.category-header iconify-icon {
  font-size: 1.5rem;
  color: var(--subtle-text-color);
}

.product-scroll-container {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem; /* Ruang untuk scrollbar agar tidak terpotong */
  /* Menyembunyikan scrollbar */
  scrollbar-width: none; /* Firefox */
}

.category-header .see-all-link {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.9rem;
  color: var(--primary-color);
  font-weight: 500;
}

.category-header .see-all-link iconify-icon {
  font-size: 1.5rem;
}

.product-scroll-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.product-card {
  flex: 0 0 150px;
  background-color: var(--white-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
  text-decoration: none;
}

.product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.product-info {
  padding: 0.75rem;
}

.product-name {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 0.25rem;
}

.search-results-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Membuat 2 kolom */
  gap: 1rem; /* Jarak antar kartu */
}

.product-card-wrapper {
  display: flex;
  flex-direction: column;
  background-color: var(--white-color);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.product-card-wrapper .product-card {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  border: none;
  box-shadow: none;
  border-radius: 0;
  flex-basis: auto;
}

.product-card-wrapper .product-card .product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  min-height: 2.7em; /* approx 2 lines */
}

.product-card-wrapper .product-card .product-price {
  margin-top: 0.5rem;
}

/* ================================== */
/* GAYA HALAMAN DALAM (BUDIDAYA, DLL) */
/* ================================== */

/* Background khusus untuk halaman dalam */
.inner-page-bg {
  background-color: var(--background-color);
}

.inner-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.5rem 0 1.5rem; /* Padding disesuaikan */
  color: var(--text-color);
}

.inner-header .back-button {
  font-size: 1.8rem;
  color: var(--text-color);
}

.inner-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Judul Sub di bawah header */
.page-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding: 0 1.5rem; /* Padding agar sejajar dengan konten */
}

.inner-page-bg .main-content {
  padding-top: 1rem;
  /* DIUBAH: Nilai ditambah agar ada ruang untuk FAB */
  padding-bottom: 160px;
}

/* ================================== */
/* GAYA TAB INPUT HARGA               */
/* ================================== */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

/* --- Aturan yang Diubah untuk .section-title --- */
.riwayat-header .section-title {
  margin-bottom: 0; /* Hapus margin bawah agar sejajar */
}

.form-group-input {
  margin-bottom: 2rem;
}

.form-group-input label {
  color: var(--primary-color);
  font-weight: 500;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Custom Dropdown */
.custom-select-wrapper {
  position: relative;
}

.custom-select-wrapper::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 5px;
  transform: translateY(-50%);
  width: 1.5rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23333' d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6l-6-6l1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  pointer-events: none;
}

.custom-select-wrapper select {
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--border-color);
  padding: 0.5rem 0;
  font-size: 1.1rem;
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  background-color: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* Price Slider */
.price-display {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0.5rem 0;
  color: var(--text-color);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  margin-top: 1rem; /* Memberi jarak dari input harga */
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 5px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  cursor: pointer;
  border-radius: 50%;
  border: 4px solid var(--white-color);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: var(--primary-color);
  cursor: pointer;
  border-radius: 50%;
  border: 4px solid var(--white-color);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.btn-simpan {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
}

/* Riwayat Harga */
.riwayat-container {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 4px solid var(--secondary-color);
}

.riwayat-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline; /* DIUBAH: Meluruskan berdasarkan baseline teks */
}

.date-picker-wrapper {
  position: relative;
}

.hidden-date-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0; /* Sembunyikan input tanggal asli */
  cursor: pointer;
}

.date-picker {
  cursor: pointer; /* Menunjukkan elemen bisa diklik */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.riwayat-list {
  margin-top: 1rem;
}

.riwayat-item {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 1rem;
}

.riwayat-price {
  font-weight: 600;
}

.price-input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 0.5rem;
}
.price-input-wrapper:focus-within {
  border-bottom-color: var(--primary-color);
}
.price-prefix {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
  padding-right: 0.5rem;
}
.price-input {
  border: none;
  outline: none;
  background-color: transparent;
  width: 100%;
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

/* ================================== */
/* GAYA HALAMAN DETAIL HARGA          */
/* ================================== */

.detail-card {
  background-color: var(--white-color);
  border-radius: 24px;
  padding: 1.5rem;
  border: 2px solid var(--secondary-color);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
}

.price-overview {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.product-title-detail {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.current-price {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin: 0.25rem 0;
}

.price-change-today {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
}

.price-change-today .today-label {
  font-weight: 400;
  color: var(--subtle-text-color);
  margin-left: 0.25rem;
}

.chart-container {
  margin-top: 1.5rem;
}

.chart-container img {
  width: 100%;
  display: block;
}

/* --- Riwayat Harga --- */
.history-list-detail {
  margin-top: 0.5rem;
}

.history-item-detail {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* 3 kolom */
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.history-item-detail:last-child {
  border-bottom: none;
}

.history-price {
  font-weight: 500;
}

.history-time {
  color: var(--subtle-text-color);
  font-size: 0.9rem;
}

.history-change {
  font-weight: 600;
  text-align: right;
}

/* Mewarnai teks perubahan harga */
.history-item-detail.trend-up .history-change {
  color: var(--trend-up-color);
}
.history-item-detail.trend-down .history-change {
  color: var(--trend-down-color);
}

/* ================================== */
/* MEMBUAT KARTU PRODUK BISA DIKLIK   */
/* ================================== */

a.product-card {
  color: inherit; /* Mewarisi warna teks normal */
  text-decoration: none; /* Menghilangkan garis bawah link */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.product-card:hover {
  transform: translateY(-5px); /* Efek sedikit terangkat saat disentuh */
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ================================== */
/* GAYA FLOATING ACTION BUTTON (FAB)  */
/* ================================== */
.fab {
  position: absolute;
  /* Diberi jarak lebih agar di atas navigasi bawah */
  bottom: 6rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 0.75rem 1.25rem;
  border-radius: 99px; /* Membuatnya berbentuk pil */
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(42, 120, 84, 0.4);
  z-index: 100; /* Memastikan tombol ini di atas konten lain */
  text-decoration: none;
  transition: transform 0.2s ease;
}

.fab:hover {
  transform: scale(1.05);
}

.fab iconify-icon {
  font-size: 1.2rem;
}

/* Gaya untuk Notifikasi Pop-up */
.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.5s ease;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-results,
.no-results-initial {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--subtle-text-color);
  background-color: var(--white-color);
  border-radius: 12px;
}
.no-results iconify-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  color: var(--primary-color);
  opacity: 0.5;
}
.no-results p {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
}
.no-results span {
  font-size: 0.9rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem 1rem;
  background-color: var(--white-color);
}

.action-btn-admin {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
  padding: 0.6rem 0.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.action-btn-admin:hover {
  opacity: 0.8;
}

.action-btn-admin.edit {
  background-color: #e7f3ff;
  color: #155724;
}

.action-btn-admin.delete {
  background-color: #fbe7e7;
  color: #dc3545;
}

/* ================================== */
/* GAYA FORM TAMBAH KOMODITAS         */
/* ================================== */

/* --- Kotak Upload Gambar --- */
.image-upload-box {
  background-color: var(--secondary-color);
  border: 2px dashed var(--primary-color);
  opacity: 0.7;
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.image-upload-box:hover {
  background-color: #cde4d6;
  opacity: 1;
}
.image-upload-box iconify-icon {
  font-size: 3rem;
  color: var(--primary-color);
}
.image-upload-box p {
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 0.5rem;
}
.upload-box-subtitle {
  font-size: 0.8rem;
  color: var(--subtle-text-color);
  margin-top: 0.25rem;
}

/* --- Pratinjau Gambar --- */
.image-preview-container {
  position: relative;
  margin-bottom: 1.5rem;
  text-align: center;
}
#image-preview {
  width: 150px;
  height: 150px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid var(--border-color);
}
.btn-change-image {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.form-group input[type="text"],
.form-group select,
.price-input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  background-color: var(--white-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group input[type="text"]:focus,
.form-group select:focus,
.price-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(42, 120, 84, 0.15);
}

/* --- Kustomisasi Dropdown (Select) --- */
.select-wrapper {
  position: relative;
}
.select-wrapper::after {
  content: "▼";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  font-size: 0.8rem;
  pointer-events: none;
  color: var(--subtle-text-color);
}
.form-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* --- Tombol Submit --- */
.form-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.btn-submit {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  border: none;
  border-radius: 12px;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn-submit:hover {
  background-color: #225e43;
  transform: translateY(-2px);
}

.form-message.error {
  background-color: #fbe7e7;
  color: #dc3545;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.alert {
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 0.5s ease;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.btn-simpan:disabled {
  background-color: #a5d6a7;
  cursor: not-allowed;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- GAYA BARU: BADGE WAKTU UPDATE --- */
.last-update-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  color: var(--subtle-text-color);
  font-size: 0.85rem;
}

.last-update-badge iconify-icon {
  font-size: 1.1rem;
  color: var(--primary-color);
}

.last-update-badge b {
  color: var(--primary-color);
  font-weight: 600;
}

.last-update-badge small {
  font-size: 0.75rem;
  color: #999;
}
