/* ==========================================================================
   ATZ Software — Unified Master CSS Style File
   ========================================================================== */

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

/* ── 1. ROOT DESIGN SYSTEM TOKENS ── */
:root {
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* ═══════════════════════════════════════════════════════════════════════════
     CENTRALIZED ERP BACKGROUND THEME TOKEN (Admin & User Panels)
     Change this single value to instantly update the background of ALL pages!
     ═══════════════════════════════════════════════════════════════════════════ */
  --bg-app: #f8fafc; /* Centralized soft, clean, modern light gray */
  --bg-body: var(--bg-app);
  --bg-surface: #ffffff;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --brand-primary: #d92027;
  --brand-hover: #b5151b;
  --brand-gradient: linear-gradient(135deg, #d92027 0%, #b5151b 100%);
  --brand-light: #fdf2f2;
  --border-divider: #f1f5f9;
  --border-input: #cbd5e1;
  --radius-control: 20px;
  --radius-card: 12px;

  --color-success: #10b981;
  --color-success-bg: #ecfdf5;
  --color-warning: #f59e0b;
  --color-warning-bg: #fffbeb;
  --color-danger: #ef4444;
  --color-danger-bg: #fef2f2;
  --color-info: #3b82f6;
  --color-info-bg: #eff6ff;
  --sidebar-width: 260px;
  --header-height: 64px;
}

/* ── 2. GLOBAL RESET & BASE STYLES ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overscroll-behavior-x: none !important;
  touch-action: pan-y !important;
}


/* ── SESSION TIMEOUT MODAL STYLING (MATCHING EXACT USER REQUIREMENTS) ── */
.session-timeout-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInTimeout 0.25s ease-out;
}

.session-timeout-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 30px;
  /* 30px border-radius as requested */
  padding: 28px 24px 24px 24px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(226, 232, 240, 0.9);
  animation: scaleUpTimeout 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.session-timeout-icon-container {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  /* 18px rounded square badge matching OTP modal */
  background: #fef2f2;
  /* Pastel light red background */
  color: #dc2626;
  /* Deep red icon color */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px auto;
  position: relative;
}


.session-timeout-title {
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  margin-top: 0;
  margin-bottom: 2px;
  /* Minimal tight inter-line spacing */
  line-height: 1.25;
  white-space: nowrap;
  /* Strictly 1 single line */
  max-width: 100%;
}

.session-timeout-subtitle {
  font-size: 13.5px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 18px;
  /* INCREASED 18px SPACING FROM SUBTITLE TO LOGIN BUTTON */
  line-height: 1.25;
  white-space: nowrap;
  /* Strictly 1 single line */
  max-width: 100%;
}

.session-timeout-btn {
  width: 100%;
  max-width: 320px;
  background-color: #d92525;
  color: #ffffff !important;
  border: none;
  border-radius: 50px;
  /* Pill shape button */
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none !important;
  /* SHADOW REMOVED AS REQUESTED */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.session-timeout-btn:hover {
  background-color: #b91c1c;
  transform: translateY(-1px);
  box-shadow: none !important;
}

/* Mobile-Specific Styling (Increased 18px Subtitle-to-Button Spacing) */
@media (max-width: 640px) {
  .session-timeout-modal-overlay {
    align-items: flex-end;
    /* Position towards bottom of screen on mobile with elevated safe-area padding */
    padding-bottom: max(48px, env(safe-area-inset-bottom));
    padding-left: 20px;
    padding-right: 20px;
  }

  .session-timeout-card {
    max-width: 340px;
    width: calc(100% - 16px);
    border-radius: 30px;
    padding: 24px 18px 20px 18px;
    margin-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .session-timeout-icon-container {
    margin-bottom: 8px;
    /* Clean spacing before text */
  }

  .session-timeout-title {
    font-size: 13px !important;
    margin-bottom: 2px !important;
    /* Minimal tight inter-line spacing */
    white-space: nowrap;
    max-width: 100%;
    letter-spacing: -0.015em;
  }

  .session-timeout-subtitle {
    font-size: 13px !important;
    margin-bottom: 18px !important;
    /* INCREASED 18px SPACING BEFORE BUTTON */
    white-space: nowrap;
    max-width: 100%;
    letter-spacing: -0.015em;
  }

  .session-timeout-btn {
    padding: 10px 20px;
    font-size: 13px;
    max-width: 100%;
    box-shadow: none !important;
  }
}

@keyframes fadeInTimeout {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scaleUpTimeout {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

html {
  scroll-behavior: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior-y: auto !important;
}

html,
body {
  width: 100% !important;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  font-family: var(--font-main);
  background-color: var(--bg-app) !important;
  background: var(--bg-app) !important;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.admin-wrapper {
  width: 100% !important;
  min-height: 100vh;
  display: flex;
  overflow-x: hidden !important;
}

.admin-main {
  flex: 1;
  min-width: 0;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  background-color: var(--bg-app) !important;
  background: var(--bg-app) !important;
  min-height: 100vh !important;
  height: auto !important;
  overflow-y: visible !important;
}

/* Global Hidden Scrollbars — Ultra-Smooth Hardware-Accelerated Native Scrolling Across All Pages (Desktop & Mobile) */
*,
*::before,
*::after,
html,
body,
.admin-wrapper,
.admin-main,
.admin-main-content,
.user-sidebar,
.admin-sidebar,
.sidebar-nav,
.user-table-desktop,
.overflow-x-auto,
.overflow-y-auto,
div,
section,
main,
aside,
nav,
article,
table,
tbody {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  -webkit-overflow-scrolling: touch !important;
}

*::-webkit-scrollbar,
*::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-track,
*::-webkit-scrollbar-corner,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.admin-wrapper::-webkit-scrollbar,
.admin-main::-webkit-scrollbar,
.admin-main-content::-webkit-scrollbar,
.user-sidebar::-webkit-scrollbar,
.admin-sidebar::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar,
.user-table-desktop::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar,
.overflow-y-auto::-webkit-scrollbar,
div::-webkit-scrollbar,
section::-webkit-scrollbar,
main::-webkit-scrollbar,
aside::-webkit-scrollbar,
nav::-webkit-scrollbar,
article::-webkit-scrollbar,
table::-webkit-scrollbar,
tbody::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-hover);
}

ul,
ol {
  list-style: none;
}

/* ── 3. REQUIRED STANDARDIZED UI GUIDELINE COMPONENTS ── */
.search-input,
.form-control {
  padding: 10px 16px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 500;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-control);
  background-color: #ffffff;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus,
.form-control:focus {
  border-color: var(--brand-primary);
}

/* ── INPUT GROUP (icon prefix + input) ── */
.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
}

.input-group .input-group-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: #f8fafc;
  border: 1px solid var(--border-input);
  border-right: none;
  border-radius: var(--radius-control) 0 0 var(--radius-control);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
  line-height: 1;
}

.input-group .form-control {
  flex: 1;
  min-width: 0;
  border-radius: 0 var(--radius-control) var(--radius-control) 0 !important;
}

.input-group .form-control:focus {
  border-color: var(--brand-primary);
  z-index: 1;
}

/* ── HIDE NUMBER SPIN ARROWS GLOBALLY (all price/qty fields) ── */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ── PREVENT BROWSER AUTOFILL BACKGROUND & COLOR OVERRIDE ── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #1e293b !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  transition: background-color 50000s ease-in-out 0s, color 50000s ease-in-out 0s !important;
}



.custom-dropdown {
  position: relative;
  flex: 1;
  min-width: 150px;
  font-family: var(--font-main);
}

.custom-dropdown.small-dropdown {
  flex: unset;
  width: 90px;
  min-width: 90px;
}

.dropdown-select-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-control);
  background-color: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: none !important;
  user-select: none;
}

.dropdown-select-box i {
  transition: transform 0.3s ease;
  color: var(--text-muted);
  font-size: 12px;
}

.custom-dropdown.open .dropdown-select-box i {
  transform: rotate(180deg);
}

.dropdown-list-container {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-card);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
  display: none;
  z-index: 100;
  overflow: hidden;
}

.custom-dropdown.open .dropdown-list-container {
  display: block;
}

.admin-main-content,
.user-main-content {
  width: 100% !important;
  flex: 1;
  margin: 0 !important;
  padding: 16px 20px !important;
  box-sizing: border-box !important;
}

@media (max-width: 767.98px) {

  .admin-main-content,
  .user-main-content {
    padding: 12px !important;
  }
}

.dropdown-item {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.2s;
}

.dropdown-item:hover,
.dropdown-item.selected {
  background-color: #f1f5f9;
}

.btn-action-primary {
  background: var(--brand-primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-action-primary:hover {
  background: var(--brand-hover);
  color: #ffffff;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 600;
  border-radius: var(--radius-control);
  border: 1px solid var(--border-input);
  background: #f8fafc;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.2s ease;
}

.file-label:hover {
  background: #e2e8f0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-family: var(--font-main);
  border-radius: 6px;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: none !important;
}

.btn-edit {
  background: #1e40af;
  color: #ffffff;
}

.btn-edit:hover {
  background: #1e3a8a;
  color: #ffffff;
}

.btn-delete {
  background: var(--brand-primary);
  color: #fff;
}

.btn-delete:hover {
  background: var(--brand-hover);
  color: #fff;
}

.table-card,
.user-table-card-wrapper,
.pl-table-card-wrapper {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: visible;
  z-index: 10;
}

@media (max-width: 767.98px) {

  .table-card,
  .user-table-card-wrapper,
  .pl-table-card-wrapper,
  .cb-table-card-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}

.pl-desktop-view,
.user-table-desktop,
.pl-table {
  background: #ffffff !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
  font-family: var(--font-main);
}

th,
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-divider);
  vertical-align: middle;
}

th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:hover {
  background-color: #f8fafc;
}

/* Standardized Desktop Table Cell Typography (Applies strictly to desktop views >= 641px) */
@media (min-width: 641px) {

  .table-card table td,
  .pl-table td,
  .table td {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #334155;
    padding: 14px 20px !important;
    border-bottom: 1px solid #e2e8f0 !important;
  }

  .table-card table th,
  .pl-table th,
  .table th {
    padding: 14px 20px !important;
  }
}

/* Multi-line Truncation Utility (Max 2 lines with ellipsis) */
.line-clamp-2 {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
  line-height: 1.35 !important;
  max-height: 2.7em !important;
}

/* Standardized Action Buttons (Product List Design Standard) */
.btn-action-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-action,
.pl-card-btn {
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  border: none !important;
  background: transparent !important;
  color: #475569 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: all 0.15s ease-in-out !important;
  text-decoration: none !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}

.btn-action:hover,
.pl-card-btn:hover {
  background: #f1f5f9 !important;
  border: none !important;
  box-shadow: none !important;
  color: #0f172a !important;
}

