/* =========================================================
   AMAZZA COFFEE — STYLE MODUL ADMIN v5
   Manajemen Menu, Loyalty (Daily Reward/Reward/Voucher), Notifikasi
   ========================================================= */

.adm-toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  margin-bottom: 1rem;
}
.adm-toolbar .form-control,
.adm-toolbar .form-select { max-width: 220px; }
.adm-count { font-size: .85rem; color: #6b7280; margin-left: auto; }

.adm-list { display: grid; gap: .6rem; }

.adm-card {
  display: flex; gap: .75rem; align-items: flex-start;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: .85rem 1rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.adm-card.off { opacity: .62; background: #fafafa; }
.adm-card-main { flex: 1; min-width: 0; }
.adm-title {
  font-weight: 700; font-size: .98rem; color: #111827;
  display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
}
.adm-sub {
  margin-top: .3rem; font-size: .8rem; color: #6b7280;
  display: flex; flex-wrap: wrap; gap: .75rem;
}
.adm-terms {
  margin-top: .4rem; font-size: .78rem; color: #92400e;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: .35rem .5rem;
}
.adm-actions { display: flex; gap: .35rem; }
.adm-actions .btn { padding: .35rem .55rem; border-radius: 10px; }

.adm-chip {
  font-size: .68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .02em; padding: .15rem .45rem; border-radius: 999px;
  background: #f3f4f6; color: #4b5563;
}
.adm-chip.chip-on { background: #dcfce7; color: #166534; }
.adm-chip.chip-off { background: #fee2e2; color: #991b1b; }
.adm-chip.chip-hot { background: #ffedd5; color: #9a3412; }
.adm-chip.chip-iced { background: #e0f2fe; color: #075985; }
.adm-chip.chip-point { background: #ede9fe; color: #5b21b6; }
.adm-chip.chip-code { background: #111827; color: #fff; font-family: "JetBrains Mono", monospace; }

.adm-empty, .adm-loading {
  text-align: center; color: #9ca3af; padding: 2rem 1rem;
  border: 1px dashed #e5e7eb; border-radius: 14px; background: #fff;
}
.adm-empty i { font-size: 1.6rem; margin-bottom: .5rem; }

/* ---------- Panel & tab ---------- */
.adm-panel {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 16px;
  padding: 1rem 1.1rem; margin-bottom: 1rem;
}
.adm-panel h5 { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }
.adm-panel .adm-panel-sub { font-size: .82rem; color: #6b7280; margin-bottom: .9rem; }

.adm-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.adm-tab {
  border: 1px solid #e5e7eb; background: #fff; border-radius: 999px;
  padding: .45rem .95rem; font-size: .85rem; font-weight: 600; color: #4b5563;
}
.adm-tab.active { background: #111827; color: #fff; border-color: #111827; }

/* ---------- Form ---------- */
.adm-form { text-align: left; font-size: .88rem; }
.adm-form label { display: block; font-weight: 600; font-size: .78rem; color: #374151; margin: .55rem 0 .2rem; }
.adm-input {
  width: 100%; border: 1px solid #d1d5db; border-radius: 10px;
  padding: .5rem .65rem; font-size: .88rem; background: #fff; color: #111827;
}
.adm-input:focus { outline: none; border-color: #111827; box-shadow: 0 0 0 3px rgba(17, 24, 39, .08); }
.adm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem .7rem; }
.adm-note {
  margin-top: .8rem; font-size: .76rem; color: #4b5563;
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 10px; padding: .5rem .65rem;
}

/* ---------- Preview daily reward ---------- */
.dr-preview { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .5rem; }
.dr-day {
  min-width: 74px; text-align: center; border: 1px solid #e5e7eb;
  border-radius: 12px; padding: .45rem .3rem; background: #f9fafb;
}
.dr-day-n { font-size: .7rem; color: #6b7280; }
.dr-day-p { font-weight: 800; color: #5b21b6; }

@media (max-width: 640px) {
  .adm-grid2 { grid-template-columns: 1fr; }
  .adm-card { flex-direction: column; }
  .adm-actions { align-self: flex-end; }
  .adm-toolbar .form-control, .adm-toolbar .form-select { max-width: none; flex: 1 1 45%; }
}

/* =========================================================
   SUBMENU NAVIGASI "MANAJEMEN"
   ========================================================= */
.nav-group { position: relative; }

.nav-group-toggle {
  display: flex !important;
  align-items: center;
  gap: .55rem;
  text-align: left;
}

.nav-group-toggle .nav-caret {
  margin-left: auto;
  font-size: .72rem;
  opacity: .75;
  transition: transform .25s ease;
}

.nav-group-toggle .nav-caret.rotated { transform: rotate(180deg); }
.nav-group-toggle.open { /*background: rgba(200, 161, 101, .18);*/ }

/* Wrapper tunggal supaya animasi buka/tutup benar-benar 0 -> auto */
.nav-submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}

.nav-submenu.open { grid-template-rows: 1fr; }

.nav-submenu .nav-submenu-inner {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding-left: .35rem;
  border-left: 2px solid rgba(255, 255, 255, .14);
  margin-left: .55rem;
}

.nav-submenu.open .nav-submenu-inner { padding-top: .4rem; }

.nav-submenu .nav-sub-item {
  display: flex !important;
  align-items: center;
  gap: .55rem;
  width: 100%;
  margin: 0;
  padding: .5rem .7rem;
  font-size: .9rem;
  text-align: left;
  border: 0;
  border-radius: .55rem;
  opacity: .88;
  transition: background .18s ease, opacity .18s ease;
}

.nav-submenu .nav-sub-item:hover { opacity: 1; background: rgba(255, 255, 255, .08); }
.nav-submenu .nav-sub-item.active {
  opacity: 1;
  /*background: rgba(200, 161, 101, .22);
  box-shadow: inset 3px 0 0 var(--brand, #c8a165);*/
}

/* Kartu statistik gabungan member & transaksi */
.stat-card.stat-5 .stat-value {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.stat-card.stat-5 .stat-sep {
  font-size: .8em;
  opacity: .35;
}

.stat-card.stat-5 .stat-foot { white-space: normal; }

/* QR pada struk (preview layar) */
.receipt-qr { text-align: center; padding: 6px 0 2px; }
.receipt-qr-box { display: flex; justify-content: center; margin-bottom: 6px; }
.receipt-qr-box img, .receipt-qr-box canvas { display: block; }
.receipt-qr-code { font-weight: 700; letter-spacing: .5px; font-size: 12px; }
.receipt-qr-note { font-size: 10px; line-height: 1.35; margin-top: 3px; }

/* Tombol pengaturan urutan tampilan */
.order-btns { display: inline-flex; gap: .25rem; }
.order-btns .btn { padding: .2rem .45rem; line-height: 1; }

/* Netralkan gaya bawaan SweetAlert2 di dalam form admin agar sejajar */
.adm-form .swal2-input,
.adm-form .swal2-textarea,
.adm-form .swal2-select {
  width: 100%;
  margin: 0;
  height: auto;
  font-size: .88rem;
  box-shadow: none;
}
