/* ============================================================
   Kensure Admin Panel – Shared Glassmorphism Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-primary: #0066FF;
  --blue-light:   #00C2FF;
  --blue-pale:    #E0F4FF;
  --blue-dark:    #0a1628;
  --blue-mid:     #0d2847;
  --blue-ocean:   #0a3d62;
  --blue-teal:    #1a6b8a;
  --glass-bg:     rgba(255,255,255,0.13);
  --glass-bg-dark:rgba(10,22,40,0.55);
  --glass-border: rgba(255,255,255,0.28);
  --glass-shadow: 0 8px 32px rgba(0,102,255,0.18);
  --sidebar-w:    260px;
  --radius-lg:    20px;
  --radius-md:    14px;
  --radius-sm:    8px;
  --transition:   0.3s cubic-bezier(0.4,0,0.2,1);
}

html, body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  color: #fff;
}

/* ── Water Background ──────────────────────────────────────── */
.water-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg,
    #0a1628 0%,
    #0d2847 30%,
    #0a3d62 60%,
    #1a6b8a 100%);
  overflow: hidden;
  z-index: -1;
}

.water-bg::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,255,0.18) 0%, transparent 70%);
  filter: blur(60px);
  top: -150px; left: -150px;
  animation: waterFloat 9s ease-in-out infinite alternate;
}
.water-bg::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,102,255,0.15) 0%, transparent 70%);
  filter: blur(70px);
  bottom: -150px; right: -150px;
  animation: waterFloat 11s ease-in-out infinite alternate-reverse;
}

.water-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  animation: waterFloat linear infinite alternate;
  pointer-events: none;
}

@keyframes waterFloat {
  0%   { transform: translate(0,0) scale(1); }
  33%  { transform: translate(40px,-30px) scale(1.08); }
  66%  { transform: translate(-20px,20px) scale(0.96); }
  100% { transform: translate(60px,40px) scale(1.12); }
}

/* Ripple rings on the water surface */
.water-surface {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  overflow: hidden;
}
.water-surface svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  animation: waveSurface 6s linear infinite;
}
.water-surface svg:nth-child(2) { animation-delay: -3s; opacity: 0.5; }

@keyframes waveSurface {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Floating droplets / bubbles */
.droplet {
  position: absolute;
  border-radius: 50%;
  background: rgba(100,200,255,0.35);
  animation: rise linear infinite;
  pointer-events: none;
}

@keyframes rise {
  0%   { bottom: -20px; opacity: 0;   transform: translateX(0) scale(1); }
  20%  { opacity: 0.7; }
  80%  { opacity: 0.4; }
  100% { bottom: 105vh; opacity: 0;   transform: translateX(35px) scale(0.6); }
}

/* ── Glassmorphism Cards ───────────────────────────────────── */
.glass-card {
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
}

.glass-card-dark {
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: rgba(10,22,40,0.6);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

/* ── Glassmorphism Sidebar ─────────────────────────────────── */
.glass-sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  background: rgba(5,15,35,0.75);
  border-right: 1px solid rgba(255,255,255,0.1);
  box-shadow: 4px 0 30px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
}

/* ── Layout Shell ──────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 32px;
  min-height: 100vh;
}

/* ── Sidebar internals ─────────────────────────────────────── */
.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sidebar-logo .logo-text { line-height: 1.2; }
.sidebar-logo .logo-text strong {
  display: block;
  font-size: 16px; font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--blue-light));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-logo .logo-text span {
  font-size: 11px; color: rgba(255,255,255,0.5); font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  margin-bottom: 3px;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: rgba(0,102,255,0.18);
  color: #fff;
  border-color: rgba(0,194,255,0.25);
  box-shadow: 0 0 12px rgba(0,102,255,0.2);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(0,102,255,0.35), rgba(0,194,255,0.18));
  color: #fff;
  border-color: rgba(0,194,255,0.4);
  box-shadow: 0 0 18px rgba(0,102,255,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}
.nav-item .nav-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 17px;
  flex-shrink: 0;
}
.nav-item.active .nav-icon {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  box-shadow: 0 4px 12px rgba(0,102,255,0.45);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ── Top Header Bar ────────────────────────────────────────── */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.page-title {
  font-size: 26px;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--blue-pale));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.user-badge {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 16px;
  border-radius: 40px;
}
.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.user-info { line-height: 1.2; }
.user-info .u-name { font-size: 14px; font-weight: 600; }
.user-info .u-role { font-size: 11px; color: rgba(255,255,255,0.55); }

