/* ==========================================================================
   Service Center Management System - Main Stylesheet
   Theme: Inspired by modern ISP & Clinic Management ERP UI
   ========================================================================== */

:root {
  /* Sidebar Colors (from Screenshot 1) */
  --sidebar-bg: #13262c;
  --sidebar-header: #0e1e23;
  --sidebar-hover: #1b383e;
  --sidebar-active-bg: #7ea58e;
  --sidebar-active-text: #102422;
  --sidebar-text: #9cb5ab;
  --sidebar-text-bright: #e2eeea;
  --sidebar-section: #567b73;
  --sidebar-border: #1a343b;
  --sidebar-user-card: #183036;
  --sidebar-badge-bg: #22433d;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 72px;

  /* Topbar & General Layout */
  --topbar-bg: #ffffff;
  --topbar-height: 64px;
  --body-bg: #f2f5f6;
  --card-bg: #ffffff;
  --card-border: #e3eaec;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(19, 38, 44, 0.03);

  /* Brand Accents & Status Colors (Aligned with Navbar Theme #13262c & #7ea58e) */
  --brand-navy: #13262c;
  --brand-navy-hover: #1b383e;
  --brand-teal: #1a3c42;
  --brand-green: #13262c;
  --brand-green-hover: #1b383e;
  --brand-accent: #7ea58e;
  --brand-accent-hover: #96bea6;
  --brand-amber: #e5971e;
  --brand-red: #e04f44;
  --brand-purple: #7848b8;
  --brand-cyan: #1994a8;

  /* Typography & Neutrals */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-light: #e2e8f0;

  /* Transitions */
  --transition-speed: 0.25s;
  --font-family: 'Plus Jakarta Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--body-bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   App Layout
   ========================================================================== */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

/* ==========================================================================
   Sidebar Navigation
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 3px 0 16px rgba(0, 0, 0, 0.15);
  user-select: none;
}

/* Sidebar Top Brand Header */
.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: var(--sidebar-header);
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  white-space: nowrap;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1b383e, #13262c);
  border: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sidebar-active-bg);
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--sidebar-section);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.sidebar-toggle-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sidebar-text);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background-color: var(--sidebar-hover);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Sidebar User Profile Card (Screenshot 1 Style) */
.sidebar-user {
  margin: 12px 14px 6px;
  padding: 12px;
  background-color: var(--sidebar-user-card);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-speed) ease;
}

.user-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1b3860 0%, #22436a 100%);
  border: 2px solid #2f5a8c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  white-space: nowrap;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.user-role-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  background-color: var(--sidebar-badge-bg);
  color: #8cb8a5;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 12px;
  text-transform: capitalize;
  letter-spacing: 0.3px;
}

/* Nav Menu List */
.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 24px;
}

/* Custom Sleek Scrollbar */
.sidebar-menu::-webkit-scrollbar {
  width: 5px;
}
.sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Section Header (like GENERAL, OPERATIONS, etc.) */
.nav-section {
  margin-top: 14px;
  margin-bottom: 5px;
}

.nav-section:first-child {
  margin-top: 2px;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--sidebar-section);
  text-transform: uppercase;
  letter-spacing: 1.1px;
  padding: 6px 10px 4px;
  white-space: nowrap;
}

/* Nav Items */
.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
  color: var(--sidebar-text-bright);
}

/* Exact Active Item Style from Screenshot 1 */
.nav-item.active {
  background-color: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(126, 165, 142, 0.25);
}

.nav-item.active .nav-icon {
  color: var(--sidebar-active-text);
}

.nav-icon {
  width: 20px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #799d91;
  transition: color 0.18s ease;
}

.nav-item:hover .nav-icon {
  color: #ffffff;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  padding: 1px 7px;
  border-radius: 12px;
  font-size: 0.68rem;
  font-weight: 700;
  background-color: var(--brand-red);
  color: #ffffff;
  line-height: 1.4;
}

/* ==========================================================================
   Sidebar Collapsed State (Desktop)
   ========================================================================== */
.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .brand-title,
.sidebar.collapsed .user-meta,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-toggle-btn i {
  display: none;
}

.sidebar.collapsed .sidebar-toggle-btn {
  margin: 0 auto;
}

.sidebar.collapsed .sidebar-toggle-btn::after {
  content: '\f054'; /* FontAwesome chevron-right */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.75rem;
}

.sidebar.collapsed .sidebar-user {
  padding: 8px;
  justify-content: center;
  margin: 10px 8px;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 12px;
}

.sidebar.collapsed .nav-icon {
  margin: 0;
  font-size: 1.15rem;
}

/* Tooltip on Collapsed Mode */
.sidebar.collapsed .nav-item:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background-color: #0c1b20;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1050;
  pointer-events: none;
}

/* ==========================================================================
   Main Layout & Content Container
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
  min-width: 0;
  min-height: 100vh;
  transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
              width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1),
              max-width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--body-bg);
  box-sizing: border-box;
  overflow-x: hidden;
}

.sidebar.collapsed ~ .main-wrapper {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
  max-width: calc(100% - var(--sidebar-collapsed-width));
}

/* ==========================================================================
   Top Header Bar (Screenshot 1 & 3 style)
   ========================================================================== */
.topbar {
  height: var(--topbar-height);
  background-color: var(--topbar-bg);
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px;
}

.page-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title-icon {
  font-size: 1.2rem;
  color: var(--brand-teal);
}

.page-title-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.breadcrumbs {
  font-size: 0.76rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs span.current {
  color: var(--text-muted);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Quick Bar in Topbar */
.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border: 1px solid var(--sidebar-border);
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  box-shadow: 0 2px 5px rgba(19, 38, 44, 0.2);
}

.quick-btn i {
  color: var(--sidebar-active-bg);
}

.quick-btn:hover {
  background-color: var(--sidebar-hover);
}

.quick-btn:active {
  transform: translateY(1px);
}

/* User Greeting & Utilities */
.user-greeting {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-greeting strong {
  color: var(--text-main);
  font-weight: 600;
}

.topbar-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.topbar-action-btn:hover {
  background-color: #f8fafc;
  color: var(--text-main);
  border-color: #cbd5e1;
}

.topbar-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background-color: var(--brand-red);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  border: 2px solid #ffffff;
  line-height: 1.2;
}

.user-profile-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #13262c, #1b383e);
  color: var(--sidebar-active-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: 2px solid var(--sidebar-border);
}

/* ==========================================================================
   Quick Actions Bar (like in Screenshot 1)
   ========================================================================== */
.quick-action-strip {
  background-color: #ffffff;
  border-bottom: 1px solid var(--card-border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hide Quick Action Strip on all pages except Dashboard */
.main-wrapper:not([data-active-page="dashboard"]) .quick-action-strip,
.main-wrapper:not(:has(#page-dashboard.active)) .quick-action-strip {
  display: none !important;
}

.quick-strip-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

.strip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
}

.strip-pill.pill-green {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border: 1px solid var(--sidebar-border);
}
.strip-pill.pill-green i {
  color: var(--sidebar-active-bg);
}
.strip-pill.pill-green:hover {
  background-color: var(--sidebar-hover);
}

.strip-pill.pill-dark {
  background-color: #243b42;
  color: #d8e5e2;
}
.strip-pill.pill-dark:hover {
  background-color: #2d4850;
  color: #ffffff;
}

/* ==========================================================================
   Content Body & Blank Page Views
   ========================================================================== */
.content-body {
  flex: 1;
  padding: 20px 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

/* Single Page Views Container */
.page-view {
  display: none;
  width: 100%;
  min-width: 0;
  animation: fadeIn 0.22s ease-in-out;
}

.page-view.active {
  display: block;
}

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

/* Blank Page Placeholder Card (Clean ERP Canvas) */
.blank-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.blank-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #fafbfc;
}

.blank-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blank-header-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: #eaf1ee;
  color: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.blank-title-text h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.blank-title-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.blank-header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background-color: #f1f5f9;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.blank-card-body {
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 420px;
}

.blank-empty-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eef5f2, #e2ece8);
  color: #558776;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  margin-bottom: 20px;
}

.blank-empty-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.blank-empty-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.55;
  margin-bottom: 24px;
}

.blank-hint-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: #f0fdf4;
  border: 1px dashed #86efac;
  color: #166534;
  font-size: 0.84rem;
  font-weight: 600;
}

/* ==========================================================================
   Mobile Overlay & Responsiveness
   ========================================================================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 995;
}

@media (max-width: 992px) {
  .sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width) !important;
  }

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

  .sidebar.mobile-open ~ .sidebar-overlay {
    display: block;
  }

  .main-wrapper {
    margin-left: 0 !important;
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-toggle-btn {
    display: flex;
  }

  .quick-action-strip {
    padding: 10px 16px;
  }

  .content-body {
    padding: 16px;
  }

  .user-greeting {
    display: none;
  }
}

/* ==========================================================================
   Reusable UI Components (Screenshots 2 & 3 Reference Styles)
   Ready for future page implementation
   ========================================================================== */

/* Button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border: 1px solid var(--sidebar-border);
  box-shadow: 0 2px 5px rgba(19, 38, 44, 0.2);
}
.btn-primary:hover {
  background-color: var(--sidebar-hover);
}
.btn-primary i {
  color: var(--sidebar-active-bg);
}

.btn-success {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border: 1px solid var(--sidebar-border);
  box-shadow: 0 2px 5px rgba(19, 38, 44, 0.2);
}
.btn-success:hover {
  background-color: var(--sidebar-hover);
}
.btn-success i {
  color: var(--sidebar-active-bg);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}
.btn-secondary:hover {
  background-color: #e2e8f0;
}

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

/* Status chevron pipeline banner (Screenshot 3 style) */
.status-pipeline {
  display: flex;
  align-items: center;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pipeline-step {
  flex: 1;
  padding: 12px 18px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.pipeline-step.step-all { background-color: #274059; }
.pipeline-step.step-paid { background-color: #2ea655; }
.pipeline-step.step-pending { background-color: #dea014; }
.pipeline-step.step-partial { background-color: #6d3eb8; }

/* Table styling matching Screenshot 3 & Horizontal Scroll */
.custom-table-container {
  background-color: #ffffff;
  border-radius: 0;
  border-top: none;
  border-bottom: 1px solid var(--card-border);
  border-left: none;
  border-right: none;
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  display: block;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #7ea58e #eaf1ee;
  position: relative;
}

/* Styled, high-contrast, prominent horizontal scrollbar for all data tables */
.custom-table-container::-webkit-scrollbar {
  height: 10px;
}

.custom-table-container::-webkit-scrollbar-track {
  background: #eaf1ee;
  border-radius: 5px;
  margin: 0 4px;
}

.custom-table-container::-webkit-scrollbar-thumb {
  background: #7ea58e;
  border-radius: 5px;
  border: 2px solid #eaf1ee;
}

.custom-table-container::-webkit-scrollbar-thumb:hover {
  background: #13262c;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

/* Explicit minimum widths for tables to guarantee smooth horizontal left-right scrolling */
#itemsTable {
  min-width: 1460px;
}

#accountsTable {
  min-width: 1120px;
}

#staffTable {
  min-width: 1180px;
}

#jobCardsTable {
  min-width: 1400px;
  width: 100%;
}

#expensesTable {
  min-width: 1250px;
  width: 100%;
}

#accountStatementTable {
  min-width: 1180px;
  width: 100%;
}

#accountStatementTable th {
  padding: 12px 14px;
}

