/* ==========================================================================
   SMART PHARMACY ERP - Modern Design System & CSS Rules (Phase 3 UI Fixes)
   ========================================================================== */

:root {
  /* Color Palette - Vibrant Dark Mode */
  --bg-dark: #0b0f19;
  --bg-card: rgba(18, 26, 43, 0.7);
  --bg-card-hover: rgba(28, 39, 64, 0.8);
  --border-glass: rgba(255, 255, 255, 0.1);
  --border-glow: rgba(0, 229, 255, 0.3);
  
  --primary-cyan: #00e5ff;
  --primary-blue: #3a86ff;
  --primary-gradient: linear-gradient(135deg, #00e5ff 0%, #3a86ff 100%);
  
  --accent-purple: #8338ec;
  --accent-green: #00f5d4;
  --accent-yellow: #ffbe0b;
  --accent-pink: #ff006e;
  --accent-red: #ff3366;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(0, 229, 255, 0.15);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   THEME CUSTOMIZER OVERRIDES (Light, Hybrid, Emerald & Cyber Dark)
   ========================================================================== */

/* 1. DAYLIGHT LIGHT THEME */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-glass: rgba(0, 0, 0, 0.12);
  --border-glow: rgba(2, 132, 199, 0.4);

  --primary-cyan: #0284c7;
  --primary-blue: #2563eb;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .glow-bg {
  display: none;
}
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
[data-theme="light"] table th {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
[data-theme="light"] table tr:hover {
  background: rgba(2, 132, 199, 0.08) !important;
}

/* 2. HYBRID THEME (Dark Navigation + Light Workspace) */
[data-theme="hybrid"] {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --border-glass: rgba(0, 0, 0, 0.1);
  --border-glow: rgba(37, 99, 235, 0.3);

  --primary-cyan: #2563eb;
  --primary-blue: #1d4ed8;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
}
[data-theme="hybrid"] .topbar,
[data-theme="hybrid"] .sidebar {
  background: #0f172a !important;
  color: #f8fafc !important;
}
[data-theme="hybrid"] .topbar *,
[data-theme="hybrid"] .sidebar * {
  color: #f8fafc !important;
}
[data-theme="hybrid"] .glow-bg {
  display: none;
}
[data-theme="hybrid"] input,
[data-theme="hybrid"] select {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* 3. EMERALD CLINICAL THEME (Medical Green & Dark Emerald) */
[data-theme="emerald"] {
  --bg-dark: #061e19;
  --bg-card: rgba(12, 45, 38, 0.8);
  --bg-card-hover: rgba(18, 64, 54, 0.9);
  --border-glass: rgba(0, 245, 212, 0.18);
  --border-glow: rgba(0, 245, 212, 0.4);

  --primary-cyan: #00f5d4;
  --primary-blue: #10b981;
  --primary-gradient: linear-gradient(135deg, #00f5d4 0%, #10b981 100%);

  --text-main: #ecfdf5;
  --text-muted: #a7f3d0;
  --text-dim: #6ee7b7;
}

/* Reset & Basic Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
}

/* 3-ROW COMPACT NAVIGATION GRID (MATCHING BALRAM SIR IMAGE) */
.nav-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px;
  margin-bottom: 18px;
  background: rgba(18, 26, 43, 0.85);
  border: 1px solid rgba(0, 245, 212, 0.25);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.nav-grid-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.nav-grid-btn i {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.nav-grid-btn:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--primary-cyan);
  transform: translateY(-2px);
}

.nav-grid-btn.active {
  background: var(--primary-gradient);
  color: #000;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 245, 212, 0.4);
}

.nav-grid-btn.active i {
  color: #000 !important;
}

@media (max-width: 768px) {
  .nav-grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }
  .nav-grid-btn {
    padding: 8px 4px;
    font-size: 0.72rem;
  }
  .nav-grid-btn i {
    font-size: 1.1rem;
    margin-bottom: 3px;
  }
}

body {
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background Mesh Glow */
.glow-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite alternate;
}

.sphere-1 {
  width: 450px;
  height: 450px;
  background: var(--primary-cyan);
  top: -100px;
  left: -100px;
}

.sphere-2 {
  width: 500px;
  height: 500px;
  background: var(--accent-purple);
  bottom: -150px;
  right: -100px;
  animation-delay: -6s;
}

.sphere-3 {
  width: 350px;
  height: 350px;
  background: var(--primary-blue);
  top: 40%;
  left: 45%;
  animation-delay: -12s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, 40px) scale(1.1); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* Glassmorphism Common Class */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
}

/* Utility Classes */
.hidden { display: none !important; }
.highlight-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.text-yellow { color: var(--accent-yellow) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }

kbd {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--primary-cyan);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* AVATAR & PROFILE PHOTO STYLING */
.profile-upload-box {
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(10, 15, 26, 0.6);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-glass);
  margin-bottom: 20px;
}

.avatar-preview-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  padding: 3px;
  background: var(--primary-gradient);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.3);
  flex-shrink: 0;
}

.avatar-preview-wrapper img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0b0f19;
}

.upload-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--primary-cyan);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0f19;
}

.header-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-user-profile-box {
  display: flex;
  align-items: center;
  gap: 20px;
}

.banner-avatar-frame {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: var(--primary-gradient);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.banner-avatar-frame img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #0b0f19;
}