/* ── Stats Cards ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.stat-card {
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.stat-number {
  font-size: 28px; font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--blue-pale));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 13px; color: rgba(255,255,255,0.55); }
.stat-trend {
  font-size: 12px; display: flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.55);
}
.stat-trend .up   { color: #22d3a5; }
.stat-trend .down { color: #f87171; }

/* ── Chart Containers ──────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
.chart-card { padding: 24px; }
.chart-title {
  font-size: 16px; font-weight: 600;
  margin-bottom: 18px;
  color: rgba(255,255,255,0.92);
}

/* ── Tables ────────────────────────────────────────────────── */
.table-card { padding: 24px; margin-bottom: 24px; }
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.table-title { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.92); }

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.data-table td {
  padding: 13px 14px;
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,0.04); }

/* ── Avatar initials ───────────────────────────────────────── */
.avatar-initials {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .u-email { font-size: 12px; color: rgba(255,255,255,0.45); }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-green  { background: rgba(34,211,165,0.18); color: #22d3a5; border: 1px solid rgba(34,211,165,0.3); }
.badge-yellow { background: rgba(250,200,50,0.18);  color: #fac832; border: 1px solid rgba(250,200,50,0.3); }
.badge-red    { background: rgba(248,113,113,0.18); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }
.badge-blue   { background: rgba(0,194,255,0.18);  color: #00c2ff; border: 1px solid rgba(0,194,255,0.3); }
.badge-gray   { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.15); }
.badge-purple { background: rgba(167,139,250,0.18); color: #a78bfa; border: 1px solid rgba(167,139,250,0.3); }
.badge::before { content: '●'; font-size: 8px; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 9px 20px;
  border: none; border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,102,255,0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,102,255,0.55);
}
.btn-ghost {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  color: #fff;
}
.btn-danger {
  background: rgba(248,113,113,0.18);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
}
.btn-danger:hover { background: rgba(248,113,113,0.3); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ── Form Inputs ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  margin-bottom: 7px;
}
.form-control {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  color: #fff; font-family: 'Inter', sans-serif; font-size: 14px;
  outline: none; transition: all var(--transition);
}
.form-control::placeholder { color: rgba(255,255,255,0.3); }
.form-control:focus {
  border-color: rgba(0,194,255,0.55);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.18);
}
.form-control.error { border-color: #f87171; }
select.form-control option { background: #0d2847; color: #fff; }

/* Password toggle wrapper */
.input-pw-wrap { position: relative; }
.input-pw-wrap .form-control { padding-right: 44px; }
.pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.45); font-size: 16px; padding: 4px;
}
.pw-toggle:hover { color: rgba(255,255,255,0.8); }

/* Search + filter bar */
.toolbar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.toolbar .search-box {
  position: relative; flex: 1; min-width: 220px;
}
.toolbar .search-box input { padding-left: 40px; }
.toolbar .search-box .search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.4); font-size: 15px; pointer-events: none;
}
.filter-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  padding: 9px 16px; font-family: 'Inter', sans-serif;
  font-size: 13px; cursor: pointer; transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(0,102,255,0.25);
  color: #fff; border-color: rgba(0,194,255,0.4);
}

/* ── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  width: 100%; max-width: 520px; max-height: 92vh;
  overflow-y: auto; padding: 32px;
  transform: scale(0.93) translateY(20px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.modal-title { font-size: 18px; font-weight: 700; }
.modal-close {
  background: rgba(255,255,255,0.1); border: none;
  width: 30px; height: 30px; border-radius: 50%;
  color: rgba(255,255,255,0.7); cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: rgba(248,113,113,0.3); color: #f87171; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 6px; margin-top: 18px;
}
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7); cursor: pointer;
  font-size: 13px; font-weight: 500;
  transition: all var(--transition);
}
.page-btn:hover { background: rgba(0,102,255,0.25); color: #fff; }
.page-btn.active {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  color: #fff; border-color: transparent;
}
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: 12px; min-width: 260px; max-width: 360px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  animation: toastIn 0.35s cubic-bezier(0.4,0,0.2,1) forwards;
  font-size: 14px; font-weight: 500; color: #fff;
}
.toast.out { animation: toastOut 0.3s ease forwards; }
.toast-success { background: rgba(22,163,74,0.4); }
.toast-error   { background: rgba(220,38,38,0.4); }
.toast-info    { background: rgba(0,102,255,0.4); }
.toast-icon    { font-size: 18px; flex-shrink: 0; }

@keyframes toastIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}
@keyframes toastOut {
  from { transform: translateX(0);   opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* ── Loading Spinner ───────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
.spinner-lg { width: 40px; height: 40px; border-width: 3px; }

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35); border-radius: inherit; z-index: 10;
}

/* ── Wave Page Transition ──────────────────────────────────── */
.wave-transition {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  clip-path: circle(0% at 50% 50%);
  background: linear-gradient(135deg, #0033cc, #0066FF, #00c2ff);
  transition: clip-path 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.wave-transition.active {
  clip-path: circle(150% at 50% 50%);
}

/* ── Product Grid ──────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.product-card { padding: 0; overflow: hidden; }
.product-img {
  width: 100%; height: 160px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(0,102,255,0.3), rgba(0,194,255,0.2));
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
}
.product-body { padding: 18px 20px; }
.product-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.product-type { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 10px; }
.product-price {
  font-size: 20px; font-weight: 700;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-light));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.product-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ── Settings Sections ─────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-section { padding: 28px; }
.settings-title {
  font-size: 16px; font-weight: 700; margin-bottom: 4px;
}
.settings-subtitle {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 24px;
}
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.toggle-label { font-size: 14px; font-weight: 500; }
.toggle-sublabel { font-size: 12px; color: rgba(255,255,255,0.45); }
.mode-toggle {
  display: flex; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.mode-btn {
  padding: 7px 18px; background: transparent; border: none;
  color: rgba(255,255,255,0.5); cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: 'Inter', sans-serif; transition: all var(--transition);
}
.mode-btn.active {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-light));
  color: #fff;
}

/* ── Error message ─────────────────────────────────────────── */
.form-error {
  font-size: 12px; color: #f87171;
  margin-top: 5px; display: none;
}
.form-error.show { display: block; }
.alert-error {
  background: rgba(248,113,113,0.18); border: 1px solid rgba(248,113,113,0.35);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: #f87171; font-size: 13px; margin-bottom: 16px;
  display: none;
}
.alert-error.show { display: flex; align-items: center; gap: 8px; }

/* ── Responsive ────────────────────────────────────────────── */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  color: #fff; font-size: 22px; padding: 4px;
}

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main-content { margin-left: 0; padding: 16px; }
  .glass-sidebar { transform: translateX(-100%); }
  .glass-sidebar.open { transform: translateX(0); }
  .hamburger { display: flex; }
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55);
    z-index: 99; display: none;
  }
  .sidebar-overlay.show { display: block; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .modal-box { padding: 20px; }
  .top-header { flex-wrap: wrap; gap: 12px; }
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Product Manager & Image Upload Styling ────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}
.product-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 102, 255, 0.25);
  border-color: rgba(0, 194, 255, 0.4);
}
.product-img {
  height: 180px;
  background: radial-gradient(circle at center, rgba(0, 102, 255, 0.15) 0%, rgba(0, 0, 0, 0.2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-img img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.05);
}
.product-img .img-placeholder {
  font-size: 52px;
  opacity: 0.8;
}
.product-img .img-change-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 20px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.85;
}
.product-img:hover .img-change-badge {
  opacity: 1;
  background: var(--blue-primary);
  border-color: var(--blue-light);
  transform: scale(1.05);
}
.product-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.product-type {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 36px;
}
.product-price {
  font-size: 20px;
  font-weight: 800;
  color: #00e5ff;
  margin-bottom: 16px;
}
.product-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

