/* --- Ultra Modern Admin Dashboard CSS --- */

:root {
  --primary-color: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --secondary-color: #ec4899;
  /* Pink 500 */
  --bg-color: #0f172a;
  /* Slate 900 */
  --panel-bg: rgba(30, 41, 59, 0.7);
  /* Slate 800 with opacity */
  --text-active: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */
  --text-dark: #cbd5e1;
  /* Slate 300 */
  --border-color: rgba(255, 255, 255, 0.1);
  --danger-color: #ef4444;
  /* Red 500 */
  --success-color: #10b981;
  /* Emerald 500 */
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-active);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Shapes */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(99, 102, 241, 0) 70%);
  top: -10%;
  left: -10%;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, rgba(236, 72, 153, 0) 70%);
  bottom: 0%;
  right: -5%;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translateY(0) scale(1);
  }

  100% {
    transform: translateY(-50px) scale(1.1);
  }
}

/* Base Glassmorphism Class */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.75rem 1.5rem;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-active);
  padding: 0.75rem 1.5rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-danger-outline {
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
  padding: 0.5rem 1rem;
}

.btn-danger-outline:hover {
  background: var(--danger-color);
  color: white;
}

.icon-btn {
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.icon-btn:hover {
  color: var(--text-active);
  background: rgba(255, 255, 255, 0.1);
}

/* Inputs */
input,
textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-active);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  outline: none;
  transition: var(--transition-fast);
  font-family: inherit;
}

input:focus,
textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
}

.input-wrapper input {
  padding-left: 2.5rem;
}

/* --- Login Section --- */
.login-panel {
  max-width: 420px;
  margin: 10vh auto;
  padding: 3rem 2.5rem;
  position: relative;
  z-index: 10;
  text-align: center;
  animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-header {
  margin-bottom: 2rem;
}

.login-header .logo-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  background: -webkit-linear-gradient(var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

#login-btn {
  width: 100%;
  margin-top: 1rem;
  padding: 1rem;
  font-size: 1rem;
}

/* --- Dashboard Layout --- */
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: 100vh;
  padding: 1.5rem;
  gap: 1.5rem;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  position: sticky;
  top: 1.5rem;
  height: calc(100vh - 3rem);
}

.sidebar-header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-header .logo-icon {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: var(--transition-fast);
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-active);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2), transparent);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-avatar {
  background: var(--primary-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.admin-details {
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.admin-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.search-bar {
  position: relative;
  width: 100%;
  max-width: 350px;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  padding-left: 2.75rem;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 20px;
}

.search-bar input:focus {
  background: rgba(255, 255, 255, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.content-wrapper {
  padding: 1rem 0;
}

.section-title {
  margin-bottom: 2rem;
}

.section-title h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.section-title p {
  color: var(--text-muted);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.product-card {
  background: rgba(30, 41, 59, 0.5);
  border: var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--glass-shadow);
  background: rgba(30, 41, 59, 0.8);
}

.product-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.product-no-img {
  width: 100%;
  height: 150px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.product-info {
  padding: 1rem;
}

.product-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.product-actions button {
  flex: 1;
  padding: 0.5rem;
  font-size: 0.85rem;
}

/* Loader */
.loader-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 4rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 100%;
  max-width: 550px;
  padding: 2rem;
  transform: scale(0.95);
  transition: var(--transition-smooth);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

/* Toasts */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: white;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: slideIn 0.3s ease forwards;
}

.toast.success {
  border-left-color: var(--success-color);
}

.toast.error {
  border-left-color: var(--danger-color);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  position: relative;
  background: rgba(15, 23, 42, 0.4);
}

.upload-zone:hover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.05);
}

/* ===== CRITICAL FIX ===== */
/* File input MUST be completely hidden and off-screen */
.file-input-hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  pointer-events: none !important;
}

.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 1rem;
}

.preview-item {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
}

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-item button {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger-color);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-section {
  transition: var(--transition-fast);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat-card {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-info .stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-info h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.admin-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
}

/* Settings */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.settings-card {
  padding: 1.5rem;
}

.settings-card h4 {
  margin-bottom: 0.5rem;
}

/* Helpers */
.hidden {
  display: none !important;
}

/* ===========================
   ADMIN SKELETON LOADERS
=========================== */
@keyframes adminShimmer {
  0% {
    background-position: -500px 0;
  }

  100% {
    background-position: 500px 0;
  }
}

.skeleton-admin {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 75%);
  background-size: 500px 100%;
  animation: adminShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

.admin-product-skeleton {
  background: var(--panel-bg);
  border: var(--glass-border);
  border-radius: 16px;
  padding: 1rem;
  animation: fadeIn 0.4s ease;
}

.skeleton-admin-img {
  width: 100%;
  height: 160px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.skeleton-admin-line {
  height: 14px;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* ===========================
   MOBILE SIDEBAR OVERLAY
=========================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.open {
  display: block;
}

/* Hamburger toggle button — hidden on desktop */
.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-active);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ===========================
   RESPONSIVE — TABLET (1024px)
=========================== */
@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: 220px 1fr;
    padding: 1rem;
    gap: 1rem;
  }

  .sidebar {
    padding: 1.5rem 1rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  }
}

/* ===========================
   RESPONSIVE — MOBILE (768px)
=========================== */
@media (max-width: 768px) {

  /* Dashboard becomes single column */
  .dashboard {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
    height: auto;
    min-height: 100vh;
  }

  /* Sidebar slides in from left as a drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 100;
    border-radius: 0;
    transition: left 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 1.5rem 1.2rem;
  }

  .sidebar.open {
    left: 0;
  }

  /* Main content takes full width */
  .main-content {
    padding: 0;
  }

  /* Top nav */
  .top-nav {
    border-radius: 0;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }

  /* Show hamburger */
  .sidebar-toggle {
    display: flex;
  }

  /* Compact search bar */
  .search-bar {
    flex: 1;
    min-width: 0;
  }

  .search-bar input {
    font-size: 0.85rem;
  }

  /* Hide "New Product" text label on small screens */
  .btn-label {
    display: none;
  }

  .content-wrapper {
    padding: 1rem;
  }

  /* Products grid — 2 columns on mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  /* Product card adjustments */
  .product-card-admin {
    padding: 0.75rem !important;
  }

  .product-card-admin .card-image {
    height: 120px !important;
  }

  .product-card-admin h4 {
    font-size: 0.8rem !important;
  }

  /* Section title */
  .section-title h3 {
    font-size: 1.2rem;
  }

  /* Stats grid — single column */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  /* Orders table — scrollable */
  .orders-table-container {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 540px;
  }

  /* Settings grid */
  .settings-grid {
    grid-template-columns: 1fr;
  }

  /* Modal full-screen on mobile */
  .modal-content {
    width: 95vw !important;
    max-width: 95vw !important;
    max-height: 90vh;
    overflow-y: auto;
    margin: 5vh auto;
    border-radius: 16px !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* Login panel */
  .login-panel {
    margin: 5vh auto;
    padding: 2rem 1.5rem;
    width: 92vw;
  }

  /* Sidebar skeleton cards */
  .admin-product-skeleton {
    padding: 0.75rem;
  }

  .skeleton-admin-img {
    height: 110px;
  }
}

/* ===========================
   RESPONSIVE — SMALL (480px)
=========================== */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr !important;
  }

  .top-nav {
    padding: 0.6rem 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-info h2 {
    font-size: 1.3rem;
  }
}

/* =========================================
   ENTERPRISE STAFF & INVOICE UI ENHANCEMENTS
   ========================================= */
.staff-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.role-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.status-pill-active {
  color: #34d399;
  font-weight: 600;
  font-size: 0.8rem;
}

.status-pill-inactive {
  color: #f87171;
  font-weight: 600;
  font-size: 0.8rem;
}

.btn-invoice-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.18);
  color: #c7d2fe;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn-invoice-link:hover {
  background: #6366f1;
  color: #ffffff;
}

