/* Summit Base - Admin Dashboard & Bookkeeping Stylesheet */

/* ============================================================ */
/* AUTHENTICATION SECURITY CONTROLLER                           */
/* ============================================================ */
body:not(.is-authenticated) #admin-app {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  height: 0 !important;
  overflow: hidden !important;
}

body:not(.is-authenticated) #admin-login {
  display: flex !important;
}

body.is-authenticated #admin-login {
  display: none !important;
}

body.is-authenticated #admin-app {
  display: block !important;
}

@media (min-width: 1024px) {
  body.is-authenticated #admin-app {
    display: flex !important;
  }
}

body {
  background: #090d16;
  color: #0f172a;
}

/* Sidebar Navigation */
.admin-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s ease;
  position: relative;
  text-decoration: none;
}
.admin-nav:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}
.admin-nav.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.1));
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.admin-nav.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background: #10b981;
  border-radius: 0 4px 4px 0;
}

/* Section Tab Controller */
.admin-section {
  display: none;
}
.admin-section.active {
  display: block;
  animation: adminFadeIn 0.22s ease-out;
}
@keyframes adminFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form inputs & labels */
.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.35rem;
}
.form-input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 0.8rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.84rem;
  outline: none;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.icon-btn {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  transition: all 0.18s;
}
.icon-btn:hover {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}
.icon-btn.danger:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

/* Mobile Sidebar Drawer Overlay */
#sidebar-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 1023px) {
  #admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #admin-sidebar.open {
    transform: translateX(0);
  }
}