/* ── Image Upload Dropzone ─────────────────────────────────── */
.image-dropzone {
  border: 2px dashed rgba(0, 194, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  background: rgba(0, 102, 255, 0.05);
  position: relative;
}
.image-dropzone:hover, .image-dropzone.dragover {
  border-color: var(--blue-light);
  background: rgba(0, 102, 255, 0.12);
}
.image-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}
.dropzone-preview img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(0,0,0,0.3);
  padding: 4px;
  border: 1px solid rgba(255,255,255,0.15);
}
.dropzone-preview .preview-info {
  flex: 1;
}
.dropzone-preview .preview-name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.dropzone-preview .preview-size {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
}
.dropzone-remove {
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dropzone-remove:hover {
  background: rgba(248, 113, 113, 0.4);
}

/* ============================================================
   WHMCS Classic Human-Made CRM Theme Styles
   ============================================================ */

.whmcs-wrapper {
  color: #1e293b;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Classic Client Header */
.client-profile-header {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.client-profile-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.client-profile-header .subtitle {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

/* Classic WHMCS Horizontal Nav Tabs */
.whmcs-nav-tabs {
  display: flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom: 2px solid #0066cc;
  border-radius: 6px 6px 0 0;
  padding: 6px 6px 0 6px;
  margin-bottom: 0;
  overflow-x: auto;
  white-space: nowrap;
  gap: 4px;
  -webkit-overflow-scrolling: touch;
}
.whmcs-tab-btn {
  background: #0a192f;
  border: 1px solid #1e3a5f;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.whmcs-tab-btn:hover {
  background: #11284a;
  color: #38bdf8;
}
.whmcs-tab-btn.active {
  background: #0f223d;
  color: #ffffff;
  border-color: #2563eb;
  border-top: 3px solid #38bdf8;
  padding-top: 7px;
  font-weight: 700;
}

/* Tab Content Container */
.whmcs-tab-content {
  background: #0f223d;
  border: 1px solid #1e3a5f;
  border-top: none;
  border-radius: 0 0 6px 6px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  color: #f1f5f9;
}

/* 3-Column Box Grid */
.whmcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .whmcs-grid {
    grid-template-columns: 1fr;
  }
}

/* Classic WHMCS Box / Panel */
.whmcs-box,
.whmcs-panel {
  background: #0f223d;
  border: 1px solid #1e3a5f;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.whmcs-box-header {
  background: #0a192f;
  border-bottom: 1px solid #1e3a5f;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.whmcs-box-body {
  padding: 16px;
  font-size: 13.5px;
  color: #cbd5e1;
  flex: 1;
}

/* Field Table inside WHMCS Box */
.whmcs-info-table {
  width: 100%;
  border-collapse: collapse;
}
.whmcs-info-table td {
  padding: 8px 6px;
  font-size: 13px;
  border-bottom: 1px solid #162e50;
}
.whmcs-info-table td.label {
  font-weight: 600;
  color: #94a3b8;
  width: 40%;
}
.whmcs-info-table td.value {
  color: #ffffff;
  font-weight: 500;
}

/* Stats counter in Invoices & Products */
.whmcs-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #162e50;
  font-size: 13px;
}
.whmcs-stat-label {
  font-weight: 500;
  color: #94a3b8;
}
.whmcs-stat-val {
  font-weight: 700;
  color: #ffffff;
}
.whmcs-stat-val.paid { color: #34d399; }
.whmcs-stat-val.unpaid { color: #f87171; }
.whmcs-stat-val.active { color: #38bdf8; }

/* Classic WHMCS Table */
.whmcs-table {
  width: 100%;
  border-collapse: collapse;
  background: #0f223d;
  color: #e2e8f0;
  font-size: 13px;
}
.whmcs-table th {
  background: #0a192f;
  color: #7dd3fc;
  font-weight: 700;
  padding: 12px 14px;
  text-align: left;
  border-bottom: 2px solid #1e3a5f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.whmcs-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #162e50;
  color: #e2e8f0;
  vertical-align: middle;
}
.whmcs-table tr:hover {
  background: #152d4e;
}

/* Classic Solid Buttons */
.btn-whmcs-primary {
  background: #0066cc;
  color: #ffffff !important;
  border: 1px solid #0088ff;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease;
}
.btn-whmcs-primary:hover { background: #0052a3; color: #fff !important; }

.btn-whmcs-success {
  background: #16a34a;
  color: #ffffff !important;
  border: 1px solid #22c55e;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-whmcs-success:hover { background: #15803d; color: #fff !important; }

.btn-whmcs-secondary {
  background: #162e50;
  color: #f1f5f9 !important;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-whmcs-secondary:hover { background: #1e3d6b; border-color: #2563eb; color: #ffffff !important; }

.btn-whmcs-danger {
  background: #dc2626;
  color: #ffffff !important;
  border: 1px solid #ef4444;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-whmcs-danger:hover { background: #b91c1c; color: #fff !important; }

/* Status Badges */
.whmcs-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.whmcs-badge-active { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.whmcs-badge-pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.whmcs-badge-suspended { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.whmcs-badge-closed { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }

/* Clean Classic Form Inputs */
.whmcs-form-group {
  margin-bottom: 14px;
}
.whmcs-form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 5px;
}
.whmcs-form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 13.5px;
  border: 1px solid #1e3a5f;
  border-radius: 6px;
  background: #0a192f;
  color: #ffffff;
  outline: none;
  transition: all 0.15s ease;
}
.whmcs-form-control:focus {
  border-color: #0088ff;
  box-shadow: 0 0 0 2px rgba(0,136,255,0.25);
  background: #0d213d;
}
.whmcs-form-control::placeholder {
  color: #64748b;
}
select.whmcs-form-control option {
  background: #0a192f;
  color: #ffffff;
}

/* ============================================================
   Comprehensive Mobile & Tablet Responsive Architecture
   ============================================================ */

/* Universal Scrollbar for Data Tables & Side Scroll */
.table-responsive-wrapper,
.whmcs-table-responsive,
.table-scroll-container,
.table-card > div[style*="overflow-x"] {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  display: block !important;
  border-radius: 8px;
  background: #0f223d !important;
  border: 1px solid #1e3a5f !important;
  position: relative;
  scrollbar-width: auto !important;
  scrollbar-color: #0088ff #0a192f !important;
}

.table-responsive-wrapper::-webkit-scrollbar,
.whmcs-table-responsive::-webkit-scrollbar,
.table-scroll-container::-webkit-scrollbar,
.table-card > div[style*="overflow-x"]::-webkit-scrollbar {
  height: 10px !important;
  width: 10px !important;
}
.table-responsive-wrapper::-webkit-scrollbar-track,
.whmcs-table-responsive::-webkit-scrollbar-track,
.table-scroll-container::-webkit-scrollbar-track,
.table-card > div[style*="overflow-x"]::-webkit-scrollbar-track {
  background: #0a192f !important;
  border-radius: 5px;
}
.table-responsive-wrapper::-webkit-scrollbar-thumb,
.whmcs-table-responsive::-webkit-scrollbar-thumb,
.table-scroll-container::-webkit-scrollbar-thumb,
.table-card > div[style*="overflow-x"]::-webkit-scrollbar-thumb {
  background: #0088ff !important;
  border-radius: 5px;
}
.table-responsive-wrapper::-webkit-scrollbar-thumb:hover,
.whmcs-table-responsive::-webkit-scrollbar-thumb:hover,
.table-scroll-container::-webkit-scrollbar-thumb:hover,
.table-card > div[style*="overflow-x"]::-webkit-scrollbar-thumb:hover {
  background: #0066cc !important;
}

/* Mobile Scroll Helper Banner */
.mobile-scroll-hint {
  display: none;
  background: #0a192f;
  border: 1px solid #1e3a5f;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 10px 0 6px 0;
  align-items: center;
  gap: 8px;
}
.mobile-scroll-hint span {
  font-size: 15px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .admin-layout {
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    font-size: 24px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
  }

  .glass-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 2000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.6) !important;
  }
  .glass-sidebar.open {
    transform: translateX(0) !important;
  }

  .sidebar-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1999 !important;
    display: none;
  }
  .sidebar-overlay.show {
    display: block !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 12px 14px 60px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
  }
  .top-header > div:last-child {
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }
  .page-title {
    font-size: 20px !important;
  }

  /* All Grids Collapse to 1 Column on Mobile */
  .stats-grid,
  .notif-layout,
  .settings-grid,
  .charts-row,
  .whmcs-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .whmcs-box {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Nav Tabs Horizontal Touch Scroll */
  .whmcs-nav-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    gap: 4px !important;
    scrollbar-width: none !important;
  }
  .whmcs-nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .whmcs-tab-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 10px 14px !important;
    font-size: 13px !important;
  }

  /* Filter Tabs Bar Touch Scroll */
  .filter-tabs-bar {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
  }
  .filter-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* Tables force min-width so horizontal scroll engages cleanly */
  .data-table,
  .whmcs-table {
    min-width: 720px !important;
  }

  /* Mobile scroll hint visible on mobile */
  .mobile-scroll-hint {
    display: flex !important;
  }

  /* Touch-friendly buttons & inputs */
  .btn,
  .btn-whmcs-primary,
  .btn-whmcs-secondary,
  .btn-whmcs-success,
  .btn-whmcs-danger {
    min-height: 40px !important;
    font-size: 13px !important;
  }
  .form-control,
  .whmcs-form-control {
    font-size: 15px !important;
    min-height: 42px !important;
  }
}