.btn-action-danger,
.pl-card-btn-danger {
  border: none !important;
  color: #dc2626 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.btn-action-danger:hover,
.pl-card-btn-danger:hover {
  background: #fef2f2 !important;
  border: none !important;
  box-shadow: none !important;
  color: #b91c1c !important;
}

.btn-action svg,
.btn-action i,
.pl-card-btn svg,
.pl-card-btn i {
  width: 16px !important;
  height: 16px !important;
  font-size: 15px !important;
  stroke-width: 2 !important;
}

@media (max-width: 767.98px) {
  .btn-action,
  .pl-card-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  .btn-action svg,
  .btn-action i,
  .pl-card-btn svg,
  .pl-card-btn i {
    width: 14px !important;
    height: 14px !important;
    font-size: 14px !important;
  }
}

/* Centralized Show Entries Dropdown (Pops Upward Above Footer & Table) */
.pl-footer-wrap {
  padding: 12px 16px !important;
  background: #ffffff !important;
  border-top: 1px solid #f1f5f9 !important;
  position: relative !important;
  overflow: visible !important;
  z-index: 50 !important;
}

.pl-entries-dropdown {
  position: relative !important;
  display: inline-block !important;
  overflow: visible !important;
  z-index: 100 !important;
}

.pl-entries-btn {
  height: 32px !important;
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  padding: 0 8px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  cursor: pointer !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.15s ease !important;
  box-sizing: border-box !important;
}

.pl-entries-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
}

.pl-entries-dropdown {
  position: relative !important;
  display: inline-block !important;
  width: 56px !important;
}

.pl-entries-menu {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  bottom: auto !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
  padding: 4px !important;
  z-index: 999999 !important;
  display: none;
  box-sizing: border-box !important;
}

.pl-entries-menu.show {
  display: block !important;
}

.pl-entries-option {
  padding: 6px 2px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #334155 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  text-align: center !important;
  transition: background 0.15s !important;
  box-sizing: border-box !important;
}

.pl-entries-option:hover {
  background: #f8fafc !important;
}

.pl-entries-option.active {
  background: #f1f5f9 !important;
  font-weight: 700 !important;
  color: #dc2626 !important;
}

/* Centralized Pagination Controls */
.pl-pagination-btn {
  height: 32px !important;
  padding: 0 10px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  text-decoration: none !important;
}

.pl-pagination-btn:hover:not(:disabled) {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.pl-pagination-btn.active {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 4px 0 rgba(220, 38, 38, 0.25) !important;
}

.pl-pagination-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: #f8fafc !important;
}

/* Universal Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.badge-success,
.badge.paid,
.badge.active {
  background: #e8f5e9;
  color: #2e7d32;
}

.badge-warning,
.badge.pending {
  background: #fff8e1;
  color: #f57f17;
}

.badge-danger,
.badge.failed,
.badge.deactivated,
.badge.blocked {
  background: #fdeded;
  color: #d32f2f;
}

.badge-info {
  background: #e3f2fd;
  color: #0288d1;
}

/* ── 4. APP LAYOUT FRAMEWORK (ADMIN & USER DASHBOARDS) ── */
.admin-body {
  background-color: var(--bg-app) !important;
  background: var(--bg-app) !important;
  min-height: 100vh;
}

.admin-wrapper,
.admin-main,
.admin-main-content {
  background-color: var(--bg-app) !important;
  background: var(--bg-app) !important;
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar Styles */
.admin-sidebar {
  width: var(--sidebar-width);
  background: #1e293b;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: width 0.3s ease, box-shadow 0.3s ease;
  height: 100vh;
  overflow: hidden;
}

.sidebar-header,
.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.brand-icon-wrap,
.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.brand-text {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
}

.nav-list,
.sidebar-nav ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 12px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-link.active {
  background: #dc2626;
  color: #ffffff;
}

.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
}

.submenu-arrow {
  margin-left: auto;
  font-size: 11px;
  transition: transform 0.2s ease;
}

.has-submenu.open .submenu-arrow {
  transform: rotate(90deg);
}

.submenu-list {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
  margin-top: 4px;
}

.has-submenu.open .submenu-list {
  display: flex;
}

.submenu-link {
  font-size: 12px;
  padding: 8px 12px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0f172a;
  flex-shrink: 0;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

body,
html {
  overflow-x: hidden;
}

/* Main Content Wrapper */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  height: auto;
  overflow-y: visible;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  box-sizing: border-box;
  transition: margin-left 0.3s ease, width 0.3s ease, max-width 0.3s ease;
}

/* Header Styles */
.admin-header {
  height: var(--header-height);
  min-height: var(--header-height);
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-divider);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
  z-index: 900;
}

@media (min-width: 769px) {
  .admin-header {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    width: calc(100% - var(--sidebar-width));
    border-bottom: none !important;
    box-shadow: none !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.sidebar-collapsed .admin-header {
    left: 5rem;
    width: calc(100% - 5rem);
    border-bottom: none !important;
    box-shadow: none !important;
  }

  .admin-main {
    padding-top: var(--header-height) !important;
  }
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-sidebar-toggle,
.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.header-sidebar-toggle:hover,
.sidebar-toggle-btn:hover {
  background: #f1f5f9;
  color: var(--brand-primary);
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-profile-menu {
  position: relative;
}

.profile-trigger-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.profile-trigger-btn:hover {
  background: #f1f5f9;
}

.user-avatar-circle {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden !important;
  flex-shrink: 0;
  padding: 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.user-avatar-circle img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: block !important;
}

.user-info-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.user-display-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-role-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-primary);
  letter-spacing: 0.05em;
}

/* User Profile Dropdown Menu Card */
.profile-dropdown-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #ffffff;
  border: 1px solid var(--border-divider);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  z-index: 1500;
  display: none;
}

.profile-dropdown-card.active {
  display: block !important;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

.dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-divider);
  font-size: 13px;
  color: var(--text-primary);
}

.dropdown-links {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.dropdown-links li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s ease;
}

.dropdown-links li a:hover {
  background: #f8fafc;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-divider);
  margin: 6px 0;
}

.admin-page-body,
main.admin-main-content {
  padding: 24px;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

/* View Sections / SPA Panels */
.view-panel,
.view-section {
  display: none;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.view-panel.active,
.view-section.active {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  flex: 1 !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
}

/* ── 5. DASHBOARD & KPI COMPONENTS ── */
.db-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.db-kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-divider);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 92px;
}

.db-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.db-kpi-icon.amber {
  background: #fffbeb;
  color: #d97706;
}

.db-kpi-icon.blue {
  background: #eff6ff;
  color: #2563eb;
}

.db-kpi-icon.accent {
  background: #fdf2f2;
  color: #d92027;
}

.db-kpi-icon.purple {
  background: #f3e8ff;
  color: #9333ea;
}

.db-kpi-icon.green {
  background: #ecfdf5;
  color: #10b981;
}

.db-kpi-info {
  flex: 1;
  min-width: 0;
}

.db-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.db-kpi-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 2px 0 1px;
}

.db-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
}

.db-analytics-row {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
}

.db-card {
  background: #ffffff;
  border: 1px solid var(--border-divider);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  padding: 20px;
}

.db-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-card-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.db-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.db-chart-wrap {
  position: relative;
  height: 250px;
  margin-top: 14px;
}

.db-perf-item {
  background: #f8fafc;
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.db-perf-item:last-child {
  margin-bottom: 0;
}

.db-perf-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
}

.db-perf-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 2px;
}

.db-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ── 6. LOGIN PORTAL STYLES ── */
.login-body {
  background: #f4f6f9;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  width: 100%;
  max-width: 920px;
  padding: 24px 16px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card-wrapper {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.08), 0 10px 15px -3px rgba(0, 0, 0, 0.04);
  display: grid;
  grid-template-columns: 45% 55%;
  overflow: hidden;
  width: 100%;
  border: 1px solid #e2e8f0;
}

/* Left Column: Red Brand Panel */
.login-brand-panel {
  background: #dc2626 !important;
  background-image: none !important;
  color: #ffffff;
  padding: 44px 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.brand-header-top {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo-box {
  width: 36px;
  height: 36px;
  background: #b91c1c;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.brand-title-text {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.1;
}

.brand-portal-sub {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.brand-middle-hero {
  margin: 40px 0;
}

.brand-hero-title {
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.brand-hero-sub {
  font-size: 13.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.5;
}

.brand-footer-copy {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
}

/* Right Column: Login Form Panel */
.login-form-panel {
  padding: 44px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #ffffff;
}

.login-form-header {
  margin-bottom: 24px;
}

.login-form-title {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-form-subtitle {
  font-size: 13px;
  color: #64748b;
  font-weight: 400;
}

.form-group-custom {
  margin-bottom: 16px;
}

.form-label-custom {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.input-wrapper-custom {
  position: relative;
  width: 100%;
}

.input-icon-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
}

.input-icon-suffix {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.input-icon-suffix:hover {
  color: #475569;
}

.form-control-custom {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none !important;
}

.form-control-custom.has-suffix {
  padding-right: 40px;
}

.form-control-custom:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Password Requirements 2x2 Grid Box */
.password-requirements-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 10px;
  margin-bottom: 16px;
}

.req-card-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 10px;
}

.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.req-item-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 500;
  color: #64748b;
}

.req-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.req-item-pill.valid {
  color: #16a34a;
  font-weight: 600;
}

.req-item-pill.valid .req-dot {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}

/* Select Role Pills */
.role-section-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 8px;
}

.role-tabs-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.role-tab-card {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  box-shadow: none !important;
}

.role-tab-card:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.role-tab-card.active {
  border: 1.5px solid #ef4444 !important;
  color: #dc2626 !important;
  background: #ffffff !important;
  font-weight: 700;
}

.role-tab-card i {
  font-size: 14px;
}

/* Role Status Indicator Banner */
.role-status-banner {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #dc2626;
  font-weight: 500;
}

.status-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  flex-shrink: 0;
  display: inline-block;
}

/* Submit Button */
.btn-login-primary {
  width: 100%;
  height: 44px;
  background: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 8px;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: none !important;
}

.btn-login-primary:hover {
  background: #dc2626;
  border-color: #dc2626;
}

@media (max-width: 768px) {
  .login-card-wrapper {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    padding: 32px 24px;
  }

  .login-form-panel {
    padding: 32px 24px;
  }
}

.otp-input-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}

.otp-box {
  width: 45px;
  height: 48px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  outline: none;
}

.otp-box:focus {
  border-color: var(--brand-primary);
}

/* ── 7. MODALS & SIDE DRAWERS ── */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.active {
  display: flex !important;
}

.modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-card.modal-sm {
  max-width: 400px;
}

.modal-card.modal-md {
  max-width: 600px;
}

