/* ==========================================================================
   RAGUNAN INTEGRATED TICKETING & REVENUE MANAGEMENT SYSTEM
   Clean Green Eco Theme
   ========================================================================== */

:root {
  --ragunan-forest: #052e16;
  --ragunan-dark: #0f3822;
  --ragunan-primary: #15803d;
  --ragunan-primary-hover: #166534;
  --ragunan-primary-light: #16a34a;
  --ragunan-accent: #22c55e;
  --ragunan-mint: #dcfce7;
  --ragunan-bg-light: #f8fafc;
  --ragunan-bg-green: #f0fdf4;
  --ragunan-surface: #ffffff;
  --ragunan-text-main: #0f172a;
  --ragunan-text-muted: #64748b;
  --ragunan-border: #e2e8f0;
  --ragunan-border-green: #bbf7d0;
  --ragunan-radius: 12px;
  --ragunan-radius-sm: 8px;
  --ragunan-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --ragunan-shadow-lg: 0 10px 15px -3px rgba(15, 56, 34, 0.08), 0 4px 6px -4px rgba(15, 56, 34, 0.05);
  --ragunan-shadow-green: 0 10px 20px -5px rgba(22, 163, 74, 0.25);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--ragunan-text-main);
  background-color: var(--ragunan-bg-light);
  line-height: 1.6;
}

/* Navbar */
.navbar-ragunan {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ragunan-border-green);
  box-shadow: 0 2px 10px rgba(5, 46, 22, 0.04);
}

.navbar-brand-ragunan {
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ragunan-dark) !important;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar-brand-ragunan .badge-leaf {
  background: linear-gradient(135deg, var(--ragunan-primary), var(--ragunan-accent));
  color: white;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.85rem;
  box-shadow: var(--ragunan-shadow-green);
}

.nav-link-ragunan {
  color: #334155 !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link-ragunan:hover, .nav-link-ragunan.active {
  color: var(--ragunan-primary) !important;
  background-color: var(--ragunan-bg-green);
}

/* Clean Green Buttons */
.btn-ragunan {
  background: linear-gradient(135deg, var(--ragunan-primary), var(--ragunan-primary-light));
  color: #ffffff;
  border: none;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--ragunan-radius-sm);
  box-shadow: var(--ragunan-shadow-green);
  transition: all 0.25s ease;
}

.btn-ragunan:hover {
  background: linear-gradient(135deg, var(--ragunan-primary-hover), var(--ragunan-primary));
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 12px 20px -6px rgba(22, 163, 74, 0.35);
}

.btn-ragunan-outline {
  background: transparent;
  color: var(--ragunan-primary);
  border: 1.5px solid var(--ragunan-primary);
  font-weight: 600;
  padding: 0.6rem 1.3rem;
  border-radius: var(--ragunan-radius-sm);
  transition: all 0.2s ease;
}

.btn-ragunan-outline:hover {
  background-color: var(--ragunan-bg-green);
  color: var(--ragunan-primary-hover);
  border-color: var(--ragunan-primary-hover);
}

.btn-ragunan-light {
  background-color: var(--ragunan-mint);
  color: var(--ragunan-forest);
  border: 1px solid var(--ragunan-border-green);
  font-weight: 600;
  border-radius: var(--ragunan-radius-sm);
  transition: all 0.2s ease;
}

.btn-ragunan-light:hover {
  background-color: #bbf7d0;
  color: var(--ragunan-forest);
}

