/* ========================================================= */
/* OMEGA ENTERPRISE ERP DESIGN SYSTEM & STYLESHEET          */
/* Light Clean Theme — White surfaces + Royal Blue accent   */
/* ========================================================= */

:root {
  /* Surfaces */
  --bg-dark: #f5f7fb;          /* App background (name kept for compatibility) */
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --bg-subtle: #f1f5f9;        /* Nested panels, readonly fields, table heads */
  --bg-hover: #eef2f8;
  --bg-input: #ffffff;
  --border-color: #e3e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* Accents (legacy names kept so inline styles / JS keep working) */
  --gold-primary: #2563eb;     /* Primary accent -> Royal Blue */
  --gold-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --primary-ring: rgba(37, 99, 235, 0.18);
  --crimson-primary: #dc2626;
  --rose-primary: #e11d48;
  --emerald-primary: #059669;
  --blue-primary: #2563eb;
  --sky-primary: #0284c7;
  --amber-primary: #d97706;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.12);

  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* ========================================================= */
/* 1. SINGLE UNIFIED LANDING & LOGIN PAGE                   */
/* ========================================================= */
.landing-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top center, #dbe7ff 0%, #f5f7fb 70%);
  padding: 2rem;
}

.landing-card-single {
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.omega-logo-wrapper {
  margin-bottom: 2rem;
}

.omega-logo-img {
  width: 220px;
  height: 160px;
  filter: drop-shadow(0 10px 25px rgba(37, 99, 235, 0.25));
  transition: transform 0.3s ease;
}

.omega-logo-img:hover {
  transform: scale(1.04);
}

.company-title {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.5rem;
}

.company-tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.3rem;
}

/* Single Unified Login Form Box */
.login-form-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.2rem 2rem;
  text-align: left;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.login-form-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1d4ed8, #3b82f6, #60a5fa);
}

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

.login-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.login-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

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

.input-icon-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--gold-primary);
  font-size: 0.95rem;
}

.input-icon-wrapper input {
  padding-left: 2.8rem !important;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}

.login-hints {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ========================================================= */
/* 2. MAIN APP LAYOUT & SIDEBAR                             */
/* ========================================================= */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03);
}