.modal-card.modal-lg {
  max-width: 850px;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  max-height: calc(85vh - 120px);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* ── 8. ROLE TAB STYLING ── */
.role-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.role-tab-btn {
  flex: 1;
  padding: 10px 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-divider);
  border-radius: var(--radius-control);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.role-tab-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

/* ── 9. OTP INPUT LAYOUT ── */
.otp-inputs {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.otp-inputs .otp-digit {
  width: 40px;
  padding: 8px;
  text-align: center;
  font-size: 18px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-control);
}

/* Prevent timer overflow */
.resend-timer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  word-break: break-word;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Side Drawer */
.side-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 1900;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ── 8. UTILITY CARDS, GRIDS, BUTTONS & BADGES ── */
.card {
  background: #ffffff;
  border: 1px solid var(--border-divider);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-between {
  justify-content: space-between;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: 4px;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.w-100 {
  width: 100%;
}

.w-50 {
  width: 50%;
}

.me-1 {
  margin-right: 4px;
}

.me-2 {
  margin-right: 8px;
}

.mr-2 {
  margin-right: 8px;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 4px !important;
}

.mb-2 {
  margin-bottom: 8px !important;
}

.mb-3 {
  margin-bottom: 12px !important;
}

.mb-4 {
  margin-bottom: 16px !important;
}

.mt-1 {
  margin-top: 4px !important;
}

.mt-2 {
  margin-top: 8px !important;
}

.mt-3 {
  margin-top: 12px !important;
}

.mt-4 {
  margin-top: 16px !important;
}

.p-2 {
  padding: 8px !important;
}

.p-3 {
  padding: 16px !important;
}

.p-4 {
  padding: 24px !important;
}

.py-3 {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.px-3 {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

.text-xs {
  font-size: 11px !important;
}

.text-sm {
  font-size: 13px !important;
}

.text-lg {
  font-size: 16px !important;
}

.text-xl {
  font-size: 20px !important;
}

.text-2xl {
  font-size: 24px !important;
}

.font-bold {
  font-weight: 700 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.font-medium {
  font-weight: 500 !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-primary {
  color: var(--brand-primary) !important;
}

.text-danger {
  color: #ef4444 !important;
}

.text-success {
  color: #10b981 !important;
}

.text-dark {
  color: var(--text-primary) !important;
}

.text-center {
  text-align: center !important;
}

.text-end {
  text-align: right !important;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  text-align: center;
}

.badge-success,
.badge.paid {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-danger,
.badge.failed {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.badge-warning,
.badge.pending {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-info {
  background: var(--color-info-bg);
  color: var(--color-info);
}

.badge-light {
  background: #f1f5f9;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-main);
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
  color: #fff;
}

.btn-secondary {
  background: #64748b;
  color: #fff;
}

.btn-secondary:hover {
  background: #475569;
  color: #fff;
}

.btn-outline-primary {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--brand-primary);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--border-input);
  color: var(--text-muted);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.btn-light {
  background: #f1f5f9;
  color: var(--text-primary);
}

.btn-light:hover {
  background: #e2e8f0;
}

.btn-block {
  width: 100%;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 1600;
  max-height: 220px;
  overflow-y: auto;
}

.search-dropdown-item,
.search-dropdown .search-item {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  border-bottom: 1px solid var(--border-divider);
  transition: background 0.15s ease;
}

.search-dropdown-item:last-child,
.search-dropdown .search-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown .search-item:hover {
  background: var(--brand-light);
  color: var(--brand-primary);
}

/* Modal Form Table Controls */
.table .form-input,
.table .form-control {
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 6px;
  border: 1px solid var(--border-input);
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.table .form-input:focus,
.table .form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(217, 32, 39, 0.1) !important;
}

/* Financial Summary Block in Sale Modal */
.sale-financial-card {
  background: #f8fafc;
  border: 1px solid var(--border-divider);
  border-radius: 10px;
  padding: 16px;
}

.sale-total-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.2;
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-main,
  .admin-main-content {
    margin-left: 0;
    width: 100%;
  }

  .db-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .db-analytics-row,
  .db-tables-row {
    grid-template-columns: 1fr;
  }

  .login-card-wrapper {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    display: none;
  }
}

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

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
  }
}

/* POS & Product Cards Grid */
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
}

.pos-prod-card {
  background: #ffffff;
  border: 1px solid var(--border-divider);
  border-radius: var(--radius-card);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.pos-prod-card:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 6px 16px rgba(217, 32, 39, 0.1);
  transform: translateY(-2px);
}

.pos-prod-img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #f1f5f9;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-primary);
  font-size: 20px;
}

.pos-prod-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.pos-prod-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--brand-primary);
}

.pos-prod-stock {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 2px;
}

/* ── USER DASHBOARD LIGHT SIDEBAR THEME ── */
.user-sidebar {
  background: #ffffff !important;
  border-right: none !important;
  box-shadow: none !important;
}

.user-sidebar .sidebar-brand {
  background: #ffffff;
  border-bottom: none !important;
}

.user-sidebar .brand-text {
  color: #1e293b !important;
}

.user-sidebar .brand-icon-wrap {
  background: var(--brand-primary);
  color: #ffffff;
}

.user-sidebar .nav-section-title {
  color: #94a3b8;
}

.user-sidebar .nav-link {
  color: #475569;
}

.user-sidebar .nav-link .nav-icon {
  color: #64748b;
}

.user-sidebar .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.user-sidebar .nav-link:hover .nav-icon {
  color: var(--brand-primary);
}

.user-sidebar .nav-link.active {
  background: var(--brand-primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  filter: none !important;
  outline: none !important;
  text-shadow: none !important;
}

.user-sidebar .nav-link.active .nav-icon {
  color: #ffffff !important;
}



/* Compact User Sidebar Footer */
.user-sidebar .sidebar-footer {
  padding: 10px 16px !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  flex-shrink: 0;
}

.user-sidebar .sidebar-logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-primary) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.user-sidebar .sidebar-logout-btn:hover {
  background: rgba(217, 32, 39, 0.08) !important;
  color: #b91c1c !important;
}

/* ── MISSING UTILITY CLASSES ─────────────────────────────────────────────── */

/* Hamburger / Sidebar Toggle Button */
.hamburger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.hamburger-btn:hover {
  background: #f1f5f9;
  color: var(--brand-primary);
}

/* Icon Button (bell, etc.) */
.icon-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: var(--brand-primary);
}

/* Page Breadcrumb */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.breadcrumb-sep {
  display: flex;
  align-items: center;
}

.breadcrumb-current {
  font-size: 12px;
  color: var(--text-muted);
}

/* Small extra-small button variant */
.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-xs.btn-outline-primary {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}

.btn-xs.btn-outline-primary:hover {
  background: var(--brand-primary);
  color: #fff;
}

.btn-xs.btn-outline-danger {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background: transparent;
}

.btn-xs.btn-outline-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

/* Inline text button */
.btn-link {
  background: none;
  border: none;
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-main);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

.btn-link:hover {
  color: var(--brand-hover);
}

/* Cash Book Toggle States */
.active-cash-in {
  background: var(--color-success-bg) !important;
  color: var(--color-success) !important;
  border: 1.5px solid var(--color-success) !important;
}

.active-cash-out {
  background: var(--color-danger-bg) !important;
  color: var(--color-danger) !important;
  border: 1.5px solid var(--color-danger) !important;
}

/* Notice badge (small red pill for sidebar/header) */
.notice-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 0 3px;
  margin-left: auto;
}

/* Generic position helper */
.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

/* Form input (for table / toolbar use) */
.form-input {
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-main);
  font-weight: 500;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-control);
  background-color: #ffffff;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(217, 32, 39, 0.08) !important;
}

/* Toolbar wrapper row */
.toolbar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Card title utility */
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Flex display helpers */
.d-flex {
  display: flex !important;
}

.d-block {
  display: block !important;
}

.d-none {
  display: none !important;
}

.align-items-center {
  align-items: center !important;
}

.align-middle {
  vertical-align: middle !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.justify-content-center {
  justify-content: center !important;
}

.text-center {
  text-align: center !important;
}

.text-end {
  text-align: right !important;
}

.text-start {
  text-align: left !important;
}

.w-50 {
  width: 50% !important;
}

.w-100 {
  width: 100% !important;
}

.me-1 {
  margin-right: 4px !important;
}

.me-2 {
  margin-right: 8px !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 4px !important;
}

.mb-2 {
  margin-bottom: 8px !important;
}

.mb-3 {
  margin-bottom: 16px !important;
}

.mt-1 {
  margin-top: 4px !important;
}

.mt-3 {
  margin-top: 16px !important;
}

.ms-1 {
  margin-left: 4px !important;
}

.p-2 {
  padding: 8px !important;
}

.p-3 {
  padding: 16px !important;
}

.py-3 {
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}

.py-4 {
  padding-top: 24px !important;
  padding-bottom: 24px !important;
}

.gap-2 {
  gap: 8px !important;
}

.gap-3 {
  gap: 12px !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-shrink-0 {
  flex-shrink: 0 !important;
}

.uppercase {
  text-transform: uppercase !important;
}

.text-xl {
  font-size: 18px !important;
}

.text-2xl {
  font-size: 22px !important;
}

.text-sm {
  font-size: 12px !important;
}

.text-xs {
  font-size: 11px !important;
}

.text-lg {
  font-size: 16px !important;
}

.font-bold {
  font-weight: 700 !important;
}

.font-semibold {
  font-weight: 600 !important;
}

.font-medium {
  font-weight: 500 !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.text-danger {
  color: var(--brand-primary) !important;
}

.text-dark {
  color: var(--text-primary) !important;
}

.text-success {
  color: var(--color-success) !important;
}

.bg-light {
  background: #f8fafc !important;
}

.bg-light-danger {
  background: #fef2f2 !important;
}

.bg-white {
  background: #ffffff !important;
}

.border {
  border: 1px solid var(--border-divider) !important;
}

.border-bottom {
  border-bottom: 1px solid var(--border-divider) !important;
}

.border-top {
  border-top: 1px solid var(--border-divider) !important;
}

.rounded {
  border-radius: var(--radius-card) !important;
}

.opacity-50 {
  opacity: 0.5 !important;
}

.cursor-pointer {
  cursor: pointer !important;
}

/* Row / Col Bootstrap-like grid */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}

.g-3 {
  gap: 16px;
  margin: 0;
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-12 {
  padding: 0;
  box-sizing: border-box;
}

.col-12 {
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-3 {
    width: 25%;
  }

  .col-md-4 {
    width: 33.333%;
  }

  .col-md-6 {
    width: 50%;
  }
}

/* Card with box shadow */
.card {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-divider);
}

/* Table pagination footer */
.table-pagination-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Pagination controls */
.pagination-controls {
  display: flex;
  gap: 4px;
  align-items: center;
}

.pagination-controls button {
  padding: 5px 10px;
  font-size: 12px;
  font-family: var(--font-main);
  font-weight: 600;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-controls button:hover,
.pagination-controls button.active {
  background: var(--brand-primary);
  color: #ffffff;
  border-color: var(--brand-primary);
}

.pagination-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── MODAL SYSTEM ──────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideIn 0.2s ease;
}

.modal-sm {
  max-width: 420px;
}

.modal-md {
  max-width: 600px;
}

.modal-lg {
  max-width: 800px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-divider);
  flex-shrink: 0;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.modal-close-btn:hover {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-divider);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  background: #fafbfc;
}

/* ── SIDE DRAWER SYSTEM ─────────────────────────────────────────────────────── */

.side-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(1px);
  z-index: 1900;
}