.input-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.9rem;
}

@media (max-width: 1024px) {
  .staff-layout {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   FULL-WIDTH TOP-NAV ENTERPRISE ADMIN LAYOUT
   ========================================= */
.dashboard-top-layout {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh;
  width: 100%;
}

.dashboard-top-layout.hidden {
  display: none !important;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-radius: 0 !important;
  border-left: none !important;
  border-right: none !important;
  border-top: none !important;
  padding: 0.75rem 1.75rem;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar-row-primary {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.topbar-brand .logo-icon {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  margin: 0;
}

.topbar-brand h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.topbar-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

.topbar-nav {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.45);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-nav::-webkit-scrollbar {
  display: none;
}

.topbar-nav .nav-item {
  padding: 0.5rem 0.9rem !important;
  border-radius: 8px !important;
  font-size: 0.84rem !important;
  white-space: nowrap;
  margin: 0 !important;
}

.topbar-nav .nav-item.active {
  background: var(--primary-color) !important;
  color: #ffffff !important;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.topbar-actions .search-bar {
  width: 210px;
  margin: 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-left: 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar-user .admin-details {
  text-align: right;
  line-height: 1.25;
}

.topbar-user .admin-name {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}

.topbar-user .admin-role {
  display: block;
  font-size: 0.68rem;
  color: #a5b4fc;
  letter-spacing: 0.4px;
}

.main-content-full {
  margin-left: 0 !important;
  width: 100% !important;
  max-width: 1480px;
  margin: 0 auto !important;
  padding: 1.5rem 1.75rem !important;
}

@media (max-width: 1024px) {
  .topbar-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .admin-topbar {
    padding: 0.65rem 1rem;
  }

  .topbar-actions .search-bar {
    display: none;
  }

  .main-content-full {
    padding: 1rem !important;
  }
}

/* =========================================
   STAFF MANAGEMENT FULL-WIDTH DIRECTORY
   ========================================= */
.staff-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.staff-kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 220px));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.staff-kpi-chip {
  padding: 0.9rem 1.15rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.staff-kpi-chip span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.staff-kpi-chip strong {
  font-size: 1.25rem;
  font-weight: 700;
}

.staff-user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.staff-avatar-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.22);
  color: #c7d2fe;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .staff-kpi-strip {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   POS BILLING, REPORTS & LOW STOCK ALERTS
   ========================================= */
.stat-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.low-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.low-stock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.low-stock-card strong {
  font-size: 0.85rem;
  display: block;
}

.low-stock-card small {
  font-size: 0.72rem;
  color: #cbd5e1;
}

.low-stock-qty {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
  white-space: nowrap;
}

.pos-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pos-items-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pos-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.85rem;
}

.pos-total-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.88rem;
}

.pos-total-box > div {
  display: flex;
  justify-content: space-between;
}

.pos-total-box .pos-grand {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  font-size: 1.05rem;
  color: #34d399;
}

.reports-toolbar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.report-select,
.report-search {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
  font-size: 0.85rem;
}

.report-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}