.sidebar-brand {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

.brand-logo-small {
  width: 38px;
  height: 38px;
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.brand-text h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
}

.brand-text h2 span {
  color: var(--gold-primary);
}

.version-badge {
  font-size: 0.7rem;
  background: var(--primary-soft);
  color: var(--gold-primary);
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.72rem 1rem;
  margin: 2px 0.85rem;
  border-radius: 10px;
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.nav-item a i {
  width: 18px;
  text-align: center;
  color: #64748b;
  transition: color 0.2s ease;
}

.nav-item:hover a {
  color: var(--text-main);
  background: var(--bg-hover);
}

.nav-item:hover a i {
  color: var(--gold-primary);
}

.nav-item.active a {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.nav-item.active a i {
  color: #ffffff;
}

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

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}

.user-role-badge {
  font-size: 0.75rem;
  color: var(--gold-primary);
  display: block;
}

.btn-switch-landing {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
}

.btn-switch-landing:hover {
  color: var(--crimson-primary);
  background: #fef2f2;
}

/* ========================================================= */
/* 3. MAIN HEADER & PAGE CONTAINERS                          */
/* ========================================================= */
.main-wrapper {
  flex: 1;
  min-width: 0;
  width: calc(100% - 260px);
  max-width: calc(100vw - 260px);
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

.top-header {
  min-height: 60px;
  height: auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: nowrap;
  padding: 0.45rem 1rem;
  position: sticky;
  top: 0;
  z-index: 90;
  max-width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 auto;
}

.active-portal-badge {
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.22);
  padding: 0.28rem 0.65rem;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--gold-primary);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 185px;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 0.34rem 0.65rem;
  border-radius: 9px;
  width: 195px;
  min-width: 130px;
  max-width: 240px;
  flex: 1 1 195px;
  transition: all 0.2s ease;
}

.header-search:focus-within {
  background: #ffffff;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.header-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--emerald-primary);
  white-space: nowrap;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--emerald-primary);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

.quick-btn-group {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: nowrap;
}

.quick-btn-group .btn {
  padding: 0.36rem 0.6rem;
  font-size: 0.75rem;
  gap: 0.32rem;
  white-space: nowrap;
}

@media (max-width: 1480px) {
  .status-indicator span:not(.pulse-dot) {
    display: none;
  }
  .header-search {
    width: 145px;
    flex: 0 1 150px;
  }
}

@media (max-width: 1060px) {
  .top-header {
    flex-wrap: wrap;
  }
  .quick-btn-group {
    flex-wrap: wrap;
  }
}

/* Clean utility spacing for FontAwesome icons */
.me-1 { margin-right: 0.32rem !important; }
.me-2 { margin-right: 0.55rem !important; }
.ms-1 { margin-left: 0.32rem !important; }
.ms-2 { margin-left: 0.55rem !important; }

/* ========================================================= */
/* 4. BUTTONS, FORMS & PERMISSION CHECKBOXES                 */
/* ========================================================= */
.btn {
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-primary { background: var(--gold-primary); color: #fff; box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { background: var(--gold-hover); }

.btn-gold { background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-weight: 700; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28); }
.btn-gold:hover { opacity: 0.92; transform: translateY(-1px); }

.btn-secondary { background: #ffffff; color: var(--text-main); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-strong); }

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

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

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 0.75rem 1.3rem; font-size: 1rem; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }
.btn-danger-ghost { background: none; color: var(--crimson-primary); border: 1px solid #fecaca; }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  background: var(--bg-subtle);
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.checkbox-label {
  font-size: 0.85rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.content-container { padding: 1.35rem 1.5rem; flex: 1; min-width: 0; max-width: 100%; }
.tab-content { display: none; min-width: 0; max-width: 100%; }
.tab-content.active { display: block; }
.page-title-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-title-bar h2 { font-size: 1.55rem; font-weight: 800; color: var(--text-main); }
.subtitle { color: var(--text-muted); font-size: 0.88rem; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi-card { background: var(--bg-card); border: 1px solid var(--border-color); padding: 1.15rem 1.25rem; border-radius: 14px; display: flex; align-items: center; gap: 0.95rem; min-width: 0; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.icon-emerald { background: #ecfdf5; color: var(--emerald-primary); }
.icon-blue { background: #eff6ff; color: var(--blue-primary); }
.icon-amber { background: #fffbeb; color: var(--amber-primary); }
.icon-rose { background: #fef2f2; color: var(--crimson-primary); }

.kpi-title { font-size: 0.82rem; color: var(--text-muted); display: block; }
.kpi-value { font-size: 1.35rem; font-weight: 800; color: var(--text-main); }
.kpi-sub { font-size: 0.76rem; color: var(--text-muted); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.card-header { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.card-header h3 { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; color: var(--text-main); }
.card-body { padding: 1.5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.data-table th { background: #f8fafc; padding: 0.9rem 1.2rem; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border-color); }
.data-table td { padding: 0.9rem 1.2rem; border-bottom: 1px solid var(--border-color); }
.data-table tr:hover td { background: #f8fafc; }

.badge { padding: 0.25rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

.pos-layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; }
.pos-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.pos-product-item { background: #ffffff; border: 1px solid var(--border-color); padding: 1rem; border-radius: 10px; cursor: pointer; transition: all 0.2s ease; box-shadow: var(--shadow-sm); }
.pos-product-item:hover { border-color: var(--gold-primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pos-product-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.3rem; }
.pos-product-sku { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }
.pos-product-price { font-size: 1.1rem; font-weight: 800; color: var(--gold-primary); margin-top: 0.5rem; }

.pos-summary-box { background: var(--bg-subtle); border: 1px solid var(--border-color); padding: 1rem; border-radius: 8px; margin: 1rem 0; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.9rem; }
.total-row { border-top: 1px solid var(--border-color); padding-top: 0.5rem; font-size: 1.2rem; font-weight: 800; color: var(--gold-primary); }

.aging-matrix-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem; }
.aging-card { background: var(--bg-card); border: 1px solid var(--border-color); padding: 1.5rem; border-radius: 12px; text-align: center; }
.aging-card h4 { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.aging-card h3 { font-size: 1.6rem; font-weight: 800; }
.aging-card p { font-size: 0.78rem; color: var(--text-muted); }

.modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 999; }
.modal-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; width: 580px; max-width: 90%; overflow: hidden; }
.modal-header { padding: 1.2rem 1.5rem; border-bottom: 1px solid var(--border-color); display: flex; align-items: center; justify-content: space-between; }
.btn-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.btn-close:hover { color: var(--text-main); }

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.85rem; color: #475569; margin-bottom: 0.4rem; font-weight: 600; }
.form-input, .form-select { width: 100%; background: var(--bg-input); border: 1px solid var(--border-strong); padding: 0.6rem 0.8rem; border-radius: 8px; color: var(--text-main); font-size: 0.9rem; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.form-input:focus, .form-select:focus { border-color: var(--gold-primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-input[readonly] { background: var(--bg-subtle); }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* EXECUTIVE SYSTEM SETTINGS MODAL (Wide, Tabbed, Scrollable, Zero Overflow) */
#modal-system-settings .modal-card {
  width: 820px !important;
  max-width: 94vw !important;
  max-height: 90vh !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.28) !important;
}

#modal-system-settings .modal-header {
  padding: 16px 22px !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0 !important;
  flex-shrink: 0;
}

#modal-system-settings .sys-settings-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  flex-wrap: wrap;
}

#modal-system-settings .sys-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

#modal-system-settings .sys-tab-btn:hover {
  border-color: var(--gold-primary);
  color: var(--text-main);
}

#modal-system-settings .sys-tab-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

#modal-system-settings .modal-body {
  padding: 20px 22px !important;
  overflow-y: auto !important;
  flex: 1 1 auto;
}

#modal-system-settings .sys-settings-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

#modal-system-settings .sys-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

#modal-system-settings .sys-card-title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#modal-system-settings .sa-plugin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

#modal-system-settings .sa-plugin-row-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

#modal-system-settings .sa-plugin-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

#modal-system-settings .sa-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

#modal-system-settings .sa-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

#modal-system-settings .sa-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 24px;
}

#modal-system-settings .sa-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

#modal-system-settings .sa-switch input:checked + .sa-slider {
  background-color: #10b981;
}

#modal-system-settings .sa-switch input:checked + .sa-slider:before {
  transform: translateX(20px);
}

@media (max-width: 680px) {
  #modal-system-settings .grid-2-col {
    grid-template-columns: 1fr !important;
  }
}

/* POS Category Quick Filter Pills */
.pos-category-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pos-cat-pill { background: #ffffff; border: 1px solid var(--border-color); color: var(--text-muted); padding: 5px 12px; border-radius: 20px; font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.pos-cat-pill:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.pos-cat-pill.active { background: var(--gold-primary); color: #ffffff; border-color: var(--gold-primary); font-weight: 700; }

/* Unified Terminal Table Input Styling & Spinner Removal (Sales Invoice, SO, PO, PI, Return, Reorder, Claims) */
.inv-row-qty, .inv-row-gift, .inv-row-price, .inv-row-disc,
.so-qty, .so-gift, .so-price, .so-discount,
.po-qty, .po-gift, .po-cost, .po-discount,
.pi-qty, .pi-gift, .pi-cost, .pi-discount,
.ro-qty, .ro-cost,
.clm-qty, .clm-price,
.return-qty-input, .return-gift-input, .return-disc-input {
  background: #ffffff !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong) !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  padding: 0.45rem 0.5rem !important;
  border-radius: 6px !important;
  -moz-appearance: textfield;
}

.inv-row-qty::-webkit-outer-spin-button,
.inv-row-qty::-webkit-inner-spin-button,
.inv-row-gift::-webkit-outer-spin-button,
.inv-row-gift::-webkit-inner-spin-button,
.inv-row-price::-webkit-outer-spin-button,
.inv-row-price::-webkit-inner-spin-button,
.inv-row-disc::-webkit-outer-spin-button,
.inv-row-disc::-webkit-inner-spin-button,
.so-qty::-webkit-outer-spin-button,
.so-qty::-webkit-inner-spin-button,
.so-gift::-webkit-outer-spin-button,
.so-gift::-webkit-inner-spin-button,
.so-price::-webkit-outer-spin-button,
.so-price::-webkit-inner-spin-button,
.so-discount::-webkit-outer-spin-button,
.so-discount::-webkit-inner-spin-button,
.po-qty::-webkit-outer-spin-button,
.po-qty::-webkit-inner-spin-button,
.po-gift::-webkit-outer-spin-button,
.po-gift::-webkit-inner-spin-button,
.po-cost::-webkit-outer-spin-button,
.po-cost::-webkit-inner-spin-button,
.po-discount::-webkit-outer-spin-button,
.po-discount::-webkit-inner-spin-button,
.pi-qty::-webkit-outer-spin-button,
.pi-qty::-webkit-inner-spin-button,
.pi-gift::-webkit-outer-spin-button,
.pi-gift::-webkit-inner-spin-button,
.pi-cost::-webkit-outer-spin-button,
.pi-cost::-webkit-inner-spin-button,
.pi-discount::-webkit-outer-spin-button,
.pi-discount::-webkit-inner-spin-button,
.ro-qty::-webkit-outer-spin-button,
.ro-qty::-webkit-inner-spin-button,
.ro-cost::-webkit-outer-spin-button,
.ro-cost::-webkit-inner-spin-button,
.clm-qty::-webkit-outer-spin-button,
.clm-qty::-webkit-inner-spin-button,
.clm-price::-webkit-outer-spin-button,
.clm-price::-webkit-inner-spin-button,
.return-qty-input::-webkit-outer-spin-button,
.return-qty-input::-webkit-inner-spin-button,
.return-gift-input::-webkit-outer-spin-button,
.return-gift-input::-webkit-inner-spin-button,
.return-disc-input::-webkit-outer-spin-button,
.return-disc-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.inv-row-qty:focus, .inv-row-gift:focus, .inv-row-price:focus, .inv-row-disc:focus, .inv-row-prod-input:focus,
.so-qty:focus, .so-gift:focus, .so-price:focus, .so-discount:focus, .so-prod-input:focus,
.po-qty:focus, .po-gift:focus, .po-cost:focus, .po-discount:focus, .po-prod-input:focus,
.pi-qty:focus, .pi-gift:focus, .pi-cost:focus, .pi-discount:focus, .pi-prod-input:focus,
.ro-qty:focus, .ro-cost:focus, .ro-prod-input:focus,
.clm-qty:focus, .clm-price:focus, .clm-prod-input:focus,
.return-qty-input:focus, .return-gift-input:focus, .return-disc-input:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 3px var(--primary-ring) !important;
  background: #ffffff !important;
  color: var(--text-main) !important;
}

/* Reshuffled Sales & POS Section Styling */
.invoice-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 1024px) {
  .invoice-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.invoice-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.invoice-kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.invoice-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-accent, var(--gold-primary));
}

.invoice-kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--card-accent, var(--gold-primary));
  flex-shrink: 0;
}

.invoice-kpi-info {
  display: flex;
  flex-direction: column;
}

.invoice-kpi-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.invoice-kpi-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin: 2px 0;
}

.invoice-kpi-subtext {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.sales-view-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 1.25rem;
}

.sales-view-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.65rem 1.3rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.2s ease;
  position: relative;
}

.sales-view-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-strong);
}