.side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: #ffffff;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: drawerSlideIn 0.25s ease;
}

@keyframes drawerSlideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-divider);
  flex-shrink: 0;
}

.drawer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-divider);
  background: #fafbfc;
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ── FORM LABELS & LAYOUT ───────────────────────────────────────────────────── */

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  font-family: var(--font-main);
}

select.form-control {
  appearance: none;
  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='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 70px;
  border-radius: 10px;
}

/* ── TABLE BORDER VARIANT ───────────────────────────────────────────────────── */

.table-bordered th,
.table-bordered td {
  border: 1px solid #e2e8f0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── INVOICE SETTINGS / VIEW UTILITIES ─────────────────────────────────────── */

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check-input {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--brand-primary);
}

.form-check-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

/* ── ICON-ONLY SIDEBAR COLLAPSE (UNIVERSAL) ── */
.admin-sidebar.collapsed {
  width: 5rem !important;
  transform: translateX(0) !important;
}

body.sidebar-collapsed .admin-sidebar .brand-text,
body.sidebar-collapsed .admin-sidebar .brand-text-wrap,
body.sidebar-collapsed .admin-sidebar .nav-text,
body.sidebar-collapsed .admin-sidebar .nav-section-title,
body.sidebar-collapsed .admin-sidebar .notice-badge,
body.sidebar-collapsed .admin-sidebar .submenu-arrow,
body.sidebar-collapsed .admin-sidebar .submenu-list {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.sidebar-collapsed .admin-sidebar .sidebar-brand {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0 !important;
}

body.sidebar-collapsed .admin-sidebar .sidebar-header {
  padding: 0 !important;
  justify-content: center !important;
  border-bottom: none !important;
  border: none !important;
}

body.sidebar-collapsed .admin-sidebar .nav-link {
  justify-content: center !important;
  align-items: center !important;
  padding: 12px 0 !important;
}

body.sidebar-collapsed .admin-sidebar .nav-icon {
  font-size: 16px !important;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  text-align: center !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.sidebar-collapsed .admin-sidebar .sidebar-footer {
  padding: 16px 0 !important;
  display: flex !important;
  justify-content: center !important;
  overflow: hidden !important;
}

body.sidebar-collapsed .admin-sidebar .sidebar-logout-btn {
  justify-content: center !important;
  padding: 8px !important;
}

/* Base adjustment only triggers if sidebar-collapsed class is present */
body.sidebar-collapsed .admin-main {
  margin-left: 5rem !important;
  width: calc(100% - 5rem) !important;
  max-width: calc(100% - 5rem) !important;
  box-sizing: border-box !important;
}

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

@media (max-width: 900px) {

  /* On mobile, standard behavior: hide completely unless opened */
  .admin-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }

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

  body.sidebar-collapsed .admin-sidebar {
    transform: translateX(-100%) !important;
  }

  .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.sidebar-collapsed .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ── BUTTON GROUP ───────────────────────────────────────────────────────────── */

.btn-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-xs.btn-outline-secondary {
  border-color: var(--border-input);
  color: var(--text-muted);
  background: transparent;
}

.btn-xs.btn-outline-secondary:hover {
  background: #f1f5f9;
  color: var(--text-primary);
}

.btn-xs.disabled,
.btn-xs:disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ── WAREHOUSE POS REDESIGN STYLES ────────────────────────────────────────── */
.store-split-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 991px) {
  .store-split-layout {
    grid-template-columns: 1fr;
  }
}

.store-cart-side .sticky-cart-card {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 2px;
}

.pos-product-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pos-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.pos-product-card .card-img-wrap {
  height: 130px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid #f1f5f9;
}

.pos-product-card .card-img-wrap img {
  max-height: 100%;
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pos-product-card:hover .card-img-wrap img {
  transform: scale(1.04);
}

.pos-product-card .card-stock-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pos-product-card .card-body-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pos-product-card .card-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 34px;
}

.pos-product-card .card-code {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 8px;
}

.pos-product-card .card-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand-primary);
  margin-bottom: 10px;
}

.pos-product-card .qty-action-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.pos-product-card .qty-stepper {
  display: flex;
  align-items: center;
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px;
  border: 1px solid #e2e8f0;
}

.pos-product-card .qty-stepper button {
  width: 24px;
  height: 24px;
  border: none;
  background: #ffffff;
  border-radius: 4px;
  color: #334155;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pos-product-card .qty-stepper button:hover {
  background: #e2e8f0;
  color: var(--brand-primary);
}