/* ONBOARDING & SYSTEM MODALS VIEWPORT SAFETY ENGINE */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 8, 15, 0.88);
  backdrop-filter: blur(12px);
  z-index: 100000;
  display: flex;
  align-items: flex-start; /* CRITICAL FIX: Align flex-start to prevent top viewport clipping! */
  justify-content: center;
  padding: 20px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-overlay.hidden {
  display: none !important;
  pointer-events: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  padding: 28px;
  margin: 16px auto;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
  border: 1px solid var(--border-glass);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-wide {
  max-width: 760px !important;
}

/* ==========================================================================
   PRINT ENGINE (80mm Thermal Receipt & A4 Tax Invoice Printing)
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-family: Arial, sans-serif !important;
  }
  .app-header, .sidebar, .modal-overlay, .btn, #global-error-banner, #license-modal, #app-lock-overlay {
    display: none !important;
  }
  .view-panel {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .print-thermal-receipt {
    width: 80mm !important;
    max-width: 80mm !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    padding: 5px !important;
    color: #000 !important;
    border: none !important;
  }
  .print-thermal-receipt table {
    width: 100% !important;
    border-collapse: collapse !important;
  }
  .print-thermal-receipt th, .print-thermal-receipt td {
    border-bottom: 1px dashed #000 !important;
    padding: 3px 0 !important;
  }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  background: rgba(18, 26, 43, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-cyan);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--accent-pink);
  transform: scale(1.15);
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary-cyan);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(0, 229, 255, 0.2);
  margin-bottom: 16px;
}

.welcome-heading {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.25;
}

.welcome-subtext {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.input-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-group label i {
  color: var(--primary-cyan);
}

.input-group input, .input-group select {
  background: rgba(10, 15, 26, 0.7);
  border: 1px solid var(--border-glass);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--primary-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.25);
  background: rgba(15, 23, 42, 0.9);
}

.required {
  color: var(--accent-pink);
}

/* FORM GRID */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* BUTTON STYLES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #05080f;
  font-weight: 700;
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 229, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-danger {
  background: rgba(255, 51, 102, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 51, 102, 0.3);
}

.btn-danger:hover {
  background: var(--accent-red);
  color: #fff;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

/* APP LAYOUT */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* TOPBAR - COMPACT & ZERO CUTOFF */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  margin: 10px 14px 0 14px;
  border-radius: var(--radius-md);
  gap: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.topbar::-webkit-scrollbar {
  display: none;
}

.brand-zone {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.welcome-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--text-main);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
  white-space: nowrap;
  flex-shrink: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.topbar-actions .btn {
  padding: 6px 10px;
  font-size: 0.76rem;
  white-space: nowrap;
  flex-shrink: 0;
  border-radius: 6px;
}



/* BODY WRAPPER */
.body-wrapper {
  display: flex;
  gap: 20px;
  padding: 20px;
  flex: 1;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 14px;
  flex-shrink: 0;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.nav-item * {
  pointer-events: none;
}

.nav-item i {
  font-size: 1.1rem;
  width: 20px;
}

.nav-item:hover, .nav-item.active {
  color: var(--text-main);
  background: rgba(0, 229, 255, 0.12);
}

.nav-item.active {
  color: var(--primary-cyan);
  font-weight: 600;
  border-left: 3px solid var(--primary-cyan);
}

.nav-item.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.badge {
  margin-left: auto;
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-glass);
}

.badge-active {
  background: rgba(0, 245, 212, 0.15);
  color: var(--accent-green);
  border-color: rgba(0, 245, 212, 0.3);
}

.network-card {
  padding: 16px;
  font-size: 0.82rem;
  background: rgba(10, 15, 26, 0.6);
}

.network-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-green);
  font-weight: 700;
  margin-bottom: 6px;
}

.network-desc {
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.4;
}

.ip-code {
  background: rgba(0, 0, 0, 0.4);
  color: var(--primary-cyan);
  padding: 8px;
  border-radius: 6px;
  font-family: monospace;
  word-break: break-all;
  text-align: center;
  border: 1px dashed rgba(0, 229, 255, 0.3);
}

/* MAIN CONTENT AREA */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* PHASE 3 BILLING SCREEN STYLING */
.billing-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 20px;
  align-items: start;
}

.billing-left-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.billing-search-box {
  padding: 20px;
  position: relative;
  z-index: 100 !important;
  overflow: visible !important;
}

.billing-search-box label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-input-wrapper {
  position: relative;
  z-index: 100 !important;
}

.search-input-wrapper input {
  width: 100%;
  background: rgba(10, 15, 26, 0.9);
  border: 2px solid var(--border-glow);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.05rem;
  outline: none;
}

.search-input-wrapper input:focus {
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.35);
  border-color: var(--primary-cyan);
}

/* DROPDOWN MENU FLOATING OVERALL (Z-INDEX FIX) */
.autocomplete-dropdown {
  position: absolute;
  top: 108%;
  left: 0;
  width: 100%;
  background: #0f172a;
  border: 2px solid var(--primary-cyan);
  border-radius: var(--radius-sm);
  max-height: 350px;
  overflow-y: auto;
  z-index: 99999 !important;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.95);
  margin-top: 4px;
}

.salt-match-header {
  background: rgba(255, 190, 11, 0.18);
  color: var(--accent-yellow);
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 190, 11, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.autocomplete-item {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  cursor: pointer;
  transition: var(--transition);
}

.autocomplete-item:hover, .autocomplete-item.selected {
  background: rgba(0, 229, 255, 0.2);
}

.item-main-title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-main);
}

.item-sub-salt {
  font-size: 0.82rem;
  color: var(--primary-cyan);
  margin-top: 2px;
}

.item-price-tag {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--accent-green);
  text-align: right;
}

.cart-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.cart-table-container {
  min-height: 280px;
  overflow: hidden !important;
}

/* CUSTOM TABLE CLEAN SPACING & FIT */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: rgba(10, 15, 26, 0.6);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-glass);
}

.custom-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
  color: var(--text-main);
  vertical-align: middle;
}

.custom-table tr:hover {
  background: rgba(0, 229, 255, 0.04);
}

.med-title-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.med-name {
  font-weight: 700;
  color: var(--text-main);
}

.med-salt-text {
  font-size: 0.78rem;
  color: var(--primary-cyan);
}

.qty-input-sm {
  width: 52px;
  padding: 6px 4px;
  border-radius: 4px;
  background: rgba(10, 15, 26, 0.9);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  text-align: center;
  font-family: var(--font-body);
  font-weight: 700;
}

.billing-right-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass);
}

.bill-summary-card {
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.total-line {
  padding-top: 10px;
  border-top: 1px solid var(--border-glass);
  color: var(--text-main);
  font-weight: 700;
}

.payment-mode-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-pills {
  display: flex;
  gap: 10px;
}

.pay-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pay-btn.active {
  background: rgba(0, 245, 212, 0.15);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

/* UPI QR CARD & BILLED MEDICINES SUMMARY LIST */
.upi-qr-card {
  background: #ffffff;
  color: #0b0f19;
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 0 20px rgba(0, 245, 212, 0.3);
  animation: fadeIn 0.3s ease;
}

.qr-items-summary-box {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #334155;
}

.qr-items-summary-title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 2px;
}

.qr-items-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 80px;
  overflow-y: auto;
}

.qr-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.qr-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
}

.qrcode-container {
  padding: 8px;
  background: #ffffff;
  border-radius: 6px;
}

.upi-apps-icons {
  display: flex;
  gap: 6px;
}

.upi-app-tag {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

/* PRINTABLE INVOICE MODAL STYLING */
.print-invoice-card {
  background: #ffffff !important;
  color: #0f172a !important;
}

.printable-bill-area {
  padding: 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #0f172a;
}

.inv-header {
  display: flex;
  justify-content: space-between;
}

.inv-brand h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: #0f172a;
}

.inv-brand p {
  font-size: 0.8rem;
  color: #475569;
}

.inv-meta {
  text-align: right;
  font-size: 0.85rem;
}

.inv-meta h3 {
  color: #0284c7;
  font-size: 1.1rem;
}

.inv-divider {
  margin: 14px 0;
  border: 0;
  border-top: 1px solid #cbd5e1;
}

