/* ==========================================================================
   Samad Motors - Executive Admin & Editorial Suite Stylesheet
   Modern, ultra-clean automotive dealership management cockpit
   ========================================================================== */

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

:root {
  --admin-bg: #09090b;
  --admin-surface: #121215;
  --admin-card: #18181b;
  --admin-border: #27272a;
  --admin-border-subtle: #202023;
  --admin-text-main: #f4f4f5;
  --admin-text-muted: #a1a1aa;
  --admin-text-dim: #71717a;
  --brand-red: #dc2626;
  --brand-red-hover: #b91c1c;
  --brand-red-glow: rgba(220, 38, 38, 0.25);
  --color-green: #10b981;
  --color-amber: #f59e0b;
  --color-blue: #3b82f6;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --font-base: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  font-size: 14px;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
}

body {
  font-family: var(--font-base);
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  line-height: 1.5;
  font-size: 13.5px;
  overflow-x: hidden !important;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
}

/* Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-w);
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  height: var(--topbar-h);
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--admin-border);
}

.sidebar-brand .brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.sidebar-brand .brand-title span {
  color: var(--brand-red);
}

.sidebar-brand .brand-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--admin-text-dim);
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-heading {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--admin-text-dim);
  padding: 0.75rem 0.65rem 0.35rem 0.65rem;
  margin-top: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--admin-text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  color: var(--admin-text-dim);
  transition: color 0.15s ease;
  flex-shrink: 0;
}

.sidebar-link:hover {
  color: #ffffff;
  background: var(--admin-card);
}

.sidebar-link:hover svg {
  color: var(--brand-red);
}

.sidebar-link.active {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.12);
  border-left: 3px solid var(--brand-red);
  font-weight: 600;
}

.sidebar-link.active svg {
  color: var(--brand-red);
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.68rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: var(--admin-border);
  color: #cbd5e1;
  font-weight: 700;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  letter-spacing: 0.02em;
  min-width: 22px;
  box-sizing: border-box;
}

.sidebar-badge.badge-red {
  background: rgba(220, 38, 38, 0.22);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.45);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.2);
}

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--admin-border);
  background: rgba(0, 0, 0, 0.2);
}

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

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--admin-border);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.user-details {
  line-height: 1.2;
  overflow: hidden;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  margin-top: 2px;
}

.role-super {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.role-admin {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Main Content Area */
.admin-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Topbar */
.admin-topbar {
  height: var(--topbar-h);
  background: rgba(18, 18, 21, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border);
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.topbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem;
  color: #ffffff;
  cursor: pointer;
  flex-shrink: 0;
}

.topbar-page-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  line-height: 1.2;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

/* Page Body */
.admin-content {
  padding: 1.75rem;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Page Header Title */
.page-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #ffffff;
  line-height: 1.2;
  margin-top: 0.25rem;
}

/* Common UI Elements */
.admin-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--admin-border);
}

.metric-card.accent-red::after { background: var(--brand-red); }
.metric-card.accent-green::after { background: var(--color-green); }
.metric-card.accent-amber::after { background: var(--color-amber); }
.metric-card.accent-blue::after { background: var(--color-blue); }

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

.metric-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--admin-text-muted);
}

.metric-icon {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--admin-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-main);
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 0.2rem;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--admin-text-dim);
}

/* Tables */
.admin-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
  border: 1px solid var(--admin-border);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
}

.admin-table-wrap::-webkit-scrollbar {
  height: 6px;
}
.admin-table-wrap::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
.admin-table-wrap::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 9999px;
}

.admin-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
}

.admin-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.85rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-text-muted);
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--admin-border-subtle);
  vertical-align: middle;
}

.admin-table th.cell-nowrap,
.admin-table td.cell-nowrap,
.admin-table td.cell-price,
.admin-table td:has(.badge-pill),
.admin-table td:has(.btn-admin) {
  white-space: nowrap;
}

.admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   Badges & Status Indicators - High-End Luxury Cockpit
   ========================================================================== */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.28rem 0.68rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap !important;
  line-height: 1;
  flex-shrink: 0 !important;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  user-select: none;
}

/* Status Dot Indicator with gentle ambient glow */
.badge-in-stock::before,
.badge-sold::before,
.badge-reserved::before,
.badge-coming-soon::before,
.badge-pending::before,
.badge-contacted::before,
.badge-booked::before,
.badge-closed::before {
  content: "";
  display: inline-block;
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 5px currentColor;
  flex-shrink: 0;
}