.pos-product-card .qty-stepper input {
  width: 38px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 12px;
  color: #0f172a;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

.pos-product-card .qty-stepper input::-webkit-outer-spin-button,
.pos-product-card .qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── COMPREHENSIVE CASH BOOK MODULE STYLES ───────────────────────────────── */

/* Prominent Close (x) Buttons for Modals and Side Panels */
.cb-close-btn {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.cb-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* 44px Standard Action Buttons */
.cb-btn-44 {
  height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  white-space: nowrap;
}

.cb-btn-dark {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.cb-btn-dark:hover {
  background: #0f172a;
  color: #ffffff;
  box-shadow: none !important;
}

.cb-btn-emerald {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.cb-btn-emerald:hover {
  background: #059669;
  color: #ffffff;
  box-shadow: none !important;
}

.cb-btn-rose-subtle {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}

.cb-btn-rose-subtle:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  box-shadow: none !important;
}

.cb-btn-rose {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.cb-btn-rose:hover {
  background: #b91c1c;
  color: #ffffff;
  box-shadow: none !important;
}

/* Custom Floating Dropdowns with 100% Width Matching */
.cb-dropdown-wrap {
  position: relative;
  width: 100%;
}

.cb-dropdown-trigger {
  height: 44px;
  width: 100%;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13px;
  color: #1e293b;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.cb-dropdown-trigger:hover,
.cb-dropdown-wrap.open .cb-dropdown-trigger {
  background: #ffffff;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.cb-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  z-index: 1050;
  display: none !important;
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
}

.cb-dropdown-wrap.open .cb-dropdown-menu {
  display: block !important;
  animation: cbDropdownFadeIn 0.18s ease-out forwards;
}

/* Single-Line Filter Toolbar Layout Rules */
.cb-filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.cb-filter-search {
  flex: 1;
  min-width: 200px;
}

.cb-filter-dropdown {
  width: 170px;
  flex-shrink: 0;
}

.cb-filter-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .cb-filter-row {
    flex-wrap: wrap;
  }

  .cb-filter-search {
    flex: 1 1 100%;
  }

  .cb-filter-dropdown {
    flex: 1;
    min-width: 130px;
  }

  .cb-filter-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .cb-filter-actions .cb-btn-44 {
    flex: 1;
  }
}

@keyframes cbDropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

.cb-dropdown-item {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cb-dropdown-item:hover,
.cb-dropdown-item.active {
  background: #f1f5f9;
  color: #0f172a;
}

/* Metric Cards */
.cb-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.cb-metric-card {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cb-metric-card.cash-in {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.cb-metric-card.cash-out {
  background: #fef2f2;
  border-color: #fecaca;
}

.cb-metric-card.net-balance {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.cb-metric-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cb-metric-card.cash-in .cb-metric-label {
  color: #059669;
}

.cb-metric-card.cash-out .cb-metric-label {
  color: #dc2626;
}

.cb-metric-card.net-balance .cb-metric-label {
  color: #475569;
}

.cb-metric-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.cb-metric-card.cash-in .cb-metric-value {
  color: #059669;
}

.cb-metric-card.cash-out .cb-metric-value {
  color: #dc2626;
}

.cb-metric-card.net-balance .cb-metric-value {
  color: #0f172a;
}

/* Filter & Search Bar */
.cb-filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cb-search-input-wrap {
  position: relative;
  width: 100%;
}

.cb-search-input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.cb-search-input-wrap input {
  height: 44px;
  padding-left: 40px;
  padding-right: 16px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  transition: all 0.2s ease;
}

.cb-search-input-wrap input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* Mobile vs Desktop View Rules */
.cb-desktop-table {
  display: block;
}

.cb-mobile-cards {
  display: none;
}

@media (max-width: 768px) {
  .cb-desktop-table {
    display: none !important;
  }

  .cb-mobile-cards {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }

  .cb-mobile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  }

  .cb-mobile-line-1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
  }

  .cb-mobile-line-2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #64748b;
  }

  .cb-mobile-line-3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    margin-top: 2px;
  }
}

/* Slide-Over Entry Form Drawer */
.cb-drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cb-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cb-drawer {
  position: fixed;
  top: 0;
  right: -500px;
  width: 460px;
  max-width: 92vw;
  height: 100vh;
  background: #ffffff;
  z-index: 2001;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cb-drawer.open {
  right: 0;
}

.cb-drawer-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.cb-drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.cb-drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  gap: 10px;
}

.cb-tab-switcher {
  display: flex;
  background: #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}

.cb-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s ease;
}

.cb-tab.active-in {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.cb-tab.active-out {
  background: #dc2626;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

/* Attachment Thumbnails */
.cb-attach-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}

.cb-attach-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
}

.cb-attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cb-attach-thumb .pdf-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
}

.cb-attach-thumb-delete {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cb-attach-add-btn {
  width: 64px;
  height: 64px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MASTER DATA MODULE — UNIFIED FILTER BAR (Products / Customers / Suppliers)
   Mirrors the Cash Book cb-filter-bar aesthetic for design consistency
   ═══════════════════════════════════════════════════════════════════════════ */

.md-filter-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}


.md-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  flex-wrap: nowrap;
}

/* Icon-prepended search input (expands to fill remaining space) */
.md-search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.md-search-wrap>i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.md-search-wrap>input {
  width: 100%;
  height: 40px;
  padding-left: 38px;
  padding-right: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  background: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
  font-family: Inter, sans-serif;
}

.md-search-wrap>input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.md-search-wrap>input:focus {
  border-color: var(--brand-primary, #2563eb);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Sort / filter native select */
.md-filter-select {
  height: 40px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  background: #f8fafc;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  font-family: Inter, sans-serif;
  flex-shrink: 0;
}

.md-filter-select:focus {
  border-color: var(--brand-primary, #2563eb);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Action buttons group */
.md-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL DESIGN SYSTEM SPECIFICATIONS (USER DASHBOARD)
   Strict User Rules: Solid Red Primary, Flat White Secondary, 44px Uniform Heights,
   No Button Shadows, Neutral Focus Shift, 12px/16px Borders, Mobile Right Alignment
   ═══════════════════════════════════════════════════════════════════════════ */

/* Global Body Theme */
body.admin-body {
  background-color: var(--bg-app) !important;
  background: var(--bg-app) !important;
}

/* Strict Flat Action Buttons System */
.md-btn,
.btn-primary,
.btn-secondary,
.btn-outline-primary,
.btn-outline-secondary,
.btn-danger {
  box-shadow: none !important;
  /* 100% Flat Style — NO BUTTON SHADOWS */
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

/* Default / Standard Action Button Dimensions */
.md-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13.5px;
}

/* Small & Extra-Small Buttons Preserve Compact Dimensions */
.btn-sm {
  height: 36px !important;
  padding: 0 14px !important;
  font-size: 12.5px !important;
  border-radius: 8px !important;
}

.btn-xs {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
}

/* Primary Action / Add / Save / Export / Purchase / Sale Buttons */
.md-btn-primary,
.btn-primary,
.btn-danger {
  background-color: #dc2626 !important;
  /* bg-red-600 */
  color: #ffffff !important;
  border: 1px solid #dc2626 !important;
}

.md-btn-primary:hover,
.btn-primary:hover,
.btn-danger:hover {
  background-color: #b91c1c !important;
  /* hover:bg-red-700 */
  border-color: #b91c1c !important;
  color: #ffffff !important;
}

/* Secondary / Import / Filter / Ghost Buttons */
.md-btn-ghost,
.btn-secondary,
.btn-outline-primary,
.btn-outline-secondary {
  background-color: #ffffff !important;
  /* bg-white */
  color: #334155 !important;
  /* text-slate-700 */
  border: 1px solid #e2e8f0 !important;
  /* border border-slate-200 */
}

.md-btn-ghost:hover,
.btn-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background-color: #f8fafc !important;
  /* hover:bg-slate-50 */
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* Search Input Container & Specific Search Input Styling */
.md-search-wrap {
  position: relative;
  width: 280px;
  max-width: 100%;
}

.md-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  z-index: 2;
}

/* Input Fields & Form Controls */
.form-input,
.form-control {
  height: 44px;
  border-radius: 10px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 0 14px;
  font-size: 13.5px;
  color: #0f172a;
  box-shadow: none !important;
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s ease-in-out;
}

/* ONLY Search Inputs with Icons get 40px Left Padding */
.md-search-input,
.md-search-wrap input {
  padding-left: 40px !important;
}

/* Textareas keep dynamic height */
textarea.form-control,
textarea.form-input {
  height: auto !important;
  min-height: 80px;
  padding: 10px 14px !important;
}

/* Neutral Focus State — NO RED RINGS, NO GLOWING SHADOWS */
.md-search-input:focus,
.form-input:focus,
.form-control:focus,
.md-filter-select:focus {
  border-color: #94a3b8 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Dropdown Filters */
.md-filter-select {
  height: 44px;
  width: 160px;
  min-width: 160px;
  border-radius: 12px;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13.5px;
  font-weight: 500;
  padding: 0 36px 0 14px;
  box-shadow: none !important;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='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 12px center;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

/* Data Tables Styling */
.card-table-wrap,
.table-responsive {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: none !important;
}

.table thead th {
  background-color: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.table tbody td {
  padding: 12px 14px;
  font-size: 13px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

/* Status Badges System */
.badge-status {
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  line-height: 1.4;
}

.badge-status-emerald,
.badge-status.emerald,
.badge-success {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-status-emerald svg,
.badge-status-emerald i,
.badge-status.emerald svg,
.badge-status.emerald i {
  color: #059669;
}

.badge-status-amber,
.badge-status.amber,
.badge-warning {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-status-amber svg,
.badge-status-amber i,
.badge-status.amber svg,
.badge-status.amber i {
  color: #d97706;
}

.badge-status-red,
.badge-status.red,
.badge-danger,
.badge-status-danger {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-status-red svg,
.badge-status-red i,
.badge-status.red svg,
.badge-status.red i {
  color: #dc2626;
}

.badge-status-slate,
.badge-status.slate,
.badge-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-status-slate svg,
.badge-status-slate i,
.badge-status.slate svg,
.badge-status.slate i {
  color: #64748b;
}

/* Side-by-side Table Action Buttons */
.table-actions-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  color: #475569 !important;
  background: transparent !important;
  border: none !important;
  transition: all 0.15s ease !important;
  cursor: pointer !important;
  font-size: 13px !important;
  padding: 0 !important;
}

.btn-action-edit:hover {
  color: #2563eb !important;
  background-color: #f1f5f9 !important;
}

.btn-action-print:hover {
  color: #4f46e5 !important;
  background-color: #f1f5f9 !important;
}

.btn-action-delete:hover {
  color: #dc2626 !important;
  background-color: #fef2f2 !important;
}

/* Mobile Responsive Adjustments (< 768px) */
@media (max-width: 768px) {
  .md-filter-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .md-search-wrap {
    max-width: 100% !important;
  }

  .d-flex.ms-auto {
    margin-left: 0 !important;
    justify-content: flex-end !important;
    width: 100% !important;
  }

  .responsive-table-mobile-cards table {
    display: none !important;
  }

  .responsive-table-mobile-cards .mobile-card-item {
    display: block !important;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: none !important;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   "Add New Product" Pop-up Modal Styling
   ────────────────────────────────────────────────────────────────────────── */
#userProductModal .modal-card {
  max-width: 680px;
  width: 95%;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden;
  margin: auto;
}

#userProductModal .modal-header {
  padding: 20px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#userProductModal .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

#userProductModal .modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0 0;
  font-weight: 400;
}

#userProductModal .modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin: -4px -4px 0 0;
  transition: color 0.15s ease;
}

#userProductModal .modal-close-btn:hover {
  color: #0f172a;
}

#userProductModal .modal-body {
  padding: 24px;
  background: #ffffff;
}

#userProductModal .pm-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

#userProductModal .pm-form-row:last-child {
  margin-bottom: 0;
}

#userProductModal .pm-col-6 {
  flex: 1 1 calc(50% - 8px);
  min-width: 200px;
}

#userProductModal .pm-col-4 {
  flex: 1 1 calc(33.333% - 11px);
  min-width: 140px;
}

#userProductModal .pm-col-12 {
  flex: 1 1 100%;
  width: 100%;
}

#userProductModal .pm-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

#userProductModal .pm-input,
#userProductModal .pm-textarea {
  width: 100%;
  padding: 10px 14px;
  height: 44px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease-in-out;
  box-sizing: border-box;
}

#userProductModal .pm-textarea {
  height: auto;
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

#userProductModal .pm-input::placeholder,
#userProductModal .pm-textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

#userProductModal .pm-input:focus,
#userProductModal .pm-textarea:focus {
  border-color: #94a3b8 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Remove number spin arrows */
#userProductModal input[type=number]::-webkit-inner-spin-button,
#userProductModal input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#userProductModal input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

#userProductModal .modal-footer {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#userProductModal .btn-pm-cancel {
  height: 40px;
  padding: 0 20px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

#userProductModal .btn-pm-cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

#userProductModal .btn-pm-save {
  height: 40px;
  padding: 0 20px;
  background: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

#userProductModal .btn-pm-save:hover {
  background: #dc2626;
  border-color: #dc2626;
}

@media (max-width: 640px) {

  #userProductModal .pm-col-6,
  #userProductModal .pm-col-4 {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   "Add New Customer" Pop-up Modal Styling
   ────────────────────────────────────────────────────────────────────────── */
#userCustomerModal .modal-card {
  max-width: 680px;
  width: 95%;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden;
  margin: auto;
}

#userCustomerModal .modal-header {
  padding: 20px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#userCustomerModal .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

#userCustomerModal .modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0 0;
  font-weight: 400;
}

#userCustomerModal .modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin: -4px -4px 0 0;
  transition: color 0.15s ease;
}

#userCustomerModal .modal-close-btn:hover {
  color: #0f172a;
}

#userCustomerModal .modal-body {
  padding: 24px;
  background: #ffffff;
}

#userCustomerModal .cm-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

#userCustomerModal .cm-form-row:last-child {
  margin-bottom: 0;
}

#userCustomerModal .cm-col-6 {
  flex: 1 1 calc(50% - 8px);
  min-width: 200px;
}

#userCustomerModal .cm-col-12 {
  flex: 1 1 100%;
  width: 100%;
}

#userCustomerModal .cm-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

#userCustomerModal .cm-input,
#userCustomerModal .cm-textarea {
  width: 100%;
  padding: 10px 14px;
  height: 44px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease-in-out;
  box-sizing: border-box;
}

#userCustomerModal .cm-textarea {
  height: auto;
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

#userCustomerModal .cm-input::placeholder,
#userCustomerModal .cm-textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

#userCustomerModal .cm-input:focus,
#userCustomerModal .cm-textarea:focus {
  border-color: #94a3b8 !important;
  outline: none !important;
  box-shadow: none !important;
}

#userCustomerModal .modal-footer {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#userCustomerModal .btn-cm-cancel {
  height: 40px;
  padding: 0 20px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

#userCustomerModal .btn-cm-cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

#userCustomerModal .btn-cm-save {
  height: 40px;
  padding: 0 20px;
  background: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

#userCustomerModal .btn-cm-save:hover {
  background: #dc2626;
  border-color: #dc2626;
}

@media (max-width: 640px) {
  #userCustomerModal .cm-col-6 {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* ──────────────────────────────────────────────────────────────────────────
   "Add New Supplier" Pop-up Modal Styling
   ────────────────────────────────────────────────────────────────────────── */
#userSupplierModal .modal-card {
  max-width: 680px;
  width: 95%;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden;
  margin: auto;
}

#userSupplierModal .modal-header {
  padding: 20px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

#userSupplierModal .modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

#userSupplierModal .modal-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 4px 0 0 0;
  font-weight: 400;
}

#userSupplierModal .modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin: -4px -4px 0 0;
  transition: color 0.15s ease;
}

#userSupplierModal .modal-close-btn:hover {
  color: #0f172a;
}

#userSupplierModal .modal-body {
  padding: 24px;
  background: #ffffff;
}

#userSupplierModal .sm-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

#userSupplierModal .sm-form-row:last-child {
  margin-bottom: 0;
}

#userSupplierModal .sm-col-6 {
  flex: 1 1 calc(50% - 8px);
  min-width: 200px;
}

#userSupplierModal .sm-col-12 {
  flex: 1 1 100%;
  width: 100%;
}

#userSupplierModal .sm-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
}