.inv-customer {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  background: #f8fafc;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.inv-table th {
  background: #e2e8f0;
  color: #1e293b;
  padding: 8px;
  text-align: left;
  border-bottom: 2px solid #cbd5e1;
}

.inv-table td {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.inv-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.inv-terms {
  font-size: 0.75rem;
  color: #64748b;
  max-width: 50%;
}

.inv-totals-box {
  text-align: right;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inv-grand-total {
  font-size: 1.2rem;
  color: #0284c7;
  margin-top: 6px;
  border-top: 2px solid #cbd5e1;
  padding-top: 6px;
}

@media print {
  body * {
    visibility: hidden;
  }
  #invoice-modal, #invoice-modal * {
    visibility: visible;
  }
  #invoice-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: white;
  }
  .no-print {
    display: none !important;
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
  .body-wrapper {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .billing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .nav-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-start !important;
  }

  .table-wrapper,
  .table-container,
  .cart-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .custom-table {
    min-width: 680px;
  }

  #medicine-form [style*="grid-template-columns: 1fr 1fr"],
  #medicine-form [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  #customer-form,
  #purchases-view [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  #customer-form [style*="grid-column:span 2"] {
    grid-column: auto !important;
  }
}


/* ==========================================================================
   PHARMAPULSE PREMIUM USER PANEL & UNIFIED DASHBOARD STYLES
   ========================================================================== */

/* Sidebar Section Titles */
.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
  padding: 14px 14px 6px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-section-title:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 4px;
}

/* 6-Card KPI Grid */
.kpi-grid-6 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: rgba(18, 26, 43, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 14px);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.4);
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient, linear-gradient(135deg, #00e5ff 0%, #3a86ff 100%));
  opacity: 0.8;
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.kpi-sub {
  font-size: 0.76rem;
  color: #38bdf8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(56, 189, 248, 0.08);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  word-break: break-word;
}

/* Charts Section */
.charts-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: rgba(18, 26, 43, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md, 14px);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 240px;
}

/* Shift Summary Banner */
.shift-summary-bar {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  border-radius: var(--radius-md, 14px);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.shift-metric-item {
  display: flex;
  flex-direction: column;
}

.shift-metric-label {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.shift-metric-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #00e5ff;
}

/* View Sub-Headers & Filter Bars */
.view-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.view-heading-wrap h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 4px;
}