.sales-view-tab.active {
  background: var(--primary-soft);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.sales-view-tab .badge-pill {
  background: var(--bg-subtle);
  color: #475569;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.sales-view-tab.active .badge-pill {
  background: var(--gold-primary);
  color: #ffffff;
}

.customer-info-mini-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.quick-tender-btns {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.btn-tender-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
  text-align: center;
}

.btn-tender-chip:hover {
  background: #ecfdf5;
  border-color: var(--emerald-primary);
  color: var(--emerald-primary);
}

.inv-shortcut-bar {
  display: flex;
  gap: 16px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding: 8px 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
}

.inv-shortcut-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.inv-shortcut-item kbd {
  background: #ffffff;
  color: var(--text-main);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.7rem;
  font-weight: bold;
}

.print-mode-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.1);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.print-mode-btn {
  border: none;
  background: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.print-mode-btn.active {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Formal A4 Printable Invoice Styles */
.a4-invoice-body {
  background: #ffffff;
  color: #111827;
  padding: 25px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 0.88rem;
  line-height: 1.5;
}

.a4-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #059669;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.a4-company-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: #059669;
  letter-spacing: 0.5px;
}

.a4-invoice-title {
  text-align: right;
}

.a4-invoice-title h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #111827;
  margin: 0;
  text-transform: uppercase;
}