#userSupplierModal .sm-input,
#userSupplierModal .sm-textarea {
  width: 100%;
  padding: 10px 14px;
  height: 44px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 500;
  color: #0f172a;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease-in-out;
  box-sizing: border-box;
}

#userSupplierModal .sm-textarea {
  height: auto;
  min-height: 90px;
  resize: vertical;
  line-height: 1.5;
}

#userSupplierModal .sm-input::placeholder,
#userSupplierModal .sm-textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

#userSupplierModal .sm-input:focus,
#userSupplierModal .sm-textarea:focus {
  border-color: #94a3b8 !important;
  outline: none !important;
  box-shadow: none !important;
}

#userSupplierModal .modal-footer {
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#userSupplierModal .btn-sm-cancel {
  height: 40px;
  padding: 0 20px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

#userSupplierModal .btn-sm-cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

#userSupplierModal .btn-sm-save {
  height: 40px;
  padding: 0 20px;
  background: #ef4444;
  border: 1px solid #ef4444;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
  box-shadow: none !important;
  outline: none !important;
}

#userSupplierModal .btn-sm-save:hover {
  background: #dc2626;
  border-color: #dc2626;
}

@media (max-width: 640px) {
  #userSupplierModal .sm-col-6 {
    flex: 1 1 100%;
    min-width: 100%;
  }
}

/* 42px Flat Inputs for Add Sale Modal */
.sale-input-flat {
  height: 42px !important;
  border-radius: 6px !important;
  border: 1px solid #d1d5db !important;
  background-color: #ffffff !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  color: #0f172a !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease-in-out !important;
}

.sale-input-flat:focus {
  border-color: #94a3b8 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Remove number spinner arrows */
.sale-input-flat[type=number]::-webkit-inner-spin-button,
.sale-input-flat[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sale-input-flat[type=number] {
  -moz-appearance: textfield;
}

/* ─── REDESIGNED USER DASHBOARD SIDEBAR NAVIGATION COMPONENT (SLATE & RED THEME) ─── */
.user-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  width: var(--sidebar-width) !important;
  height: 100vh;
  background-color: #ffffff !important;
  border-right: none !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  overflow: visible !important;
}

.user-sidebar .sidebar-header {
  height: 64px;
  /* h-16 */
  padding: 0 16px;
  /* px-4 */
  border-bottom: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.user-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  overflow: visible;
  width: auto;
  border-bottom: none !important;
}

.user-sidebar .brand-icon-box {
  width: 40px;
  height: 40px;
  background-color: #dc2626;
  /* bg-red-600 */
  color: #ffffff;
  border-radius: 12px;
  /* rounded-xl */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.user-sidebar .brand-text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: visible;
  transition: opacity 0.2s ease;
}

.user-sidebar .brand-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: visible;
}

.user-sidebar .brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}

.user-sidebar .sidebar-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  overflow-x: visible;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.user-sidebar .sidebar-nav::-webkit-scrollbar {
  display: none;
}

.user-sidebar .nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.user-sidebar .nav-item {
  position: relative;
  list-style: none;
}

.user-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: #334155;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  user-select: none;
  box-shadow: none !important;
  outline: none !important;
}

.user-sidebar .nav-link:hover {
  background-color: #f1f5f9;
  color: #0f172a;
  box-shadow: none !important;
}

.user-sidebar .nav-link.active,
.user-sidebar .nav-link.active:hover,
.user-sidebar .nav-link.active:focus {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: none !important;
  filter: none !important;
  outline: none !important;
  text-shadow: none !important;
}

.user-sidebar .nav-icon {
  width: 20px;
  height: 20px;
  font-size: 15px;
  text-align: center;
  flex-shrink: 0;
  color: #64748b;
  stroke: #64748b;
  stroke-width: 2;
  fill: none;
  transition: color 0.15s ease, stroke 0.15s ease;
}

.user-sidebar .nav-link:hover .nav-icon {
  color: #0f172a;
  stroke: #0f172a;
}

.user-sidebar .nav-link.active .nav-icon,
.user-sidebar .nav-link.active:hover .nav-icon {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

.user-sidebar .nav-text {
  font-size: 13.5px;
  font-weight: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.user-sidebar .submenu-dot-indicator {
  display: none !important;
}

.user-sidebar .submenu-arrow {
  font-size: 11px;
  color: #64748b;
  transition: transform 0.2s ease;
  margin-left: 4px;
  flex-shrink: 0;
}

.user-sidebar .has-submenu.open .submenu-arrow {
  transform: rotate(180deg);
}

.user-sidebar,
.user-sidebar .sidebar-nav,
.user-sidebar .nav-list,
.user-sidebar .nav-item,
.user-sidebar .has-submenu {
  background-color: #ffffff !important;
  background: #ffffff !important;
}

.user-sidebar .submenu-list {
  display: none;
  flex-direction: column;
  gap: 3px;
  padding-left: 20px;
  margin-top: 4px;
  margin-bottom: 4px;
  list-style: none;
  background-color: #ffffff !important;
  background: #ffffff !important;
}

.user-sidebar .has-submenu.open .submenu-list {
  display: flex !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
}

.user-sidebar .floating-popup-header {
  display: none;
}

.user-sidebar .submenu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  background-color: #ffffff !important;
  background: #ffffff !important;
}

.user-sidebar .sub-icon {
  width: 18px;
  font-size: 14px;
  text-align: center;
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.user-sidebar .submenu-link:hover {
  background-color: #f1f5f9 !important;
  background: #f1f5f9 !important;
  color: #0f172a;
}

.user-sidebar .submenu-link:hover .sub-icon {
  color: #0f172a;
}

.user-sidebar .submenu-link.active {
  background-color: #fef2f2 !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  font-weight: 600;
}

.user-sidebar .submenu-link.active .sub-icon {
  color: #dc2626 !important;
}

.user-sidebar .sub-dot {
  display: none !important;
}

.user-sidebar .sidebar-footer {
  padding: 12px;
  border-top: 1px solid #e2e8f0;
  background-color: #ffffff;
  flex-shrink: 0;
}

.user-sidebar .footer-settings-btn {
  color: #64748b;
}

/* ─── DESKTOP EXPANDED & COLLAPSED SIDEBAR GEOMETRY ─── */
@media (min-width: 769px) {
  body:not(.sidebar-collapsed) .admin-main {
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    max-width: calc(100% - var(--sidebar-width)) !important;
    box-sizing: border-box !important;
  }

  body.sidebar-collapsed .admin-main {
    margin-left: 5rem !important;
    width: calc(100% - 5rem) !important;
    max-width: calc(100% - 5rem) !important;
    box-sizing: border-box !important;
  }
}

.user-sidebar.collapsed {
  width: 5rem !important;
  /* 80px / w-20 */
}

.user-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
}

.user-sidebar.collapsed .brand-text-wrap,
.user-sidebar.collapsed .nav-text,
.user-sidebar.collapsed .submenu-dot-indicator,
.user-sidebar.collapsed .submenu-arrow {
  display: none !important;
}

.user-sidebar.collapsed .sidebar-nav {
  padding: 12px 8px;
  overflow: visible !important;
}

.user-sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 12px 0;
}

.user-sidebar.collapsed .nav-icon {
  margin: 0;
}

.user-sidebar.collapsed .submenu-list {
  display: none !important;
}

/* Hover Floating Submenus in Collapsed Mode */
.user-sidebar.collapsed .has-submenu {
  position: relative;
}

.user-sidebar.collapsed .has-submenu:hover .submenu-list {
  display: flex !important;
  position: absolute;
  left: 100%;
  top: 0;
  margin-left: 8px;
  width: 240px;
  /* w-60 */
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  /* rounded-2xl */
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  /* shadow-2xl */
  z-index: 9999;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
}

.user-sidebar.collapsed .has-submenu:hover .floating-popup-header {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}

.user-sidebar.collapsed .has-submenu:hover .submenu-list .nav-text {
  display: inline !important;
}

/* ─── MOBILE RESPONSIVENESS & DRAWER BACKDROP OVERLAY ─── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  /* bg-slate-950/40 */
  backdrop-filter: blur(4px);
  /* backdrop-blur-xs */
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .user-sidebar {
    transform: translateX(-100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .user-sidebar.mobile-open {
    transform: translateX(0) !important;
  }

  html,
  body {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
  }

  .admin-main,
  .admin-main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
  }
}

/* ── Admin Sidebar Crisp Flat Overrides (Matching User Sidebar) ── */
.admin-sidebar {
  width: var(--sidebar-width) !important;
  background-color: #ffffff !important;
  background: #ffffff !important;
  box-shadow: none !important;
  border-right: none !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.admin-sidebar::-webkit-scrollbar,
.admin-sidebar .sidebar-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.admin-sidebar .sidebar-header {
  height: 64px;
  padding: 0 16px;
  border-bottom: none !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background-color: #ffffff !important;
}

.admin-sidebar .sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  width: 100%;
}

.admin-sidebar .brand-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  margin: 0;
}

.admin-sidebar .brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  margin-top: 1px;
}

.admin-sidebar .nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  color: #334155 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  background-color: transparent !important;
  background: transparent !important;
  transition: none !important;
  cursor: pointer !important;
  user-select: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.admin-sidebar .nav-link:not(.active) {
  background-color: transparent !important;
  background: transparent !important;
  color: #334155 !important;
}