.view-heading-wrap p {
  font-size: 0.82rem;
  color: #94a3b8;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Badge Enhancements */
.badge-settled {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #10b981 !important;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-overdue-red {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #ef4444 !important;
  font-weight: 800 !important;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-aging-warn {
  background: rgba(245, 158, 11, 0.2) !important;
  color: #f59e0b !important;
  font-weight: 700 !important;
  border: 1px solid rgba(245, 158, 11, 0.3);
}


/* ==========================================================================
   PREMIUM LIGHT THEME & REFERENCE IMAGE MATCHING STYLES (PHARMAPULSE ERP)
   ========================================================================== */

:root {
  --bg-dark: #f0f4f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-glass: #e2e8f0;
  --border-glow: rgba(37, 99, 235, 0.2);

  --primary-cyan: #0284c7;
  --primary-blue: #2563eb;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);

  --accent-purple: #9333ea;
  --accent-green: #16a34a;
  --accent-yellow: #ea580c;
  --accent-pink: #db2777;
  --accent-red: #dc2626;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.12);
  --shadow-card: 0 2px 10px rgba(15, 23, 42, 0.05);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background-color: #f0f4f9 !important;
  color: #0f172a !important;
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
}

.glow-bg {
  display: none !important;
}

/* TOPBAR MATCHING REFERENCE IMAGE */
.topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
  padding: 0 24px !important;
  height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}

.topbar .brand-zone {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .brand-title {
  display: flex;
  flex-direction: column;
}

.topbar .app-title-prefix {
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.topbar .store-tag {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
}

/* TOPBAR SEARCH BAR */
.topbar-search-box {
  flex: 1;
  max-width: 440px;
  margin: 0 24px;
  position: relative;
}

.topbar-search-input {
  width: 100%;
  padding: 9px 16px 9px 38px !important;
  border-radius: 30px !important;
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  font-size: 0.86rem !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}

.topbar-search-input:focus {
  background: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.topbar-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.9rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.topbar-action-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.topbar-icon-badge-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

.topbar-badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}

.topbar-user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 8px;
}

.topbar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user-info {
  display: flex;
  flex-direction: column;
}

.topbar-user-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.topbar-user-role {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

/* SIDEBAR MATCHING REFERENCE IMAGE */
.sidebar {
  background: #0b1e3d !important;
  color: #f8fafc !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 240px !important;
  min-width: 240px !important;
  padding: 16px 12px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: calc(100vh - 64px) !important;
  box-sizing: border-box !important;
}

.sidebar * {
  color: inherit;
}

.sidebar .sidebar-section-title {
  color: #93c5fd !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.8px !important;
  text-transform: uppercase !important;
  padding: 14px 10px 6px !important;
}

.sidebar .nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  color: #cbd5e1 !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  margin-bottom: 2px !important;
}

.sidebar .nav-item i {
  font-size: 1rem !important;
  width: 20px !important;
  text-align: center !important;
}

.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.sidebar .nav-item.active {
  background: #1a73e8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(26, 115, 232, 0.4) !important;
}

.sidebar .nav-item.active i {
  color: #ffffff !important;
}

/* SIDEBAR PROMO CARD */
.sidebar-promo-card {
  margin-top: auto;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* CARDS & PANELS */
.glass-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 14px !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  color: #0f172a !important;
}

/* WELCOME BANNER */
.welcome-banner-clean {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 50%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.welcome-banner-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
}

.welcome-banner-sub {
  font-size: 0.9rem;
  color: #475569;
  margin: 0 0 14px;
}

.welcome-banner-pill {
  background: #ffffff;
  border: 1px solid #93c5fd;
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  display: inline-block;
}

/* KPI CARD SQUIRCLES */
.kpi-card-white {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kpi-card-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.kpi-icon-squircle {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.kpi-squircle-green { background: #dcfce7; color: #16a34a; }
.kpi-squircle-blue { background: #dbeafe; color: #2563eb; }
.kpi-squircle-purple { background: #f3e8ff; color: #9333ea; }
.kpi-squircle-orange { background: #ffedd5; color: #ea580c; }
.kpi-squircle-cyan { background: #e0f2fe; color: #0284c7; }
.kpi-squircle-red { background: #fee2e2; color: #dc2626; }

.kpi-content-box {
  flex: 1;
  min-width: 0;
}

.kpi-value-lg {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 3px;
}

.kpi-label-muted {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 4px;
}

.kpi-trend-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trend-green { background: #dcfce7; color: #15803d; }
.trend-blue { background: #dbeafe; color: #1d4ed8; }
.trend-orange { background: #ffedd5; color: #c2410c; }
.trend-red { background: #fee2e2; color: #b91c1c; }

/* QUICK ACTIONS GRID */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.quick-action-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  text-align: center;
}

.quick-action-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.quick-action-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.quick-action-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
}

@media (max-width: 1024px) {
  .quick-actions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* TABLES STYLING */
.custom-table {
  width: 100%;
  border-collapse: collapse;
}

.custom-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  text-align: left !important;
}

.custom-table td {
  padding: 11px 14px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #0f172a !important;
  font-size: 0.85rem !important;
}

.custom-table tr:hover td {
  background: #f8fafc !important;
}

.badge-paid {
  background: #dcfce7 !important;
  color: #15803d !important;
  font-weight: 700 !important;
  font-size: 0.74rem !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  display: inline-block !important;
}

.badge-warning {
  background: #ffedd5 !important;
  color: #c2410c !important;
  font-weight: 700 !important;
  font-size: 0.74rem !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  display: inline-block !important;
}

.badge-danger {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  font-weight: 700 !important;
  font-size: 0.74rem !important;
  padding: 3px 8px !important;
  border-radius: 6px !important;
  display: inline-block !important;
}

/* =========================================================================
   📱 100% ZOOM DESKTOP RESPONSIVE & LAYOUT RULES (1366x768 & 1920x1080)
   ========================================================================= */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

.app-layout {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh !important;
  width: 100% !important;
  overflow-x: hidden !important;
}

.body-wrapper {
  display: flex !important;
  flex: 1 !important;
  width: 100% !important;
  min-height: calc(100vh - 64px) !important;
  overflow: hidden !important;
}

.content-area {
  flex: 1 !important;
  min-width: 0 !important;
  padding: 16px 20px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: var(--bg-dark, #f0f4f9) !important;
}

.view-panel {
  max-width: 1600px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* =========================================================================
   📊 DASHBOARD EXPANDED VIEW IN-PLACE
   ========================================================================= */
.dash-expanded-container {
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
  animation: dashFadeIn 0.25s ease-out;
}

@keyframes dashFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dash-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.dash-breadcrumb-path {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.dash-breadcrumb-crumb {
  color: #2563eb;
}

.dash-subcards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.dash-subcard-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-subcard-item:hover, .dash-subcard-item.active {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.dash-subcard-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.dash-subcard-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}

/* =========================================================================
   🛒 SALES / BILLING REDESIGN STYLES (MATCHING REFERENCE IMAGE)
   ========================================================================= */
.billing-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 12px;
}

.billing-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.billing-header-title h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.billing-header-title p {
  font-size: 0.8rem;
  color: #64748b;
  margin: 2px 0 0 0;
}

.billing-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-header-shortcut {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-header-shortcut:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-header-shortcut.btn-stock { border-color: #93c5fd; color: #1d4ed8; }
.btn-header-shortcut.btn-return { border-color: #fca5a5; color: #b91c1c; }
.btn-header-shortcut.btn-purch-return { border-color: #bfdbfe; color: #0369a1; }
.btn-header-shortcut.btn-customer { border-color: #86efac; color: #15803d; }
.btn-header-complete {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

/* 6 Billing KPI Cards Row */
.billing-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.billing-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.billing-kpi-squircle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.billing-kpi-info {
  flex: 1;
  min-width: 0;
}

.billing-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
}

.billing-kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.billing-kpi-sub {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
}

/* 2-Column Split Layout */
.billing-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1.15fr);
  gap: 16px;
  align-items: start;
}

.billing-left-col, .billing-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Section Cards */
.billing-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.billing-section-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Search Tabs */
.billing-search-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
}

.billing-tab-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-billing-tab {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-billing-tab.active {
  background: #2563eb;
  color: #ffffff;
}

.btn-billing-tab:not(.active):hover {
  background: #f1f5f9;
  color: #0f172a;
}

.search-input-pill-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 4px 6px 4px 12px;
  transition: border-color 0.2s ease;
}

.search-input-pill-box:focus-within {
  border-color: #2563eb;
  background: #ffffff;
}

.search-input-pill-box input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  padding: 6px 0;
}

.quick-add-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
  font-size: 0.76rem;
}

.quick-add-pill-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-add-pill-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Cart Table and Controls */
.cart-tools-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cart-tool {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
}

.btn-cart-tool:hover {
  background: #f8fafc;
}

/* Bill Summary Footer inside Cart */
.cart-summary-footer {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.cart-summary-values {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.82rem;
  font-weight: 700;
}

.cart-grand-total-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-grand-total-box strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: #2563eb;
}

/* Customer & Payment Right Column */
.customer-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mini-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 14px;
}

.mini-stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.mini-stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
}

.mini-stat-val {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.payment-grid-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.btn-pay-mode-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-pay-mode-card.active {
  border-color: #16a34a;
  background: #f0fdf4;
  color: #15803d;
  box-shadow: 0 0 0 1px #16a34a;
}

.bill-totals-panel {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.bill-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bill-total-row.grand {
  border-top: 1px solid #cbd5e1;
  padding-top: 8px;
  font-size: 1.05rem;
  font-weight: 800;
}

.bill-action-btn-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.btn-action-print {
  background: #16a34a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  border: none !important;
  cursor: pointer !important;
}

.btn-action-save {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  border: none !important;
  cursor: pointer !important;
}

.btn-action-whatsapp {
  background: #25d366 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 10px !important;
  border: none !important;
  cursor: pointer !important;
}

.action-icon-pill-btn {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-icon-pill-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.action-icon-pill-btn.btn-wa:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}

.action-icon-pill-btn.btn-pr:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.action-icon-pill-btn.btn-sv:hover {
  background: #f3e8ff;
  color: #7e22ce;
  border-color: #d8b4fe;
}

@media (max-width: 1200px) {
  .billing-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .billing-main-grid {
    grid-template-columns: 1fr;
  }
}


/* Billing Tab Buttons */
.billing-tab-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.billing-tab-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.billing-tab-btn.active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

/* Quick Add Medicine Pills */
.billing-quick-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.quick-pill-btn {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-pill-btn:hover {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

/* Cart Live Summary Strip */
.cart-live-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: #475569;
  flex-wrap: wrap;
  gap: 8px;
}

.cart-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cart-summary-item strong {
  color: #0f172a;
}


/* Desktop 100% Zoom 6-Card Single Row Fit */
@media (min-width: 1200px) {
  #dashboard-view > section:nth-of-type(2) {
    grid-template-columns: repeat(6, 1fr) !important;
  }
  .kpi-card-white {
    padding: 12px 10px !important;
    gap: 8px !important;
  }
  .kpi-value-lg {
    font-size: 1.18rem !important;
  }
  .kpi-label-muted {
    font-size: 0.72rem !important;
  }
  .kpi-trend-pill {
    font-size: 0.66rem !important;
    padding: 2px 6px !important;
  }
}


/* =========================================================================
   🏥 PHARMAPULSE DASHBOARD & SIDEBAR 100% ZOOM PIXEL-PERFECT FIT
   ========================================================================= */

/* Topbar compact sizing */
.topbar {
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 16px !important;
}

/* Sidebar Proper Full-Height Fit */
.sidebar {
  background: #0b1e3d !important;
  color: #f8fafc !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  width: 225px !important;
  min-width: 225px !important;
  padding: 10px 8px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  height: calc(100vh - 56px) !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.sidebar .nav-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 1px !important;
  overflow: hidden !important;
}

.sidebar .nav-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 6px 10px !important;
  border-radius: 8px !important;
  color: #cbd5e1 !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  border: none !important;
  background: transparent !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  white-space: nowrap !important;
}

.sidebar .nav-item i {
  font-size: 0.88rem !important;
  width: 18px !important;
  text-align: center !important;
}

.sidebar .nav-item:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
}

.sidebar .nav-item.active {
  background: #2563eb !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

/* Sidebar Bottom Promo Card - Securely Anchored Inside */
.sidebar-promo-card {
  margin-top: auto !important;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Main Content Area */
.content-area {
  padding: 14px 18px !important;
  height: calc(100vh - 56px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* WELCOME BANNER WITH PHARMACY / MEDICINE THEMED BACKGROUND */
.welcome-banner-clean {
  background: 
    radial-gradient(circle at 90% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 10% 80%, rgba(16, 185, 129, 0.10) 0%, transparent 40%),
    linear-gradient(135deg, #e0f2fe 0%, #ebf5ff 45%, #f0fdf4 100%) !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 12px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.05) !important;
}

.welcome-banner-clean::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='160' height='80' viewBox='0 0 160 80' xmlns='http://www.w3.org/2000/svg' opacity='0.09'%3E%3Cg fill='%231d4ed8'%3E%3Cpath d='M20 15 h8 v8 h8 v8 h-8 v8 h-8 v-8 h-8 v-8 h8 z' /%3E%3Crect x='65' y='18' width='32' height='12' rx='6' transform='rotate(25 81 24)' /%3E%3Ccircle cx='130' cy='25' r='8' /%3E%3Cpath d='M110 50 h6 v6 h6 v6 h-6 v6 h-6 v-6 h-6 v-6 h6 z' /%3E%3Crect x='25' y='50' width='28' height='10' rx='5' transform='rotate(-20 39 55)' /%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
}

.welcome-banner-title {
  font-size: 1.28rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 2px !important;
}

.welcome-banner-sub {
  font-size: 0.8rem !important;
  color: #475569 !important;
  margin: 0 0 6px !important;
}

.welcome-banner-pill {
  display: inline-block !important;
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 20px !important;
  padding: 3px 12px !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #0369a1 !important;
}

/* 6 TOP KPI CARDS */
.kpi-card-white {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  padding: 10px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03) !important;
}

.kpi-card-white:hover {
  border-color: #93c5fd !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08) !important;
}

/* SELECTED CARD ACTIVE STATE (LIGHT BLUE BORDER) */
.kpi-card-white.kpi-card-active {
  border: 2px solid #0284c7 !important;
  background: #f0f9ff !important;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.18) !important;
}

.kpi-icon-squircle {
  width: 36px !important;
  height: 36px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  flex-shrink: 0 !important;
}

.kpi-value-lg {
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.kpi-label-muted {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  margin-bottom: 2px !important;
  white-space: nowrap !important;
}

.kpi-trend-pill {
  font-size: 0.66rem !important;
  font-weight: 700 !important;
  padding: 1px 6px !important;
  border-radius: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
}

/* DASHBOARD EXPANDED VIEW CONTAINER */
.dash-expanded-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  animation: fadeIn 0.2s ease-in-out;
}

.dash-breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.dash-breadcrumb-path {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.dash-breadcrumb-crumb {
  color: #2563eb;
  font-weight: 800;
}

/* 11 SUB-CARDS COMPACT 2-ROW GRID */
.dash-subcards-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.dash-subcard-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02) !important;
}

.dash-subcard-item:hover {
  border-color: #93c5fd !important;
  background: #f8fafc !important;
}

.dash-subcard-item.active {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 1px #2563eb !important;
}

.dash-subcard-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 2px !important;
}

.dash-subcard-title {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  color: #64748b !important;
  white-space: nowrap !important;
}

.dash-subcard-value {
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

.dash-subcard-sub {
  font-size: 0.65rem !important;
  color: #64748b !important;
  margin-top: 2px !important;
  white-space: nowrap !important;
}

/* Compact Ledger Table Inside Detail */
.dash-ledger-table-wrap {
  max-height: 250px !important;
  overflow-y: auto !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
}

.dash-ledger-table-wrap table th,
.dash-ledger-table-wrap table td {
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
}

/* Responsive Rules for 1366x768 and 1920x1080 Desktop Fit */
@media (min-width: 1200px) {
  #dash-top-kpi-row {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
  }
}



/* ==========================================================================
   PROFILE & STORE SETTINGS + ACTIVITY/AUDIT LOG (LIGHT THEME MODALS)
   ========================================================================== */

/* Settings Modal Card */
.pp-settings-card {
  background: #ffffff !important;
  color: #1e293b !important;
  max-width: 860px !important;
  width: 95% !important;
  border-radius: 14px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3) !important;
  max-height: 90vh !important;
  padding: 24px !important;
  overflow-y: auto !important;
  position: relative !important;
}

/* Modal Title Header */
.pp-settings-header, .pp-audit-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 12px !important;
  margin-bottom: 16px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  background: transparent !important;
  position: relative !important;
}

.pp-modal-title-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.pp-modal-icon-badge {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: #e0f2fe !important;
  color: #0284c7 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
}

.pp-modal-title {
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin: 0 !important;
  font-family: inherit !important;
}

.pp-modal-subtitle {
  font-size: 0.8rem !important;
  color: #64748b !important;
  margin: 2px 0 0 0 !important;
}

.pp-close-btn {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.4rem !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.pp-close-btn:hover {
  background: #fee2e2 !important;
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
  transform: scale(1.05) !important;
}

/* 2-Column Settings Grid */
.pp-settings-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 20px !important;
  margin-bottom: 16px !important;
}

@media (max-width: 768px) {
  .pp-settings-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
}

.pp-settings-col {
  display: flex !important;
  flex-direction: column !important;
}

.pp-col-header {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  padding-bottom: 6px !important;
  border-bottom: 2px solid #e2e8f0 !important;
  margin-bottom: 12px !important;
}

.pp-col-header i {
  font-size: 1rem !important;
}

/* Photo Upload Boxes (Separate User & Shop) */
.pp-photo-box {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  margin-bottom: 12px !important;
}

.pp-avatar-preview-wrap {
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  border: 2px solid #0284c7 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
}

.pp-user-avatar-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.pp-shop-preview-wrap {
  width: 76px !important;
  height: 58px !important;
  border-radius: 8px !important;
  border: 1.5px solid #0284c7 !important;
  overflow: hidden !important;
  background: #ffffff !important;
  flex-shrink: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pp-shop-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.pp-photo-actions {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

.pp-upload-btn {
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #0284c7 !important;
  color: #ffffff !important;
  border: none !important;
  width: fit-content !important;
  transition: background 0.2s ease !important;
}

.pp-upload-btn:hover {
  background: #0369a1 !important;
}

.pp-upload-hint {
  font-size: 0.7rem !important;
  color: #64748b !important;
}

/* Fields & Groups */
.pp-field-group {
  margin-bottom: 10px !important;
}

.pp-field-group label {
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 4px !important;
}

.pp-field-group label i {
  color: #0284c7 !important;
  margin-right: 4px !important;
  font-size: 0.78rem !important;
}

.pp-field-group input,
.pp-field-group textarea {
  width: 100% !important;
  padding: 7px 11px !important;
  font-size: 0.85rem !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.pp-field-group input:focus,
.pp-field-group textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.pp-field-row-2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.pp-field-row-3 {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 8px !important;
}

.pp-input-readonly {
  background: #f1f5f9 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

.pp-req {
  color: #ef4444 !important;
  font-weight: 700 !important;
}

/* Form Action Buttons */
.pp-modal-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

.pp-primary-actions {
  margin-top: 8px !important;
  padding-top: 10px !important;
  border-top: 1px solid #f1f5f9 !important;
}

.pp-section-divider {
  height: 1px !important;
  background: #e2e8f0 !important;
  margin: 16px 0 !important;
}

/* Account Security & Password Eye Wrapper */
.pp-security-section {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 14px !important;
}

.pp-security-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

@media (max-width: 768px) {
  .pp-security-grid {
    grid-template-columns: 1fr !important;
  }
}

.pp-password-wrap {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.pp-password-wrap input {
  padding-right: 36px !important;
}

.pp-eye-btn {
  position: absolute !important;
  right: 6px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: transparent !important;
  border: none !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
  cursor: pointer !important;
  padding: 5px !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.15s ease !important;
  z-index: 2 !important;
}

.pp-eye-btn:hover {
  color: #0284c7 !important;
  background: #f1f5f9 !important;
}

.pp-error-box {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  margin-bottom: 10px !important;
  border: 1px solid #fca5a5 !important;
}

.pp-security-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.pp-sec-btn {
  font-size: 0.8rem !important;
  padding: 6px 12px !important;
}

/* ==========================================================================
   ACTIVITY / AUDIT LOG MODAL
   ========================================================================== */
.pp-audit-card {
  background: #ffffff !important;
  color: #1e293b !important;
  max-width: 900px !important;
  width: 95% !important;
  border-radius: 14px !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.3) !important;
  max-height: 88vh !important;
  padding: 22px !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
}

.pp-audit-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.pp-audit-search-wrap {
  position: relative !important;
  flex: 1 !important;
  max-width: 400px !important;
}

.pp-audit-search-icon {
  position: absolute !important;
  left: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #94a3b8 !important;
  font-size: 0.85rem !important;
}

.pp-audit-search-wrap input {
  width: 100% !important;
  padding: 7px 12px 7px 32px !important;
  font-size: 0.83rem !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  background: #f8fafc !important;
  outline: none !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
}

.pp-audit-search-wrap input:focus {
  background: #ffffff !important;
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.pp-audit-badge {
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  background: #f1f5f9 !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
}

.pp-audit-table-wrapper {
  flex: 1 !important;
  overflow-y: auto !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  max-height: 440px !important;
  background: #ffffff !important;
  margin-bottom: 12px !important;
}

.pp-audit-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.82rem !important;
  text-align: left !important;
}

.pp-audit-table th {
  background: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  padding: 9px 12px !important;
  border-bottom: 1px solid #cbd5e1 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

.pp-audit-table td {
  padding: 8px 12px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  color: #1e293b !important;
  vertical-align: middle !important;
}

.pp-audit-table tr:hover td {
  background: #f8fafc !important;
}

.pp-action-badge {
  display: inline-block !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  background: #e0f2fe !important;
  color: #0284c7 !important;
}

.pp-action-badge.warn {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

.pp-action-badge.danger {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.pp-audit-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: 10px !important;
  border-top: 1px solid #e2e8f0 !important;
}

.pp-audit-pagination {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.pp-page-btn {
  font-size: 0.78rem !important;
  padding: 5px 12px !important;
  border-radius: 6px !important;
}

.pp-page-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.pp-page-info {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
}


/* MODAL VIEWPORT REFINEMENT FOR 100% ZOOM 1366x768 FIT */
#settings-modal, #audit-log-modal {
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 16px !important;
}

.pp-settings-card {
  max-width: 820px !important;
  max-height: 92vh !important;
  padding: 18px 22px !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
}

.pp-audit-card {
  max-width: 860px !important;
  max-height: 88vh !important;
  padding: 18px 22px !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
}

.pp-settings-header, .pp-audit-header {
  padding-bottom: 8px !important;
  margin-bottom: 12px !important;
}

.pp-modal-icon-badge {
  width: 36px !important;
  height: 36px !important;
  font-size: 1.1rem !important;
}

.pp-modal-title {
  font-size: 1.1rem !important;
}

.pp-photo-box {
  padding: 8px 12px !important;
  margin-bottom: 8px !important;
  gap: 12px !important;
}

.pp-avatar-preview-wrap {
  width: 50px !important;
  height: 50px !important;
}

.pp-shop-preview-wrap {
  width: 68px !important;
  height: 50px !important;
}

.pp-field-group {
  margin-bottom: 8px !important;
}

.pp-field-group label {
  font-size: 0.76rem !important;
  margin-bottom: 2px !important;
}

.pp-field-group input, .pp-field-group textarea {
  padding: 6px 10px !important;
  font-size: 0.82rem !important;
}

.pp-section-divider {
  margin: 12px 0 !important;
}

.pp-security-section {
  padding: 10px 14px !important;
}

.pp-security-grid {
  gap: 10px !important;
  margin-bottom: 8px !important;
}

.pp-col-header {
  font-size: 0.88rem !important;
  margin-bottom: 8px !important;
  padding-bottom: 4px !important;
}



/* =========================================================================
   🤖 VIRAJ AI SIDEBAR WIDGET & HELP MODAL STYLING
   ========================================================================= */
.viraj-sidebar-widget {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.45) 0%, rgba(37, 99, 235, 0.35) 100%) !important;
  border: 1px solid rgba(147, 197, 253, 0.3) !important;
  border-radius: 10px !important;
  padding: 8px 10px !important;
  margin: 6px 0 8px 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
  width: 100% !important;
  flex-shrink: 0 !important;
}

.viraj-widget-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 5px !important;
}

.viraj-badge {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.5px !important;
}

.viraj-lang-toggle-btn {
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.viraj-lang-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3) !important;
}

.viraj-widget-prompt {
  font-size: 0.72rem !important;
  color: #e0f2fe !important;
  font-weight: 600 !important;
  margin: 0 0 5px 0 !important;
  line-height: 1.2 !important;
}

.viraj-input-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
}

.viraj-search-icon {
  position: absolute !important;
  left: 7px !important;
  font-size: 0.72rem !important;
  color: #93c5fd !important;
  pointer-events: none !important;
}

.viraj-input {
  width: 100% !important;
  padding: 5px 26px 5px 24px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(147, 197, 253, 0.35) !important;
  border-radius: 7px !important;
  color: #ffffff !important;
  font-size: 0.72rem !important;
  box-sizing: border-box !important;
  outline: none !important;
  transition: border-color 0.2s !important;
}

.viraj-input:focus {
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25) !important;
}

.viraj-send-btn {
  position: absolute !important;
  right: 3px !important;
  background: #2563eb !important;
  border: none !important;
  color: #fff !important;
  border-radius: 5px !important;
  width: 20px !important;
  height: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.65rem !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}

.viraj-send-btn:hover {
  background: #1d4ed8 !important;
}

.viraj-suggestions-dropdown {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 100% !important;
  margin-bottom: 4px !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
  max-height: 200px !important;
  overflow-y: auto !important;
  z-index: 1000 !important;
  padding: 4px 0 !important;
}

.viraj-suggestion-item {
  padding: 7px 10px !important;
  font-size: 0.73rem !important;
  color: #1e293b !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  border-bottom: 1px solid #f1f5f9 !important;
  line-height: 1.3 !important;
}

.viraj-suggestion-item:last-child {
  border-bottom: none !important;
}

.viraj-suggestion-item:hover {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

.viraj-browse-all-btn {
  width: 100% !important;
  margin-top: 5px !important;
  background: transparent !important;
  border: 1px dashed rgba(147, 197, 253, 0.45) !important;
  color: #bfdbfe !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  padding: 3px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  transition: all 0.2s !important;
}

.viraj-browse-all-btn:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  border-style: solid !important;
}

/* =========================================================================
   📱 DASHBOARD & BILLING 100% SCREEN FIT ERGONOMIC STYLES
   ========================================================================= */
.sidebar {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 8px 10px !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

.sidebar .nav-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

.sidebar .nav-item {
  padding: 6px 10px !important;
  font-size: 0.78rem !important;
  border-radius: 7px !important;
}

.sidebar .nav-item i {
  font-size: 0.9rem !important;
  margin-right: 6px !important;
}

.sidebar-promo-card {
  margin-top: auto !important;
  background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%) !important;
  border-radius: 10px !important;
  padding: 6px 10px !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.content-area {
  padding: 10px 14px !important;
  height: calc(100vh - 52px) !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

/* Selected Card Active Blue Border */
.kpi-card-white.kpi-card-active {
  border: 2px solid #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.22) !important;
  background: #ffffff !important;
}

/* Clean compact density for 100% zoom dashboard */
#dashboard-view {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

.dash-kpi-grid {
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.kpi-card-white {
  padding: 10px 12px !important;
  border-radius: 10px !important;
}

.kpi-value-lg {
  font-size: 1.25rem !important;
}

.stock-status-grid {
  gap: 8px !important;
}

.welcome-banner-clean {
  padding: 10px 16px !important;
  margin-bottom: 10px !important;
}

.billing-header-bar {
  padding: 8px 14px !important;
  margin-bottom: 8px !important;
}



/* VIRAJ AI MODAL DISPLAY OVERRIDES */
#viraj-ai-help-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(4px) !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
}

#viraj-ai-help-modal.hidden {
  display: none !important;
}



/* =========================================================================
   🚨 CRITICAL VIEW VISIBILITY RULES
   ========================================================================= */
.hidden,
.view-panel.hidden,
#dashboard-view.hidden,
#billing-view.hidden,
#sales-profit-view.hidden,
#purchases-view.hidden,
#stock-view.hidden,
#medicine-master-view.hidden,
#expiry-alerts-view.hidden,
#customers-view.hidden,
#supplier-view.hidden,
#udhaar-view.hidden,
#payments-view.hidden,
#expenses-view.hidden,
#gst-view.hidden,
#profit-view.hidden,
#invoices-view.hidden,
#item-sales-view.hidden,
#chronic-view.hidden,
#viraj-suggestions-dropdown.hidden,
#viraj-ai-help-modal.hidden {
  display: none !important;
}

#dashboard-view:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

#billing-view:not(.hidden) {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding-bottom: 2px !important;
}

@media screen and (min-width: 1024px) {
  #billing-view:not(.hidden) {
    zoom: 0.87 !important;
  }
}

/* =========================================================================
   🛒 100% BROWSER ZOOM RESPONSIVE HYPER-COMPACT LAYOUT FOR SALES / BILLING
   ========================================================================= */
#billing-view .developer-banner {
  margin-bottom: 2px !important;
  padding: 2px 6px !important;
  font-size: 0.7rem !important;
}

#billing-view .billing-header-bar {
  margin-bottom: 2px !important;
  padding: 4px 8px !important;
  gap: 4px !important;
}

#billing-view .billing-header-title h2 {
  font-size: 0.98rem !important;
}

#billing-view .billing-header-title p {
  display: none !important;
}

#billing-view .btn-header-shortcut {
  padding: 3px 6px !important;
  font-size: 0.7rem !important;
  border-radius: 5px !important;
}

#billing-view .billing-kpi-row {
  gap: 4px !important;
  margin-bottom: 2px !important;
}

#billing-view .billing-kpi-card {
  padding: 3px 5px !important;
  border-radius: 6px !important;
  gap: 4px !important;
}

#billing-view .billing-kpi-squircle {
  width: 22px !important;
  height: 22px !important;
  border-radius: 5px !important;
  font-size: 0.75rem !important;
}

#billing-view .billing-kpi-label {
  font-size: 0.6rem !important;
  margin-bottom: 0px !important;
}