#accountStatementTable td {
  padding: 11px 14px;
}

#accountStatementTable td.particulars-cell {
  white-space: normal !important;
  word-break: break-word;
  min-width: 300px;
}

#auditLogTable {
  min-width: 1200px;
  width: 100%;
}

#auditLogTable td.audit-details-cell {
  white-space: normal !important;
  word-break: break-word;
  min-width: 300px;
  line-height: 1.4;
}

.custom-table th {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  border-bottom: 2px solid var(--sidebar-border);
}

.custom-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
  vertical-align: middle;
  white-space: nowrap;
}

.custom-table td[colspan] {
  white-space: normal;
}

.custom-table tr:hover td {
  background-color: #f8fafc;
}

/* Badges (Pending, Paid, Partial) */
.badge-status {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-block;
}
.badge-status.paid {
  background-color: #dcfce7;
  color: #15803d;
}
.badge-status.pending {
  background-color: #fef9c3;
  color: #a16207;
}
.badge-status.partial {
  background-color: #f3e8ff;
  color: #7e22ce;
}
.badge-status.accepted {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.badge-status.rejected {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.badge-status.converted {
  background-color: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.badge-status.draft {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Table action buttons */
.table-action-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 0.88rem;
  transition: transform 0.15s ease;
}
.icon-view { color: #2563eb; }
.icon-print { color: #475569; }
.icon-pay { color: #16a34a; }
.icon-edit { color: #eab308; }
.icon-delete { color: #dc2626; }

/* ==========================================================================
   Account Creation Page & Data Table Styling
   ========================================================================== */
.page-top-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.view-heading {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.view-subheading {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Metric Cards Grid */
.metric-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.metric-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.metric-card .metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Distinct Light/Pastel Card Themes (Soft Tints & Contrasted Metrics) */
.metric-card.metric-all,
.metric-card.metric-indigo {
  background-color: #f0f4ff;
  border-color: #c7d2fe;
}
.metric-card.metric-all .metric-icon,
.metric-card.metric-indigo .metric-icon {
  background-color: #e0e7ff;
  color: #4338ca;
}
.metric-card.metric-all .metric-label,
.metric-card.metric-indigo .metric-label {
  color: #4f46e5;
}
.metric-card.metric-all .metric-value,
.metric-card.metric-indigo .metric-value {
  color: #1e1b4b;
}

.metric-card.metric-customer,
.metric-card.metric-emerald {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}
.metric-card.metric-customer .metric-icon,
.metric-card.metric-emerald .metric-icon {
  background-color: #dcfce7;
  color: #15803d;
}
.metric-card.metric-customer .metric-label,
.metric-card.metric-emerald .metric-label {
  color: #16a34a;
}
.metric-card.metric-customer .metric-value,
.metric-card.metric-emerald .metric-value {
  color: #14532d;
}

.metric-card.metric-supplier,
.metric-card.metric-amber {
  background-color: #fffbeb;
  border-color: #fde68a;
}
.metric-card.metric-supplier .metric-icon,
.metric-card.metric-amber .metric-icon {
  background-color: #fef3c7;
  color: #b45309;
}
.metric-card.metric-supplier .metric-label,
.metric-card.metric-amber .metric-label {
  color: #d97706;
}
.metric-card.metric-supplier .metric-value,
.metric-card.metric-amber .metric-value {
  color: #78350f;
}

.metric-card.metric-technician,
.metric-card.metric-cyan {
  background-color: #f0f9ff;
  border-color: #bae6fd;
}
.metric-card.metric-technician .metric-icon,
.metric-card.metric-cyan .metric-icon {
  background-color: #e0f2fe;
  color: #0284c7;
}
.metric-card.metric-technician .metric-label,
.metric-card.metric-cyan .metric-label {
  color: #0284c7;
}
.metric-card.metric-technician .metric-value,
.metric-card.metric-cyan .metric-value {
  color: #0c4a6e;
}

.metric-card.metric-bank,
.metric-card.metric-rose {
  background-color: #fff1f2;
  border-color: #fecdd3;
}
.metric-card.metric-bank .metric-icon,
.metric-card.metric-rose .metric-icon {
  background-color: #ffe4e6;
  color: #e11d48;
}
.metric-card.metric-bank .metric-label,
.metric-card.metric-rose .metric-label {
  color: #e11d48;
}
.metric-card.metric-bank .metric-value,
.metric-card.metric-rose .metric-value {
  color: #881337;
}

.metric-data {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
}

/* Data Card Wrapper */
.data-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Table Toolbar */
.table-toolbar {
  padding: 14px 20px;
  background-color: #fafbfc;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.export-btns {
  display: flex;
  gap: 6px;
}

.btn-tool {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  color: #475569;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-tool:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* Distinct Deep Colors for CSV Export & Print Table Toolbar Buttons */
.btn-tool.btn-tool-csv,
.btn-tool[id*="Csv"],
.btn-tool[id*="csv"],
.btn-tool[id*="CSV"] {
  background-color: #15803d;
  border-color: #166534;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(21, 128, 61, 0.25);
}

.btn-tool.btn-tool-csv:hover,
.btn-tool[id*="Csv"]:hover,
.btn-tool[id*="csv"]:hover,
.btn-tool[id*="CSV"]:hover {
  background-color: #166534;
  border-color: #14532d;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(21, 128, 61, 0.35);
}

.btn-tool.btn-tool-print,
.btn-tool[id*="Print"],
.btn-tool[id*="print"] {
  background-color: #1e40af;
  border-color: #1e3a8a;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(30, 64, 175, 0.25);
}

.btn-tool.btn-tool-print:hover,
.btn-tool[id*="Print"]:hover,
.btn-tool[id*="print"]:hover {
  background-color: #1e3a8a;
  border-color: #172554;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(30, 64, 175, 0.35);
}

.type-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-select-sm {
  padding: 6px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.8rem;
  background-color: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}
.form-select-sm:focus {
  border-color: var(--brand-teal);
}

.search-input-wrap {
  position: relative;
  width: 250px;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.82rem;
}

.table-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.table-search-input:focus {
  border-color: var(--sidebar-active-bg);
  box-shadow: 0 0 0 3px rgba(126, 165, 142, 0.25);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* Account Badges */
.badge-type {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.badge-type.badge-customer {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-type.badge-supplier {
  background-color: #faf5ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-type.badge-technician {
  background-color: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.badge-type.badge-bank {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-type.badge-cash {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* Row Action Buttons - Unified Deep Color System */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.table-action-icon,
.btn-action-statement,
.btn-action-barcode,
.action-btn-barcode,
.btn-action-edit,
.btn-action-delete,
.action-btn-edit,
.action-btn-delete,
.btn-view-staff-perm,
.btn-edit-staff,
.btn-delete-staff,
.btn-action-print,
.btn-action-view,
.btn-action-whatsapp,
.btn-action-convert,
.btn-action-cart,
.btn-action {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 4px;
  border: none;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.18s ease;
  line-height: 1;
  text-decoration: none;
  user-select: none;
  box-sizing: border-box;
}

/* View & Print Button - Deep Sky Blue */
.btn-action-print,
.btn-action-view,
.table-action-icon.icon-print,
.table-action-icon.icon-view {
  background-color: #0284c7 !important;
  color: #ffffff !important;
  border: 1px solid #0369a1 !important;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.25);
}

.btn-action-print:hover,
.btn-action-view:hover,
.table-action-icon.icon-print:hover,
.table-action-icon.icon-view:hover {
  background-color: #0369a1 !important;
  border-color: #075985 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(2, 132, 199, 0.45);
}

.btn-action-print:active,
.btn-action-view:active {
  transform: translateY(0);
}

/* WhatsApp Button - Deep Green */
.btn-action-whatsapp,
.table-action-icon.icon-whatsapp {
  background-color: #16a34a !important;
  color: #ffffff !important;
  border: 1px solid #15803d !important;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.25);
}

.btn-action-whatsapp:hover,
.table-action-icon.icon-whatsapp:hover {
  background-color: #15803d !important;
  border-color: #166534 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(22, 163, 74, 0.45);
}

.btn-action-whatsapp:active {
  transform: translateY(0);
}

/* Convert to Sale / Cart Button - Deep Teal */
.btn-action-convert,
.btn-action-cart,
.table-action-icon.icon-convert,
.table-action-icon.icon-cart {
  background-color: #0f766e !important;
  color: #ffffff !important;
  border: 1px solid #0d5f58 !important;
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.25);
}

.btn-action-convert:hover,
.btn-action-cart:hover,
.table-action-icon.icon-convert:hover,
.table-action-icon.icon-cart:hover {
  background-color: #115e59 !important;
  border-color: #134e4a !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(15, 118, 110, 0.45);
}

.btn-action-convert:active,
.btn-action-cart:active {
  transform: translateY(0);
}

/* Barcode Button - Deep Indigo (Only Icon) */
.btn-action-barcode,
.action-btn-barcode {
  background-color: #6366f1 !important;
  color: #ffffff !important;
  border: 1px solid #4f46e5 !important;
  box-shadow: 0 1px 2px rgba(99, 102, 241, 0.25);
}

.btn-action-barcode:hover,
.action-btn-barcode:hover {
  background-color: #4f46e5 !important;
  border-color: #4338ca !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(99, 102, 241, 0.45);
}

.btn-action-barcode:active,
.action-btn-barcode:active {
  transform: translateY(0);
}

/* Edit Button - Deep Yellow (Only Icon) */
.btn-action-edit,
.action-btn-edit,
.btn-edit-staff,
.table-action-icon.icon-edit {
  background-color: #eab308 !important;
  color: #ffffff !important;
  border: 1px solid #ca8a04 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 1px 2px rgba(234, 179, 8, 0.25);
}

.btn-action-edit:hover,
.action-btn-edit:hover,
.btn-edit-staff:hover,
.table-action-icon.icon-edit:hover {
  background-color: #ca8a04 !important;
  border-color: #a16207 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(234, 179, 8, 0.45);
}

.btn-action-edit:active,
.action-btn-edit:active,
.btn-edit-staff:active,
.table-action-icon.icon-edit:active {
  transform: translateY(0);
}

/* Delete Button - Deep Red (Only Icon) */
.btn-action-delete,
.action-btn-delete,
.btn-delete-staff,
.table-action-icon.icon-delete {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.25);
}

.btn-action-delete:hover,
.action-btn-delete:hover,
.btn-delete-staff:hover,
.table-action-icon.icon-delete:hover {
  background-color: #b91c1c !important;
  border-color: #991b1b !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(220, 38, 38, 0.45);
}

.btn-action-delete:active,
.action-btn-delete:active,
.btn-delete-staff:active,
.table-action-icon.icon-delete:active {
  transform: translateY(0);
}

/* Statement Button - Deep Violet (Only Icon) */
.btn-action-statement {
  background-color: #4f46e5 !important;
  color: #ffffff !important;
  border: 1px solid #4338ca !important;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.25);
}

.btn-action-statement:hover {
  background-color: #4338ca !important;
  border-color: #3730a3 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(79, 70, 229, 0.45);
}

/* View Permissions Button - Deep Royal Blue (Only Icon) */
.btn-view-staff-perm,
.table-action-icon.icon-view {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
}

.btn-view-staff-perm:hover,
.table-action-icon.icon-view:hover {
  background-color: #1d4ed8 !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(37, 99, 235, 0.45);
}

/* Balance Text */
.balance-dr {
  color: #dc2626;
  font-weight: 700;
}
.balance-cr {
  color: #16a34a;
  font-weight: 700;
}

/* Table Footer */
.table-footer-bar {
  padding: 12px 20px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.table-entries-info,
.entries-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 4px;
}

.page-btn {
  padding: 5px 11px;
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-main);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-btn:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.page-btn.active {
  background-color: var(--brand-navy);
  color: #ffffff;
  border-color: var(--brand-navy);
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ==========================================================================
   Account Creation Modal Dialog (Screenshot 4 High Fidelity)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(14, 25, 30, 0.65);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background-color: #ffffff;
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 40px);
  border-radius: 6px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(-16px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal-dialog form,
.modal-dialog > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.modal-backdrop.active .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Modal Header (Matching Navbar / Sidebar Theme: #13262c) */
.modal-header-darkgreen,
.modal-header-navbar {
  background-color: var(--sidebar-bg); /* #13262c (exact navbar color) */
  color: var(--sidebar-text-bright);
  padding: 13px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--sidebar-border); /* #1a343b */
}

.modal-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: #ffffff;
}

.modal-header-title i {
  color: var(--sidebar-active-bg); /* #7ea58e signature active accent */
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-badge-new {
  background-color: rgba(126, 165, 142, 0.18);
  color: var(--sidebar-active-bg);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(126, 165, 142, 0.4);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 1.15rem;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background-color: var(--sidebar-hover);
  color: #ffffff;
}

/* Modal Body Content */
.modal-body-content {
  padding: 18px 22px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-color: #ffffff;
  overscroll-behavior: contain;
}

.modal-body-content::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.modal-body-content::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.modal-body-content::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
}

.modal-body-content::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Form Grid Rows */
.form-row-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.form-row-item-meta {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr 1fr;
  gap: 14px;
}

.badge-item-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--sidebar-bg);
  background-color: #eaf1ee;
  border: 1px solid #c9ded3;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.badge-item-code[data-action="barcode-item"],
.badge-item-code:hover {
  cursor: pointer;
  background-color: #e0e7ff;
  border-color: #a5b4fc;
  color: #3730a3;
}

.form-row-balance-udyam {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group-split {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.split-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.split-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.split-select {
  width: 80px;
  flex-shrink: 0;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.2px;
}

.required-star {
  color: #dc2626;
  font-weight: 800;
}

.form-input {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.84rem;
  color: #1e293b;
  outline: none;
  background-color: #ffffff;
  transition: all 0.18s ease;
}

.form-input::placeholder {
  color: #94a3b8;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
}

.form-input:focus::placeholder,
input:focus::placeholder,
textarea:focus::placeholder {
  color: transparent !important;
  opacity: 0 !important;
}

.form-input:focus {
  border-color: var(--sidebar-active-bg);
  box-shadow: 0 0 0 2px rgba(126, 165, 142, 0.25);
}

/* Exact theme highlight for Account Type select */
.form-select-highlight {
  border: 2px solid var(--sidebar-active-bg);
  font-weight: 700;
  color: #102422;
  background-color: #f0f7f4;
}

.input-readonly {
  background-color: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
  font-weight: 600;
}

/* Modal Footer Bar */
.modal-footer-bar {
  background-color: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.btn-form-reset {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 7px 16px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.btn-form-reset:hover {
  background-color: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}

.btn-form-cancel {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 7px 18px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-form-cancel:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

/* Exact Theme Save Button (Navbar Palette) */
.btn-form-save {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border: 1px solid var(--sidebar-border);
  padding: 7px 22px;
  border-radius: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(19, 38, 44, 0.25);
  transition: all 0.18s ease;
}

.btn-form-save:hover {
  background-color: var(--sidebar-hover);
  box-shadow: 0 3px 8px rgba(19, 38, 44, 0.35);
}

.btn-form-save i {
  color: var(--sidebar-active-bg);
}

@media (max-width: 768px) {
  .form-row-2, .form-row-3, .form-row-item-meta, .form-row-balance-udyam {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .modal-dialog {
    max-height: 94vh;
  }
}

/* ==========================================================================
   List Management Styling (Screenshot 5 Reference)
   ========================================================================== */
.page-subtitle-crumb {
  font-size: 0.74rem;
  color: var(--text-light);
  margin-bottom: 2px;
  font-weight: 600;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
}

.live-dot {
  font-size: 0.5rem;
  color: #22c55e;
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

/* Two Column Layout */
.list-mgmt-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 22px;
  align-items: start;
}

/* Left Sidebar - Dropdowns List */
.list-mgmt-sidebar {
  background-color: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.sidebar-list-header {
  padding: 14px 18px;
  background-color: #fafbfc;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-list-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-lists-count {
  font-size: 0.7rem;
  font-weight: 800;
  color: #334155;
  background-color: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
}

.dropdowns-nav-list {
  list-style: none;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
}

.dropdown-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.16s ease;
  user-select: none;
}

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

/* Active List (Navbar Palette) */
.dropdown-nav-item.active {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(19, 38, 44, 0.3);
}

.dropdown-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item-label i {
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  color: #64748b;
}

.dropdown-nav-item.active .dropdown-item-label i {
  color: var(--sidebar-active-bg);
}

.dropdown-item-count {
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 22px;
  text-align: center;
}

.dropdown-nav-item.active .dropdown-item-count {
  background-color: rgba(126, 165, 142, 0.25);
  color: #ffffff;
}

/* Right Content Panel */
.list-mgmt-content {
  background-color: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Panel Header */
.mgmt-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.mgmt-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mgmt-header-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: #eaf1ee;
  color: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.mgmt-header-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.mgmt-header-desc {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 2px;
}

/* Theme count pill (Navbar Palette) */
.badge-options-pill {
  background-color: #eaf1ee;
  color: var(--sidebar-bg);
  border: 1px solid #c0d5cc;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
}

/* Add Option Box */
.add-option-container {
  background-color: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 16px;
}

.add-option-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-lead-icon {
  font-size: 1.2rem;
  color: #94a3b8;
}

.add-option-input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.86rem;
  outline: none;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

.add-option-input:focus {
  border-color: var(--sidebar-active-bg);
  box-shadow: 0 0 0 3px rgba(126, 165, 142, 0.25);
}

.btn-navy {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border: 1px solid var(--sidebar-border);
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background-color 0.18s ease;
}

.btn-navy:hover {
  background-color: var(--sidebar-hover);
}

.btn-navy i {
  color: var(--sidebar-active-bg);
}

/* Sub-Category Specialized Add Box */
.subcat-alert-banner {
  background-color: #edf5f2;
  border: 1px solid #bdd6cb;
  color: #123027;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.subcat-form-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
}

.subcat-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 5px;
}

.subcat-select {
  width: 100%;
  padding: 9px 12px;
  border: 2px solid var(--sidebar-section);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--sidebar-bg);
  background-color: #f8fafc;
  outline: none;
}

.subcat-select:focus {
  border-color: var(--sidebar-active-bg);
  box-shadow: 0 0 0 3px rgba(126, 165, 142, 0.25);
}

.subcat-input-wrap {
  display: flex;
  gap: 10px;
}

/* Toolbar (Search & Guide) */
.options-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 4px 0;
}

.toolbar-search-wrap {
  position: relative;
  width: 260px;
}

.options-search-input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.82rem;
  outline: none;
  background-color: #ffffff;
}

.options-search-input:focus {
  border-color: var(--sidebar-active-bg);
  box-shadow: 0 0 0 3px rgba(126, 165, 142, 0.25);
}

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

.filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.toolbar-guide-text {
  font-size: 0.76rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-hint-edit {
  color: #2563eb;
}

.badge-hint-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background-color: #fee2e2;
  color: #ef4444;
  font-size: 0.65rem;
}

/* Option Chips Grid (Screenshot 5 exact style) */
.options-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 180px;
  padding: 10px 0;
  align-content: flex-start;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 8px 6px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  gap: 10px;
  transition: all 0.16s ease;
  user-select: none;
}

.option-chip:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.chip-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: #1e293b;
}

.chip-parent-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #2563eb;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 6px;
  border-radius: 4px;
}

.chip-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chip-btn-edit {
  background-color: #eab308;
  border: 1px solid #ca8a04;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.chip-btn-edit:hover {
  background-color: #ca8a04;
  border-color: #a16207;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(234, 179, 8, 0.4);
}

.chip-btn-delete {
  background-color: #dc2626;
  border: 1px solid #b91c1c;
  color: #ffffff;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.72rem;
  transition: all 0.15s ease;
}

.chip-btn-delete:hover {
  background-color: #b91c1c;
  border-color: #991b1b;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.4);
}

/* Empty State */
.options-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.options-empty-state .empty-icon {
  font-size: 2.2rem;
  color: #cbd5e1;
  margin-bottom: 10px;
}

.options-empty-state h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}

.options-empty-state p {
  font-size: 0.82rem;
}

/* Live Sync Banner (Screenshot 5 exact style) */
.live-sync-banner {
  background-color: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sync-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: #166534;
}

.sync-left i {
  font-size: 1.15rem;
  color: #16a34a;
}

.live-connected-badge {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

@media (max-width: 900px) {
  .list-mgmt-layout {
    grid-template-columns: 1fr;
  }
  .subcat-form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Item Creation Badges & Tags (Brand, Model, Category, Stock)
   ========================================================================== */
.badge-item-type {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-item-part {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-item-service {
  background-color: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.badge-item-product {
  background-color: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
}

.tag-brand-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #86198f;
  background-color: #fdf4ff;
  border: 1px solid #f0abfc;
  padding: 1px 7px;
  border-radius: 4px;
  margin-right: 4px;
}

.tag-model-chip {
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
}

.tag-category-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1d4ed8;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 1px 7px;
  border-radius: 4px;
  margin-right: 4px;
}

.tag-subcat-chip {
  font-size: 0.82rem;
  font-weight: 500;
  color: #475569;
}

.stock-badge {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stock-in {
  color: #15803d;
}

.stock-low {
  color: #dc2626;
  background-color: #fef2f2;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #fecaca;
}

/* Item Creation Specific Badges */
.badge-gst {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #9a3412;
  background-color: #ffedd5;
  border: 1px solid #fed7aa;
}

.badge-hsn {
  display: inline-block;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background-color: #f1f5f9;
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.badge-warranty-yes {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #166534;
  background-color: #dcfce7;
  border: 1px solid #bbf7d0;
}

.badge-warranty-no {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
}

.badge-model-imei {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  background-color: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Staff & Technician Management & Permission Matrix Styles
   ========================================================================== */

/* Form Section Divider Banner */
.form-section-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #f1f6f4;
  color: var(--sidebar-bg);
  border-left: 3px solid var(--sidebar-active-bg);
  padding: 7px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.form-section-banner i {
  color: var(--sidebar-section);
}

/* User ID Sync Input Group */
.user-id-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-input-sync {
  background-color: #f1f5f9;
  border: 1px solid var(--border-light);
  color: var(--sidebar-bg);
  padding: 7px 11px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-input-sync:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

/* Password Field with Eye Toggle */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .form-input {
  padding-right: 38px;
}

.btn-toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.btn-toggle-password:hover {
  color: var(--sidebar-bg);
}

/* Permission Preset Toolbar */
.perm-preset-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f8fafc;
  border: 1px solid var(--card-border);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.perm-preset-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.perm-preset-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sidebar-bg);
}

.perm-preset-select {
  min-width: 280px;
  border-color: var(--sidebar-section);
  font-weight: 600;
  color: var(--sidebar-bg);
}

.perm-preset-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.74rem;
}

/* Staff Modal Dialog Sizing */
#staffModalDialog {
  max-width: 960px;
  max-height: calc(100vh - 30px);
  height: 90vh;
}

/* Permission Matrix Table - Seamlessly part of the main modal form */
.perm-table-container {
  border: 1px solid var(--card-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  background-color: #ffffff;
  position: relative;
  overflow: visible;
  max-height: none;
  margin-top: 4px;
  margin-bottom: 8px;
}

.perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
  text-align: left;
}

.perm-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--sidebar-bg);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border-bottom: 2px solid var(--sidebar-border);
}

.perm-table thead th:first-child {
  border-top-left-radius: 5px;
}

.perm-table thead th:last-child {
  border-top-right-radius: 5px;
}

.perm-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.15s ease;
}

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

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

.perm-table tbody td {
  padding: 9px 14px;
  vertical-align: middle;
}

.perm-module-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: #1e293b;
}

.perm-module-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background-color: #eaf1ee;
  color: var(--sidebar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  flex-shrink: 0;
}

/* Permission Checkbox Styling */
.perm-check-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.perm-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--sidebar-bg);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.perm-checkbox:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  filter: grayscale(1);
}

.perm-checkbox:hover:not(:disabled) {
  transform: scale(1.1);
}

.btn-row-toggle {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-row-toggle:hover {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  border-color: var(--sidebar-bg);
}

/* Badges for Staff Table */
.badge-role-tech {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  letter-spacing: 0.3px;
}

.badge-role-staff {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  letter-spacing: 0.3px;
}

.badge-status-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge-status-inactive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Permission Counter & Summary Pill */
.perm-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.perm-count-pill:hover {
  background-color: #eaf1ee;
  border-color: var(--sidebar-section);
  color: var(--sidebar-bg);
}

.perm-tags-bar {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}

.perm-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 3px;
  font-size: 0.64rem;
  font-weight: 800;
}

.perm-tag-r { background-color: #dbeafe; color: #1e40af; }
.perm-tag-w { background-color: #dcfce7; color: #15803d; }
.perm-tag-e { background-color: #fef3c7; color: #92400e; }
.perm-tag-d { background-color: #fee2e2; color: #b91c1c; }

/* View Permissions Modal Details */
.staff-summary-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #f8fafc, #edf4f1);
  border: 1px solid var(--card-border);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 18px;
}

.staff-summary-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-active-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  border: 2px solid var(--sidebar-border);
}

.staff-summary-details {
  flex: 1;
}

.staff-summary-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.staff-summary-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.staff-summary-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin: 3px 0 8px 0;
}

.staff-credentials-box {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cred-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
}

.cred-label {
  color: #64748b;
  font-weight: 600;
}

.cred-value {
  color: var(--sidebar-bg);
  font-family: monospace;
  font-size: 0.84rem;
}

.btn-show-pass {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.78rem;
}

.btn-show-pass:hover {
  color: var(--sidebar-bg);
}

.view-perm-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sidebar-bg);
  margin-bottom: 10px;
}

.view-perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.view-perm-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.15s ease;
}

.view-perm-card.has-access {
  border-left: 3px solid var(--sidebar-active-bg);
}

.view-perm-card.no-access {
  opacity: 0.55;
  background-color: #fafafa;
}

.view-perm-module-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1e293b;
}

.view-perm-pills {
  display: flex;
  gap: 3px;
}

/* ==========================================================================
   Firebase Cloud Sync Status Badge & Toast Notifications
   Theme: Matching navbar & primary brand colors
   ========================================================================== */

.firebase-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  background-color: #f1f6f4;
  border: 1px solid #c9ded3;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--sidebar-bg);
  box-shadow: 0 1px 3px rgba(19, 38, 44, 0.08);
  transition: all 0.25s ease;
  user-select: none;
}

.firebase-status-pill i {
  color: var(--sidebar-active-bg);
  font-size: 0.82rem;
}

.firebase-status-pill.online {
  background-color: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.firebase-status-pill.online i {
  color: #10b981;
}

.firebase-status-pill.offline {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.firebase-status-pill.offline i {
  color: #ef4444;
}

.fb-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
  transition: background-color 0.2s ease;
}

.fb-status-dot.online {
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: fbSyncPulse 2s infinite;
}

.fb-status-dot.offline {
  background-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

@keyframes fbSyncPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Floating Realtime Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

.toast-pill {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(19, 38, 44, 0.22);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  max-width: 380px;
}

.toast-pill.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-pill.toast-success {
  background-color: var(--sidebar-bg);
  border: 1px solid var(--sidebar-active-bg);
  color: #ffffff;
}

.toast-pill.toast-success i {
  color: var(--sidebar-active-bg);
  font-size: 1.05rem;
}

.toast-pill.toast-info {
  background-color: var(--sidebar-hover);
  border: 1px solid #366068;
  color: #ffffff;
}

.toast-pill.toast-info i {
  color: #7ea58e;
}

.toast-pill.toast-error {
  background-color: #7f1d1d;
  border: 1px solid #b91c1c;
  color: #ffffff;
}

.toast-pill.toast-error i {
  color: #fca5a5;
}

/* ==========================================================================
   Job Card Module & Side Window Styles
   ========================================================================== */
.job-status-pipeline-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  background: #ffffff;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.status-chevron-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  width: 100%;
}

.status-chevron-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  background-color: var(--chevron-bg, #334155);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 12px 0 20px;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
}

.status-chevron-item.chevron-start {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%);
  padding-left: 14px;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.status-chevron-item.chevron-end {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 12px 50%);
  padding-right: 14px;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.status-chevron-item:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.status-chevron-item.active {
  filter: brightness(1.22) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
  font-weight: 800;
}

.status-chevron-item.active .chevron-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-chevron-item i {
  font-size: 0.82rem;
  opacity: 0.95;
  flex-shrink: 0;
}

.status-chevron-item .chevron-label {
  white-space: nowrap;
}

.status-chevron-item .chevron-count {
  font-weight: 800;
  font-size: 0.82rem;
  opacity: 0.95;
  letter-spacing: 0.2px;
  flex-shrink: 0;
}

@media (max-width: 680px) {
  .status-chevron-row {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 4px;
  }
  .status-chevron-item,
  .status-chevron-item.chevron-start,
  .status-chevron-item.chevron-end {
    clip-path: none !important;
    border-radius: 5px !important;
    padding: 0 10px !important;
  }
}

/* Job Status Table Badges */
.job-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-status-pending { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.badge-status-checking { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-status-parts-waiting { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.badge-status-approval { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }
.badge-status-completed { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-status-not-repair { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }
.badge-status-return { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-status-delivered { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }
.badge-status-other-center { background: #e2e8f0; color: #0f172a; border: 1px solid #cbd5e1; }

#jobCardModalDialog {
  max-width: 1420px;
  width: 96vw;
  max-height: calc(100vh - 25px);
  height: 92vh;
}

.job-modal-layout,
.modal-body-content.job-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  padding: 16px 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden; /* Parent stays fixed; left and right scroll independently */
  height: 100%;
  align-items: stretch;
}

.job-modal-main-col {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
}

.job-modal-side-window {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

/* Custom sleek scrollbars for independent left and right panes */
.job-modal-main-col::-webkit-scrollbar,
.job-modal-side-window::-webkit-scrollbar {
  width: 6px;
}

.job-modal-main-col::-webkit-scrollbar-thumb,
.job-modal-side-window::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.job-modal-main-col::-webkit-scrollbar-thumb:hover,
.job-modal-side-window::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@media (max-width: 1100px) {
  .job-modal-layout,
  .modal-body-content.job-modal-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
    height: auto;
  }
  .job-modal-main-col,
  .job-modal-side-window {
    height: auto;
    overflow-y: visible;
    padding-right: 0;
  }
}

/* ==========================================================================
   Searchable Combobox Component (Job Card Customer Selector)
   ========================================================================== */
.searchable-combobox-wrap {
  position: relative;
  width: 100%;
}

.searchable-combobox-wrap.open {
  z-index: 1050;
}

.combobox-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.combobox-input-container .combobox-icon {
  position: absolute;
  left: 10px;
  color: #7ea58e;
  font-size: 0.85rem;
  pointer-events: none;
}

.combobox-input-container .combobox-input {
  width: 100%;
  padding-left: 32px;
  padding-right: 48px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1e293b;
  cursor: text;
}

.combobox-input-container .combobox-input:focus {
  border-color: #7ea58e;
  box-shadow: 0 0 0 2px rgba(126, 165, 142, 0.25);
}

.combobox-input-container .combobox-chevron {
  position: absolute;
  right: 11px;
  color: #94a3b8;
  font-size: 0.75rem;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.searchable-combobox-wrap.open .combobox-chevron {
  transform: rotate(180deg);
  color: #13262c;
}

.combobox-clear-btn {
  position: absolute;
  right: 28px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  line-height: 1;
}

.combobox-clear-btn:hover {
  color: #ef4444;
  background-color: #fee2e2;
}

/* Floating Dropdown Menu */
.combobox-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  z-index: 1050;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
}

.combobox-options-list {
  padding: 4px 0;
}

.combobox-option-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f5f9;
}

.combobox-option-item:last-child {
  border-bottom: none;
}

.combobox-option-item:hover {
  background-color: #eaf1ee;
}

.combobox-option-item.selected {
  background-color: #d8e6df;
  font-weight: 700;
}

.combobox-option-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #13262c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.combobox-option-meta {
  font-size: 0.73rem;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.combobox-option-meta i {
  color: #7ea58e;
  font-size: 0.68rem;
}

.combobox-option-city {
  background: #f1f5f9;
  color: #475569;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 600;
}

.combobox-empty-item {
  padding: 16px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 0.8rem;
}

.combobox-empty-item i {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 4px;
  color: #cbd5e1;
}

.job-form-section {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.job-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #13262c;
  padding-bottom: 8px;
  margin-bottom: 0;
  border-bottom: 1px dashed var(--border-light);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.job-section-header i {
  color: #7ea58e;
  font-size: 0.95rem;
}

.job-form-section .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.job-form-section .form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

/* Pattern Drawing Widget */
.pattern-widget-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pattern-canvas-container {
  background: #ffffff;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  cursor: crosshair;
}

#patternCanvas {
  display: block;
  touch-action: none;
}

.pattern-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.pattern-value-badge {
  font-size: 0.76rem;
  font-weight: 600;
  color: #13262c;
  background: #eaf1ee;
  padding: 4px 10px;
  border-radius: 4px;
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Accessories Pills Checklist */
.accessories-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.accessory-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.accessory-pill:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.accessory-pill.selected {
  background: #13262c;
  border-color: #13262c;
  color: #ffffff;
}

.accessory-pill.selected i {
  color: #7ea58e;
}

/* Side Window (Parts & Realtime Financial Calculation) */
.job-modal-side-window {
  position: relative;
}

.side-window-card {
  background: #f8fafc;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.side-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 10px;
}

.side-window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #13262c;
}

.side-window-title i {
  color: #7ea58e;
}

.badge-parts-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #13262c;
  background: #eaf1ee;
  padding: 3px 8px;
  border-radius: 12px;
}

.add-part-box-inline {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  width: 100%;
}

.part-inline-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.part-field-category {
  width: 25%;
  min-width: 110px;
  flex-shrink: 0;
}

.part-field-search {
  flex: 1;
  min-width: 150px;
}

.part-field-cost {
  width: 78px;
  flex-shrink: 0;
}

.part-field-qty {
  width: 52px;
  flex-shrink: 0;
}

.part-field-btn {
  flex-shrink: 0;
}

.part-field-btn .btn {
  height: 31px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 4px;
}

.form-label-xs {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: block;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-input-sm, .form-select-sm {
  padding: 4px 8px;
  font-size: 0.8rem;
  height: 31px;
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

/* Part Dropdown Option Cards */
.part-option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.part-option-item:last-child {
  border-bottom: none;
}

.part-option-item:hover {
  background-color: #eaf1ee;
}

.part-option-item.selected {
  background-color: #d8e6df;
  font-weight: 700;
}

.part-option-main {
  min-width: 0;
  flex: 1;
}

.part-option-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #13262c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.part-option-sub {
  font-size: 0.69rem;
  color: #64748b;
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.part-option-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
}

.part-option-rate {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f2d22;
  white-space: nowrap;
  margin-left: 8px;
}

.part-option-item .badge-item-code {
  font-size: 0.68rem;
  padding: 1px 5px;
  cursor: inherit;
  pointer-events: none;
}

.badge-part-cat {
  font-size: 0.67rem;
  background: #f1f5f9;
  color: #475569;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 600;
  margin-left: 5px;
  display: inline-block;
}

.parts-items-list-wrap {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.parts-mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

.parts-mini-table th {
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  padding: 6px 8px;
  border-bottom: 1px solid #e2e8f0;
}

.parts-mini-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.parts-mini-table tr:hover td {
  background: #f8fafc;
}

.btn-part-remove {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 2px;
  font-size: 0.78rem;
  border-radius: 3px;
}

.btn-part-remove:hover {
  background: #fee2e2;
}

/* Financial Summary Card */
.financial-summary-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 14px;
}

.financial-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #13262c;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.financial-card-header i {
  color: #7ea58e;
}

.fin-calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.82rem;
}

.fin-label {
  color: #475569;
  font-weight: 600;
}

.fin-val {
  color: #1e293b;
  font-weight: 700;
}

.fin-input {
  width: 110px;
  padding: 4px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.fin-input:focus {
  border-color: #7ea58e;
  outline: none;
}

.fin-input.highlight-received {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.fin-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 10px 0;
}

.fin-calc-row.highlight {
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 4px;
}

.total-grand {
  font-size: 1.05rem;
  color: #13262c;
}

.balance-pill {
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  background: #fee2e2;
  color: #b91c1c;
}

.balance-pill.paid-full {
  background: #dcfce7;
  color: #15803d;
}

.profit-pill {
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  background: #eaf1ee;
  color: #13262c;
  border: 1px solid #7ea58e;
}

/* Table Badges & Action Buttons */
.badge-repair-store {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-repair-site {
  background: #fef3c7;
  color: #b45309;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-lock-pattern {
  background: #f3e8ff;
  color: #6b21a8;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-lock-pin {
  background: #fef9c3;
  color: #854d0e;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.72rem;
}

.badge-lock-none {
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
}

.btn-action-print {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #0284c7;
  color: #ffffff;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-action-print:hover {
  background-color: #0369a1;
  transform: translateY(-1px);
}

/* Printable Job Card Slip Paper */
.print-slip-paper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0f172a;
}

.print-slip-header {
  text-align: center;
  border-bottom: 2px dashed #94a3b8;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.print-slip-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #13262c;
  letter-spacing: 0.5px;
}

.print-slip-subtitle {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 2px;
}

.print-slip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.print-slip-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 8px 10px;
}

.print-slip-box-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.print-slip-box-val {
  font-weight: 700;
  color: #0f172a;
}

/* Job Card Action Buttons (Barcode & WhatsApp) */
.btn-action-barcode {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #6366f1;
  color: #ffffff;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-action-barcode:hover {
  background-color: #4f46e5;
  transform: translateY(-1px);
}

.btn-action-whatsapp {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #25d366;
  color: #ffffff;
  font-size: 0.88rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-action-whatsapp:hover {
  background-color: #1eb956;
  transform: translateY(-1px);
}

/* Print Slip Format Toggle Bar */
.print-format-toggle-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.format-toggle-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.format-toggle-btns-group {
  display: inline-flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.btn-format-toggle {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-format-toggle:hover {
  color: #13262c;
}

.btn-format-toggle.active {
  background: #13262c;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* 50mm x 30mm Thermal Barcode Label Sticker */
.barcode-sticker-card {
  width: 50mm;
  height: 25mm;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  padding: 1.5mm 1.8mm;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #000000;
}

.barcode-preview-dashed-box {
  border: 2px dashed #0284c7;
  border-radius: 8px;
  padding: 8px 12px;
  background: #ffffff;
  width: 220px;
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-copy-preset {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-copy-preset:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-copy-preset.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
}

.btn-layout-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 12px;
  font-weight: 600;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.btn-layout-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-layout-chip.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
  font-weight: 700 !important;
}

/* Modal Continuous Roll Preview Styling (Image 3 Reference) */
.barcode-roll-preview-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
}

.barcode-roll-preview-1col {
  width: 250px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.barcode-roll-card-item {
  padding: 10px 14px;
  box-sizing: border-box;
  text-align: center;
  background: #ffffff;
  border-bottom: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.barcode-roll-card-item:last-child {
  border-bottom: none;
}

.barcode-roll-preview-2cols {
  display: flex;
  flex-wrap: wrap;
  width: 504px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.barcode-roll-preview-2cols .barcode-roll-card-item {
  width: 250px;
  border-right: 1px dashed #cbd5e1;
  border-bottom: 1px dashed #cbd5e1;
}

.barcode-roll-preview-2cols .barcode-roll-card-item:nth-child(2n) {
  border-right: none;
}

.barcode-roll-preview-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 600px;
}

.barcode-roll-preview-sheet .barcode-roll-card-item {
  width: 240px;
  border: 1px dashed #94a3b8;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.b-card-company {
  font-size: 0.82rem;
  font-weight: 800;
  color: #000000;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.b-card-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.15;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.b-card-svg {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3px 0 2px;
  width: 100%;
}

.b-card-svg svg {
  max-width: 96%;
  height: 30px;
}

.b-card-sku {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: monospace, Courier, sans-serif;
  color: #000000;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-top: 2px;
}

.b-card-price {
  font-size: 0.82rem;
  font-weight: 800;
  color: #000000;
  margin-top: 3px;
  line-height: 1.15;
}

.barcode-sticker-header {
  font-size: 6.8pt;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000000;
}

.barcode-sticker-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 6pt;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 0.5mm;
  color: #000000;
}

.barcode-sticker-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5mm 0;
}

.barcode-sticker-svg-wrap svg {
  max-width: 100%;
  height: 11mm;
}

.barcode-sticker-info-row {
  font-size: 5.8pt;
  line-height: 1.15;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #000000;
}

/* Thermal 80mm POS Receipt Layout */
.thermal-pos-receipt {
  width: 76mm;
  max-width: 76mm;
  margin: 0 auto;
  background: #ffffff;
  padding: 4mm 3.5mm;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 8.5pt;
  color: #000000;
  line-height: 1.35;
  box-sizing: border-box;
}

.thermal-pos-header {
  text-align: center;
  margin-bottom: 6px;
}

.thermal-pos-title {
  font-size: 11pt;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.thermal-pos-subtitle {
  font-size: 7.2pt;
  color: #475569;
}

.thermal-pos-divider {
  border-top: 1px dashed #000000;
  margin: 6px 0;
}

.thermal-pos-row {
  display: flex;
  justify-content: space-between;
  font-size: 8pt;
  margin-bottom: 2px;
}

.thermal-pos-barcode-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 6px 0 4px 0;
}

/* A4 Full Invoice / Job Sheet Layout */
.a4-invoice-sheet {
  max-width: 780px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #0f172a;
}

/* ==========================================================================
   Print Media Rules (High-Fidelity A4 Invoice & 80mm Thermal POS Slips)
   ========================================================================== */
@media print {
  /* Fast structural reset to prevent transitions/animations/filters without slow universal selector */
  html, body, .app-container, .modal-backdrop, .modal-dialog, .sidebar, .topbar, .main-wrapper, .data-card {
    -webkit-transition: none !important;
    transition: none !important;
    -webkit-animation: none !important;
    animation: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    filter: none !important;
    text-shadow: none !important;
  }

  /* Base print page layout */
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    font-size: 11pt;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* -------------------------------------------------------------------------
     1. Modal Slip Print Modes (A4 Job Sheet, Thermal 80mm, Barcode Sticker, Purchase, Sale)
     ------------------------------------------------------------------------- */
  body.printing-a4,
  body.printing-thermal,
  body.printing-barcode,
  body.printing-purchase-a4,
  body.printing-purchase-thermal,
  body.printing-sale-a4,
  body.printing-sale-thermal {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    overflow: visible !important;
  }

  /* Completely eliminate main application shell when printing modal documents */
  body.printing-a4 .app-container,
  body.printing-thermal .app-container,
  body.printing-barcode .app-container,
  body.printing-purchase-a4 .app-container,
  body.printing-purchase-thermal .app-container,
  body.printing-sale-a4 .app-container,
  body.printing-sale-thermal .app-container,
  body.printing-a4 .sidebar,
  body.printing-thermal .sidebar,
  body.printing-barcode .sidebar,
  body.printing-purchase-a4 .sidebar,
  body.printing-purchase-thermal .sidebar,
  body.printing-sale-a4 .sidebar,
  body.printing-sale-thermal .sidebar,
  body.printing-a4 .topbar,
  body.printing-thermal .topbar,
  body.printing-barcode .topbar,
  body.printing-purchase-a4 .topbar,
  body.printing-purchase-thermal .topbar,
  body.printing-sale-a4 .topbar,
  body.printing-sale-thermal .topbar,
  body.printing-a4 .sidebar-overlay,
  body.printing-thermal .sidebar-overlay,
  body.printing-barcode .sidebar-overlay,
  body.printing-purchase-a4 .sidebar-overlay,
  body.printing-purchase-thermal .sidebar-overlay,
  body.printing-sale-a4 .sidebar-overlay,
  body.printing-sale-thermal .sidebar-overlay,
  body.printing-a4 .main-wrapper,
  body.printing-thermal .main-wrapper,
  body.printing-barcode .main-wrapper,
  body.printing-purchase-a4 .main-wrapper,
  body.printing-purchase-thermal .main-wrapper,
  body.printing-sale-a4 .main-wrapper,
  body.printing-sale-thermal .main-wrapper,
  body.printing-a4 .toast-container,
  body.printing-thermal .toast-container,
  body.printing-barcode .toast-container,
  body.printing-purchase-a4 .toast-container,
  body.printing-purchase-thermal .toast-container,
  body.printing-sale-a4 .toast-container,
  body.printing-sale-thermal .toast-container {
    display: none !important;
  }

  /* Hide interactive modal header, toolbar toggles, and buttons */
  .modal-header,
  .modal-footer-bar,
  .print-format-toggle-bar,
  .modal-close-btn,
  .no-print,
  button,
  .btn {
    display: none !important;
  }

  /* Strip printing modal backdrops from fixed/flex positioning to prevent vertical offset */
  body.printing-a4 .modal-backdrop,
  body.printing-thermal .modal-backdrop,
  body.printing-barcode .modal-backdrop,
  body.printing-purchase-a4 .modal-backdrop,
  body.printing-purchase-thermal .modal-backdrop,
  body.printing-sale-a4 .modal-backdrop,
  body.printing-sale-thermal .modal-backdrop {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    transform: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    inset: auto !important;
    pointer-events: auto !important;
    z-index: auto !important;
  }

  /* Hide inactive modal backdrops */
  body.printing-a4 .modal-backdrop:not(#jobCardPrintModalBackdrop),
  body.printing-thermal .modal-backdrop:not(#jobCardPrintModalBackdrop),
  body.printing-barcode .modal-backdrop:not(#jobCardBarcodeModalBackdrop),
  body.printing-purchase-a4 .modal-backdrop:not(#purchasePrintModalBackdrop),
  body.printing-purchase-thermal .modal-backdrop:not(#purchasePrintModalBackdrop),
  body.printing-sale-a4 .modal-backdrop:not(#salePrintModalBackdrop),
  body.printing-sale-thermal .modal-backdrop:not(#salePrintModalBackdrop) {
    display: none !important;
  }

  /* Strip dialog structure */
  body.printing-a4 .modal-dialog,
  body.printing-thermal .modal-dialog,
  body.printing-barcode .modal-dialog,
  body.printing-purchase-a4 .modal-dialog,
  body.printing-purchase-thermal .modal-dialog,
  body.printing-sale-a4 .modal-dialog,
  body.printing-sale-thermal .modal-dialog {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    transform: none !important;
    overflow: visible !important;
  }

  /* Strip modal body wrapper */
  body.printing-a4 .modal-body-content,
  body.printing-thermal .modal-body-content,
  body.printing-barcode .modal-body-content,
  body.printing-purchase-a4 .modal-body-content,
  body.printing-purchase-thermal .modal-body-content {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    overflow: visible !important;
  }

  /* A4 Job Sheet Invoice Slip Print Styling */
  body.printing-a4 #printableReceiptSlipArea {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 195mm !important;
    margin: 0 auto !important;
    padding: 4mm 6mm !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  body.printing-a4 .a4-invoice-sheet {
    box-shadow: none !important;
  }

  /* Thermal 80mm POS Slip Print Styling */
  body.printing-thermal #printableReceiptSlipArea {
    position: static !important;
    display: block !important;
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 1mm 2mm !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  body.printing-thermal .thermal-pos-receipt {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    width: 76mm !important;
    max-width: 76mm !important;
  }

  /* Thermal 50x30mm Barcode Sticker Print Styling */
  body.printing-barcode #jobBarcodeStickerPreviewArea {
    position: static !important;
    display: block !important;
    width: 50mm !important;
    height: auto !important;
    max-width: 50mm !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.printing-barcode .barcode-roll-card-item,
  body.printing-barcode .barcode-sticker-card {
    border: none !important;
    border-bottom: 0.5px dashed #cbd5e1 !important;
    box-shadow: none !important;
    width: 50mm !important;
    height: 25mm !important;
    max-width: 50mm !important;
    max-height: 25mm !important;
    padding: 1.2mm 1.5mm !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.printing-barcode .barcode-roll-card-item:last-child,
  body.printing-barcode .barcode-sticker-card:last-child {
    border-bottom: none !important;
  }

  /* Purchase Voucher Slip Print Styling (A4 & Thermal) */
  body.printing-purchase-a4 #purchasePrintPreviewArea {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 195mm !important;
    margin: 0 auto !important;
    padding: 4mm 6mm !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  body.printing-purchase-thermal #purchasePrintPreviewArea {
    position: static !important;
    display: block !important;
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 1mm 2mm !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  /* Sales Invoice Slip Print Styling (A4 & Thermal) */
  body.printing-sale-a4 #salePrintPreviewArea {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 195mm !important;
    margin: 0 auto !important;
    padding: 4mm 6mm !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #0f172a !important;
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  body.printing-sale-thermal #salePrintPreviewArea {
    position: static !important;
    display: block !important;
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 1mm 2mm !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    color: #000000 !important;
    page-break-inside: avoid !important;
    box-sizing: border-box !important;
  }

  /* -------------------------------------------------------------------------
     2. Standard Table Print Mode (Accounts, Items, Staff, Job Cards, Purchases, Sales)
     ------------------------------------------------------------------------- */
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .sidebar,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .topbar,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .sidebar-overlay,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .table-toolbar,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .pagination-bar,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .metric-card-group,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .metric-card,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .modal-backdrop,
  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .toast-container {
    display: none !important;
  }

  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) .table-container {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
    overflow: visible !important;
  }

  body:not(.printing-a4):not(.printing-thermal):not(.printing-barcode):not(.printing-purchase-a4):not(.printing-purchase-thermal):not(.printing-sale-a4):not(.printing-sale-thermal) table {
    width: 100% !important;
    font-size: 8.5pt !important;
  }
}

/* ==========================================================================
   Device Condition Photos & Auto-Compression Section
   ========================================================================== */
.job-photos-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.job-photos-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.photos-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #13262c;
}

.photos-compression-pill {
  font-size: 0.68rem;
  font-weight: 600;
  background: #eaf1ee;
  color: #13262c;
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #c2d6cc;
}

.photos-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 8px;
  border-radius: 4px;
}

/* Upload Dropzone */
.photos-dropzone {
  border: 2px dashed #94a3b8;
  border-radius: 6px;
  background: #f8fafc;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.photos-dropzone:hover,
.photos-dropzone.dragover {
  border-color: #13262c;
  background: #eaf1ee;
}

.photos-dropzone-icon {
  font-size: 1.4rem;
  color: #7ea58e;
  margin-bottom: 4px;
  display: block;
}

.photos-dropzone-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
}

.photos-dropzone-subtitle {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 2px;
}

/* Thumbnails Grid */
.photos-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.photo-thumb-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  background: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.photo-thumb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.photo-thumb-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-size-tag {
  position: absolute;
  bottom: 3px;
  left: 3px;
  background: rgba(19, 38, 44, 0.88);
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.btn-remove-photo {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: background-color 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.btn-remove-photo:hover {
  background: #b91c1c;
  transform: scale(1.15);
}

.btn-footer-add-photos {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-footer-add-photos:hover {
  background: #eaf1ee;
  color: #13262c;
  border-color: #7ea58e;
}

/* ==========================================================================
   Quick Status Update & Free Service (30 Days) Styles
   ========================================================================== */
.btn-action-status {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #0891b2;
  color: #ffffff;
  font-size: 0.82rem;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn-action-status:hover {
  background-color: #0e7490;
  transform: translateY(-1px);
}

/* Free Service Badges */
.badge-free-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background-color: #dcfce7;
  color: #15803d;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid #86efac;
}

.badge-free-expired {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background-color: #fee2e2;
  color: #b91c1c;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid #fca5a5;
}

.badge-free-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  background-color: #e0e7ff;
  color: #4338ca;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
}

.badge-free-none {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  background-color: #f1f5f9;
  color: #64748b;
  padding: 1px 6px;
  border-radius: 10px;
}

/* Status Modal & History Timeline */
.status-modal-job-summary {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.status-history-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 14px;
}

.status-history-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-history-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-history-item {
  font-size: 0.74rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #0891b2;
  border-radius: 4px;
  padding: 6px 10px;
}

.status-history-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
  font-weight: 700;
}

.status-history-remark {
  color: #475569;
  font-style: italic;
}

.status-remark-snippet {
  font-size: 0.68rem;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* ==========================================================================
   Purchase Module Styles (High-Fidelity 2-Frame Workspace & Financials)
   ========================================================================== */
.purchase-split-workspace {
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 992px) {
  .purchase-split-workspace {
    grid-template-columns: 1fr;
  }
}

.purchase-items-frame,
.purchase-summary-frame {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.purchase-frame-header {
  background: #0f766e;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-item-count {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.purchase-item-entry-strip {
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.form-label-xs {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 3px;
  display: block;
}

.form-input-sm {
  width: 100%;
  padding: 5px 8px;
  font-size: 0.76rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background-color: #ffffff;
  color: #1e293b;
  box-sizing: border-box;
}

.form-input-sm:focus {
  outline: none;
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.purchase-items-table-wrap {
  overflow-x: auto;
  max-height: 250px;
  overflow-y: auto;
  flex: 1;
}

.purchase-summary-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background-color: #f8fafc;
  flex: 1;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #334155;
  font-weight: 500;
}

.grand-total-box {
  background: #042f2e;
  color: #34d399;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.badge-payment-paid {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-block;
}

.badge-payment-partial {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-block;
}

.badge-payment-due {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-block;
}

.purchase-photo-attachment-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

/* ==========================================================================
   Multiple Problems Pills & Quick Chips (Job Card Module)
   ========================================================================== */
.selected-problems-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-height: 28px;
  padding: 4px 0;
}

.problem-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  animation: fadeIn 0.15s ease-in-out;
}

.problem-pill .remove-problem-btn {
  background: none;
  border: none;
  color: #dc2626;
  cursor: pointer;
  padding: 0 2px;
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
}

.problem-pill .remove-problem-btn:hover {
  color: #991b1b;
}

.problem-chip-btn {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.problem-chip-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.problem-chip-btn.selected {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}

/* ==========================================================================
   Sales Module Styles (High-Fidelity 2-Frame POS & Retail Invoicing)
   ========================================================================== */
.sales-split-workspace {
  display: grid;
  grid-template-columns: 1.62fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

@media (max-width: 992px) {
  .sales-split-workspace {
    grid-template-columns: 1fr;
  }
}

.sales-items-frame,
.sales-summary-frame {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sales-frame-header {
  background: #0f766e;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sales-item-entry-strip {
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.sales-items-table-wrap {
  overflow-x: auto;
  max-height: 250px;
  overflow-y: auto;
  flex: 1;
}

.sales-summary-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background-color: #f8fafc;
  flex: 1;
}

/* ==========================================================================
   Account Master & Bank/Cash Ledger Styles
   ========================================================================== */

.badge-type-cash {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-type-bank {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  background-color: #eef2ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}

.badge-type-upi {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  background-color: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.btn-statement {
  background-color: #047857;
  color: #ffffff;
  border: 1px solid #047857;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.btn-statement:hover {
  background-color: #065f46;
  border-color: #065f46;
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(4, 120, 87, 0.2);
}

.statement-credit {
  color: #15803d;
  font-weight: 700;
  font-family: 'Consolas', 'Courier New', monospace;
}

.statement-debit {
  color: #b91c1c;
  font-weight: 700;
  font-family: 'Consolas', 'Courier New', monospace;
}

.statement-running-bal {
  font-weight: 800;
  font-family: 'Consolas', 'Courier New', monospace;
  color: #0f172a;
}

.statement-running-bal.negative {
  color: #dc2626;
}

.account-avatar {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.account-avatar.avatar-cash {
  background-color: #d1fae5;
  color: #065f46;
}

.account-avatar.avatar-bank {
  background-color: #e0e7ff;
  color: #3730a3;
}

.account-avatar.avatar-upi {
  background-color: #ede9fe;
  color: #6b21a8;
}

.statement-source-pill {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
}

.source-job-card {
  background-color: #dbeafe;
  color: #1e40af;
}

.source-sales {
  background-color: #d1fae5;
  color: #065f46;
}

.source-purchase {
  background-color: #fee2e2;
  color: #991b1b;
}

.source-transfer {
  background-color: #fef3c7;
  color: #92400e;
}

.source-direct {
  background-color: #ede9fe;
  color: #5b21b6;
}

.source-opening {
  background-color: #f1f5f9;
  color: #475569;
}

.source-expense {
  background-color: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.source-receipt {
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.source-payment {
  background-color: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
}

@media (max-width: 992px) {
  .sale-header-row-1 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }
  .sale-header-row-2 {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  }
}

/* ==========================================================================
   Receipt & Payment and Party Statement Module Styles
   ========================================================================== */
.badge-receipt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-payment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-party-customer {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-party-supplier {
  background-color: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-dr {
  background-color: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 3px;
}

.badge-cr {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: 800;
  font-size: 0.74rem;
  padding: 2px 7px;
  border-radius: 3px;
}

.rp-toggle-btn-group {
  display: inline-flex;
  border-radius: 6px;
  background: #f1f5f9;
  padding: 3px;
  gap: 3px;
}

.rp-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rp-toggle-btn:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.rp-toggle-btn.active.party-cust {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.rp-toggle-btn.active.party-supp {
  background: #7c3aed !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}

.rp-toggle-btn.active.vch-receipt {
  background: #16a34a !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(22, 163, 74, 0.3);
}

.rp-toggle-btn.active.vch-payment {
  background: #e11d48 !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.3);
}

.rp-balance-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.rp-balance-banner.dr {
  background-color: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.rp-balance-banner.cr {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.statement-party-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  width: 100%;
  box-sizing: border-box;
}

#statementPartyProfileWrap {
  display: block;
  width: 100%;
}

#partyLedgerTable {
  width: 100%;
  border-collapse: collapse;
}

#partyLedgerTable th,
#partyLedgerTable td {
  vertical-align: middle;
}

/* ==========================================================================
   Reports Hub & Multi-Tab Subpage Navigation (Refined Premium Enterprise UI)
   ========================================================================== */
.reports-hub-nav-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.report-tabs-nav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px;
  border-bottom: none;
  margin-bottom: 0;
  scrollbar-width: thin;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.report-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-weight: 700;
  font-size: 0.83rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.report-tab-btn i {
  font-size: 0.9rem;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.report-tab-btn:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.report-tab-btn:hover i {
  color: #0f766e;
}

.report-tab-btn.active {
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.28);
}

.report-tab-btn.active i {
  color: #5eead4;
}

.report-pane {
  display: none;
}

.report-pane.active {
  display: block;
  animation: fadeInReport 0.22s ease forwards;
}

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

/* Metric Cards for Reports (High Polish Enterprise Tiles) */
.reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.report-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.report-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

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

.report-kpi-data {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.report-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-kpi-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

/* KPI Color Themes */
.report-kpi-card.kpi-blue { border-left: 4px solid #0284c7; }
.report-kpi-card.kpi-blue .report-kpi-icon { background: #e0f2fe; color: #0284c7; }

.report-kpi-card.kpi-rose { border-left: 4px solid #e11d48; }
.report-kpi-card.kpi-rose .report-kpi-icon { background: #ffe4e6; color: #e11d48; }

.report-kpi-card.kpi-emerald { border-left: 4px solid #059669; }
.report-kpi-card.kpi-emerald .report-kpi-icon { background: #dcfce7; color: #059669; }

.report-kpi-card.kpi-amber { border-left: 4px solid #d97706; }
.report-kpi-card.kpi-amber .report-kpi-icon { background: #fef3c7; color: #d97706; }

.report-kpi-card.kpi-teal { border-left: 4px solid #0d9488; }
.report-kpi-card.kpi-teal .report-kpi-icon { background: #ccfbf1; color: #0d9488; }

.report-kpi-card.kpi-indigo { border-left: 4px solid #4f46e5; }
.report-kpi-card.kpi-indigo .report-kpi-icon { background: #e0e7ff; color: #4f46e5; }

/* Filter Toolbar Card for Reports */
.reports-filter-card {
  margin-bottom: 16px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.reports-toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.reports-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reports-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-date-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.reports-input {
  height: 38px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s ease;
}

.reports-input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.reports-search-box {
  position: relative;
  min-width: 250px;
}

.reports-search-box input {
  width: 100%;
  height: 38px;
  padding: 6px 12px 6px 36px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s ease;
}

.reports-search-box input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.reports-search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.85rem;
}

/* Custom Table in Reports */
.reports-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-bottom: 24px;
}

.reports-table-card .custom-table-container {
  border: none;
  margin: 0;
  width: 100%;
}

.reports-table-card .custom-table th {
  background-color: var(--sidebar-bg);
  color: #ffffff;
  padding: 12px 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.reports-table-card .custom-table td {
  padding: 11px 14px;
  font-size: 0.82rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

.reports-table-card .custom-table tbody tr:hover td {
  background-color: #f8fafc;
}

/* PnL Statement Table Refinement */
.pnl-statement-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  font-size: 0.85rem;
}

.pnl-statement-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.pnl-statement-table .pnl-section-header td {
  background: #f1f5f9;
  font-weight: 800;
  font-size: 0.8rem;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 16px;
}

.pnl-statement-table .pnl-subtotal-row td {
  background: #f8fafc;
  font-weight: 700;
  border-top: 1px solid #cbd5e1;
  border-bottom: 1px solid #cbd5e1;
}

.pnl-statement-table .pnl-gross-profit-row td {
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
  border-top: 2px solid #86efac;
  border-bottom: 2px solid #86efac;
}

.pnl-statement-table .pnl-net-profit-row td {
  background: linear-gradient(135deg, #064e3b, #042f2e);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  border: none;
}

.pnl-statement-table .pnl-net-loss-row td {
  background: linear-gradient(135deg, #991b1b, #881337);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.05rem;
  border: none;
}

/* ==========================================================================
   Expenses Action Buttons Hover & Transitions
   ========================================================================== */
.action-btn-print-expense:hover {
  background-color: #0f766e !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
}

.action-btn-edit-expense:hover {
  background-color: #d97706 !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
}

.action-btn-delete-expense:hover {
  background-color: #e11d48 !important;
  color: #ffffff !important;
  border-color: #e11d48 !important;
}

/* ==========================================================================
   Audit Log Badges & Typography
   ========================================================================== */
.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}

.audit-badge-login { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.audit-badge-create { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.audit-badge-update { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.audit-badge-delete { background: #ffe4e6; color: #be123c; border: 1px solid #fecdd3; }
.audit-badge-status { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.audit-badge-transfer { background: #e0e7ff; color: #4338ca; border: 1px solid #c7d2fe; }

.audit-user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audit-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #13262c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.audit-module-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* ==========================================================================
   WhatsApp Notification Modal Enhancement
   ========================================================================== */
.form-control-input {
  width: 100% !important;
  box-sizing: border-box !important;
}

#jobCardWhatsAppModalDialog {
  max-width: 660px !important;
  width: 95% !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.35), 0 10px 15px -5px rgba(0, 0, 0, 0.2);
}

#whatsappRecipientNumber {
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
}

#whatsappMessagePreview {
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
  min-height: 280px !important;
}

#whatsappRecipientNumber:focus,
#whatsappMessagePreview:focus {
  border-color: #25d366 !important;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.2) !important;
  outline: none !important;
}

/* ==========================================================================
   Executive 8-Card Dashboard & Analytics Charts Styling
   ========================================================================== */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

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

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

.dash-kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  position: relative;
  overflow: hidden;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.dash-kpi-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.dash-kpi-card:hover .dash-kpi-icon {
  transform: scale(1.08);
}

.dash-kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dash-kpi-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-value {
  font-size: 1.42rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Color Accents for 8 Cards */
.kpi-emerald .dash-kpi-icon { background: #ecfdf5; color: #059669; }
.kpi-emerald:hover { border-color: #a7f3d0; }

.kpi-amber .dash-kpi-icon { background: #fffbeb; color: #d97706; }
.kpi-amber:hover { border-color: #fde68a; }

.kpi-blue .dash-kpi-icon { background: #eff6ff; color: #2563eb; }
.kpi-blue:hover { border-color: #bfdbfe; }

.kpi-rose .dash-kpi-icon { background: #fff1f2; color: #e11d48; }
.kpi-rose:hover { border-color: #fecdd3; }

.kpi-purple .dash-kpi-icon { background: #faf5ff; color: #7e22ce; }
.kpi-purple:hover { border-color: #e9d5ff; }

.kpi-cyan .dash-kpi-icon { background: #ecfeff; color: #0891b2; }
.kpi-cyan:hover { border-color: #a5f3fc; }

.kpi-green .dash-kpi-icon { background: #f0fdf4; color: #16a34a; }
.kpi-green:hover { border-color: #bbf7d0; }

.kpi-red .dash-kpi-icon { background: #fef2f2; color: #dc2626; }
.kpi-red:hover { border-color: #fecaca; }

/* Dashboard Charts & Tables Grids */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dashboard-tables-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

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

.dash-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dash-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
}

.dash-card-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.icon-teal { background: #f0fdfa; color: #0f766e; }
.icon-indigo { background: #e0e7ff; color: #4338ca; }
.icon-rose { background: #ffe4e6; color: #e11d48; }
.icon-amber { background: #fef3c7; color: #d97706; }

.dash-card-title {
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
}

.dash-card-sub {
  font-size: 0.74rem;
  color: #64748b;
  margin: 2px 0 0;
}

.dash-card-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
}

.badge-teal { background: #f0fdfa; color: #0f766e; border: 1px solid #ccfbf1; }

/* Topbar & Sidebar Business Branding */
.topbar-shop-badge {
  transition: all 0.2s ease;
}

.topbar-shop-badge:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

@media (max-width: 900px) {
  .topbar-shop-badge {
    display: none !important;
  }
}

/* ==========================================================================
   BASIC LOGIN FORM (Lightweight, Fast, Zero GPU Blur)
   ========================================================================== */

.basic-login-wrapper {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  padding: 16px;
  font-family: inherit;
}

.basic-login-card {
  width: 100%;
  max-width: 360px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.basic-login-header {
  padding: 22px 20px 14px;
  text-align: center;
  border-bottom: 1px solid #334155;
}

.basic-login-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #0f766e;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.basic-login-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px;
}

.basic-login-header p {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.basic-login-body {
  padding: 18px 20px;
}

.basic-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1.5px solid #ef4444;
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: basicAlertShake 0.35s ease;
}

@keyframes basicAlertShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.basic-alert i {
  color: #f87171;
  font-size: 1.05rem;
  flex-shrink: 0;
}

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

.basic-form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.basic-form-group input {
  width: 100%;
  box-sizing: border-box;
  background: #0f172a;
  border: 1.5px solid #334155;
  border-radius: 6px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.basic-form-group input:focus {
  border-color: #0d9488;
}

.basic-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.basic-password-wrapper input {
  padding-right: 42px !important;
}

.basic-toggle-pass {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.15s ease;
  z-index: 2;
}

.basic-toggle-pass:hover {
  color: #ffffff;
}

/* Red Highlight on Error */
.basic-form-group input.input-error {
  border-color: #ef4444 !important;
  background: #200f14 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25) !important;
}

.basic-login-btn {
  width: 100%;
  background: #0f766e;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.basic-login-btn:hover {
  background: #115e59;
}

.basic-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Sidebar Logout Button */
.sidebar-logout-btn {
  margin-left: auto;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.sidebar-logout-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.sidebar.collapsed .sidebar-logout-btn {
  display: none !important;
}


/* ==========================================================================
   DATABASE SETUP GATE & FULL-SCREEN SETUP OVERLAY
   ========================================================================== */
.db-gate-wrapper {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: radial-gradient(circle at top right, #13262c 0%, #0b141a 60%, #091015 100%);
  padding: 28px 20px 36px;
  overflow-y: auto;
  font-family: inherit;
}

.db-gate-notice-card {
  margin: auto 0;
}

.db-gate-topbar {
  width: 100%;
  max-width: 820px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.db-gate-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #e2eeea;
  font-weight: 800;
  font-size: 0.95rem;
}

.db-gate-brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

.db-gate-lang-select {
  background: #16262f;
  color: #e2e8f0;
  border: 1px solid #2c4350;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.db-gate-lang-select:focus {
  border-color: #14b8a6;
}

.db-gate-notice-card {
  width: 100%;
  max-width: 480px;
  background: #13212a;
  border: 1px solid #263b47;
  border-radius: 16px;
  padding: 32px 28px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.db-gate-alert-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: rgba(245, 158, 11, 0.14);
  border: 2px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
}

.db-gate-notice-card h2 {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.db-gate-notice-card p {
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 22px;
}

.db-gate-lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.db-gate-primary-btn {
  width: 100%;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 13px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.db-gate-primary-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.db-gate-setup-card {
  width: 100%;
  max-width: 820px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  display: none;
  flex-shrink: 0;
}

.db-gate-setup-header {
  background: #13262c;
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.db-gate-setup-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-gate-setup-header p {
  font-size: 0.8rem;
  color: #9cb5ab;
  margin: 0;
}

.db-gate-setup-body {
  padding: 22px 24px;
}

/* ==========================================================================
   DATABASE SETUP SHARED UI (BOTH PRE-LOGIN & IN-APP PAGE)
   ========================================================================== */
.db-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  margin-bottom: 18px;
}

.db-status-banner.is-connected {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.db-status-banner.is-disconnected {
  background: #fffbeb;
  border-color: #fde68a;
}

.db-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.8rem;
  color: #334155;
}

.db-status-meta strong {
  color: #0f172a;
}

.db-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.db-status-pill .db-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.db-status-pill.connected {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.db-status-pill.connected .db-dot {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25);
}

.db-status-pill.connecting {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.db-status-pill.connecting .db-dot {
  background: #f59e0b;
}

.db-status-pill.disconnected {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.db-status-pill.disconnected .db-dot {
  background: #ef4444;
}

.db-paste-box {
  background: #f8fafc;
  border: 1.5px dashed #94a3b8;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.db-paste-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.db-paste-textarea {
  width: 100%;
  min-height: 112px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  resize: vertical;
  outline: none;
}

.db-paste-textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.db-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.db-config-grid .db-field-full {
  grid-column: span 2;
}

.db-config-grid label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 5px;
}

.db-config-grid input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #0f172a;
  background: #ffffff;
  outline: none;
}

.db-config-grid input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.db-feedback-box {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.db-feedback-box.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.db-feedback-box.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.db-feedback-box.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.db-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

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

.db-help-tip {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .db-config-grid {
    grid-template-columns: 1fr;
  }
  .db-config-grid .db-field-full {
    grid-column: span 1;
  }
}

/* ==========================================================================
   LOGIN PAGE ENHANCEMENTS (FIXED ROUND DEVELOPER LOGO + CREDIT + DB STATUS)
   ========================================================================== */
.basic-login-card {
  max-width: 390px;
}

.basic-login-dev-logo {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #14b8a6;
  padding: 6px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(20, 184, 166, 0.18);
}

.login-dev-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}

.basic-login-dev-credit {
  padding: 10px 16px;
  border-top: 1px solid #334155;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
}

.basic-login-dev-credit i {
  color: #2dd4bf;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.basic-login-dev-credit strong {
  color: #ffffff;
  font-weight: 800;
}

.basic-login-dev-credit a {
  color: #5eead4;
  text-decoration: none;
  font-weight: 700;
}

.basic-login-dev-credit a:hover {
  text-decoration: underline;
}

.basic-login-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(15, 23, 42, 0.45);
}

.login-db-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: opacity 0.15s ease;
}

.login-db-status:hover {
  opacity: 0.88;
}

.login-db-status.connected {
  color: #86efac;
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
}

.login-db-status.connecting {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
}

.login-db-status.disconnected {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
}

.login-lang-select {
  background: #0f172a;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   LANGUAGE SETTINGS CARDS (SETTINGS PAGE - 5 LANGUAGES)
   ========================================================================== */
.language-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1100px) {
  .language-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .language-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.language-option-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
}

.language-option-card:hover {
  border-color: #0f766e;
  background: #f0fdfa;
  transform: translateY(-1px);
}

.language-option-card.active {
  border-color: #0f766e;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.language-card-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.language-code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
}

.language-option-card.active .language-code-pill {
  background: #0f766e;
  color: #ffffff;
}

.language-active-check {
  color: #0f766e;
  font-size: 1rem;
  opacity: 0;
  transform: scale(0.75);
  transition: all 0.18s ease;
}

.language-option-card.active .language-active-check {
  opacity: 1;
  transform: scale(1);
}

.language-native-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.language-sub-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}

.language-dir-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}

/* ==========================================================================
   RTL SUPPORT (ARABIC & URDU)
   ========================================================================== */
html[dir="rtl"] .sidebar {
  left: auto;
  right: 0;
  box-shadow: -3px 0 16px rgba(0, 0, 0, 0.15);
}

html[dir="rtl"] .main-wrapper {
  margin-left: 0;
  margin-right: var(--sidebar-width);
}

html[dir="rtl"] .sidebar.collapsed ~ .main-wrapper {
  margin-left: 0;
  margin-right: var(--sidebar-collapsed-width);
}

html[dir="rtl"] .sidebar-toggle-btn i {
  transform: rotate(180deg);
}

html[dir="rtl"] .sidebar.collapsed .nav-item:hover::after {
  left: auto;
  right: calc(100% + 10px);
}

html[dir="rtl"] .sidebar-logout-btn {
  margin-left: 0;
  margin-right: auto;
}

html[dir="rtl"] .topbar-shop-badge {
  margin-left: 0 !important;
  margin-right: 16px;
}

html[dir="rtl"] .breadcrumbs i.fa-chevron-right {
  transform: rotate(180deg);
}

html[dir="rtl"] .basic-password-wrapper input {
  padding-right: 12px !important;
  padding-left: 42px !important;
}

html[dir="rtl"] .basic-toggle-pass {
  right: auto;
  left: 10px;
}

html[dir="rtl"] .language-option-card {
  align-items: flex-end;
  text-align: right;
}

@media (max-width: 992px) {
  html[dir="rtl"] .main-wrapper {
    margin-right: 0 !important;
  }
}