.admin-sidebar .nav-link .nav-icon {
  color: #0f172a !important;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.admin-sidebar .nav-link:not(.active):hover,
.admin-sidebar .nav-link:not(.active):active,
.admin-sidebar .nav-link:not(.active):focus {
  background-color: #f1f5f9 !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 10px !important;
}

.admin-sidebar .nav-link:hover:not(.active) .nav-icon {
  color: #0f172a !important;
}

.admin-sidebar .nav-link:focus,
.admin-sidebar .nav-link:active,
.admin-sidebar .nav-link:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.admin-sidebar .nav-link.active,
.admin-sidebar .nav-link.active:hover,
.admin-sidebar .nav-link.active:active,
.admin-sidebar .nav-link.active:focus {
  background-color: #dc2626 !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  filter: none !important;
  outline: none !important;
  text-shadow: none !important;
  border-radius: 10px !important;
}

.admin-sidebar .nav-link.active .nav-icon,
.admin-sidebar .nav-link.active:hover .nav-icon,
.admin-sidebar .nav-link.active:active .nav-icon,
.admin-sidebar .nav-link.active:focus .nav-icon {
  color: #ffffff !important;
}

.admin-sidebar,
.admin-sidebar .sidebar-header,
.admin-sidebar .sidebar-nav,
.admin-sidebar .nav-list,
.admin-sidebar .nav-item,
.admin-sidebar .sidebar-footer {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #0f172a;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* ── Admin Sidebar Collapsed State (80px / 5rem) ── */
.admin-sidebar.collapsed {
  width: 5rem !important;
}

.admin-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 0;
  border-bottom: none !important;
  border: none !important;
}

.admin-sidebar.collapsed .sidebar-brand {
  justify-content: center !important;
  width: 100% !important;
  padding: 0 !important;
}

.admin-sidebar.collapsed .brand-text-wrap,
.admin-sidebar.collapsed .brand-title,
.admin-sidebar.collapsed .brand-subtitle,
.admin-sidebar.collapsed .nav-text,
.admin-sidebar.collapsed .sidebar-badge {
  display: none !important;
}

.admin-sidebar.collapsed .sidebar-nav {
  padding: 12px 8px;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.admin-sidebar.collapsed .sidebar-nav::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.admin-sidebar.collapsed .nav-link {
  justify-content: center !important;
  align-items: center !important;
  padding: 12px 0 !important;
}

.admin-sidebar.collapsed .nav-icon {
  margin: 0 !important;
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  font-size: 16px !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.admin-sidebar.collapsed .sidebar-footer {
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

/* Sidebar Collapsed Layout Adjustments for Desktop */
body.sidebar-collapsed .admin-main,
.admin-sidebar.collapsed~.admin-main {
  margin-left: 5rem !important;
  width: calc(100% - 5rem) !important;
  max-width: calc(100% - 5rem) !important;
}

@media (max-width: 768px) {

  .admin-main,
  .main-content,
  body.sidebar-collapsed .admin-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .user-sidebar,
  .admin-sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    width: 240px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

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

  .user-table-desktop {
    display: none !important;
  }

  .user-cards-mobile {
    display: flex !important;
  }
}

/* Global Search Icon Standardization — Positioned on RIGHT Side */
.pl-search-icon,
.pl-search-wrap svg,
.pl-search-wrap i[data-lucide] {
  position: absolute !important;
  right: 14px !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2 !important;
  pointer-events: none !important;
}

/* Import & Export Toolbar Button Icons Standardization (Reduced to 15px) */
.pl-filter-actions .md-btn svg,
.pl-filter-actions .pl-btn-secondary svg,
.pl-filter-actions button svg,
.pl-filter-actions a svg,
.pl-filter-actions .md-btn i[data-lucide],
.pl-filter-actions .pl-btn-secondary i[data-lucide],
.pl-filter-actions button i[data-lucide],
.pl-filter-actions a i[data-lucide] {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2 !important;
  flex-shrink: 0;
}

/* Low Stock Alert Status Badge Icons (Reduced to 13px) */
.badge-status svg,
.badge-status i[data-lucide] {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2 !important;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Cash Book Reports Dropdown & Table Action Button Icons (Matched to 15px) */
.cb-dropdown-item svg,
.cb-dropdown-item i[data-lucide],
.btn-xs svg,
.btn-xs i[data-lucide],
.cb-mobile-action-btn svg,
.cb-mobile-action-btn i[data-lucide] {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2 !important;
  flex-shrink: 0;
}

/* Modal Focus Outline Standardization — Suppress Black Border Outlines on Keyboard Focus */
.btn-pm-cancel:focus,
.btn-pm-cancel:focus-visible,
.btn-pm-save:focus,
.btn-pm-save:focus-visible,
.btn-action:focus,
.btn-action:focus-visible,
.vs-btn-close:focus,
.vs-btn-close:focus-visible,
.vsupp-btn-close:focus,
.vsupp-btn-close:focus-visible,
.pm-input:focus,
.pm-input:focus-visible,
.pur-flat-input:focus,
.pur-flat-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ── Admin Header Notice & Profile Styling ── */
.header-notice-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  border: none !important;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.15s ease;
}

.header-notice-btn:hover {
  background: #f1f5f9;
  color: #dc2626;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.header-notice-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #dc2626;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
  border: 2px solid #ffffff;
  line-height: 1;
}

.user-profile-menu {
  position: relative;
}

.profile-trigger-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 3px !important;
  border-radius: 50% !important;
  background: #f1f5f9 !important;
  border: none !important;
  outline: none !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, background 0.15s ease !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.profile-trigger-btn:hover {
  background: #e2e8f0 !important;
  border: none !important;
  outline: none !important;
  transform: scale(1.04) !important;
}

.profile-dropdown-card {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  padding: 10px;
  display: none;
  z-index: 1050;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-dropdown-card.active {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

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

/* ── Product List & Admin Management Filter Bar Standardization ── */
.pl-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.pl-search-wrap {
  position: relative;
  width: 320px;
  max-width: 100%;
}

.pl-search-input,
.pl-search-input-editable {
  height: 44px;
  line-height: normal;
  width: 100%;
  padding: 0 40px 0 16px !important;
  background: #ffffff !important;
  border: none !important;
  border-radius: 12px;
  font-size: 13.5px;
  color: #1e293b;
  caret-color: #0f172a !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: inherit;
  transition: border-color 0.15s ease-in-out;
  box-sizing: border-box;
}

.pl-search-input::placeholder,
.nb-search-input::placeholder {
  color: #94a3b8 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

.pl-search-input-editable {
  white-space: nowrap;
  overflow: hidden;
  display: block;
  cursor: text;
  line-height: 44px;
}

.pl-search-input-editable:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}

.pl-search-input:focus {
  border-color: #94a3b8 !important;
}

/* ── Notice Board Filter Dropdowns ── */
.nb-dropdown {
  position: relative;
  display: inline-block;
}

.nb-dropdown-btn {
  height: 36px;
  min-width: 0;
  width: auto;
  width: fit-content;
  max-width: max-content;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 50px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: none !important;
  user-select: none;
  transition: all 0.15s ease-in-out;
  box-sizing: border-box;
  white-space: nowrap;
}

.nb-dropdown-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.nb-dropdown-btn:focus,
.nb-dropdown-btn:active {
  border-color: #64748b !important;
  outline: none !important;
}

.nb-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 160px;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  padding: 6px;
  z-index: 1000;
  display: none;
  box-sizing: border-box;
}

.nb-dropdown-menu.show {
  display: block !important;
}

.nb-dropdown-item {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s ease-in-out;
}

.nb-dropdown-item:hover {
  background: #f8fafc;
  color: #1e293b;
}

.nb-dropdown-item.active {
  background: #eff6ff;
  color: #1e293b;
  font-weight: 600;
}

/* ── Mobile Table Footer Pagination Fit Fix ── */
@media (max-width: 640px) {
  .pl-footer-wrap {
    padding: 10px 12px !important;
  }

  .pl-single-line-footer {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: space-between !important;
  }

  .pl-pagination-btn {
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 11.5px !important;
    min-width: 28px !important;
  }

  .pl-entries-btn {
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 11.5px !important;
  }
}

/* ── Global Ultra-Soft Featherlight Drop Shadows System for User Panel ── */
.pl-search-input,
.pl-dropdown-btn,
.pl-io-btn,
.pl-mobile-add-btn,
.pl-card-item,
.nb-search-input,
.nb-dropdown-btn,
.nb-card,
.cb-card,
.md-btn-ghost,
.pl-banner,
.nb-banner {
  border: 1px solid #f1f5f9 !important;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.03), 0 1px 4px -1px rgba(15, 23, 42, 0.02) !important;
}

.pl-search-input:focus,
.pl-dropdown-btn:hover,
.pl-io-btn:hover,
.pl-mobile-add-btn:hover,
.nb-search-input:focus,
.nb-dropdown-btn:hover,
.nb-card:hover {
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px -2px rgba(15, 23, 42, 0.03), 0 1px 4px -1px rgba(15, 23, 42, 0.02) !important;
}

/* ── Mobile View Toast Notification Offset System ── */
@media (max-width: 768px) {
  #atzToastContainer {
    bottom: 85px !important;
    right: 16px !important;
    left: 16px !important;
    max-width: calc(100% - 32px) !important;
    margin: 0 auto !important;
  }
}

/* ── Global Mobile Filter Drawer Backdrop Overlay Standard ── */
.pl-mobile-filter-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(15, 23, 42, 0.4) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 1000000 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  transition: opacity 0.25s ease, visibility 0.25s ease !important;
}

.pl-mobile-filter-backdrop.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
}

/* ── Centralized Static Skeleton Loader (Clean Content Placeholder - No Animation) ── */
.erp-skeleton {
  background: #f1f5f9 !important;
  animation: none !important;
  border-radius: 6px;
  display: inline-block;
  vertical-align: middle;
}

.erp-skeleton-circle {
  border-radius: 50% !important;
}

body.dark-mode .erp-skeleton,
body.dark-theme .erp-skeleton {
  background: #1e293b !important;
  animation: none !important;
}

/* ── Desktop View: Remove All Bottom Shadows (User Dashboard) ── */
@media (min-width: 769px) {

  .admin-header,
  .admin-sidebar,
  .user-sidebar,
  .admin-main,
  .admin-main-content,
  .admin-wrapper {
    box-shadow: none !important;
    border-bottom: none !important;
  }

  .admin-sidebar,
  .user-sidebar {
    border-right: 1px solid #f1f5f9 !important;
  }
}
/* ==========================================================================
   GLOBAL STANDARDIZED BOTTOM SHEET & NOTIFICATION SYSTEM
   Matches exact layout, typography, and styling of userDeleteProductModal
   ========================================================================== */

.global-sheet-backdrop {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  background-color: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  z-index: 99999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  box-sizing: border-box !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease !important;
}

.global-sheet-backdrop.active,
.global-sheet-backdrop.show {
  opacity: 1 !important;
  visibility: visible !important;
}

.global-sheet-card {
  max-width: 440px !important;
  width: 92% !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  margin: auto !important;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  text-align: center !important;
  padding: 24px !important;
  position: relative !important;
  box-sizing: border-box !important;
  transform: scale(0.96);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease !important;
}

.global-sheet-backdrop.active .global-sheet-card,
.global-sheet-backdrop.show .global-sheet-card {
  transform: scale(1) !important;
}

.global-sheet-drag-handle {
  display: none;
}

.global-sheet-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  color: #64748b !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.global-sheet-close-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.global-sheet-icon-wrap {
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 16px auto !important;
  font-size: 30px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease !important;
}

.global-sheet-icon-wrap svg {
  width: 32px !important;
  height: 32px !important;
}

/* Icon Variations: Strictly Green (Success/Update) and Red (Error/Delete/Warning/Notice) */
.global-sheet-icon-wrap.danger,
.global-sheet-icon-wrap.error,
.global-sheet-icon-wrap.delete,
.global-sheet-icon-wrap.warning,
.global-sheet-icon-wrap.info {
  background: #fef2f2 !important;
  color: #dc2626 !important;
}

.global-sheet-icon-wrap.success {
  background: #f0fdf4 !important;
  color: #16a34a !important;
}

.global-sheet-title {
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 0 8px 0 !important;
  line-height: 1.3 !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

.global-sheet-text {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  margin: 4px 0 20px 0 !important;
  line-height: 1.45 !important;
  word-break: break-word !important;
  text-align: center !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
}

.global-sheet-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.global-sheet-btn-cancel,
.global-sheet-btn-confirm,
.global-sheet-btn-ok {
  height: 42px !important;
  border-radius: 50px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
  font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
  padding: 0 20px !important;
  text-decoration: none !important;
  border: none;
}

.global-sheet-btn-cancel {
  flex: 1 !important;
  width: 50% !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #334155 !important;
}

.global-sheet-btn-cancel:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
}

.global-sheet-btn-confirm {
  flex: 1 !important;
  width: 50% !important;
  background: #dc2626 !important;
  background-color: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
}

.global-sheet-btn-confirm:hover {
  background: #b91c1c !important;
  background-color: #b91c1c !important;
  border-color: #b91c1c !important;
}

.global-sheet-btn-ok {
  width: 100% !important;
  flex: 1 !important;
  background: #dc2626 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
}

.global-sheet-btn-ok.btn-success {
  background: #16a34a !important;
  border-color: #16a34a !important;
}

.global-sheet-btn-ok.btn-success:hover {
  background: #15803d !important;
  border-color: #15803d !important;
}

.global-sheet-btn-ok.btn-danger,
.global-sheet-btn-ok.btn-warning,
.global-sheet-btn-ok.btn-info {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

.global-sheet-btn-ok.btn-danger:hover,
.global-sheet-btn-ok.btn-warning:hover,
.global-sheet-btn-ok.btn-info:hover {
  background: #b91c1c !important;
  border-color: #b91c1c !important;
}

/* Mobile View: Bottom Sheet Sliding Up with Drag Handle */
@media (max-width: 767.98px) {
  .global-sheet-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
  }

  .global-sheet-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 32px 32px 0 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 18px 20px max(28px, calc(16px + env(safe-area-inset-bottom))) 20px !important;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.2) !important;
    position: relative !important;
    text-align: center !important;
    background: #ffffff !important;
    transform: translateY(100%);
    animation: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    touch-action: pan-y !important;
  }

  .global-sheet-backdrop.active .global-sheet-card,
  .global-sheet-backdrop.show .global-sheet-card {
    transform: translateY(0) !important;
  }

  .global-sheet-drag-handle {
    display: block !important;
    width: 42px !important;
    height: 5px !important;
    background: #cbd5e1 !important;
    border-radius: 10px !important;
    margin: 0 auto 14px auto !important;
    cursor: grab !important;
    touch-action: none !important;
  }

  .global-sheet-close-btn {
    top: 14px !important;
    right: 16px !important;
  }
}