#billing-view .billing-kpi-val {
  font-size: 0.8rem !important;
}

#billing-view .billing-kpi-sub {
  font-size: 0.55rem !important;
  margin-top: 0px !important;
}

#billing-view .billing-main-grid {
  gap: 6px !important;
}

#billing-view .billing-left-col,
#billing-view .billing-right-col {
  gap: 4px !important;
}

#billing-view .billing-section-card {
  padding: 4px 8px !important;
  border-radius: 6px !important;
}

#billing-view .billing-section-title {
  font-size: 0.78rem !important;
  margin-bottom: 2px !important;
}

#billing-view .billing-search-tabs {
  margin-bottom: 2px !important;
  padding-bottom: 2px !important;
}

#billing-view .billing-tab-btn {
  padding: 2px 5px !important;
  font-size: 0.7rem !important;
}

#billing-view .billing-quick-pills {
  margin-top: 2px !important;
  gap: 2px !important;
}

#billing-view .quick-pill-btn {
  padding: 1px 4px !important;
  font-size: 0.68rem !important;
}

#billing-view .cart-table th,
#billing-view .cart-table td {
  padding: 2px 4px !important;
  font-size: 0.72rem !important;
}

#billing-view .cart-live-summary-strip {
  padding: 2px 6px !important;
  margin-top: 2px !important;
  font-size: 0.7rem !important;
}

