/* ==========================================================================
   LOVECOM ADMIN PANEL - MODERN TRANSPARENT GLASSMORPHISM THEME
   ========================================================================== */

:root {
  --bg-dark: #0f0f13;
  --bg-glass: rgba(22, 22, 30, 0.65);
  --bg-glass-hover: rgba(30, 30, 42, 0.8);
  --bg-card: rgba(24, 24, 34, 0.6);
  --bg-sidebar: rgba(16, 16, 24, 0.75);
  --bg-input: rgba(12, 12, 18, 0.6);
  
  --pink-primary: #ff2a85;
  --pink-hover: #e01f72;
  --pink-glow: rgba(255, 42, 133, 0.35);
  --pink-subtle: rgba(255, 42, 133, 0.12);
  
  --text-main: #f8f9fa;
  --text-muted: #a0a0b0;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-pink: rgba(255, 42, 133, 0.4);
  
  --glass-blur: blur(16px);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

/* Background & Body Setup */
body {
  background: linear-gradient(rgba(15, 15, 19, 0.82), rgba(15, 15, 19, 0.88)), 
              url('../assets/img/bg-edward.jpeg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 15, 19, 0.5);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--pink-primary);
}

/* Base Wrapper Layout */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   SIDEBAR STYLING
   ========================================================================== */
#sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--border-color);
  min-height: 100vh;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1045;
  display: flex;
  flex-direction: column;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand img {
  max-height: 38px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(255, 42, 133, 0.3));
}

.nav-link-custom {
  color: var(--text-muted);
  padding: 0.7rem 1rem;
  margin: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  font-size: 0.9rem;
}

.nav-link-custom i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  transition: transform 0.2s ease;
}

.nav-link-custom:hover {
  color: #fff;
  background-color: var(--pink-subtle);
  transform: translateX(3px);
}

.nav-link-custom.active {
  color: #fff;
  background: linear-gradient(90deg, var(--pink-subtle) 0%, rgba(255, 42, 133, 0.02) 100%);
  border-left: 3px solid var(--pink-primary);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   MAIN CONTENT & HEADER
   ========================================================================== */
#content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.main-header {
  background: var(--bg-sidebar);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 0.8rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Glassmorphism Cards */
.card-custom {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s ease;
}

.card-custom:hover {
  border-color: var(--border-pink);
  box-shadow: 0 8px 32px 0 rgba(255, 42, 133, 0.15);
}

/* Metric Stats Cards (dashboard.php) */
.stat-card {
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.stat-card .stat-icon {
  position: absolute;
  right: 18px;
  bottom: 15px;
  font-size: 2.75rem;
  color: var(--pink-primary);
  opacity: 0.2;
  transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
  opacity: 0.4;
  transform: scale(1.1) rotate(-5deg);
}

/* ==========================================================================
   BUTTONS & CONTROLS
   ========================================================================== */
.btn-pink {
  background: linear-gradient(135deg, var(--pink-primary) 0%, var(--pink-hover) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  box-shadow: 0 4px 15px var(--pink-glow);
  transition: all 0.3s ease;
}

.btn-pink:hover, .btn-pink:focus {
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 42, 133, 0.5);
  transform: translateY(-1px);
}

.style-pink {
  color: var(--pink-primary) !important;
}

/* Inputs & Forms */
.form-control, .form-select {
  background-color: var(--bg-input) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  backdrop-filter: blur(4px);
  transition: all 0.25s ease;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-control:focus, .form-select:focus {
  border-color: var(--pink-primary) !important;
  box-shadow: 0 0 0 0.25rem var(--pink-glow) !important;
}

.input-group-text {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* ==========================================================================
   TABLES (nota.php, products.php, users.php, etc.)
   ========================================================================== */
.table-responsive {
  border-radius: var(--radius-md);
  overflow: x-auto;
}

.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-main);
  border-color: var(--border-color);
  margin-bottom: 0;
}

.table-dark-custom th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0.75rem;
  background: rgba(0, 0, 0, 0.2);
}

.table-dark-custom td {
  vertical-align: middle;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
}

.table-dark-custom tbody tr {
  transition: background-color 0.2s ease;
}

.table-dark-custom tbody tr:hover {
  background-color: var(--bg-glass-hover);
}

/* ==========================================================================
   MODALS GLASSMORPHISM
   ========================================================================== */
.modal-content {
  background: rgba(20, 20, 28, 0.85) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

.modal-header, .modal-footer {
  border-color: var(--border-color) !important;
}

/* ==========================================================================
   RESPONSIVE & MOBILE FRIENDLY ADJUSTMENTS
   ========================================================================== */

/* Laptop & Desktop Small */
@media (max-width: 1199.98px) {
  .stat-card {
    padding: 1.25rem;
  }
}

/* Tablet & Mobile (Offcanvas / Toggle Sidebar) */
@media (max-width: 991.98px) {
  #sidebar {
    position: fixed;
    top: 0;
    left: -270px;
    height: 100vh;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  #sidebar.show {
    left: 0;
  }
  
  /* Overlay Backdrop ketika sidebar dibuka di mobile */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1040;
    display: none;
  }
  
  .sidebar-backdrop.show {
    display: block;
  }
  
  /* Adjust Spacing di Handphone */
  main {
    padding: 1rem !important;
  }
  
  .card-custom {
    padding: 1rem !important;
    border-radius: var(--radius-md);
  }
  
  /* Force Table Horizontal Scroll yang mulus di Mobile */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
}

/* Small Smartphone Screen */
@media (max-width: 575.98px) {
  .main-header {
    padding: 0.6rem 1rem;
  }
  
  .btn-pink {
    width: 100%;
    justify-content: center;
  }
  
  /* Penyesuaian Pagination Mobile */
  .pagination {
    font-size: 0.8rem;
  }
  
  .pagination .page-link {
    padding: 0.35rem 0.65rem;
  }
}