/* Keyframes for sliding bottom sheet drawers */
@keyframes slideUpGlobalSheet {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes slideUpDeleteDrawer {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Universal Del-Modal styling across admin and user panels */
.del-modal-drag-handle { display: none; }
.del-modal-close-btn {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  width: 30px !important;
  height: 30px !important;
  border-radius: 50% !important;
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  color: #64748b !important;
  font-size: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.del-modal-close-btn:hover { background: #f1f5f9 !important; color: #0f172a !important; }
.del-modal-icon-wrap {
  width: 68px !important;
  height: 68px !important;
  border-radius: 50% !important;
  background: #fef2f2 !important;
  color: #dc2626 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 16px auto !important;
  font-size: 30px !important;
}
.del-modal-icon-wrap svg { width: 32px !important; height: 32px !important; }
.del-modal-title {
  font-size: 21px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 8px !important;
  line-height: 1.3 !important;
}
.del-modal-text-simple {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  color: #475569 !important;
  margin: 4px 0 20px 0 !important;
  line-height: 1.4 !important;
  word-break: break-word !important;
  text-align: center !important;
}
.del-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
}
.del-btn-cancel, .del-btn-confirm {
  flex: 1 !important;
  width: 50% !important;
  height: 40px !important;
  border-radius: 50px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
}
.del-btn-cancel { background: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #334155 !important; }
.del-btn-cancel:hover { background: #f8fafc !important; color: #0f172a !important; }
.del-btn-confirm { background: #dc2626 !important; border: 1px solid #dc2626 !important; color: #ffffff !important; }
.del-btn-confirm:hover { background: #b91c1c !important; border-color: #b91c1c !important; }

@media (max-width: 767.98px) {
  .del-modal-drag-handle {
    display: block !important;
    width: 42px !important;
    height: 5px !important;
    background: #cbd5e1 !important;
    border-radius: 10px !important;
    margin: 0 auto 14px auto !important;
    cursor: grab !important;
    touch-action: none !important;
  }
}

/* Auto-standardize any modal-backdrop with Delete in ID */
.modal-backdrop[id*="Delete"],
.modal-backdrop[id*="delete"] {
  z-index: 1000005 !important;
}
.modal-backdrop[id*="Delete"] .modal-card,
.modal-backdrop[id*="delete"] .modal-card {
  max-width: 440px !important;
  width: 92% !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  overflow: hidden !important;
  margin: auto !important;
  font-family: 'Inter', sans-serif !important;
  text-align: center !important;
  padding: 24px !important;
  position: relative !important;
}

@media (max-width: 767.98px) {
  .modal-backdrop[id*="Delete"],
  .modal-backdrop[id*="delete"] {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 1000005 !important;
    display: none;
    align-items: flex-end !important;
    justify-content: center !important;
    background-color: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
  .modal-backdrop[id*="Delete"] .modal-card,
  .modal-backdrop[id*="delete"] .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 32px 32px 0 0 !important;
    border: none !important;
    margin: 0 !important;
    padding: 18px 20px max(28px, calc(16px + env(safe-area-inset-bottom))) 20px !important;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.2) !important;
    position: relative !important;
    text-align: center !important;
    background: #ffffff !important;
    animation: slideUpDeleteDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    touch-action: pan-y !important;
  }
}

/* ==========================================================================
   Desktop Filter Dropdowns (Unified 1:1 with Admin Dashboard Chart Filter)
   Applies to Desktop View Only (>= 768px). Mobile views remain untouched.
   ========================================================================== */
@media (min-width: 768px) {
  /* Ensure parent containers allow floating popups to be visible without clipping */
  .pl-dropdown,
  .nb-dropdown,
  .admin-chart-filter-dropdown {
    position: relative !important;
    overflow: visible !important;
  }

  .pl-dropdown-row,
  .pl-filter-bar,
  .pl-filter-left,
  .nb-filter-bar,
  .nb-dropdown-group,
  .db-chart-filter-controls,
  .db-chart-header,
  .pl-mobile-filter-scroll-row,
  #whFilterScrollRow,
  .wh-catalog-side {
    overflow: visible !important;
  }

  /* Dropdown Floating Menu (Left-to-Right starting at left: 0, min-width 180px matching Cashbook Dashboard) */
  .pl-dropdown-menu,
  .nb-dropdown-menu,
  .admin-chart-filter-menu {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    min-width: 180px !important;
    width: max-content !important;
    max-width: 320px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    padding: 6px !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
    display: none !important;
    flex-direction: column !important;
    gap: 3px !important;
    transform: none !important;
    animation: none !important;
    max-height: 280px !important;
    overflow-y: auto !important;
  }

  /* User Dashboard Chart Filter Pill preserves compact 140px capsule width */
  #dbMonthMenu.admin-chart-filter-menu {
    min-width: 140px !important;
    max-width: 140px !important;
    width: 100% !important;
  }

  /* When open: clean flex column */
  .pl-dropdown-menu.show,
  .nb-dropdown-menu.show,
  .admin-chart-filter-menu.show {
    display: flex !important;
  }

  /* Hide headers and divider lines inside desktop dropdown popup (admin style has pure options) */
  .pl-dropdown-menu .pl-dropdown-header,
  .pl-dropdown-menu .pl-dropdown-header-divider,
  .nb-dropdown-menu .nb-dropdown-header,
  .nb-dropdown-menu .nb-dropdown-header-divider {
    display: none !important;
  }

  /* Dropdown Option Items */
  .pl-dropdown-menu .pl-dropdown-item,
  .nb-dropdown-menu .nb-dropdown-item,
  .admin-chart-filter-menu .pl-dropdown-item {
    padding: 8px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    cursor: pointer !important;
    border-radius: 8px !important;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    color: #334155 !important;
    transition: all 0.15s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    user-select: none !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .pl-dropdown-menu .pl-dropdown-item:hover,
  .nb-dropdown-menu .nb-dropdown-item:hover,
  .admin-chart-filter-menu .pl-dropdown-item:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
  }

  .pl-dropdown-menu .pl-dropdown-item.active,
  .nb-dropdown-menu .nb-dropdown-item.active,
  .admin-chart-filter-menu .pl-dropdown-item.active {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    font-weight: 700 !important;
  }

  .pl-dropdown-menu .pl-dropdown-item .wh-check-icon,
  .pl-dropdown-menu .pl-dropdown-item i.fa-check,
  .nb-dropdown-menu .nb-dropdown-item .wh-check-icon,
  .nb-dropdown-menu .nb-dropdown-item i.fa-check {
    display: none !important;
  }

  .pl-dropdown-menu .pl-dropdown-item.active .wh-check-icon,
  .pl-dropdown-menu .pl-dropdown-item.active i.fa-check,
  .nb-dropdown-menu .nb-dropdown-item.active .wh-check-icon,
  .nb-dropdown-menu .nb-dropdown-item.active i.fa-check {
    display: none !important;
  }

  /* Active Filter Dropdown Button state for Notice Board & Pill filters */
  .nb-dropdown-btn.active {
    background: #dc2626 !important;
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
  }
  .nb-dropdown-btn.active span,
  .nb-dropdown-btn.active i {
    color: #ffffff !important;
  }
}

/* ==========================================================================
   Global Active Filter Button & Chip State (Vibrant Red Theme)
   Applies across all user modules: Notice Board, Products, Customers,
   Suppliers, Sales, Purchases, Stock, Low Stock, Warehouse Orders, Cashbook
   ========================================================================== */
.pl-filter-chip-btn {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 50px;
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: none !important;
  outline: none !important;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.pl-filter-chip-btn:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
}

.pl-dropdown-btn.active,
.nb-dropdown-btn.active,
.pl-filter-chip-btn.active,
.nb-status-filter-btn.active {
  background: #dc2626 !important;
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.pl-dropdown-btn.active span,
.pl-dropdown-btn.active i,
.pl-dropdown-btn.active svg,
.nb-dropdown-btn.active span,
.nb-dropdown-btn.active i,
.nb-dropdown-btn.active svg,
.pl-filter-chip-btn.active span,
.pl-filter-chip-btn.active i,
.pl-filter-chip-btn.active svg,
.nb-status-filter-btn.active span,
.nb-status-filter-btn.active i,
.nb-status-filter-btn.active svg {
  color: #ffffff !important;
  fill: currentColor !important;
}