#billing-view .mini-stats-grid {
  gap: 3px !important;
}

#billing-view .mini-stat-card {
  padding: 1px 3px !important;
}

#billing-view .mini-stat-lbl {
  font-size: 0.58rem !important;
}

#billing-view .mini-stat-val {
  font-size: 0.72rem !important;
}

#billing-view .bill-totals-panel {
  padding: 4px 6px !important;
  margin-top: 2px !important;
}

#billing-view .bill-total-row {
  margin-bottom: 1px !important;
  font-size: 0.72rem !important;
}

#billing-view .bill-total-row.grand {
  margin-top: 2px !important;
  padding-top: 2px !important;
  font-size: 0.8rem !important;
}

#billing-view #bill-grand-total {
  font-size: 1.1rem !important;
}

#billing-view .payment-grid-btns {
  gap: 3px !important;
}

#billing-view .btn-pay-mode-card {
  padding: 3px 5px !important;
  font-size: 0.7rem !important;
}

#billing-view #save-print-bill-btn {
  margin-top: 4px !important;
  padding: 5px 8px !important;
  font-size: 0.8rem !important;
}

#billing-view .bill-action-btn-group {
  margin-top: 3px !important;
  gap: 3px !important;
}

#billing-view .btn-action-save,
#billing-view .btn-action-whatsapp {
  padding: 3px 6px !important;
  font-size: 0.72rem !important;
}