/* Product & Category Badges */
.type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 0.6rem;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}
.type-badge.is-package {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
}
.type-badge.is-single {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #d1fae5;
}
.type-badge.is-buy {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Mobile Product Cards */
.mobile-product-list { display: none; }
.mobile-product-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  background: #fff;
  padding: 0.95rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.mobile-product-card + .mobile-product-card { margin-top: 0.75rem; }
.mobile-product-top { display: flex; gap: 0.8rem; }
.mobile-product-image {
  width: 76px; height: 76px; flex: 0 0 76px;
  object-fit: cover; border-radius: 1rem;
  border: 1px solid #e2e8f0; background: #f8fafc;
}
.mobile-product-main { flex: 1; min-width: 0; }
.mobile-product-name { font-size: 0.92rem; line-height: 1.25; font-weight: 800; color: #0f172a; }
.mobile-product-desc { margin-top: 0.25rem; font-size: 0.7rem; line-height: 1.4; color: #94a3b8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mobile-status { display: inline-flex; align-items: center; padding: 0.35rem 0.55rem; border-radius: 0.65rem; font-size: 0.65rem; line-height: 1; font-weight: 800; white-space: nowrap; }
.mobile-status.is-active { background: #ecfdf5; color: #047857; }
.mobile-status.is-inactive { background: #f1f5f9; color: #64748b; }
.mobile-product-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 0.85rem; }
.mobile-product-meta > div { background: #f8fafc; border-radius: 0.8rem; padding: 0.65rem 0.7rem; min-width: 0; border: 1px solid #f1f5f9; }
.mobile-product-meta span { display: block; font-size: 0.62rem; color: #94a3b8; margin-bottom: 0.2rem; }
.mobile-product-meta strong { display: block; font-size: 0.72rem; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-product-meta > div:last-child strong { color: #047857; }
.mobile-product-actions { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.mobile-action-btn {
  min-height: 42px; padding: 0.55rem 0.45rem; border-radius: 0.8rem;
  display: flex; align-items: center; justify-content: center; gap: 0.35rem;
  border: 1px solid #e2e8f0; background: #f8fafc; color: #475569;
  font-size: 0.68rem; font-weight: 800;
}
.mobile-action-btn.danger { color: #dc2626; background: #fff7f7; border-color: #fecaca; }

@media (max-width: 767px) {
  .desktop-product-table { display: none; }
  .mobile-product-list { display: block; }
}

/* Category Admin Cards */
.category-manager-form { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.category-icon-input { width: 4rem; text-align: center; font-size: 1.1rem; padding-left: 0.35rem; padding-right: 0.35rem; }
.category-admin-list { margin-top: 0.85rem; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.65rem; }
.category-admin-card { border: 1px solid #e2e8f0; border-radius: 1rem; padding: 0.75rem; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; background: #f8fafc; transition: all 0.2s; }
.category-admin-card:hover { border-color: #cbd5e1; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.category-admin-main { min-width: 0; display: flex; align-items: center; gap: 0.65rem; }
.category-admin-icon { width: 2.4rem; height: 2.4rem; display: flex; align-items: center; justify-content: center; border-radius: 0.75rem; background: white; border: 1px solid #e2e8f0; font-size: 1.15rem; flex: 0 0 2.4rem; }
.category-admin-name { font-size: 0.8rem; font-weight: 800; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-admin-count { margin-top: 0.15rem; font-size: 0.64rem; color: #94a3b8; font-weight: 600; }
.category-admin-actions { display: flex; gap: 0.35rem; flex: 0 0 auto; }
.category-group-select { min-width: 9.5rem; }
.category-group-block + .category-group-block { margin-top: 1.25rem; }
.category-group-heading { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.65rem; }
.category-group-heading > span { width: 2.2rem; height: 2.2rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; background: #f1f5f9; border: 1px solid #e2e8f0; }
.category-group-heading strong { display: block; font-size: 0.84rem; color: #1e293b; }
.category-group-heading small { display: block; margin-top: 0.1rem; font-size: 0.64rem; color: #94a3b8; font-weight: 700; }
.category-group-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.65rem; }
.category-empty { padding: 1rem; border: 1px dashed #cbd5e1; border-radius: 1rem; color: #94a3b8; font-size: 0.72rem; text-align: center; background: #f8fafc; }

@media (max-width: 767px) {
  .category-group-list { grid-template-columns: 1fr; }
  .category-admin-list { grid-template-columns: 1fr; }
}

/* Orders Styling */
.orders-desktop-table table { min-width: 980px; }
.order-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.33rem 0.6rem;
  border-radius: 0.65rem;
  font-size: 0.64rem;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}
.order-status-badge.pending { background: #fffbeb; color: #b45309; border: 1px solid #fef3c7; }
.order-status-badge.ready { background: #ecfeff; color: #0891b2; border: 1px solid #cffafe; }
.order-status-badge.confirmed { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.order-status-badge.active { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.order-status-badge.completed { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.order-status-badge.overdue { background: #fff1f2; color: #be123c; border: 1px solid #ffe4e6; }
.order-status-badge.tolerance { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.order-status-badge.rejected { background: #fef2f2; color: #dc2626; border: 1px solid #fee2e2; }

.order-payment-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.5rem;
  border-radius: 0.55rem;
  font-size: 0.62rem;
  font-weight: 800;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.order-payment-badge.qris { background: #eff6ff; color: #1e40af; border-color: #dbeafe; }
.order-payment-badge.cash { background: #f0fdf4; color: #166534; border-color: #dcfce7; }

.order-time-box {
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.55rem 0.7rem;
  background: #f8fafc;
}
.order-time-box small { display: block; font-size: 0.58rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.order-time-box strong { display: block; font-size: 0.68rem; color: #334155; margin-top: 0.12rem; }
.order-countdown { font-size: 0.64rem; font-weight: 800; color: #047857; margin-top: 0.22rem; }

.order-action-row { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }
.order-action-btn {
  min-height: 32px;
  padding: 0.4rem 0.65rem;
  border-radius: 0.7rem;
  font-size: 0.64rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #e2e8f0;
  transition: all 0.18s;
  cursor: pointer;
}
.order-action-btn.confirm { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.order-action-btn.confirm:hover { background: #d1fae5; color: #065f46; }
.order-action-btn.reject { background: #fff7f7; color: #dc2626; border-color: #fecaca; }
.order-action-btn.reject:hover { background: #fee2e2; }
.order-action-btn.status-btn { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.order-action-btn.status-btn:hover { background: #dbeafe; color: #1e40af; }
.order-action-btn.detail { background: #f8fafc; color: #334155; }
.order-action-btn.detail:hover { background: #f1f5f9; color: #0f172a; }
.order-action-btn.delete { background: #fff1f2; color: #e11d48; border-color: #fecdd3; }
.order-action-btn.delete:hover { background: #ffe4e6; color: #be123c; border-color: #fda4af; }

.orders-mobile-list { display: none; }
.order-mobile-card {
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 0.95rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}
.order-mobile-card + .order-mobile-card { margin-top: 0.75rem; }
.order-mobile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.order-mobile-id { font-size: 0.78rem; font-weight: 900; color: #0f172a; }
.order-mobile-name { margin-top: 0.15rem; font-size: 0.72rem; color: #64748b; }
.order-mobile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; margin-top: 0.75rem; }
.order-mobile-grid > div { min-width: 0; padding: 0.6rem; border-radius: 0.8rem; background: #f8fafc; border: 1px solid #f1f5f9; }
.order-mobile-grid span { display: block; font-size: 0.58rem; color: #94a3b8; margin-bottom: 0.18rem; text-transform: uppercase; font-weight: 700; }
.order-mobile-grid strong { display: block; font-size: 0.68rem; color: #334155; line-height: 1.35; }
.order-mobile-items { margin-top: 0.75rem; padding-top: 0.7rem; border-top: 1px dashed #e2e8f0; }
.order-mobile-items p { margin: 0.15rem 0; font-size: 0.64rem; color: #475569; }
.order-mobile-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }
.order-mobile-actions .order-action-btn { justify-content: center; }

@media (max-width: 767px) {
  .orders-desktop-table { display: none; }
  .orders-mobile-list { display: block; }
}

/* Bookkeeping (Pembukuan) Styles */
.finance-kpi-card {
  position: relative;
  border-radius: 1.25rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.finance-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -3px rgba(0,0,0,0.05);
}

.bookkeep-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.bookkeep-tab-btn.active {
  background: #0f172a;
  color: white;
  box-shadow: 0 4px 12px rgba(15,23,42,0.18);
}
.bookkeep-tab-btn:not(.active) {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.bookkeep-tab-btn:not(.active):hover {
  background: #f1f5f9;
  color: #1e293b;
}

/* Period Filter Mode Tabs */
.period-mode-btn {
  padding: 0.45rem 0.85rem;
  border-radius: 0.7rem;
  font-size: 0.76rem;
  font-weight: 800;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}
.period-mode-btn.active {
  background: #10b981;
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}
.period-mode-btn:not(.active) {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.period-mode-btn:not(.active):hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* Cashflow Visual Chart */
.cashflow-chart-container {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  height: 200px;
  padding: 1.25rem 0.5rem 0.5rem;
  overflow-x: auto;
}
.cashflow-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 52px;
  flex-shrink: 0;
  gap: 0.4rem;
}
.cashflow-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 140px;
  width: 100%;
  justify-content: center;
}
.cashflow-bar {
  width: 16px;
  min-height: 4px;
  border-radius: 4px 4px 0 0;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}
.cashflow-bar.income {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}
.cashflow-bar.expense {
  background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%);
}
.cashflow-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  text-align: center;
  line-height: 1.2;
}

/* Category Expense Badges */
.expense-cat-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 0.6rem;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}
.expense-cat-badge.perawatan { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; }
.expense-cat-badge.restok { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.expense-cat-badge.perbaikan { background: #fae8ff; color: #a21caf; border: 1px solid #f5d0fe; }
.expense-cat-badge.operasional { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.expense-cat-badge.promosi { background: #ecfdf5; color: #047857; border: 1px solid #d1fae5; }
.expense-cat-badge.lainnya { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* Thermal POS Receipt Styles (Standard 58mm POS / Bluetooth Printer) */
.thermal-receipt-paper {
  background: #ffffff;
  color: #0f172a;
  font-family: 'Courier New', Courier, 'Lucida Console', Monaco, monospace;
  width: 275px;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 12px 18px;
  border-radius: 6px;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  line-height: 1.3;
  font-size: 10.5px;
  box-sizing: border-box;
}

.receipt-stamp-logo {
  width: 54px;
  height: 54px;
  border: 1.5px dashed #0f172a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  position: relative;
  background: #ffffff;
}
.receipt-stamp-logo::after {
  content: "";
  position: absolute;
  inset: 2.5px;
  border: 1px solid #0f172a;
  border-radius: 50%;
}

.receipt-dashed-divider {
  border-bottom: 1px dashed #64748b;
  margin: 6px 0;
}

/* Custom print report styles */
@media print {
  /* Mode 1: Printing Thermal Receipt (Standard 58mm POS Roll Centered) */
  @page {
    margin: 0;
    size: auto;
  }

  body.printing-receipt {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body.printing-receipt * {
    visibility: hidden;
  }
  body.printing-receipt #order-detail-modal,
  body.printing-receipt #order-detail-modal *,
  body.printing-receipt .thermal-receipt-paper,
  body.printing-receipt .thermal-receipt-paper * {
    visibility: visible;
    color: #000000 !important;
  }
  body.printing-receipt #order-detail-modal {
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-shadow: none !important;
  }
  body.printing-receipt .modal-dialog-box {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  body.printing-receipt .receipt-modal-header,
  body.printing-receipt .receipt-modal-footer,
  body.printing-receipt .receipt-modal-actions,
  body.printing-receipt .no-print,
  body.printing-receipt button {
    display: none !important;
  }
  body.printing-receipt #modal-order-content {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  body.printing-receipt .thermal-receipt-paper {
    box-shadow: none !important;
    border: none !important;
    width: 54mm !important;
    max-width: 54mm !important;
    margin: 0 auto !important;
    padding: 2mm 1.5mm 4mm 1.5mm !important;
    font-size: 9.5px !important;
    line-height: 1.25 !important;
    color: #000000 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    float: none !important;
  }
  body.printing-receipt .thermal-receipt-paper * {
    color: #000000 !important;
  }
  body.printing-receipt .receipt-stamp-logo {
    width: 46px !important;
    height: 46px !important;
    margin: 0 auto 5px !important;
    border: 1.5px dashed #000000 !important;
  }

  /* Mode 2: Printing Bookkeeping Report (Default when not printing-receipt) */
  body:not(.printing-receipt) {
    background: white !important;
    color: black !important;
  }
  body:not(.printing-receipt) #admin-sidebar,
  body:not(.printing-receipt) header,
  body:not(.printing-receipt) #btn-mobile-menu,
  body:not(.printing-receipt) .no-print,
  body:not(.printing-receipt) #toast,
  body:not(.printing-receipt) .order-action-row,
  body:not(.printing-receipt) #product-modal,
  body:not(.printing-receipt) #expense-modal,
  body:not(.printing-receipt) #order-detail-modal {
    display: none !important;
  }
  body:not(.printing-receipt) #admin-app {
    display: block !important;
  }
  body:not(.printing-receipt) main {
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }
  body:not(.printing-receipt) .admin-section {
    display: none !important;
  }
  body:not(.printing-receipt) #section-pembukuan {
    display: block !important;
  }
  body:not(.printing-receipt) .print-only {
    display: block !important;
  }
  body:not(.printing-receipt) .shadow-sm,
  body:not(.printing-receipt) .shadow-md,
  body:not(.printing-receipt) .shadow-xl,
  body:not(.printing-receipt) .shadow-2xl {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
  body:not(.printing-receipt) .cashflow-chart-container {
    height: 120px !important;
  }
}
.print-only {
  display: none;
}

/* ============================================================ */
/* ANIMATED MODAL & POPUP STYLES                                */
/* ============================================================ */
@keyframes modalPopIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(18px);
  }
  65% {
    transform: scale(1.015) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(8px);
  }
}

.modal-animated-box,
#reject-order-modal > div,
#confirm-order-modal > div,
#custom-confirm-modal > div,
#edit-category-modal > div,
#rental-status-modal > div,
#expense-modal > div,
#product-modal > div,
#order-detail-modal .modal-dialog-box {
  animation: modalPopIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  will-change: transform, opacity;
}

#reject-order-modal,
#confirm-order-modal,
#custom-confirm-modal,
#edit-category-modal,
#rental-status-modal,
#expense-modal,
#product-modal,
#order-detail-modal {
  animation: backdropFadeIn 0.22s ease-out forwards;
}

/* Quick Reject Chips */
.reject-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: left;
  transition: all 0.18s ease;
  cursor: pointer;
  width: 100%;
}
.reject-chip-btn:hover {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #e11d48;
  transform: translateY(-1px);
}
.reject-chip-btn:active {
  transform: scale(0.97);
}

/* Guarantee Pill Badge in Admin */
.guarantee-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 0.5rem;
  font-size: 0.62rem;
  font-weight: 800;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

/* ============================================================ */
/* MOBILE-FIRST UX ENHANCEMENTS (PHONE-OPTIMIZED)               */
/* ============================================================ */

/* Mobile Bottom Navigation Bar */
#admin-mobile-bottom-bar {
  padding-bottom: calc(0.35rem + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-btn {
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-btn:active {
  transform: scale(0.92);
}

.mobile-nav-btn.active,
.mobile-nav-btn.text-emerald-400 {
  color: #34d399 !important;
}

@media (max-width: 1023px) {
  /* Fast touch responsiveness */
  button, a, input, select, textarea {
    touch-action: manipulation;
  }

  /* Smooth momentum scrolling */
  .overflow-x-auto, .overflow-y-auto {
    -webkit-overflow-scrolling: touch;
  }

  /* Mobile cards & tables */
  .order-mobile-card {
    border-radius: 1.25rem !important;
    padding: 1rem !important;
  }

  .finance-kpi-card {
    padding: 0.95rem !important;
    border-radius: 1.25rem !important;
  }

  /* Modals on mobile: safe margins */
  .modal-dialog-box {
    max-height: 90vh !important;
    margin: auto 0.75rem !important;
  }
}