/* Specific Status Palettes */
.badge-in-stock,
.badge-booked { 
  background: rgba(16, 185, 129, 0.12); 
  color: #34d399; 
  border-color: rgba(16, 185, 129, 0.28); 
}

.badge-sold { 
  background: rgba(239, 68, 68, 0.12); 
  color: #f87171; 
  border-color: rgba(239, 68, 68, 0.28); 
}

.badge-reserved,
.badge-pending { 
  background: rgba(245, 158, 11, 0.12); 
  color: #fbbf24; 
  border-color: rgba(245, 158, 11, 0.28); 
}

.badge-coming-soon,
.badge-contacted { 
  background: rgba(59, 130, 246, 0.12); 
  color: #60a5fa; 
  border-color: rgba(59, 130, 246, 0.28); 
}

.badge-closed { 
  background: rgba(113, 113, 122, 0.14); 
  color: #a1a1aa; 
  border-color: rgba(113, 113, 122, 0.25); 
}

.badge-featured { 
  background: rgba(220, 38, 38, 0.15); 
  color: #f87171; 
  border-color: rgba(220, 38, 38, 0.35); 
}

/* Buttons */
.btn-admin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-admin-primary {
  background: var(--brand-red);
  color: #ffffff;
  border-color: var(--brand-red);
}

.btn-admin-primary:hover {
  background: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
}

.btn-admin-outline {
  background: transparent;
  color: var(--admin-text-main);
  border-color: var(--admin-border);
}

.btn-admin-outline:hover {
  background: var(--admin-card);
  border-color: var(--admin-text-muted);
}

.btn-admin-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-admin-danger:hover {
  background: #dc2626;
  color: #ffffff;
}

.btn-admin-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

.btn-submit-admin {
  padding: 0.65rem 1.6rem;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.edit-action-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  width: 100%;
  box-sizing: border-box;
}

.btn-full-text {
  display: inline;
}

.btn-compact-text {
  display: none;
}

/* Forms */
.form-group-admin {
  margin-bottom: 1.25rem;
}

.form-label-admin {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--admin-text-muted);
  margin-bottom: 0.4rem;
}

.form-control-admin {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--admin-border);
  background: var(--admin-bg);
  color: var(--admin-text-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

select.form-control-admin {
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px 14px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-control-admin:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 2px var(--brand-red-glow);
}

.form-control-admin[readonly], .form-control-admin:disabled {
  background: rgba(0, 0, 0, 0.2);
  color: var(--admin-text-dim);
}

/* Dark Theme Browser Autofill Normalization (Chrome, Edge, Safari, Firefox) */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #18181b inset !important;
  -webkit-text-fill-color: #f4f4f5 !important;
  caret-color: #f4f4f5 !important;
  border-color: #27272a !important;
  transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
  border-color: var(--brand-red) !important;
  box-shadow: 0 0 0 1000px #18181b inset, 0 0 0 2px var(--brand-red-glow) !important;
}

/* Password Field with Show/Hide Toggle */
.password-field-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
}

.password-field-wrapper .form-control-admin {
  padding-right: 2.85rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.password-toggle-btn {
  position: absolute !important;
  right: 0.5rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  color: #a1a1aa !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 32px !important;
  height: 32px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.1s ease !important;
  z-index: 5 !important;
  user-select: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: 1 !important;
}

.password-toggle-btn:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.92) !important;
}

.password-toggle-btn:focus-visible {
  outline: 2px solid var(--brand-red) !important;
  color: #ffffff !important;
}

.password-toggle-btn svg {
  width: 18px !important;
  height: 18px !important;
  pointer-events: none !important;
  stroke: currentColor !important;
}

.password-toggle-btn .icon-eye-show {
  display: block !important;
}

.password-toggle-btn .icon-eye-hide {
  display: none !important;
}

.password-toggle-btn.is-active .icon-eye-show {
  display: none !important;
}

.password-toggle-btn.is-active .icon-eye-hide {
  display: block !important;
}

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

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--admin-text-dim);
  margin-top: 0.35rem;
}

/* Alert Boxes */
.admin-alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

/* Inventory Filter Form */
.inventory-filter-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.inventory-filter-form .filter-item-search {
  flex: 1;
  min-width: 220px;
}

.inventory-filter-form .filter-item-select {
  min-width: 160px;
}

.inventory-filter-form .filter-item-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Grids */
.photo-upload-grid {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1.5rem;
  align-items: start;
}