/* =========================================================================
   📦 10 PURCHASE SUMMARY KPI CARDS STYLING
   ========================================================================= */
.purchase-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.purchase-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
}

.purchase-kpi-squircle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.purchase-kpi-info {
  flex: 1;
  min-width: 0;
}

.purchase-kpi-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-kpi-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-kpi-sub {
  font-size: 0.6rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media screen and (max-width: 1200px) {
  .purchase-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .purchase-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================================
   🛒 PURCHASE INWARD LIGHT THEME FORM INPUT STYLING
   ========================================================================= */
#purchases-view .input-group label {
  color: #334155 !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
}

#purchases-view .input-group label i {
  color: #2563eb !important;
}

#purchases-view input,
#purchases-view select,
#purchases-view .input-group input,
#purchases-view .input-group select {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

#purchases-view input::placeholder {
  color: #94a3b8 !important;
  font-weight: 500 !important;
}

#purchases-view select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

#purchases-view input:focus,
#purchases-view select:focus,
#purchases-view .input-group input:focus,
#purchases-view .input-group select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  background: #ffffff !important;
}

#purchases-view input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.2) !important;
  cursor: pointer !important;
}

#purchases-view .card-title,
#purchases-view .view-title {
  color: #0f172a !important;
}

#purchases-view .view-subtext {
  color: #64748b !important;
}

