/* ==========================================================================
   PharmaRetail ERP - Modern Enterprise Theme & Layout
   Fully Responsive & Zoom-Resilient (Adapts to any resolution: 1080p, 1440p, 4K
   and any zoom level: 75%, 80%, 100%, 125%, 150%)
   ========================================================================== */

:root {
  /* Brand Color Tokens - Prime Pharma V2 Theme (Medical Navy & Emerald Green) */
  --bs-primary: #0B3B60;
  --bs-primary-rgb: 11, 59, 96;
  --bs-primary-hover: #072B47;
  --bs-secondary: #0284c7;
  --bs-secondary-rgb: 2, 132, 199;
  --bs-success: #00A859;
  --bs-success-rgb: 0, 168, 89;
  --bs-success-hover: #008f4c;
  --bs-info: #0284c7;
  --bs-info-rgb: 2, 132, 199;
  --bs-warning: #f59e0b;
  --bs-warning-rgb: 245, 158, 11;
  --brand-yellow: #FFD200;
  --bs-danger: #ef4444;
  --bs-danger-rgb: 239, 68, 68;
  
  /* Neutral Canvas Tokens */
  --bs-dark: #072B47;
  --bs-light: #F4F7FB;
  --bs-body-bg: #F4F7FB;
  --bs-body-color: #0f172a;
  
  /* Sidebar Tokens - Deep Medical Navy */
  --sidebar-bg: #0B3B60;
  --sidebar-border: #082842;
  --sidebar-text: #cbd5e1;
  --sidebar-text-hover: #ffffff;
  --sidebar-active-bg: #00A859;
  --sidebar-hover-bg: #104975;
  --sidebar-section-color: #94a3b8;
  
  /* Surface Tokens */
  --surface-card: #ffffff;
  --surface-border: #e2e8f0;
  --surface-border-subtle: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(11, 59, 96, 0.05);
  --shadow-md: 0 4px 16px -2px rgba(11, 59, 96, 0.08), 0 2px 6px -1px rgba(11, 59, 96, 0.04);
  --shadow-lg: 0 12px 28px -4px rgba(11, 59, 96, 0.12), 0 4px 10px -2px rgba(11, 59, 96, 0.05);
  --shadow-hover: 0 16px 32px -4px rgba(11, 59, 96, 0.15), 0 6px 12px -2px rgba(11, 59, 96, 0.06);
  
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-family-display: 'Outfit', 'Inter', sans-serif;
}

/* Base Reset & Enlarged Typography for Pharmacy Counter Readability */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16.5px; /* Enlarged from 15.5px for counter clarity */
}

@media (min-width: 1600px) {
  html {
    font-size: 17.5px;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-family-sans);
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   APP SHELL LAYOUT - Fully Fluid & Zoom-Adaptive
   ========================================================================== */

.app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background-color: var(--bs-body-bg);
  position: relative;
}

/* Main Content Area - Fills 100% of remaining width smoothly */
.main-content {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  padding: 0.5rem 1rem 1rem;
  background-color: var(--bs-body-bg);
  position: relative;
}