/* Clean Cards */
.card-ragunan {
  background: var(--ragunan-surface);
  border: 1px solid var(--ragunan-border);
  border-radius: var(--ragunan-radius);
  box-shadow: var(--ragunan-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.card-ragunan:hover {
  border-color: var(--ragunan-border-green);
  box-shadow: var(--ragunan-shadow-lg);
}

.card-ragunan-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--ragunan-border);
  padding: 1.2rem 1.5rem;
  font-weight: 700;
  color: var(--ragunan-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-hero-green {
  background: linear-gradient(135deg, var(--ragunan-dark) 0%, var(--ragunan-primary) 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 2.5rem 2rem;
  box-shadow: var(--ragunan-shadow-lg);
  position: relative;
  overflow: hidden;
}

.card-hero-green::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
}

/* Badges */
.badge-ragunan {
  background-color: var(--ragunan-bg-green);
  color: var(--ragunan-primary);
  border: 1px solid var(--ragunan-border-green);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
}

.badge-paid {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.badge-pending {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-used {
  background-color: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-failed {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.badge-expired {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

/* POS Layout */
.pos-container {
  min-height: calc(100vh - 70px);
  padding: 1.25rem;
  background-color: #f1f5f9;
}

.pos-product-item {
  cursor: pointer;
  border: 1.5px solid var(--ragunan-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem;
  transition: all 0.2s ease;
  height: 100%;
}

.pos-product-item:hover {
  border-color: var(--ragunan-primary);
  box-shadow: var(--ragunan-shadow-green);
  transform: translateY(-2px);
}

.pos-cart-panel {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--ragunan-border);
  box-shadow: var(--ragunan-shadow-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 100px);
  position: sticky;
  top: 80px;
}

/* Scanner Styles */
.scanner-viewport-box {
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  min-height: 320px;
  border: 3px solid #334155;
}

.scanner-status-card {
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.scanner-status-idle {
  background-color: #f8fafc;
  border: 2px dashed #cbd5e1;
  color: #64748b;
}

.scanner-status-success {
  background-color: #dcfce7;
  border: 2.5px solid #22c55e;
  color: #14532d;
  animation: pulse-green 0.5s ease;
}

.scanner-status-error {
  background-color: #fee2e2;
  border: 2.5px solid #ef4444;
  color: #7f1d1d;
  animation: shake-red 0.5s ease;
}

@keyframes pulse-green {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes shake-red {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Thermal Struk Print Style */
@media print {
  body * {
    visibility: hidden;
  }
  #thermal-receipt-print, #thermal-receipt-print * {
    visibility: visible;
  }
  #thermal-receipt-print {
    position: absolute;
    left: 0;
    top: 0;
    width: 80mm;
    margin: 0;
    padding: 5mm;
    font-size: 12px;
    font-family: 'Courier New', Courier, monospace;
    color: #000000;
  }
  .no-print {
    display: none !important;
  }
}

/* Sidebar Admin */
.admin-sidebar {
  background: #062b16;
  color: #e2e8f0;
  min-height: 100vh;
  box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.admin-sidebar .sidebar-heading {
  color: #86efac;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1rem 1.25rem 0.35rem;
}

.admin-sidebar .nav-link {
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 8px;
  margin: 2px 8px;
  transition: all 0.2s ease;
}

.admin-sidebar .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
}

.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  background-color: rgba(34, 197, 94, 0.2);
  color: #ffffff;
  font-weight: 600;
}

.admin-sidebar .nav-link.active {
  border-left: 3px solid #4ade80;
}

#adminSidebarMenu::-webkit-scrollbar {
  width: 5px;
}
#adminSidebarMenu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
#adminSidebarMenu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
#adminSidebarMenu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Stats Card */
.stat-card-ragunan {
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  background: #ffffff;
  border: 1px solid var(--ragunan-border);
  box-shadow: var(--ragunan-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card-ragunan .stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.stat-icon-green {
  background-color: #dcfce7;
  color: #15803d;
}

.stat-icon-blue {
  background-color: #e0f2fe;
  color: #0284c7;
}

.stat-icon-amber {
  background-color: #fef3c7;
  color: #d97706;
}

.stat-icon-purple {
  background-color: #f3e8ff;
  color: #7e22ce;
}

/* Attraction Wahana Cards */
.card-attraction {
  border-radius: var(--ragunan-radius);
  background: #ffffff;
  border: 1px solid var(--ragunan-border);
  box-shadow: var(--ragunan-shadow);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.card-attraction:hover {
  transform: translateY(-6px);
  box-shadow: var(--ragunan-shadow-lg);
  border-color: var(--ragunan-border-green);
}

.attraction-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.attraction-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-attraction:hover .attraction-img {
  transform: scale(1.08);
}

.attraction-badge-price {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(5, 46, 22, 0.88);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.2);
}

.attraction-badge-time {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--ragunan-forest);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ==========================================================================
   RESPONSIVE LAYOUT & PROPORTIONAL STYLING (MOBILE & LAPTOP)
   ========================================================================== */

/* Mobile & Tablet Drawer (< 992px) */
@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 285px !important;
    height: 100vh !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 1060 !important;
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.5) !important;
  }

  .admin-sidebar.show-mobile {
    transform: translateX(0) !important;
  }

  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 46, 22, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
  }

  .hero-ragunan-section {
    min-height: auto !important;
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .hero-ragunan-section h1 {
    font-size: 2rem !important;
    line-height: 1.25 !important;
  }

  .hero-ragunan-section p.lead {
    font-size: 1rem !important;
  }

  .card-ragunan {
    padding: 1.25rem !important;
    border-radius: 12px !important;
  }
}

/* Desktop & Laptop (>= 992px) */
@media (min-width: 992px) {
  .admin-sidebar {
    position: sticky !important;
    top: 0 !important;
    width: 270px !important;
    height: 100vh !important;
    transform: none !important;
    flex-shrink: 0 !important;
  }

  .sidebar-backdrop {
    display: none !important;
  }
}

/* Small Smartphone (< 576px) adjustments */
@media (max-width: 575.98px) {
  body {
    font-size: 0.9rem;
  }

  .navbar-brand-ragunan {
    font-size: 1.1rem;
  }

  .navbar-brand-ragunan .badge-leaf {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .btn-lg {
    padding: 0.65rem 1.2rem !important;
    font-size: 0.95rem !important;
  }

  .stat-card-ragunan {
    padding: 1rem !important;
  }

  .stat-card-ragunan .stat-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.15rem !important;
  }

  .attraction-img-wrapper {
    height: 170px !important;
  }

  .table th, .table td {
    padding: 0.5rem 0.5rem;
  }
}

/* ==========================================================================
   Quantity Stepper Controls (Pixel-Perfect Centering & No Default Spinners)
   ========================================================================== */
.qty-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.85rem !important;
  line-height: 1 !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
}

.qty-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin: 0 !important;
  padding: 0 !important;
}

.qty-btn:hover {
  transform: scale(1.08);
}

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

.item-qty-input {
  width: 52px !important;
  height: 36px !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 0 !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

.item-qty-input:focus {
  border-color: var(--ragunan-primary) !important;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15) !important;
}

/* Remove default browser spinners on number input */
.item-qty-input::-webkit-outer-spin-button,
.item-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