.users-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

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

/* User Management Component Styling */
.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.user-avatar-super {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.user-avatar-admin {
  background: linear-gradient(135deg, #27272a 0%, #18181b 100%);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1;
}

.role-pill-super {
  background: rgba(220, 38, 38, 0.15);
  color: #f87171;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.role-pill-admin {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.status-pill-active {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-pill-active .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

.badge-current-you {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.70rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  white-space: nowrap;
}

.btn-delete-staff {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: 6px;
  padding: 0.32rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-delete-staff:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

/* Sidebar Backdrop on Mobile */
.admin-sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

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

/* Responsive Dashboard Layout */
.dashboard-tables-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 1.5rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 1200px) {
  .dashboard-tables-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
  }
}

/* Dashboard Quick Actions Bar */
.dashboard-quick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.dashboard-quick-actions-btns {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* Sidebar Close Button */
.sidebar-close-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  color: #ffffff;
  border-color: #3f3f46;
  background: rgba(255, 255, 255, 0.05);
}

/* Responsive View Toggles */
.show-on-mobile {
  display: none !important;
}
.hide-on-mobile {
  display: block !important;
}

/* ==========================================================================
   Mobile Responsive Suite (<= 900px, <= 680px, <= 480px)
   ========================================================================== */
@media (max-width: 900px) {
  .admin-sidebar {
    transform: translateX(-100%);
    box-shadow: 10px 0 35px rgba(0, 0, 0, 0.7);
    z-index: 1000;
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: flex;
  }
  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }
  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .form-grid-2, .form-grid-3,
  .photo-upload-grid,
  .users-management-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 680px) {
  .show-on-mobile {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
  }
  .hide-on-mobile {
    display: none !important;
  }

  /* Responsive Inventory Filter Form */
  .inventory-filter-form {
    display: flex !important;
    gap: 0.65rem !important;
    flex-wrap: wrap !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .inventory-filter-form .filter-item-search {
    flex: 1 1 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }
  .inventory-filter-form .filter-item-select {
    flex: 1 1 calc(50% - 0.35rem) !important;
    min-width: 0 !important;
  }
  .inventory-filter-form .filter-item-actions {
    display: flex !important;
    gap: 0.5rem !important;
    flex: 1 1 100% !important;
    width: 100% !important;
  }
  .inventory-filter-form .filter-item-actions .btn-admin {
    flex: 1 !important;
    justify-content: center !important;
  }

  /* Executive Mobile Card Design */
  .mobile-data-card {
    background: #141417;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden !important;
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  .mobile-data-card:active {
    background: #18181d;
    border-color: #3f3f46;
  }

  .mobile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .mobile-card-visual {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .mobile-card-img {
    width: 58px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--admin-border);
    background: #09090b;
    flex-shrink: 0;
  }

  .mobile-card-meta {
    min-width: 0;
    flex: 1;
    overflow: hidden;
  }

  .mobile-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-card-title a {
    color: inherit;
  }

  .mobile-card-sub {
    font-size: 0.72rem;
    color: var(--admin-text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  /* Single-row Price & Quick Status */
  .mobile-card-price-status-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    padding: 0.4rem 0 !important;
    border-top: 1px solid var(--admin-border-subtle) !important;
    border-bottom: 1px solid var(--admin-border-subtle) !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .mobile-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }

  .mobile-price-ghs {
    font-size: 0.92rem;
    font-weight: 800;
    color: #f4f4f5;
    white-space: nowrap;
    letter-spacing: -0.015em;
  }

  .mobile-price-usd {
    font-size: 0.7rem;
    color: var(--admin-text-dim);
    font-weight: 500;
    white-space: nowrap;
  }

  .mobile-status-select {
    height: 28px !important;
    min-height: 28px !important;
    padding: 0.15rem 1.45rem 0.15rem 0.55rem !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    border: 1px solid var(--admin-border) !important;
    background-color: #18181b !important;
    color: #f4f4f5 !important;
    cursor: pointer !important;
    width: auto !important;
    flex-shrink: 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.45rem center !important;
    background-size: 10px 10px !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
  }
  .mobile-status-select:focus {
    border-color: var(--brand-red) !important;
  }

  /* Dedicated Mobile Badges Row */
  .mobile-card-badges {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .mobile-card-badges .badge-pill {
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.62rem;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    box-sizing: border-box;
  }
  .badge-outline-pill {
    background: #27272a;
    color: #f4f4f5;
    border: 1px solid #3f3f46;
  }

  /* Dedicated Full-Width Action Bar (Zero-Overflow) */
  .mobile-card-actions-bar {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin-top: 0.2rem !important;
  }

  .mobile-action-btn {
    height: 32px !important;
    min-height: 32px !important;
    font-size: 0.74rem !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    padding: 0 0.5rem !important;
  }

  .mobile-action-btn.btn-view {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    background: transparent !important;
    color: var(--admin-text-main) !important;
    border: 1px solid var(--admin-border) !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
  }
  .mobile-action-btn.btn-view:hover, .mobile-action-btn.btn-view:active {
    background: #27272a !important;
    border-color: #3f3f46 !important;
  }

  .mobile-action-btn.btn-edit {
    flex: 1.25 1 0 !important;
    min-width: 0 !important;
    background: var(--brand-red) !important;
    color: #ffffff !important;
    border: 1px solid var(--brand-red) !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }
  .mobile-action-btn.btn-edit:hover, .mobile-action-btn.btn-edit:active {
    background: var(--brand-red-hover) !important;
    border-color: var(--brand-red-hover) !important;
  }

  .mobile-action-btn.btn-delete {
    width: 34px !important;
    min-width: 34px !important;
    flex: 0 0 34px !important;
    padding: 0 !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
  }
  .mobile-action-btn.btn-delete:hover, .mobile-action-btn.btn-delete:active {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
  }

  .mobile-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--admin-border-subtle);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .mobile-card-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    flex-wrap: wrap;
  }

  .mobile-price-ghs {
    font-size: 0.92rem;
    font-weight: 800;
    color: #f4f4f5;
    white-space: nowrap;
    letter-spacing: -0.015em;
  }

  .mobile-price-usd {
    font-size: 0.7rem;
    color: var(--admin-text-dim);
    font-weight: 500;
    white-space: nowrap;
  }

  .mobile-lead-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
  }

  .mobile-lead-info {
    min-width: 0;
    flex: 1;
  }

  .mobile-lead-req {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f4f4f5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-lead-date {
    font-size: 0.68rem;
    color: var(--admin-text-dim);
    margin-top: 1px;
  }

  .btn-wa-chat {
    color: #22c55e !important;
    border-color: rgba(34, 197, 94, 0.35) !important;
    background: rgba(34, 197, 94, 0.08) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem !important;
    padding: 0.35rem 0.65rem !important;
    white-space: nowrap;
  }

  .btn-wa-chat:hover, .btn-wa-chat:active {
    background: rgba(34, 197, 94, 0.18) !important;
  }

  /* Edit / Create Form Footer Actions on Mobile */
  .edit-action-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    margin-bottom: 2rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .edit-action-footer .btn-full-text {
    display: none !important;
  }
  .edit-action-footer .btn-compact-text {
    display: inline !important;
  }
  .edit-action-footer .btn-admin {
    height: 35px !important;
    min-height: 35px !important;
    font-size: 0.74rem !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
  }
  .edit-action-footer .edit-cancel-btn {
    flex: 0 0 auto !important;
    padding: 0.35rem 0.85rem !important;
  }
  .edit-action-footer .edit-submit-btn {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 0.35rem 0.85rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  /* General Button Compact Sizing <= 680px */
  .btn-admin {
    font-size: 0.74rem !important;
    padding: 0.38rem 0.75rem !important;
    min-height: 35px !important;
    height: 35px !important;
    border-radius: 6px !important;
  }
  .btn-admin-primary,
  .btn-submit-admin {
    font-size: 0.75rem !important;
    padding: 0.38rem 0.85rem !important;
    min-height: 35px !important;
    height: 35px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }
  .btn-admin-sm {
    font-size: 0.68rem !important;
    padding: 0.22rem 0.45rem !important;
    min-height: 28px !important;
    height: 28px !important;
    border-radius: 4px !important;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 13px;
  }
  .admin-topbar {
    height: 54px;
    padding: 0 0.85rem;
    gap: 0.5rem;
  }
  .topbar-title-wrap {
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
  }
  .topbar-page-title {
    font-size: 0.92rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }
  .mobile-nav-toggle {
    padding: 0.35rem;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .mobile-nav-toggle svg {
    width: 18px;
    height: 18px;
  }
  .topbar-actions {
    display: none !important;
  }
  .admin-content {
    padding: 0.85rem 0.75rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1rem;
    width: 100%;
    min-width: 0;
  }
  .metric-card {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-sm);
    min-width: 0;
  }
  .metric-header {
    margin-bottom: 0.35rem;
  }
  .metric-label {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    font-weight: 600;
    line-height: 1.25;
  }
  .metric-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    flex-shrink: 0;
  }
  .metric-icon svg {
    width: 12px;
    height: 12px;
  }
  .metric-value {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.15rem;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .metric-sub {
    font-size: 0.65rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-card {
    padding: 0.9rem !important;
    margin-bottom: 0.9rem !important;
    border-radius: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .card-title {
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .card-header-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    margin-bottom: 0.85rem !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .card-header-row .card-title {
    font-size: 0.88rem !important;
    min-width: 0 !important;
  }
  .card-header-row .btn-admin {
    width: auto !important;
    justify-content: center !important;
    font-size: 0.72rem !important;
    padding: 0.32rem 0.65rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }
  .dashboard-quick-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .dashboard-quick-actions-btns {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }
  .dashboard-quick-actions-btns .btn-admin {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.52rem 0.85rem !important;
    font-size: 0.78rem !important;
  }
  .badge-pill {
    font-size: 0.62rem;
    padding: 0.22rem 0.5rem;
  }
  .btn-admin {
    font-size: 0.74rem !important;
    padding: 0.4rem 0.75rem !important;
    min-height: 36px !important;
    border-radius: 6px !important;
  }
  .btn-admin-primary,
  .btn-submit-admin {
    font-size: 0.76rem !important;
    padding: 0.42rem 0.85rem !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .btn-admin-sm {
    font-size: 0.68rem !important;
    padding: 0.25rem 0.5rem !important;
    min-height: 28px !important;
    height: 28px !important;
    border-radius: 4px !important;
  }
  .form-label-admin {
    font-size: 0.66rem !important;
    margin-bottom: 0.25rem !important;
    letter-spacing: 0.05em !important;
  }
  .form-control-admin {
    font-size: 0.78rem !important;
    padding: 0.38rem 0.65rem !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 6px !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
  }
  textarea.form-control-admin {
    height: auto !important;
    min-height: 80px !important;
    padding: 0.5rem 0.65rem !important;
  }
  select.form-control-admin {
    font-size: 0.78rem !important;
    padding: 0.38rem 1.85rem 0.38rem 0.65rem !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 6px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.65rem center !important;
    background-size: 12px 12px !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    text-overflow: ellipsis !important;
    cursor: pointer !important;
  }
  .form-group-admin {
    margin-bottom: 0.75rem !important;
  }
  .password-field-wrapper .form-control-admin {
    padding-right: 2.3rem !important;
  }
  .password-toggle-btn {
    width: 28px !important;
    height: 28px !important;
    right: 4px !important;
  }
  .password-toggle-btn svg {
    width: 15px !important;
    height: 15px !important;
  }
  .page-header-title {
    font-size: 1.05rem;
  }
  .save-settings-btn {
    width: 100% !important;
    justify-content: center !important;
  }
}

@media (max-width: 420px) {
  .topbar-page-title {
    font-size: 0.84rem;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .metric-card {
    padding: 0.75rem 0.85rem;
  }
  .metric-value {
    font-size: 1.25rem;
  }
  .form-label-admin {
    font-size: 0.64rem !important;
    margin-bottom: 0.2rem !important;
  }
  .form-control-admin {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.55rem !important;
    height: 35px !important;
    min-height: 35px !important;
  }
  select.form-control-admin {
    font-size: 0.75rem !important;
    padding: 0.35rem 1.6rem 0.35rem 0.55rem !important;
    height: 35px !important;
    min-height: 35px !important;
    background-position: right 0.5rem center !important;
    background-size: 11px 11px !important;
  }
  .edit-action-footer .btn-admin {
    height: 33px !important;
    min-height: 33px !important;
    font-size: 0.71rem !important;
    padding: 0.3rem 0.65rem !important;
  }
  .btn-admin {
    font-size: 0.71rem !important;
    padding: 0.32rem 0.6rem !important;
    height: 33px !important;
    min-height: 33px !important;
  }
  .btn-admin-primary,
  .btn-submit-admin {
    font-size: 0.72rem !important;
    padding: 0.32rem 0.65rem !important;
    height: 33px !important;
    min-height: 33px !important;
  }
  .form-group-admin {
    margin-bottom: 0.65rem !important;
  }
}