/* Page background watermark for every page */
.page-watermark {
  position: fixed;
  top: 50%;
  left: calc(50% + 120px);
  transform: translate(-50%, -50%);
  width: 480px;
  height: 480px;
  background-image: url('/watermark-logo.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.04;
  pointer-events: none;
  z-index: 99;
  user-select: none;
  -webkit-user-select: none;
}

@media (max-width: 991px) {
  .page-watermark {
    left: 50%;
    width: 290px;
    height: 290px;
  }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 9999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* ==========================================================================
   SIDEBAR COMPONENT (Sticky on Desktop, Off-canvas on Mobile)
   ========================================================================== */

.sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  flex: 0 0 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border);
  z-index: 1000;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Brand Header */
.sidebar .sidebar-header {
  height: 64px;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar .navbar-brand {
  font-family: var(--font-family-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.sidebar .brand-pill {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0B3B60 0%, #00A859 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 168, 89, 0.35);
}

/* Sidebar Scrollable Nav */
.sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.75rem 0.75rem 1.5rem;
}

.sidebar .nav-section {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-section-color);
  padding: 1.1rem 0.75rem 0.4rem;
}

.sidebar .nav-section:first-child {
  padding-top: 0.35rem;
}

.sidebar .nav-link {
  color: var(--sidebar-text);
  font-size: 0.9rem; /* Enlarged for readability */
  font-weight: 500;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 3px;
  transition: all 0.15s ease-in-out;
}

.sidebar .nav-link i, 
.sidebar .nav-link span[class*="bi-"] {
  font-size: 1.15rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

.sidebar .nav-link:hover {
  background-color: var(--sidebar-hover-bg);
  color: var(--sidebar-text-hover);
}

.sidebar .nav-link:hover i,
.sidebar .nav-link:hover span[class*="bi-"] {
  opacity: 1;
  transform: translateX(1px);
}

.sidebar .nav-link.active {
  background: linear-gradient(90deg, #00A859 0%, #008f4c 100%);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 168, 89, 0.35);
}

.sidebar .nav-link.active i,
.sidebar .nav-link.active span[class*="bi-"] {
  opacity: 1;
  color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 0.85rem 1rem;
  background-color: rgba(15, 23, 42, 0.95);
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer .user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid #334155;
  color: #60a5fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

/* Mobile topbar & overlay */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
}

.mobile-topbar .brand {
  font-family: var(--font-family-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1045;
}

@media (max-width: 991.98px) {
  .mobile-topbar {
    display: flex;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1050;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.35);
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .main-content {
    padding: 1rem 1rem 2.5rem;
  }
}

/* ==========================================================================
   DASHBOARD & CORE COMPONENTS
   ========================================================================== */

.dashboard-page {
  animation: fadeIn 0.3s ease-out;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Topbar Header Card */
.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: 1.25rem 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.dash-topbar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, #2563eb, #6366f1);
}

.dash-title {
  font-family: var(--font-family-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  margin-bottom: 0.2rem;
}

.dash-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.dash-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #eff6ff;
  color: #2563eb;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #dbeafe;
}

.dash-live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #2563eb;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  animation: pulse-blue 2s infinite;
}

@keyframes pulse-blue {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Stat Tiles Grid - Fluid responsive */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.stat-tile {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-border);
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.stat-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.stat-tile__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.stat-tile--sales .stat-tile__bar { background: linear-gradient(90deg, #00A859, #059669); }
.stat-tile--msales .stat-tile__bar { background: linear-gradient(90deg, #0284c7, #0369a1); }
.stat-tile--meds .stat-tile__bar { background: linear-gradient(90deg, #0B3B60, #134e7a); }
.stat-tile--lowstock .stat-tile__bar { background: linear-gradient(90deg, #ef4444, #dc2626); }
.stat-tile--cust .stat-tile__bar { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-tile--supp .stat-tile__bar { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }
.stat-tile--pending .stat-tile__bar { background: linear-gradient(90deg, #ec4899, #db2777); }

.stat-tile__label {
  font-size: 0.825rem;
  color: #475569;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.stat-tile__value {
  font-family: var(--font-family-display);
  font-size: 2.1rem; /* Enlarged for instant visibility across pharmacy counter */
  font-weight: 800;
  color: #072B47;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.25rem;
}

.stat-tile__sub {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.stat-tile__link {
  margin-top: auto;
  font-size: 0.85rem;
  color: #00A859;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.15s ease-in-out, color 0.15s ease-in-out;
}

.stat-tile__link:hover {
  color: #008f4c;
  gap: 0.55rem;
}

/* Alert Strip Chips */
.alert-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  width: 100%;
}

.alert-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.15rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.825rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease-in-out;
}

.alert-chip:hover {
  transform: translateY(-1px);
}

.alert-chip--red {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fee2e2;
}

.alert-chip--orange {
  background: #fffbeb;
  color: #b45309;
  border-color: #fef3c7;
}

.alert-chip--blue {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #dbeafe;
}

.chip-badge {
  background: #ffffff;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Quick Sections */
.qs-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--surface-border);
  width: 100%;
}

.qs-section-title {
  font-family: var(--font-family-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
}

.qs-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1rem;
  background: #2563eb;
  border-radius: 2px;
  margin-right: 0.65rem;
}

.qs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.85rem;
  width: 100%;
}

.qs-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: #334155;
  background: #ffffff;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.qs-btn:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
  color: #0f172a;
}

.qs-icon {
  font-size: 1.6rem;
  margin-bottom: 0.45rem;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qs-btn:hover .qs-icon {
  transform: scale(1.12);
}

.qs-label {
  font-size: 0.8rem;
  font-weight: 600;
}

/* QS Icon Accents */
.qs-btn--teal .qs-icon { color: #0d9488; }
.qs-btn--blue .qs-icon { color: #2563eb; }
.qs-btn--green .qs-icon { color: #16a34a; }
.qs-btn--orange .qs-icon { color: #ea580c; }
.qs-btn--indigo .qs-icon { color: #4f46e5; }
.qs-btn--purple .qs-icon { color: #9333ea; }
.qs-btn--red .qs-icon { color: #dc2626; }
.qs-btn--gray .qs-icon { color: #475569; }

/* ==========================================================================
   GLOBAL FORM & TABLE ENHANCEMENTS (ERP MODULES)
   ========================================================================== */

/* Cards */
.card {
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  background-color: #ffffff;
  width: 100%;
}

.card-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--surface-border);
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
}

/* Tables */
.table {
  color: #1e293b;
  margin-bottom: 0;
  width: 100%;
}

.table th {
  background-color: #f8fafc;
  color: #334155;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--surface-border);
}

.table td {
  padding: 0.75rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--surface-border-subtle);
  font-size: 0.935rem;
}

.table-sm th {
  font-size: 0.8rem;
  padding: 0.55rem 0.65rem;
}

.table-sm td {
  font-size: 0.9rem;
  padding: 0.55rem 0.65rem;
}

.table tbody tr:hover {
  background-color: #f1f5f9;
}

/* Buttons */
.btn {
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.5rem 1rem;
  transition: all 0.15s ease-in-out;
}

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

.btn-lg {
  font-size: 1.05rem;
  padding: 0.65rem 1.25rem;
}

.btn-primary {
  background: linear-gradient(180deg, #0B3B60, #072B47);
  border: 1px solid #072B47;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(11, 59, 96, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #072B47, #041B2D);
  border-color: #041B2D;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 59, 96, 0.35);
}

.btn-success {
  background: linear-gradient(180deg, #00A859, #008f4c);
  border: 1px solid #008f4c;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 168, 89, 0.25);
}

.btn-success:hover {
  background: linear-gradient(180deg, #008f4c, #00733d);
  border-color: #00733d;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 168, 89, 0.35);
}

/* Forms - Enlarged for pharmacy speed */
.form-control, .form-select {
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  padding: 0.6rem 0.85rem;
  font-size: 1rem; /* 16px to prevent iOS auto-zoom & fast reading */
  color: #0f172a;
}

.form-control-sm, .form-select-sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.65rem;
}

.form-control-lg, .form-select-lg {
  font-size: 1.05rem;
  padding: 0.6rem 0.95rem;
}

.form-control:focus, .form-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 0.35rem;
}

/* Badges */
.badge {
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.35rem 0.65rem;
}

/* ==========================================================================
   MODERN DESIGN SYSTEM ENHANCEMENTS: Icons, Cards, Tables & Controls
   ========================================================================== */

/* Modern Squircle Icon Badges */
.icon-badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.35rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.icon-badge-sm {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 1.05rem;
}

.icon-badge-lg {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 1.65rem;
}

.icon-badge-blue {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.15);
}
.icon-badge-emerald {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, 0.15);
}
.icon-badge-amber {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.15);
}
.icon-badge-purple {
  background: #f5f3ff;
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.15);
}
.icon-badge-rose {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.15);
}
.icon-badge-cyan {
  background: #ecfeff;
  color: #0891b2;
  border: 1px solid rgba(8, 145, 178, 0.15);
}
.icon-badge-slate {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Modern Report Card */
.report-card-modern {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.15rem 1rem;
  text-decoration: none !important;
  color: #1e293b !important;
  height: 100%;
  min-height: 130px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-card-modern:hover {
  transform: translateY(-3px);
  border-color: #93c5fd;
  box-shadow: 0 10px 24px -4px rgba(37, 99, 235, 0.12), 0 3px 6px -2px rgba(15, 23, 42, 0.04);
  background: #ffffff;
}

.report-card-modern:hover .icon-badge {
  transform: scale(1.08);
}

.report-card-modern .report-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.85rem;
}

.report-card-modern .report-arrow {
  color: #cbd5e1;
  font-size: 0.9rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.report-card-modern:hover .report-arrow {
  color: #2563eb;
  transform: translateX(3px);
}

.report-card-modern .report-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.01em;
}

.report-card-modern .report-subtitle {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
  line-height: 1.25;
}

/* Modern Section Headers */
.modern-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
  margin: 1.75rem 0 0.85rem 0;
  letter-spacing: -0.01em;
}

.modern-section-header:first-child {
  margin-top: 0;
}

.section-accent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Modern Data Table */
.modern-table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table thead th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.8rem 1rem;
  border-top: none;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.modern-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  font-size: 0.935rem;
  color: #1e293b;
}

.modern-table tbody tr {
  transition: background-color 0.15s ease;
}

.modern-table tbody tr:hover {
  background-color: #f8faff;
}

.modern-table tfoot td {
  background: #f8fafc;
  padding: 0.85rem 1rem;
  border-top: 2px solid #e2e8f0;
  border-bottom: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
}

/* Avatar Pill */
.avatar-pill {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid rgba(37, 99, 235, 0.15);
  flex-shrink: 0;
  text-transform: uppercase;
}

/* Ghost Action Buttons */
.btn-ghost-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #64748b;
  font-size: 0.95rem;
  padding: 0;
  transition: all 0.15s ease;
}

.btn-ghost-icon:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #e2e8f0;
}

.btn-ghost-icon.btn-ghost-primary:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.2);
}

.btn-ghost-icon.btn-ghost-danger:hover {
  background: #fff1f2;
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.2);
}

/* Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.status-pill-success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.status-pill-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.status-pill-danger {
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

.status-pill-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Modern Tab Pills (Fixes Inventory Tab Overlap) */
.nav-modern-tabs {
  display: inline-flex;
  padding: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

.nav-modern-tabs .nav-link {
  border-radius: 8px !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  border: none !important;
  background: transparent !important;
  transition: all 0.18s ease !important;
}

.nav-modern-tabs .nav-link:hover {
  color: #1e293b !important;
  background: rgba(255, 255, 255, 0.6) !important;
}

.nav-modern-tabs .nav-link.active {
  background: #ffffff !important;
  color: #2563eb !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

/* Modern Filter Container */
.modern-filter-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  margin-bottom: 1.25rem;
}

/* Keyboard Shortcut Keycap */
.kbd-shortcut {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.4rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 1px 0 #cbd5e1;
}

/* Custom Stock Badges */
.badge-stock {
  background-color: #16a34a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

.badge-stock-zero {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 0.35rem 0.65rem !important;
  border-radius: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) !important;
}

/* ==========================================================================
   SIDEBAR ACCORDION & MODERN NAVIGATION
   ========================================================================== */
.sidebar {
  width: 260px;
  height: 100vh;
  flex-shrink: 0;
  background-color: var(--sidebar-bg, #0f172a);
  color: var(--sidebar-text, #94a3b8);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--sidebar-border, #1e293b);
  position: relative;
  z-index: 1000;
}

/* Details and Summary Accordion Item */
details.nav-group-item {
  margin-bottom: 2px;
}

details.nav-group-item summary.nav-section-btn,
.nav-section-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.55rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 8px;
  margin-top: 4px;
  margin-bottom: 2px;
  transition: all 0.15s ease-in-out;
  user-select: none;
  list-style: none !important;
  outline: none !important;
}

details.nav-group-item summary.nav-section-btn::-webkit-details-marker,
details.nav-group-item summary.nav-section-btn::marker {
  display: none !important;
  content: "" !important;
}

details.nav-group-item summary.nav-section-btn:hover,
.nav-section-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

details.nav-group-item[open] > summary.nav-section-btn,
.nav-section-btn.active-group {
  color: #60a5fa;
}

details.nav-group-item .section-icon,
.nav-section-btn .section-icon {
  font-size: 0.85rem;
  color: #38bdf8;
  width: 18px;
  text-align: center;
}

details.nav-group-item .chevron-icon,
.nav-section-btn .chevron-icon {
  font-size: 0.75rem;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #64748b;
}

details.nav-group-item[open] > summary.nav-section-btn .chevron-icon,
.nav-section-btn .chevron-icon.open {
  transform: rotate(180deg);
  color: #94a3b8;
}

details.nav-group-item:not([open]) > summary.nav-section-btn .chevron-icon {
  transform: rotate(0deg);
  color: #64748b;
}

.nav-subitems {
  padding-left: 0.35rem;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  animation: navFadeIn 0.15s ease-in-out;
}

.nav-subitems .nav-link {
  font-size: 0.82rem;
  padding: 0.42rem 0.65rem 0.42rem 0.8rem;
  border-radius: 6px;
}

.top-dashboard-link {
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 6px;
}

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

/* ==========================================================================
   ZOOM RESILIENCE & MOBILE ENHANCEMENTS
   ========================================================================== */

/* Fluid Tables with smooth touch-scroll */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  border-radius: 8px;
}

/* Medicine & Item Search Dropdowns: scale dynamically on zoom and mobile */
.medicine-search-dropdown,
.search-dropdown-menu {
  min-width: min(650px, 92vw) !important;
  max-width: min(880px, 92vw) !important;
  width: 100% !important;
  max-height: 320px !important;
  overflow-y: auto !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 35px -5px rgba(0, 0, 0, 0.25) !important;
}

/* Touch targets and mobile form adjustments */
@media (max-width: 768px) {
  .btn {
    padding: 0.55rem 0.85rem;
    min-height: 40px;
  }
  
  .form-control, .form-select {
    min-height: 40px;
    font-size: 0.95rem;
  }
  
  .table th, .table td {
    padding: 0.65rem 0.5rem;
  }

  .stat-tile {
    padding: 1rem 1.15rem;
  }

  .dash-topbar {
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .dash-live-badge {
    align-self: flex-start;
  }
}

/* High-Zoom (125%-175%) and Ultra-wide Scaling */
@media (min-resolution: 120dpi), (min-resolution: 1.25dppx) {
  .container, .container-fluid {
    width: 100% !important;
  }
}

/* ==========================================================================
   PRIME PHARMA V2 - POSTER DASHBOARD MOCKUP THEME STYLES
   ========================================================================== */

/* 4 Top KPI Colored Blocks matching monitor */
.kpi-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.15rem;
  width: 100%;
}

.kpi-monitor-card {
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.kpi-monitor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.kpi-monitor-card--sales {
  background: linear-gradient(135deg, #00A859 0%, #008f4c 100%);
}

.kpi-monitor-card--purchase {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.kpi-monitor-card--stock {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.kpi-monitor-card--customers {
  background: linear-gradient(135deg, #0B3B60 0%, #072B47 100%);
}

.kpi-monitor-card__label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.92;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-monitor-card__value {
  font-family: var(--font-family-display);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: #ffffff;
}

.kpi-monitor-card__sub {
  font-size: 0.825rem;
  opacity: 0.85;
  margin-top: auto;
}

/* Expiry Alert Card matching poster */
.expiry-alert-box {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.4rem;
}

.expiry-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--surface-border-subtle);
}

.expiry-alert-item:last-child {
  border-bottom: none;
}

.expiry-badge {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
  border-radius: 9999px;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  min-width: 38px;
  justify-content: center;
}

.expiry-badge--red {
  background-color: #ef4444;
}

.expiry-badge--orange {
  background-color: #f97316;
}

.expiry-badge--amber {
  background-color: #f59e0b;
}

/* High-Impact Yellow Price / Promo Badge matching poster */
.promo-badge-yellow {
  background: #FFD200;
  color: #0B3B60;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-block;
}

/* Dashboard Two-Column Grid (Sales Overview + Expiry Alert) */
.dashboard-grid-two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  width: 100%;
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 992px) {
  .dashboard-grid-two-col {
    grid-template-columns: 1fr;
  }
}

/* Breadcrumb Styling Guard */
.breadcrumb {
  display: flex !important;
  flex-wrap: wrap !important;
  padding: 0.4rem 0 !important;
  margin-bottom: 0.85rem !important;
  list-style: none !important;
  font-size: 0.88rem !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›" !important;
  padding: 0 0.5rem !important;
  color: #94a3b8 !important;
}

.breadcrumb-item a {
  color: #0284c7 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.breadcrumb-item.active {
  color: #64748b !important;
}

/* ==========================================================================
   Active Input Field Cursor Highlight (Instant Visual Feedback for Data Entry)
   ========================================================================== */
.form-control:focus,
.form-select:focus,
input.form-control:focus,
select.form-select:focus,
textarea.form-control:focus,
input:focus,
select:focus {
  border-color: #00A859 !important;
  background-color: #f0fdf4 !important; /* Soft mint highlight so cursor position is unmistakably clear */
  box-shadow: 0 0 0 3.5px rgba(0, 168, 89, 0.32) !important;
  outline: 2px solid #00A859 !important;
  outline-offset: -1px !important;
  color: #072B47 !important;
  font-weight: 600 !important;
  transition: all 0.12s ease-in-out;
}

/* Billing & fast data entry input specific focus */
.item-entry-row input:focus,
.item-entry-row select:focus,
#purMedicineSearch:focus,
#purBatchNo:focus,
#purExpiry:focus,
#purQty:focus,
#purRate:focus,
#purMRP:focus,
#purDisc:focus {
  background-color: #f0fdf4 !important;
  border-color: #00A859 !important;
  box-shadow: 0 0 0 4px rgba(0, 168, 89, 0.35) !important;
  color: #0B3B60 !important;
}

/* Modal batch table active selected row styling - perfectly matched to product selector */
.batch-modal-row-selected,
.batch-modal-row-selected > td,
.batch-modal-row-selected > th,
tr.batch-modal-row-selected > td {
  background-color: #e0f2fe !important;
  --bs-table-bg: #e0f2fe !important;
  --bs-table-accent-bg: #e0f2fe !important;
  font-weight: 600 !important;
  color: #0B3B60 !important;
}

.batch-modal-row-selected > td:first-child,
tr.batch-modal-row-selected > td:first-child {
  border-left: 4px solid #2563eb !important;
}

.batch-modal-row-selected-new,
.batch-modal-row-selected-new > td,
tr.batch-modal-row-selected-new > td {
  background-color: #dcfce7 !important;
  --bs-table-bg: #dcfce7 !important;
  --bs-table-accent-bg: #dcfce7 !important;
  font-weight: 600 !important;
  color: #166534 !important;
}

.batch-modal-row-selected-new > td:first-child,
tr.batch-modal-row-selected-new > td:first-child {
  border-left: 4px solid #16a34a !important;
}

/* ==========================================================================
   PRINT SPECIFICATIONS - BRAND BAR & ICONS STRICTLY EXCLUDED FROM PRINTS
   ========================================================================== */
@media print {
  .no-print,
  .no-print *,
  .page-watermark,
  .software-brand-topbar,
  .software-brand-topbar *,
  .software-reporting-icon,
  .sidebar,
  .sidebar *,
  #sidebarNav,
  .mobile-topbar,
  .sidebar-overlay,
  .preview-toolbar,
  #pwa-install-banner,
  .btn,
  button {
    display: none !important;
    visibility: hidden !important;
  }

  .main-content {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    width: 100% !important;
  }
}