/* =========================================================================
   CUSTOMER MASTER — 8 KPI SUMMARY CARDS GRID (4x2 Responsive Layout)
   ========================================================================= */
.customer-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.customer-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.customer-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.customer-kpi-squircle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.customer-kpi-info {
  flex: 1;
  min-width: 0;
}

.customer-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-kpi-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.customer-kpi-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.kpi-squircle-yellow { background: #fef9c3; color: #ca8a04; }
.kpi-squircle-pink { background: #fce7f3; color: #db2777; }

@media (max-width: 1200px) {
  .customer-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .customer-kpi-row {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   MEDICINE MASTER CATALOG — 8 KPI SUMMARY CARDS GRID (4x2 Responsive Layout)
   ========================================================================= */
.med-master-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
  margin-bottom: 16px;
}

.med-master-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.med-master-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  border-color: #cbd5e1;
}

.med-master-kpi-squircle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.med-master-kpi-info {
  flex: 1;
  min-width: 0;
}

.med-master-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.med-master-kpi-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.med-master-kpi-sub {
  font-size: 0.68rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

@media (max-width: 1200px) {
  .med-master-kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .med-master-kpi-row {
    grid-template-columns: 1fr;
  }
}

.customer-kpi-card.clickable {
  cursor: pointer !important;
  user-select: none;
  position: relative;
  z-index: 1;
  pointer-events: auto !important;
}
.customer-kpi-card.clickable * {
  pointer-events: none !important;
  user-select: none !important;
}
.customer-kpi-card.clickable:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
  border-color: #94a3b8;
}
.customer-kpi-card.clickable:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.modal-xlarge {
  max-width: 1080px !important;
  width: 95vw !important;
}

.active-tab {
  background: var(--primary-cyan) !important;
  color: #000 !important;
  border-color: var(--primary-cyan) !important;
}

/* ==========================================================================
   ADMIN-003Q-Q3B: MY SHIFT CASHIER PANEL STYLINGS
   ========================================================================== */

.shift-page-wrapper {
  animation: fadeIn 0.3s ease-in-out;
}

.shift-header-banner {
  border-radius: var(--radius-md, 14px);
  background: linear-gradient(135deg, rgba(18, 26, 43, 0.85) 0%, rgba(11, 15, 25, 0.95) 100%);
  border: 1px solid var(--border-glass, rgba(255, 255, 255, 0.1));
}

.shift-kpi-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shift-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.shift-badge-open {
  animation: pulseBadge 2s infinite ease-in-out;
}

@keyframes pulseBadge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.shift-no-active-wrapper {
  animation: fadeIn 0.3s ease-in-out;
}

@media (max-width: 768px) {
  .shift-header-banner {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .shift-actions-group {
    width: 100%;
    justify-content: flex-start;
  }
  .shift-actions-group button {
    flex: 1;
    text-align: center;
    justify-content: center;
  }
  .shift-kpi-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 480px) {
  .shift-kpi-grid {
    grid-template-columns: 1fr !important;
  }
}