.a4-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.a4-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.a4-table th {
  background: #059669;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 8px 10px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.a4-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
}

.a4-totals-table {
  width: 320px;
  margin-left: auto;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.a4-totals-table td {
  padding: 5px 8px;
}

.scanner-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: var(--emerald-primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.quick-cash-row {
  border-top: 1px dashed var(--border-strong);
}

/* Printable POS Receipt Formatting */
.receipt-card-body { font-family: 'Courier New', Courier, monospace; color: #111827; background: #ffffff; padding: 10px; }
.receipt-header-logo { text-align: center; border-bottom: 1px dashed #9ca3af; padding-bottom: 10px; margin-bottom: 10px; }
.receipt-header-logo h2 { font-size: 1.3rem; margin: 0; font-weight: 800; }
.receipt-header-logo p { font-size: 0.8rem; margin: 2px 0 0 0; color: #4b5563; }
.receipt-info-grid { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 10px; border-bottom: 1px dashed #9ca3af; padding-bottom: 8px; }
.receipt-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 10px; }
.receipt-table th { text-align: left; border-bottom: 1px solid #111827; padding: 4px 2px; }
.receipt-table td { padding: 4px 2px; border-bottom: 1px dashed #e5e7eb; }
.receipt-totals-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; border-top: 1px dashed #9ca3af; padding-top: 6px; }
.receipt-totals-table td { padding: 3px 0; }
.receipt-footer-msg { text-align: center; margin-top: 12px; border-top: 1px dashed #9ca3af; padding-top: 10px; font-size: 0.78rem; color: #4b5563; }

/* Clean, Crisp Urdu Font & RTL Styling (Zero Vertical Clipping in Inputs) */
@import url('https://cdn.jsdelivr.net/gh/naqeeb/jameel-noori-nastaleeq-cdn@latest/font.css');

.urdu-font, .text-urdu {
  font-family: 'Noto Sans Arabic', 'Jameel Noori Nastaleeq', 'Noto Nastaliq Urdu', 'Segoe UI', Tahoma, sans-serif !important;
  line-height: 1.6 !important;
}

input.inv-row-urdu-name,
input.express-row-urdu,
input.so-urdu-name,
input.po-urdu-name,
input.pi-urdu-name,
input.ro-urdu-name,
input.clm-urdu-name,
input.ret-urdu-name,
#new-prod-name-urdu,
#edit-prod-name-urdu {
  font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif !important;
  direction: rtl !important;
  text-align: right !important;
  line-height: 1.45 !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: #0f766e !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

/* Unified Search & Barcode Scanner Input inside Invoice Row */
.inv-suggest-container {
  position: relative;
  width: 100%;
}

.inv-row-barcode-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--emerald-primary);
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0.85;
}

.inv-suggest-container .inv-row-prod-input,
.inv-suggest-container .so-prod-input,
.inv-suggest-container .po-prod-input,
.inv-suggest-container .pi-prod-input,
.inv-suggest-container .ro-prod-input,
.inv-suggest-container .clm-prod-input {
  padding-left: 32px !important;
}

.inv-suggest-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 560px;
  max-width: 88vw;
  z-index: 99999;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.22), 0 4px 12px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

.inv-suggest-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.inv-suggest-list {
  max-height: 310px;
  overflow-y: auto;
  padding: 5px;
}

.inv-suggest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  margin-bottom: 3px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.inv-suggest-item:last-child {
  margin-bottom: 0;
}

.inv-suggest-item:hover,
.inv-suggest-item.selected,
.inv-suggest-item.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  border-left-color: #10b981;
}

.inv-suggest-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.inv-suggest-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inv-suggest-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
  line-height: 1.25;
}

.inv-suggest-urdu {
  font-family: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.45;
  direction: rtl;
}

.inv-suggest-sub {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.74rem;
  color: #64748b;
}

.inv-suggest-sku {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 0.71rem;
  font-weight: 600;
}

.inv-suggest-barcode {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--font-mono, monospace);
  font-size: 0.71rem;
  font-weight: 700;
}

.inv-suggest-stock {
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.71rem;
  font-weight: 700;
}

.inv-suggest-stock.stock-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.inv-suggest-stock.stock-low {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.inv-suggest-stock.stock-out {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.inv-suggest-loc {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  padding: 1px 7px;
  border-radius: 5px;
  font-size: 0.71rem;
  font-weight: 700;
}

.inv-row-location {
  background: #f5f3ff !important;
  color: #5b21b6 !important;
  border-color: #ddd6fe !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 6px 7px !important;
  text-overflow: ellipsis;
}

.inv-suggest-price-box {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
}

.inv-suggest-price {
  font-weight: 800;
  font-size: 0.96rem;
  color: #059669;
  font-family: var(--font-mono, monospace);
}

.inv-suggest-kbd {
  font-size: 0.64rem;
  font-weight: 700;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #cbd5e1;
  padding: 1px 6px;
  border-radius: 4px;
}

.inv-suggest-item.selected .inv-suggest-kbd,
.inv-suggest-item:hover .inv-suggest-kbd {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}

.inv-suggest-empty {
  padding: 16px 14px;
  text-align: center;
  color: #64748b;
  font-size: 0.84rem;
}

/* Browser Native Printing Directives */
@media print {
  body * { visibility: hidden !important; }
  #modal-pos-invoice-print,
  #modal-pos-invoice-print * { visibility: visible !important; }
  #modal-pos-invoice-print { position: absolute !important; left: 0 !important; top: 0 !important; width: 100% !important; background: #fff !important; }
  .modal-backdrop { background: none !important; backdrop-filter: none !important; }
  .modal-card { width: 100% !important; max-width: 100% !important; border: none !important; box-shadow: none !important; }
  .modal-header, .modal-footer { display: none !important; }
  #printable-invoice-content { padding: 0 !important; }
}

/* Accounts & Financial Module Styling */
.accounts-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.accounts-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.accounts-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.accounts-tab.active {
  background: var(--primary-soft);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.accounts-tab .badge-pill {
  background: var(--bg-subtle);
  color: #475569;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 800;
}

.accounts-tab.active .badge-pill {
  background: var(--gold-primary);
  color: #ffffff;
}

.aging-matrix-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .aging-matrix-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.aging-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.aging-card:hover {
  transform: translateY(-2px);
}

.aging-card h4 {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.aging-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.aging-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.aging-current { border-top: 3px solid var(--emerald-primary); }
.aging-30 { border-top: 3px solid var(--gold-primary); }
.aging-60 { border-top: 3px solid var(--amber-primary); }
.aging-90 { border-top: 3px solid var(--rose-primary); }

.pnl-statement-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.pnl-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.pnl-row.sub-total {
  font-weight: 700;
  background: var(--bg-subtle);
  padding: 10px 12px;
  border-radius: 6px;
  margin: 6px 0;
}

.pnl-row.grand-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--emerald-primary);
  border-top: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  padding: 12px 12px;
  margin-top: 10px;
}

/* Reports & Analytics Module Styling */
.reports-nav {
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.reports-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.reports-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.reports-tab.active {
  background: var(--primary-soft);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.reports-filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.1rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

/* ========================================================= */
/* SALES INVOICE & SALES ORDER POS TERMINAL REDESIGN STYLES  */
/* ========================================================= */
.sales-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 1.1rem;
  overflow: visible;
}

.sales-view-tab {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  backdrop-filter: blur(8px);
}

.sales-view-tab:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.sales-view-tab.active {
  background: var(--primary-soft);
  color: var(--gold-primary);
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.sales-view-tab .badge-pill {
  background: var(--bg-subtle);
  color: var(--text-main);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.sales-view-tab.active .badge-pill {
  background: var(--gold-primary);
  color: #fff;
}

/* Scanner Indicator Badge */
.scanner-badge {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: var(--emerald-primary);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

/* Customer Details Mini Card */
.customer-info-mini-card {
  margin-top: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  animation: fadeIn 0.25s ease-in-out;
}

.customer-info-mini-card strong {
  color: var(--gold-primary);
  font-weight: 700;
}

/* POS Summary Container */
.pos-summary-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.pos-summary-box .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.pos-summary-box .summary-row.total-row {
  border-top: 2px dashed var(--border-strong);
  border-bottom: 2px dashed var(--border-strong);
  margin: 10px 0;
  padding: 12px 0;
  color: var(--text-main);
  font-weight: 800;
  font-size: 1.25rem;
}

.pos-summary-box .summary-row.total-row span:last-child {
  color: var(--emerald-primary);
  font-size: 1.45rem;
}

/* Quick Tender Buttons */
.quick-tender-btns {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.btn-tender-chip {
  flex: 1;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.btn-tender-chip:hover {
  background: var(--primary-soft);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-1px);
}

/* Keyboard Shortcut Legend Bar */
.inv-shortcut-bar {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding: 10px 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.inv-shortcut-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.inv-shortcut-item kbd {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 1px 0 var(--border-strong);
}

/* Status Badges */
.badge-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-status.badge-emerald {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-status.badge-amber {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.badge-status.badge-sky {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.badge-status.badge-crimson {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.badge-rose {
  background: rgba(225, 29, 72, 0.15);
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.3);
}

.badge-secondary {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.sales-view-content {
  animation: fadeIn 0.25s ease;
}

/* ========================================================= */
/* EXPRESS HYBRID MODAL INVOICE CREATOR STYLES               */
/* ========================================================= */
.modal-express-dialog {
  max-width: 1150px !important;
  width: 95%;
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(16px);
}

.express-cmd-wrapper {
  position: relative;
  background: #ffffff;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.2rem;
  transition: all 0.3s ease;
}

.express-cmd-wrapper:focus-within {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 4px var(--primary-ring);
}

.express-cmd-icon {
  font-size: 1.3rem;
  color: var(--gold-primary);
}

.express-cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-sans);
}

.express-cmd-input::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.express-cmd-kbd-tag {
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--gold-primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.express-grid-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.25rem;
}

.express-summary-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.btn-express-create {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  padding: 12px 20px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-express-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.4);
}

/* ========================================================= */
/* UNIFIED SPECIAL INVOICE HUB CUSTOM STYLES                 */
/* ========================================================= */
.special-hub-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.step-title-badge {
  background: var(--primary-soft);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--gold-primary);
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-print-bill {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.btn-print-bill:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 12px 26px rgba(5, 150, 105, 0.4);
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
}

.btn-quick-creator {
  background: var(--primary-soft);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-weight: 800;
  font-size: 1rem;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-quick-creator:hover {
  background: var(--gold-primary);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* ========================================================= */
/* OMEGA ENTERPRISE COMPANY LANDING PAGE STYLES              */
/* ========================================================= */
.landing-page-wrapper {
  background: #f5f7fb;
  color: var(--text-main);
  min-height: 100vh;
  font-family: var(--font-sans);
  overflow-x: hidden;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.landing-nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-logo-img {
  height: 42px;
  width: auto;
  border-radius: 6px;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 900;
  display: block;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.landing-nav-links {
  display: flex;
  gap: 24px;
}

.landing-nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.landing-nav-links a:hover {
  color: var(--gold-primary);
}

.landing-nav-actions {
  display: flex;
  gap: 12px;
}

/* Hero Section */
.hero-section {
  padding: 4rem 1.5rem;
  background: radial-gradient(circle at 50% 20%, #dbe7ff 0%, #f5f7fb 70%);
}

.hero-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 1rem 0;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-cta-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-visual-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.hero-preview-badge {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.hero-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.mini-kpi {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
}

.mini-kpi .kpi-lbl {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mini-kpi .kpi-val {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
}

/* Landing Sections */
.landing-section {
  padding: 5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.landing-section.alt-bg {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 24px;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3.5rem auto;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

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

/* Feature Cards */
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.feature-icon.bg-gold { background: var(--gold-primary); }
.feature-icon.bg-emerald { background: var(--emerald-primary); }
.feature-icon.bg-blue { background: #0ea5e9; color: #fff; }
.feature-icon.bg-purple { background: #7c3aed; color: #fff; }

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.benefit-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

/* Contact Cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  text-align: center;
}

.contact-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.contact-card i {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.landing-footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

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

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

.modal-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
  }
  .landing-nav-links {
    display: none;
  }
}

/* ========================================================= */
/* EXECUTIVE SALES INVOICE CREATION TERMINAL (LIGHT THEME)  */
/* ========================================================= */

.exec-invoice-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-height: calc(100vh - 150px);
  display: flex;
  flex-direction: column;
}

.exec-invoice-container .exec-table-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 240px;
}

.exec-invoice-container .exec-table-card .exec-table-actions-bar {
  margin-top: auto;
}

/* Complete-Screen Workspace for Cashier Invoice Terminal */
#tab-sales.cashier-fullscreen-invoice .sales-view-nav {
  margin-bottom: 0.75rem;
}

#tab-sales.cashier-fullscreen-invoice .exec-invoice-container {
  min-height: calc(100vh - 128px);
  margin-bottom: 0;
  padding: 1.25rem 1.5rem;
}

/* Zen Full-Screen Mode (100% Viewport Edge-to-Edge Invoice Creation Form) */
.exec-fs-only-btn {
  display: none !important;
}

body.invoice-fullscreen-mode .exec-fs-only-btn {
  display: inline-flex !important;
}

body.invoice-fullscreen-mode .sidebar,
body.invoice-fullscreen-mode .top-header,
body.invoice-fullscreen-mode #sales-page-title-bar,
body.invoice-fullscreen-mode #sales-kpi-metrics-grid,
body.invoice-fullscreen-mode #sales-invoices-history-card,
body.invoice-fullscreen-mode .exec-history-below-card,
body.invoice-fullscreen-mode #tab-sales .sales-view-nav {
  display: none !important;
}

body.invoice-fullscreen-mode .main-wrapper {
  margin-left: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

body.invoice-fullscreen-mode .content-container {
  padding: 10px 14px !important;
  max-width: 100vw !important;
}

body.invoice-fullscreen-mode .sales-view-content:not(.hidden) .exec-invoice-container {
  min-height: calc(100vh - 20px) !important;
  margin: 0 !important;
  border-radius: 12px;
  padding: 1rem 1.25rem !important;
}

/* 2-COLUMN POS SPLIT LAYOUT: LEFT ITEMS WORKSPACE + RIGHT FIXED CHECKOUT SUMMARY */
.exec-pos-split-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 325px;
  gap: 14px;
  align-items: start;
  flex: 1 1 auto;
}

.exec-pos-left-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  height: 100%;
}

.exec-pos-left-pane .exec-inv-top-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 0.9rem;
}

@media (min-width: 1620px) {
  .exec-pos-left-pane .exec-inv-top-bar {
    grid-template-columns: 165px 1.35fr 1.1fr 1.15fr;
  }
}

.exec-pos-left-pane .exec-inv-card {
  padding: 0.7rem 0.85rem;
  min-width: 0;
  overflow: hidden;
}

.exec-pos-left-pane .exec-table-card {
  flex: 1 1 auto;
  min-height: 290px;
  margin-bottom: 0.9rem;
  max-width: 100%;
}

.exec-pos-left-pane .exec-data-table thead th {
  font-size: 0.72rem !important;
  padding: 9px 6px !important;
}

.exec-pos-left-pane .exec-data-table tbody td {
  padding: 7px 6px !important;
}

.exec-pos-left-pane .inv-row-total,
.exec-pos-left-pane .so-line-total,
.exec-pos-left-pane .po-line-total,
.exec-pos-left-pane .pi-line-total,
.exec-pos-left-pane .ro-line-total,
.exec-pos-left-pane .clm-line-total {
  white-space: nowrap !important;
  font-size: 0.9rem !important;
}

.exec-pos-left-pane .exec-notes-compact {
  padding: 0.85rem 1rem;
}

.exec-pos-left-pane .exec-notes-compact textarea {
  min-height: 54px !important;
}

.exec-pos-right-pane {
  position: sticky;
  top: 12px;
  align-self: start;
  min-width: 0;
}

.exec-pos-right-pane .exec-summary-panel {
  border: 1.5px solid rgba(16, 185, 129, 0.25);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 1rem 1.05rem;
}

@media (max-width: 1120px) {
  .exec-pos-split-workspace {
    grid-template-columns: 1fr;
  }
  .exec-pos-right-pane {
    position: static;
  }
  .exec-pos-left-pane .exec-inv-top-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.exec-inv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.exec-inv-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.exec-inv-header-title h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.exec-inv-urdu-sub {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  color: var(--text-muted);
  font-size: 1.15rem;
  direction: rtl;
  padding-left: 14px;
  border-left: 2px solid var(--border-color);
}

/* TOP INFO BAR */
.exec-inv-top-bar {
  display: grid;
  grid-template-columns: 240px 1.5fr 1.2fr 1fr;
  gap: 14px;
  margin-bottom: 1.25rem;
}

.exec-inv-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.2s ease;
}

.exec-inv-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.exec-inv-card .card-mini-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exec-inv-id-field {
  background: #ffffff !important;
  border: 1px solid rgba(37, 99, 235, 0.3) !important;
  color: var(--gold-primary) !important;
  font-size: 1.1rem !important;
  font-weight: 800 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  width: 100%;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

/* Customer card */
.exec-inv-cust-select {
  background: #ffffff !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  padding: 8px 12px !important;
  width: 100%;
}

.exec-inv-cust-select:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 3px var(--primary-ring) !important;
}

.exec-cust-badge-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Payment segmented toggle */
.exec-segmented-control {
  display: flex;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.exec-segmented-control .btn {
  flex: 1;
  background: transparent !important;
  border: none !important;
  color: var(--text-muted) !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.exec-segmented-control .btn:hover {
  color: var(--text-main) !important;
  background: rgba(0, 0, 0, 0.04) !important;
}

.exec-segmented-control .btn.active {
  background: #ffffff !important;
  color: var(--gold-primary) !important;
  font-weight: 800 !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid rgba(37, 99, 235, 0.25) !important;
}

/* Dates */
.exec-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.exec-date-input {
  background: #ffffff !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-main) !important;
  font-size: 0.85rem !important;
  padding: 7px 8px !important;
  border-radius: 8px !important;
}

/* TABLE SECTION */
.exec-table-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: visible !important;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.exec-table-card .table-responsive {
  overflow: visible !important;
}

.exec-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  position: relative;
}

.exec-data-table tbody tr:focus-within {
  position: relative;
  z-index: 10000;
}

.inv-suggest-container:focus-within {
  position: relative;
  z-index: 10005;
}

.exec-data-table thead th {
  background: #f8fafc !important;
  color: var(--text-muted) !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  font-weight: 800 !important;
  padding: 12px 10px !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.exec-data-table tbody tr {
  background: #ffffff;
  transition: background 0.15s ease;
}

.exec-data-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

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

.exec-data-table tbody td {
  padding: 8px 10px !important;
  border-bottom: 1px solid var(--border-color) !important;
  vertical-align: middle !important;
  color: var(--text-main);
}

.exec-data-table input.form-input {
  background: #ffffff !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-main) !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  padding: 6px 8px !important;
  height: 36px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.exec-data-table .inv-suggest-container input.form-input {
  padding-left: 34px !important;
}

.exec-data-table select.form-select {
  background-color: #ffffff !important;
  border: 1px solid var(--border-strong) !important;
  color: var(--text-main) !important;
  border-radius: 6px !important;
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  padding: 6px 8px !important;
  height: 36px !important;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.exec-data-table input.form-input:focus,
.exec-data-table select.form-select:focus {
  border-color: var(--gold-primary) !important;
  box-shadow: 0 0 0 3px var(--primary-ring) !important;
  background-color: #ffffff !important;
}

.exec-data-table .btn-remove-row {
  width: 34px;
  height: 34px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.exec-data-table .exec-line-total-cell {
  text-align: right !important;
  vertical-align: middle !important;
  white-space: nowrap;
}

.exec-table-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

/* BOTTOM SECTION */
.exec-inv-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 16px;
}

.exec-notes-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.exec-notes-box textarea {
  background: #ffffff !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 8px !important;
  resize: vertical;
  min-height: 110px;
  padding: 10px 12px !important;
}

.exec-shortcuts-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.exec-shortcut-chip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}

.exec-shortcut-chip kbd {
  background: #f1f5f9;
  color: var(--gold-primary);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

/* EXECUTIVE SUMMARY PANEL */
.exec-summary-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.exec-summary-panel .summary-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exec-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.exec-summary-row input.form-input {
  background: #ffffff !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong) !important;
}

/* Glowing Grand Total Box */
.exec-grand-total-card {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid rgba(5, 150, 105, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.08);
}

.exec-grand-total-card .lbl {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #047857;
  font-weight: 800;
}

.exec-grand-total-card .val {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--emerald-primary);
  font-family: var(--font-mono);
}

/* Quick Tender Chips */
.exec-tender-section {
  margin: 10px 0;
}

.exec-tender-section .tender-lbl {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 6px;
}

.exec-tender-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.exec-tender-btn {
  background: #f8fafc;
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.exec-tender-btn:hover {
  background: #eff6ff;
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-1px);
}

/* BIG PRIMARY CTA */
.exec-btn-checkout {
  width: 100%;
  background: linear-gradient(135deg, var(--emerald-primary) 0%, #047857 100%);
  border: none;
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
  transition: all 0.2s ease;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.exec-btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.4);
  filter: brightness(1.05);
}

.exec-btn-checkout .btn-en {
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.exec-btn-checkout .btn-ur {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  font-size: 0.88rem;
  opacity: 0.95;
  direction: rtl;
  margin-left: 8px;
}

/* Secondary Button Strip */
.exec-action-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

@media (max-width: 1100px) {
  .exec-inv-top-bar {
    grid-template-columns: 1fr 1fr;
  }
  .exec-inv-bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================= */
/* DUPLICATE PRODUCT INDICATION (BADGE, ROW FLASH, TOAST)    */
/* ========================================================= */
.inv-suggest-item-duplicate {
  background: rgba(245, 158, 11, 0.08) !important;
  border-left: 3px solid #f59e0b !important;
}

.inv-suggest-dup-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #f59e0b;
  white-space: nowrap;
}

.inv-dup-row-tag {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 5px;
  padding: 1px 6px;
}

@keyframes execRowDupFlash {
  0%   { background-color: rgba(245, 158, 11, 0.35); }
  50%  { background-color: rgba(245, 158, 11, 0.14); }
  100% { background-color: transparent; }
}

.exec-row-duplicate-flash {
  animation: execRowDupFlash 1.1s ease-in-out 2;
  outline: 2px solid #f59e0b;
}

.pos-duplicate-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 999999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.pos-duplicate-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.pos-duplicate-toast-warning {
  background: #fffbeb;
  color: #92400e;
  border: 2px solid #f59e0b;
}

.pos-duplicate-toast-info {
  background: #ecfdf5;
  color: #065f46;
  border: 2px solid #10b981;
}

/* ========================================================= */
/* PRODUCTS CATALOG TABLE & HEADER LAYOUT POLISH             */
/* ========================================================= */
#tab-products .page-title-bar {
  align-items: center;
  gap: 0.85rem;
}

#tab-products #products-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#tab-products #products-header-actions .btn {
  padding: 0.52rem 0.85rem;
  font-size: 0.84rem;
  white-space: nowrap;
}

#products-catalog-table {
  width: 100%;
  min-width: 1180px;
}

#products-catalog-table thead th {
  padding: 0.72rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

#products-catalog-table tbody td,
#products-catalog-table tfoot td {
  padding: 0.7rem 0.7rem;
  font-size: 0.84rem;
  vertical-align: middle;
  white-space: nowrap;
}

#products-catalog-table td.prod-col-sku {
  min-width: 125px;
  line-height: 1.45;
}

#products-catalog-table td.prod-col-sku code {
  white-space: nowrap;
  font-size: 0.82rem;
}

#products-catalog-table td.prod-col-name {
  min-width: 185px;
  max-width: 280px;
  white-space: normal;
  line-height: 1.38;
}

#products-catalog-table td.prod-col-urdu {
  min-width: 150px;
  max-width: 230px;
  white-space: normal;
  line-height: 1.75;
}

#products-catalog-table .badge,
#products-catalog-table .inv-suggest-loc {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ========================================================= */
/* CUSTOMERS & VENDORS DIRECTORY TABLE LAYOUT POLISH         */
/* ========================================================= */
#customers-directory-table,
#vendors-directory-table,
#market-leads-table {
  width: 100%;
  min-width: 1020px;
}

#customers-directory-table thead th,
#vendors-directory-table thead th,
#market-leads-table thead th {
  padding: 0.7rem 0.65rem;
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

#customers-directory-table tbody td,
#customers-directory-table tfoot td,
#vendors-directory-table tbody td,
#vendors-directory-table tfoot td,
#market-leads-table tbody td {
  padding: 0.68rem 0.65rem;
  font-size: 0.84rem;
  vertical-align: middle;
  white-space: nowrap;
}

#customers-directory-table td.cust-col-name,
#vendors-directory-table td.cust-col-name,
#market-leads-table td.cust-col-name {
  min-width: 175px;
  max-width: 250px;
  white-space: normal;
  line-height: 1.35;
}

#customers-directory-table td.cust-col-money,
#vendors-directory-table td.cust-col-money {
  line-height: 1.35;
}

#customers-directory-table td.cust-col-actions,
#vendors-directory-table td.cust-col-actions,
#market-leads-table td.cust-col-actions {
  text-align: center;
}

#customers-directory-table .cust-actions-wrap,
#vendors-directory-table .cust-actions-wrap,
#market-leads-table .cust-actions-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: nowrap;
}

#customers-directory-table .cust-actions-wrap .btn,
#vendors-directory-table .cust-actions-wrap .btn,
#market-leads-table .cust-actions-wrap .btn {
  padding: 0.34rem 0.58rem;
  font-size: 0.75rem;
  gap: 4px;
  white-space: nowrap;
}

#customers-directory-table .cust-actions-wrap .btn-icon,
#vendors-directory-table .cust-actions-wrap .btn-icon,
#warehouse-inventory-table .cust-actions-wrap .btn-icon {
  padding: 0.34rem 0.48rem;
  min-width: 28px;
}

/* ========================================================= */
/* STOCK MANAGEMENT WAREHOUSE INVENTORY TABLE POLISH         */
/* ========================================================= */
#warehouse-inventory-table {
  width: 100%;
  min-width: 1020px;
}

#warehouse-inventory-table thead th {
  padding: 0.7rem 0.65rem;
  font-size: 0.77rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

#warehouse-inventory-table tbody td,
#warehouse-inventory-table tfoot td {
  padding: 0.68rem 0.65rem;
  font-size: 0.84rem;
  vertical-align: middle;
  white-space: nowrap;
}

#warehouse-inventory-table td.stock-col-name {
  min-width: 175px;
  max-width: 260px;
  white-space: normal;
  line-height: 1.35;
}

#warehouse-inventory-table td.stock-col-urdu {
  min-width: 150px;
  max-width: 220px;
  white-space: normal;
  line-height: 1.75;
}

#warehouse-inventory-table .badge {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

#warehouse-inventory-table .cust-actions-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: nowrap;
}

#warehouse-inventory-table .cust-actions-wrap .btn {
  padding: 0.34rem 0.56rem;
  font-size: 0.76rem;
  white-space: nowrap;
}

/* Crisp LTR digits inside Pure Urdu Nastaliq Invoice Previews */
.ur-num {
  font-family: 'Segoe UI', Arial, sans-serif;
  direction: ltr;
  unicode-bidi: embed;
  font-weight: 800;
  display: inline-block;
}





