/* ============================================================
   PRABHU MOBILE ERP — style.css
   Modern Slate Blue & Executive Neutral Design System
   ============================================================ */

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

/* ── CSS Custom Properties ── */
:root {
  --paper: #f8fafc;
  --paper-dark: #f1f5f9;
  --paper-alt: #ffffff;
  --ink: #0f172a;
  --ink-muted: #64748b;
  --ink-light: #94a3b8;

  --primary: #2563eb;
  --primary-deep: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-pale: #f8fafc;

  --slate-dark: #0f172a;
  --slate-mid: #1e293b;
  --slate-light: #f1f5f9;

  --red-deep: #991b1b;
  --red-mid: #dc2626;
  --red-light: #fee2e2;
  --red-pale: #fff1f1;

  --green-deep: #166534;
  --green-mid: #15803d;
  --green-light: #dcfce7;
  --green-pale: #f0fdf4;

  --brass: var(--primary);
  --brass-light: #3b82f6;
  --brass-pale: var(--primary-pale);
  --brass-dark: var(--primary-deep);
  --blue-deep: #1e3a8a;
  --blue-mid: #2563eb;
  --blue-light: #eff6ff;

  --sidebar-w: 250px;
  --topbar-h: 60px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, .05);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .08);

  --ruled-line: none;
  --transition: .15s ease-in-out;
}

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

/* Grid flex item overflow fix */
[class*="col-"] {
  min-width: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-deep);
  text-decoration: underline;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Application Shell ── */
.pm-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Premium Executive Light Sidebar ── */
.pm-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: #ffffff;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  transition: transform var(--transition);
  overflow-y: auto;
  border-right: 1px solid #e2e8f0;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.03);
}

.pm-sidebar::-webkit-scrollbar {
  width: 4px;
}

.pm-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pm-sidebar-brand {
  padding: 16px 14px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.pm-sidebar-brand .brand-icon {
  width: 36px;
  height: 36px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #2563eb;
  flex-shrink: 0;
}

.pm-sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.pm-sidebar-brand .brand-name {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -.01em;
}

.pm-sidebar-brand .brand-sub {
  font-size: .65rem;
  color: #64748b;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Nav Section */
.pm-nav-group {
  padding: 0;
  margin-bottom: 0px;
}

.pm-nav-group-label {
  font-size: .67rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 8px 18px 3px;
  font-weight: 700;
}

.pm-nav-group:first-child .pm-nav-group-label {
  padding-top: 6px;
}

.pm-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px;
  margin: 1px 10px;
  border-radius: 7px;
  color: #0f172a;
  font-size: .84rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none !important;
}

.pm-nav-link i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: #334155;
  transition: color var(--transition);
}

.pm-nav-link:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.pm-nav-link:hover i {
  color: #2563eb;
}

.pm-nav-link.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  border: 1px solid #93c5fd;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.10);
}

.pm-nav-link.active i {
  color: #2563eb;
}

/* ── Keyboard Navigation Focus Highlight ── */
.pm-nav-link.sidebar-nav-focused,
.pm-nav-link:focus-visible,
.pm-nav-dropdown-toggle.sidebar-nav-focused,
.pm-nav-dropdown-toggle:focus-visible,
.pm-nav-sublink.sidebar-nav-focused,
.pm-nav-sublink:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 1px !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

/* ── Settings & Stock Accordion Dropdown in Sidebar ── */
.pm-nav-dropdown {
  margin: 1px 10px;
}

.pm-nav-dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 12px;
  border-radius: 7px;
  color: #0f172a;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.pm-nav-dropdown-toggle i:not(.toggle-arrow) {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  color: #334155;
}

.pm-nav-dropdown-toggle:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.pm-nav-dropdown-toggle:hover i:not(.toggle-arrow) {
  color: #2563eb;
}

.pm-nav-dropdown-toggle.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.pm-nav-dropdown-toggle .toggle-arrow {
  font-size: .75rem;
  transition: transform 0.25s ease;
  color: #475569;
}

.pm-nav-dropdown.open .pm-nav-dropdown-toggle .toggle-arrow {
  transform: rotate(180deg);
}

.pm-nav-dropdown-menu {
  display: none;
  padding: 2px 0 2px 6px;
  flex-direction: column;
  gap: 1px;
}

.pm-nav-dropdown.open .pm-nav-dropdown-menu {
  display: flex;
}

.pm-nav-sublink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3.5px 10px;
  margin: 1px 0;
  border-radius: 5px;
  color: #1e293b;
  font-size: .80rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.pm-nav-sublink i {
  font-size: .45rem;
  color: #64748b;
  width: 14px;
  text-align: center;
  transition: color 0.15s ease;
}

.pm-nav-sublink:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.pm-nav-sublink:hover i {
  color: #2563eb;
}

.pm-nav-sublink.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  border: 1px solid #93c5fd;
}

.pm-nav-sublink.active i {
  color: #2563eb;
}

.pm-sidebar-footer {
  margin-top: auto;
  padding: 14px 18px;
  border-top: 1px solid #e2e8f0;
  font-size: .72rem;
  color: #64748b;
  background: #ffffff;
}

/* ── Main Canvas ── */
.pm-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin var(--transition);
}

.pm-content {
  flex: 1;
  min-width: 0;
  padding: 16px 20px 35vh;
  background: var(--paper, #f8fafc);
  min-height: 100vh;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .pm-content {
    padding: 12px 14px 30vh;
  }
}

/* ── Code Pill Badges (CC & JC) ── */
.code-pill {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.code-pill.cc {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  font-size: .72rem;
  padding: 3px 8px;
}

.code-pill.jc {
  background: #fffbeb !important;
  color: #b45309 !important;
  border: 1px solid #fde68a !important;
  font-size: .72rem;
  padding: 3px 8px;
}

/* ── Sticky Topbar ── */
.pm-topbar {
  height: var(--topbar-h);
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.pm-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink);
  cursor: pointer;
  padding: 4px;
}

.pm-breadcrumb {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-breadcrumb .bc-home {
  font-size: .8rem;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.pm-breadcrumb .bc-sep {
  color: var(--ink-light);
  font-size: .7rem;
}

.pm-breadcrumb .bc-current {
  font-size: .92rem;
  font-weight: 700;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
}

.pm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.pm-search-box {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 5px 14px;
  gap: 8px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.pm-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.pm-search-box i {
  color: var(--ink-light);
  font-size: .95rem;
}

.pm-search-box input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .84rem;
  color: var(--ink);
  width: 170px;
}

/* User Pill & Profile Dropdown in Topbar */
.user-pill-container {
  position: relative;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 5px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 700;
  color: #000000;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.user-pill:hover,
.user-pill[aria-expanded="true"] {
  background: #f8fafc;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.user-pill span {
  color: #000000;
  font-weight: 700;
}

.user-pill i {
  color: #000000;
}

.topbar-branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.80rem;
  font-weight: 700;
  color: #000000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all var(--transition);
  user-select: none;
  font-family: inherit;
}

.topbar-branch-pill:hover {
  background: #f8fafc;
  border-color: #0f172a;
}

.topbar-branch-pill i {
  color: #ef4444;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
}

.topbar-branch-pill span {
  color: #000000;
  font-weight: 800;
  letter-spacing: 0.02em;
  font-family: inherit;
}

/* Hide extra Bootstrap dropdown caret on user pill to prevent double arrow */
.user-pill.dropdown-toggle::after {
  display: none !important;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .84rem;
  font-weight: 800;
  flex-shrink: 0;
}

.user-profile-dropdown {
  width: 240px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
  padding: 4px 0;
  overflow: hidden;
  margin-top: 6px !important;
  animation: fadeInDown 0.15s ease-out;
}

.user-profile-dropdown .dropdown-header-card {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 14px;
}

.user-profile-dropdown .avatar-lg {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #0f172a;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
}

.user-profile-dropdown .dropdown-item {
  padding: 8px 14px;
  font-size: .82rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.user-profile-dropdown .dropdown-item i {
  font-size: 1rem;
}

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

.user-profile-dropdown .dropdown-item.text-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* ── Global Buttons Design System ── */
.btn-pm-primary,
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 8px rgba(37, 99, 235, .22);
  transition: all 0.18s ease-in-out;
  font-family: inherit;
  letter-spacing: .01em;
}

.btn-pm-primary:hover,
.btn-primary:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .35) !important;
  transform: translateY(-1px);
}

.btn-pm-primary:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 99, 235, .2) !important;
}

.btn-pm-brass {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .2);
  transition: all 0.18s ease-in-out;
  font-family: inherit;
  letter-spacing: .01em;
}

.btn-pm-brass:hover {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 5px 14px rgba(15, 23, 42, .3) !important;
  transform: translateY(-1px);
}

.btn-pm-brass:active {
  transform: translateY(0);
}

.btn-pm-outline,
.btn-outline-secondary {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
  transition: all 0.18s ease-in-out;
  font-family: inherit;
}

.btn-pm-outline:hover,
.btn-outline-secondary:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0f172a !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .06) !important;
  transform: translateY(-1px);
}

.btn-outline-primary {
  background: #ffffff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  border-radius: 8px !important;
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease-in-out;
}

.btn-outline-primary:hover {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 8px rgba(16, 185, 129, .22);
  transition: all 0.18s ease-in-out;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 5px 14px rgba(16, 185, 129, .35) !important;
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 8px rgba(239, 68, 68, .22);
  transition: all 0.18s ease-in-out;
}

.section-label {
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: 0.01em;
  text-transform: none;
  margin-bottom: 12px;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 5px 14px rgba(239, 68, 68, .35) !important;
  transform: translateY(-1px);
}

.btn-icon {
  background: none;
  border: none;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--ink-muted);
  transition: color var(--transition), transform var(--transition);
  font-size: .95rem;
}

.btn-icon:hover {
  color: #2563eb;
  transform: scale(1.1);
}

.btn-icon.danger:hover {
  color: #dc2626;
  transform: scale(1.1);
}

/* ── Content Container ── */
.pm-content {
  flex: 1;
  padding: 16px;
  background: var(--paper);
}

/* ── Ledger Cards ── */
.ledger-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.ledger-card:hover {
  box-shadow: var(--shadow-card);
}

.ledger-card-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  color: var(--ink);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ledger-card-header h5,
.ledger-card-header h6 {
  color: #0f172a;
  margin: 0;
  font-size: .92rem;
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ledger-card-header h5 i,
.ledger-card-header h6 i {
  color: #2563eb;
  font-size: 1rem;
}

.ledger-card-body {
  padding: 20px;
}

.ledger-card-body.ruled {
  background-image: none;
}

/* Account Layout (A-1, A-2 Cards) */
.khata-account-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  overflow: hidden;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.15s ease;
}

.khata-account-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, .07);
  border-color: #94a3b8;
}

.khata-account-card.selected,
.khata-card.selected,
.jc-jamin-card-item.selected {
  background: #f0f7ff !important;
  border-color: #60a5fa !important;
  box-shadow: 0 0 0 1.5px #60a5fa, 0 4px 14px rgba(37, 99, 235, 0.12) !important;
}

.khata-account-card.selected .khata-acct-strip,
.khata-card.selected .khata-acct-strip,
.khata-card.selected > div:first-child {
  background: #dbeafe !important;
  border-bottom-color: #bfdbfe !important;
}

.khata-account-card.selected .khata-account-header,
.khata-card.selected > div:nth-child(2) {
  background: #f0f7ff !important;
}

.khata-account-card.open {
  border-color: #cbd5e1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.khata-account-card.open.selected,
.khata-card.open.selected {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 1.5px #3b82f6, 0 6px 18px rgba(37, 99, 235, 0.16) !important;
}

.folder-tile.selected {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px #3b82f6, 0 8px 22px rgba(37, 99, 235, 0.2) !important;
  transform: translateY(-2px);
}

.folder-tile.selected i {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

.folder-tile.selected .folder-tile-sub {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.day-item-tile {
  background: #ffffff;
  transition: all 0.15s ease;
}

.day-item-tile:hover {
  background: #f8fafc !important;
}

.book-cover-item.selected {
  background: #eff6ff !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2.5px #2563eb, 0 10px 24px rgba(37, 99, 235, 0.22) !important;
  transform: translateY(-4px) !important;
}



.day-item-tile.selected {
  background: #eff6ff !important;
  box-shadow: inset 4px 0 0 #2563eb !important;
}

.day-item-tile.selected .text-dark {
  color: #1d4ed8 !important;
}

/* ── Khata View Switch Pill (Exact Image 1 Style) ── */
.khata-view-switch {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid #dbe2ea;
  border-radius: 24px;
  padding: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  gap: 2px;
}

.khata-view-btn {
  border: none;
  background: transparent;
  color: #64748b;
  width: 38px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.khata-view-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.khata-view-btn.active {
  background: #0f4c81;
  /* Executive dark blue active fill matching image 1 */
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(15, 76, 129, 0.35);
}

.khata-view-btn.active svg {
  color: #ffffff;
}

/* ── Khata Grid View Card Styles ── */
.khata-grid-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

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

.khata-grid-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Account Number Top Strip — subtle slate */
.khata-acct-strip {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.khata-acct-strip .acct-no-label {
  font-size: .65rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.khata-acct-strip .acct-no-value {
  font-size: .9rem;
  font-weight: 700;
  color: #1e293b;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .03em;
}

.khata-acct-strip .acct-no-divider {
  flex: 1;
}

.khata-acct-strip .acct-sale-info {
  font-size: .84rem;
  font-weight: 800;
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 5px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* ── Hisab Layout Alignment & Fixed-Column Structure ── */
.hisab-acct-strip {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.hisab-acct-strip .acct-no-label {
  font-size: .65rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hisab-acct-strip .acct-no-value {
  font-size: .88rem;
  font-weight: 800;
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: .02em;
}

.hisab-acct-strip .acct-sale-info {
  font-size: .78rem;
  font-weight: 700;
  color: #334155;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.hisab-card-scroll-wrapper {
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hisab-account-header {
  background: #ffffff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 64px;
  width: 100%;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.hisab-account-header:hover {
  background: #f8fafc;
}

.hisab-col-customer {
  flex: 0 1 180px;
  min-width: 120px;
  max-width: 195px;
  overflow: hidden;
}

.hisab-col-financials {
  flex: 0 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.hisab-col-device {
  flex: 1 1 110px;
  min-width: 80px;
  padding-left: 4px;
  padding-right: 4px;
  overflow: hidden;
}

.hisab-col-outstanding {
  flex: 0 0 auto;
  min-width: 75px;
  text-align: right;
  white-space: nowrap;
}

.hisab-col-status {
  flex: 0 0 auto;
  min-width: 72px;
  text-align: right;
  display: flex;
  justify-content: flex-end;
  white-space: nowrap;
}

/* Hisab Financial Summary Badges / Pills */
.hisab-pill {
  font-size: .67rem;
  font-weight: 700;
  padding: 2.5px 6px;
  border-radius: 5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

.hisab-pill.pill-total {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.hisab-pill.pill-received {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.hisab-pill.pill-pending {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.hisab-pill.pill-success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

@media (max-width: 1100px) {
  .hisab-col-financials {
    flex-wrap: wrap;
    max-width: 220px;
  }
}

/* Clickable accordion header */
.khata-account-header {
  background: #ffffff;
  padding: 10px 18px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
  min-height: 64px;
  overflow: hidden;
}

.khata-account-header:hover {
  background: #f8fafc;
}

/* Customer Info Box */
.khata-cust-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 205px;
  min-width: 205px;
  max-width: 205px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.khata-cust-box>div {
  min-width: 0;
  flex: 1;
}

.khata-cust-photo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.khata-cust-photo:hover {
  transform: scale(1.05);
  border-color: #94a3b8;
}

.khata-cust-name {
  font-size: .90rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.khata-cust-meta {
  font-size: .75rem;
  color: #64748b;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Khata Financial Summary Pills Container & Pillars */
.khata-fin-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 390px;
  min-width: 390px;
  max-width: 390px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  margin: 0 8px;
  box-sizing: border-box;
}

.khata-fin-pill {
  font-size: .72rem;
  font-weight: 600;
  padding: 4px 7px;
  border-radius: 6px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  flex-shrink: 0;
}

.khata-fin-pill.total {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
  box-shadow: 0 1px 2px rgba(2, 132, 199, 0.06);
  justify-content: space-between;
}

.khata-fin-pill.total span {
  font-weight: 800;
  font-size: .80rem;
  color: #0369a1;
}

.khata-fin-pill.received {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.06);
  justify-content: space-between;
}

.khata-fin-pill.received span {
  font-weight: 800;
  font-size: .80rem;
  color: #15803d;
}

.khata-fin-pill.success {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #86efac;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.08);
  font-weight: 800;
  font-size: .74rem;
  justify-content: center;
}

.khata-fin-pill.pending {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.06);
  justify-content: space-between;
}

.khata-fin-pill.pending span {
  font-weight: 800;
  font-size: .80rem;
  color: #b91c1c;
}

/* Guarantor Mini Card */
.khata-guar-card {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 8px 4px 6px;
  transition: background 0.15s;
  min-height: 42px;
  width: 125px;
  min-width: 125px;
  max-width: 125px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.khata-guar-card:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.khata-guar-photo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}

.khata-guar-photo:hover {
  transform: scale(1.07);
}

.khata-guar-label {
  font-size: .60rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .05em;
  line-height: 1;
  margin-bottom: 1px;
  white-space: nowrap;
}

.khata-guar-code {
  font-size: .70rem;
  font-weight: 700;
  color: #2563eb;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.15;
  white-space: nowrap;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.khata-guar-name {
  font-size: .80rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 68px;
}

.khata-guar-mobile {
  font-size: .68rem;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-badge {
  display: none;
}

.person-box {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
  transition: transform var(--transition), box-shadow var(--transition);
}

.person-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .06);
}

.person-avatar {
  width: 42px;
  height: 42px;
  background: #f1f5f9;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #475569;
  cursor: pointer;
  transition: transform var(--transition);
}

.person-avatar:hover {
  transform: scale(1.05);
}

/* ── Stat Tiles ── */
.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-tile {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}

.stat-tile-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64748b;
}

.stat-tile-value {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  letter-spacing: -.02em;
}

.stat-tile-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
  opacity: .08;
  color: #0f172a;
}

/* ── Code Pills ── */
.code-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}

.code-pill.cc {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.code-pill.jc {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.code-pill.imei {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: .7rem;
}

/* ── Status Badges ── */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.status-badge.paid {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.status-badge.overdue {
  background: #fee2e2;
  color: #b91c1c;
}

.status-badge.active {
  background: #eff6ff;
  color: #1d4ed8;
}

.status-badge.settled {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.running {
  background: #fef3c7;
  color: #b45309;
}

.status-badge.in {
  background: #dcfce7;
  color: #15803d;
}

.status-badge.out {
  background: #fee2e2;
  color: #b91c1c;
}

.status-badge.none {
  background: #f1f5f9;
  color: #64748b;
}

.status-badge.block,
.status-badge.blocked {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

/* ── Block / Unblock Toggle Switch UI ── */
.pm-status-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  user-select: none;
  vertical-align: middle;
}

.pm-status-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  position: absolute;
}

.pm-status-switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ef4444;
  /* Block state = Red */
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 28px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
}

.pm-status-switch .slider .icon-check {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.pm-status-switch .slider .icon-cross {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  opacity: 1;
  transition: opacity 0.2s ease;
  line-height: 1;
}

.pm-status-switch input:checked+.slider {
  background-color: #22c55e;
  /* Active state = Green */
}

.pm-status-switch input:checked+.slider .icon-check {
  opacity: 1;
}

.pm-status-switch input:checked+.slider .icon-cross {
  opacity: 0;
}

.pm-status-switch .slider::after {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.pm-status-switch input:checked+.slider::after {
  transform: translateX(24px);
}

/* ── Folder Tiles ── */
/* ── Executive Folder Tiles System ── */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 18px;
}

@media (min-width: 992px) {
  #dashModuleGrid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

.folder-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .03);
  position: relative;
  overflow: hidden;
}

.folder-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, .15);
  border-color: #3b82f6;
  background: #ffffff;
}

.folder-tile i {
  font-size: 1.8rem;
  color: #2563eb;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin-bottom: 2px;
}

.folder-tile:hover i {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.folder-tile-label {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.folder-tile-sub {
  font-size: .72rem;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.folder-tile:hover .folder-tile-sub {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* ── Days Calendar Grid System (Fills Whole Page) ── */
.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  width: 100%;
}

@media (max-width: 1200px) {
  .days-grid {
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .days-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}

.day-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  min-height: 105px;
}

.day-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.15);
  border-color: #3b82f6;
  background: #ffffff;
}

.day-tile .day-icon {
  font-size: 1.4rem;
  color: #2563eb;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  transition: all 0.2s ease;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.day-tile:hover .day-icon {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.day-tile-label {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 4px;
}

.day-tile-sub {
  font-size: .72rem;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.day-tile:hover .day-tile-sub {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

/* ── Tables ── */
.pm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}

.pm-table thead th {
  background: #f8fafc;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  padding: 10px 14px;
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pm-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background var(--transition);
}

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

.pm-table tbody td {
  padding: 10px 14px;
  color: var(--ink);
  vertical-align: middle;
}

.pm-table .amount-in {
  color: #15803d;
  font-weight: 700;
}

.pm-table .amount-out {
  color: #b91c1c;
  font-weight: 700;
}

.table-responsive-pm {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Buttons ── */
.btn-pm-primary {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, .2);
  transition: all var(--transition);
  font-family: inherit;
}

.btn-pm-primary:hover {
  background: #1d4ed8;
  color: #ffffff;
}

.btn-pm-brass {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .15);
  transition: all var(--transition);
  font-family: inherit;
}

.btn-pm-brass:hover {
  background: #1e293b;
  color: #ffffff;
}

.btn-pm-outline {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-pm-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-icon {
  background: none;
  border: none;
  padding: 5px 8px;
  cursor: pointer;
  color: var(--ink-muted);
  transition: color var(--transition);
  font-size: .95rem;
}

.btn-icon:hover {
  color: #2563eb;
}

.btn-icon.danger:hover {
  color: #dc2626;
}

/* ── Form Controls ── */
.form-label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 5px;
}

.form-control {
  background-color: #fff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .86rem;
  padding: 8px 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-select {
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23334155' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 16px 12px !important;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .86rem;
  padding: 8px 2.25rem 8px 12px;
  cursor: pointer;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

/* ── KYC Slots ── */
.kyc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.kyc-slot-box {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  transition: all 0.2s ease;
}

.kyc-slot-box:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.doc-name-input {
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
}

.doc-name-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  background: #ffffff !important;
}

.kyc-slot-preview-wrapper {
  border: 1.5px dashed #cbd5e1 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  transition: all 0.2s ease !important;
}

.kyc-slot-preview-wrapper:hover {
  border-color: #2563eb !important;
  background: #f0f7ff !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.kyc-slot {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
  background: var(--paper);
  min-height: 100px;
}

.kyc-slot:hover {
  border-color: #2563eb;
  background: #eff6ff;
}

.kyc-slot i {
  font-size: 1.8rem;
  color: var(--ink-light);
}

.kyc-slot-label {
  font-size: .74rem;
  color: var(--ink-muted);
  font-weight: 600;
}

/* ── Modals ── */
.modal-content {
  border: none;
  border-radius: var(--radius-md);
  background: var(--paper-alt);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
}

.modal-header {
  background: #0f172a;
  color: #fff;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 16px 22px;
}

.modal-header .modal-title {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.modal-header .btn-close {
  filter: invert(1);
  opacity: .8;
}

.modal-body {
  padding: 24px 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ── Custom Confirm Alert Modal ── */
#pmConfirmModal .modal-content {
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22) !important;
  border: 1px solid #e2e8f0;
}

#pmConfirmModal .confirm-icon-wrapper {
  animation: pulseScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pulseScale {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Toast Container ── */
.pm-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  box-shadow: var(--shadow-lift);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pm-toast.error {
  background: var(--red-deep);
}

/* ── Khata Accordion Collapsible ── */
.btn-khata-edit-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: .95rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
  cursor: pointer;
}

.btn-khata-edit-square:hover {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.15);
}

.btn-khata-wa-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  font-size: .95rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 0;
  cursor: pointer;
}

.btn-khata-wa-square:hover {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(22, 163, 74, 0.15);
}

.khata-toggle-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #94a3b8;
  font-size: .85rem;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s, color 0.2s;
  border: 1px solid #e2e8f0;
}

.khata-account-card.open .khata-toggle-arrow {
  transform: rotate(180deg);
  background: #e2e8f0;
  color: #475569;
}

.khata-account-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.khata-account-card.open .khata-account-body,
.khata-grid-card .khata-account-body {
  max-height: 5000px;
}

/* ── Print Media Styles ── */
@media print {

  .pm-sidebar,
  .pm-topbar,
  .btn,
  .no-print {
    display: none !important;
  }

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

  .pm-content {
    padding: 0 !important;
    background: #fff !important;
  }

  .ledger-card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* ── Responsive Mobile Design (<= 900px) ── */
@media (max-width: 900px) {
  .pm-sidebar {
    transform: translateX(-100%);
  }

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

  .pm-main {
    margin-left: 0;
  }

  .pm-hamburger {
    display: block;
  }

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

  .pm-search-box input {
    width: 120px;
  }
}

@media (max-width: 480px) {
  .stat-tiles {
    grid-template-columns: 1fr;
  }

  .pm-search-box {
    display: none;
  }
}

/* ── Searchable Select Textbox Component ── */
.searchable-select-wrapper {
  position: relative;
  width: 100%;
}

.searchable-select-input-group {
  position: relative;
  width: 100%;
}

.searchable-select-input {
  background-color: #ffffff !important;
  cursor: text;
}

.searchable-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1060;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.searchable-select-item {
  padding: 8px 14px;
  font-size: 0.85rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.searchable-select-item:last-child {
  border-bottom: none;
}

.searchable-select-item:hover,
.searchable-select-item.highlighted {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  font-weight: 600;
  border-left: 3px solid #0284c7;
}

.searchable-select-item.selected {
  background: #e0f2fe;
  color: #0284c7;
  font-weight: 700;
}

/* ── Guarantor Inline Row Flex Styling ── */
.sale-jc-row {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

.sale-jc-row .searchable-select-wrapper {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.sale-jc-row .btn-outline-danger {
  flex: 0 0 auto !important;
  height: 38px !important;
  padding: 0 12px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ── Physical Ruled Notebook Page Register Styling (Notebook Page 11-8-26) ── */
#rojmedTable.notebook-register-sheet,
#lenDenTable.notebook-register-sheet,
#accDailyRegisterTable.notebook-register-sheet,
#accRojmedRegisterTable.notebook-register-sheet,
#repRojmedRegisterTable.notebook-register-sheet {
  width: 100% !important;
  border-collapse: collapse !important;
  background: #ffffff !important;
  border: 2px solid #475569 !important;
  border-left: 6px solid #ef4444 !important;
  /* Red vertical margin line of real notebook paper */
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

#rojmedTable.notebook-register-sheet th,
#lenDenTable.notebook-register-sheet th,
#accDailyRegisterTable.notebook-register-sheet th,
#accRojmedRegisterTable.notebook-register-sheet th,
#repRojmedRegisterTable.notebook-register-sheet th {
  background: #0f172a !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.85rem !important;
  padding: 12px 14px !important;
  border-bottom: 2.5px solid #020617 !important;
  border-right: 2px solid #475569 !important;
  /* Straight vertical column divider line */
  letter-spacing: 0.04em !important;
}

#rojmedTable.notebook-register-sheet th:last-child,
#lenDenTable.notebook-register-sheet th:last-child,
#accDailyRegisterTable.notebook-register-sheet th:last-child,
#accRojmedRegisterTable.notebook-register-sheet th:last-child,
#repRojmedRegisterTable.notebook-register-sheet th:last-child {
  border-right: none !important;
}

#rojmedTable.notebook-register-sheet td,
#lenDenTable.notebook-register-sheet td,
#accDailyRegisterTable.notebook-register-sheet td,
#accRojmedRegisterTable.notebook-register-sheet td,
#repRojmedRegisterTable.notebook-register-sheet td {
  height: 42px !important;
  padding: 8px 14px !important;
  font-size: 0.88rem !important;
  color: #0f172a !important;
  border-bottom: 1.5px solid #64748b !important;
  /* Dark crisp horizontal ruled line */
  border-right: 2px solid #64748b !important;
  /* Straight vertical column divider line */
  vertical-align: middle !important;
}

#rojmedTable.notebook-register-sheet td:last-child,
#lenDenTable.notebook-register-sheet td:last-child,
#accDailyRegisterTable.notebook-register-sheet td:last-child,
#accRojmedRegisterTable.notebook-register-sheet td:last-child,
#repRojmedRegisterTable.notebook-register-sheet td:last-child {
  border-right: none !important;
}

#rojmedTable.notebook-register-sheet tr:hover td,
#lenDenTable.notebook-register-sheet tr:hover td,
#accDailyRegisterTable.notebook-register-sheet tr:hover td,
#accRojmedRegisterTable.notebook-register-sheet tr:hover td,
#repRojmedRegisterTable.notebook-register-sheet tr:hover td {
  background: rgba(37, 99, 235, 0.05) !important;
}

/* ── Full Width Single Row Date Strip (Calendar Day Boxes) ── */
.rep-dates-grid,
.acc-dates-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 2px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 4px 0 !important;
  overflow: visible !important;
  overflow-x: hidden !important;
}
.rep-dates-grid::-webkit-scrollbar,
.acc-dates-grid::-webkit-scrollbar {
  display: none !important;
  height: 0px !important;
}
.rep-dates-grid::-webkit-scrollbar-thumb,
.acc-dates-grid::-webkit-scrollbar-thumb {
  display: none !important;
}
.rep-date-block,
.acc-date-block {
  position: relative !important;
  height: 40px !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.12s ease !important;
  user-select: none !important;
  padding: 2px 0px !important;
  box-sizing: border-box !important;
}
.rep-date-block:hover,
.acc-date-block:hover {
  border-color: #0f172a !important;
  background: #f8fafc !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.08) !important;
}
.rep-date-block.active,
.acc-date-block.active {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.22) !important;
}
.rep-date-block.active .rep-date-num,
.acc-date-block.active .acc-date-num {
  color: #ffffff !important;
}
.rep-date-block.active .rep-date-dayname,
.acc-date-block.active .acc-date-dayname {
  color: #94a3b8 !important;
}
.rep-date-num,
.acc-date-num {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: #0f172a !important;
}
.rep-date-dayname,
.acc-date-dayname {
  font-size: 0.52rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  color: #64748b !important;
  margin-top: 2px !important;
  line-height: 1 !important;
}
.rep-date-badge,
.acc-date-badge {
  position: absolute !important;
  top: -4px !important;
  right: -3px !important;
  min-width: 15px !important;
  height: 15px !important;
  padding: 0 3px !important;
  border-radius: 8px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 0.55rem !important;
  font-weight: 800 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1.5px solid #ffffff !important;
  line-height: 1 !important;
}
.rep-date-block.active .rep-date-badge,
.acc-date-block.active .acc-date-badge {
  background: #ef4444 !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}

/* ── Repairing Card Document / Photo Thumbnail Previews ── */
.rep-doc-thumb-preview {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 6px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #f8fafc !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, border-color 0.15s ease !important;
}
.rep-doc-thumb-preview:hover {
  transform: scale(1.08) !important;
  border-color: #2563eb !important;
}
.rep-doc-thumb-preview img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.rep-doc-thumb-preview i {
  font-size: 1.1rem !important;
}

/* ── Clean Numeric Input & Modern Inline Form Styling ── */
input[type=number].no-spinner::-webkit-inner-spin-button,
input[type=number].no-spinner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type=number].no-spinner {
  -moz-appearance: textfield;
  appearance: textfield;
}

.notebook-inline-input {
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
  padding: 5px 10px !important;
  background: #ffffff !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

.notebook-inline-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}

/* ── Notebook Underline Line Input Styling ── */
.notebook-line-input {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid #94a3b8 !important;
  border-radius: 0 !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 4px 6px !important;
  color: #0f172a !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease !important;
}

.notebook-line-input:focus {
  border-bottom-color: #2563eb !important;
  background: rgba(37, 99, 235, 0.04) !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ── Global Branch Cards (Dashboard & Modules) ── */
.branch-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.branch-card:hover {
  border-color: #2563eb !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1) !important;
  transform: translateY(-2px);
}

.branch-card.active {
  border-color: #2563eb !important;
  background: #f8faff !important;
  box-shadow: 0 0 0 1.5px #2563eb !important;
}

.branch-card.selected,
.branch-card:focus-visible {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35), 0 6px 18px rgba(37, 99, 235, 0.18) !important;
  transform: translateY(-3px) scale(1.01);
  outline: none;
}

.branch-metric-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  padding: 12px 8px;
  text-align: center;
}

.branch-metric-num {
  font-size: 1.18rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  font-family: 'JetBrains Mono', monospace;
}

.branch-metric-lbl {
  font-size: .68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 3px;
}

/* ============================================================
   TAX INVOICE BILL PAGE — FULL PREMIUM UI
   ============================================================ */

/* Page wrapper */
.bill-page-wrap {
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  padding: 16px 20px 40px;
  box-sizing: border-box;
  width: 100%;
}

/* Back Link Button (Matching Image 2) */
.bill-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 7px 18px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.15s ease;
}

.bill-back-link:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

/* Main 2-column layout matching Image 2 positioning */
.bill-main-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Left: paper column (Expands 100% to fill space up to sidebar, Matching Image 2) */
.bill-paper-col {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.bill-paper-wrapper {
  display: flex;
  width: 100%;
  padding-bottom: 0;
  margin: 0;
}

/* Right: sidebar column (Docked on Right with 260px width, Matching Image 2) */
.bill-sidebar {
  width: 260px;
  flex: 0 0 260px;
  position: sticky;
  top: 16px;
}

/* Responsive: stack on smaller screens */
@media (max-width: 1100px) {
  .bill-main-layout {
    flex-direction: column-reverse;
    align-items: center;
    width: 100%;
    padding: 0 12px 24px;
  }

  .bill-sidebar {
    width: 100%;
    max-width: 210mm;
    position: static;
  }

  .bill-paper-col {
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

/* Sidebar Card */
.bill-sidebar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

/* 4 Simple Stacked Action Buttons (Image 2 style) */
.btn-bill-action {
  background: #eaedf1;
  color: #556477;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.94rem;
  height: 46px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all 0.15s ease-in-out;
}

.btn-bill-action:last-child {
  margin-bottom: 0;
}

.btn-bill-action:hover {
  background: #dde1e7;
  color: #1e293b;
  border-color: #cbd5e1;
}

.btn-bill-action:active {
  background: #cbd5e1;
}

/* Subtle Divider */
.bill-divider {
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}

/* Mobile Input Field */
.input-bill-mobile {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  height: 44px;
  font-size: 0.92rem;
  padding: 0 14px;
  color: #334155;
  background: #ffffff;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.input-bill-mobile::placeholder {
  color: #94a3b8;
}

.input-bill-mobile:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  outline: none;
}

/* WhatsApp Button */
.btn-bill-whatsapp {
  background: #22c55e;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  height: 44px;
  font-weight: 600;
  font-size: 0.95rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
  transition: all 0.15s ease-in-out;
}

.btn-bill-whatsapp:hover {
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

.invoice-paper {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 4mm;
  background: #ffffff;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.invoice-paper.without-letterhead {
  padding-top: 40mm !important;
}

.invoice-paper.without-letterhead .bill-letterhead {
  display: none !important;
}

/* Reference Blue Invoice Tables */
.invoice-paper table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-paper .table-blue-bordered,
.invoice-paper .table-blue-bordered th,
.invoice-paper .table-blue-bordered td {
  border: 1px solid #000000;
}

.invoice-paper th {
  background: #ffffff;
  font-weight: 700;
  text-align: center;
  font-size: 11.5px;
  color: #0f172a;
}

.invoice-paper td {
  padding: 4.5px 7px;
  vertical-align: top;
}

/* ─── Exact Print Colors & Brand Badges (Image 2 format) ─── */
.invoice-paper,
.invoice-paper * {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.bill-shop-logo-box {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%) !important;
  background-color: #0077b6 !important;
  color: #ffffff !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 119, 182, 0.3);
  flex-shrink: 0;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.bill-brand-badge {
  border-radius: 5px;
  padding: 2px 4px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.brand-badge-apple {
  background: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff !important;
  font-size: 9px;
  font-weight: 800;
  gap: 3px;
  padding: 2px 6px;
}
.brand-badge-apple svg {
  fill: #ffffff !important;
}
.brand-badge-apple span {
  color: #ffffff !important;
}

.brand-badge-samsung {
  background: #102a96 !important;
  background-color: #102a96 !important;
  color: #ffffff !important;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.brand-badge-mi {
  background: #ff5900 !important;
  background-color: #ff5900 !important;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 900;
}

.brand-badge-oneplus {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1.5px solid #ea0029 !important;
  color: #ea0029 !important;
  font-size: 8px;
  font-weight: 900;
}

.brand-badge-google {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  font-size: 9px;
  font-weight: 800;
}

.brand-badge-oppo {
  background: #008a54 !important;
  background-color: #008a54 !important;
  color: #ffffff !important;
  font-size: 9.5px;
  font-weight: 900;
}

.brand-badge-vivo {
  background: #008cd6 !important;
  background-color: #008cd6 !important;
  color: #ffffff !important;
  font-size: 9.5px;
  font-weight: 900;
}

.brand-badge-realme {
  background: #ffc700 !important;
  background-color: #ffc700 !important;
  color: #000000 !important;
  font-size: 8.5px;
  font-weight: 900;
}

.brand-badge-nokia {
  background: #124191 !important;
  background-color: #124191 !important;
  color: #ffffff !important;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.brand-badge-asus {
  background: #000000 !important;
  background-color: #000000 !important;
  color: #ffffff !important;
  font-size: 8.5px;
  font-weight: 900;
}

.brand-badge-sony {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1.5px solid #000000 !important;
  color: #000000 !important;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.brand-badge-honor {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1.5px solid #00adef !important;
  color: #00adef !important;
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
}


/* ─── PRINT: Strict 1-Page A4 invoice print (ZERO PAGE BREAK) ─── */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .pm-sidebar,
  .pm-sidebar-overlay,
  .pm-topbar,
  .pm-main > header,
  .bill-topnav,
  .bill-sidebar,
  .d-print-none,
  [class*="d-print-none"],
  .no-print {
    display: none !important;
    visibility: hidden !important;
  }

  .pm-shell,
  .pm-main,
  .pm-content,
  .bill-page-wrap,
  .bill-main-layout,
  .bill-paper-col,
  .bill-paper-wrapper,
  #invoiceSheetContainer {
    all: unset !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }

  #invoiceSheetPaper {
    display: flex !important;
    flex-direction: column !important;
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 auto !important;
    padding: 4mm !important;
    background: #ffffff !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    zoom: 1 !important;
    transform: none !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    page-break-before: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  #invoiceSheetPaper.without-letterhead {
    padding-top: 40mm !important;
  }

  #invoiceSheetPaper.without-letterhead .bill-letterhead {
    display: none !important;
  }
}

/* ── Product Stock Form Chips & Badges ── */
.stock-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.stock-chip-active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
  font-weight: 700 !important;
  transform: translateY(-1px);
}

.stock-chip-inactive {
  background: #f8fafc !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

.stock-chip-inactive:hover {
  background: #eef2ff !important;
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.stock-color-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Master Tables Crisp High-Visibility Grid Lines (No Hover Background) ── */
.pm-master-table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
}

.pm-master-table th,
.pm-master-table td,
.pm-master-table thead th,
.pm-master-table tbody td {
  border: 1px solid #cbd5e1 !important;
  vertical-align: middle !important;
  text-align: center !important;
}

.pm-master-table thead th {
  background-color: #f8fafc !important;
  color: #334155 !important;
  font-weight: 700 !important;
  font-size: 0.76rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

.pm-master-table tbody tr,
.pm-master-table tbody tr:hover,
.pm-master-table tbody tr td,
.pm-master-table tbody tr:hover td {
  background-color: #ffffff !important;
  background: #ffffff !important;
}

/* ── Stock Tabular Grid with Crisp Visible Lines on All Parts ── */
.stock-tabular-grid {
  width: 100% !important;
  border-collapse: collapse !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  table-layout: auto !important;
}

.stock-tabular-grid th,
.stock-tabular-grid td {
  border: 1px solid #cbd5e1 !important;
  vertical-align: middle !important;
  padding: 5px 6px !important;
}

.stock-tabular-grid thead th {
  background-color: #f1f5f9 !important;
  color: #1e293b !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.02em !important;
  border: 1px solid #cbd5e1 !important;
  border-bottom: 2px solid #94a3b8 !important;
  white-space: nowrap !important;
}

.stock-tabular-grid tbody tr:nth-child(even) td {
  background-color: #f8fafc !important;
}

.stock-tabular-grid tbody tr:hover td {
  background-color: #f0f7ff !important;
}

#stockInTableBody tr.selected td,
#stockOutTableBody tr.selected td {
  background-color: #e0f2fe !important;
}

#stockInTableBody tr.selected,
#stockOutTableBody tr.selected {
  outline: 2px solid #0284c7 !important;
  outline-offset: -2px;
}

/* ── Opening & Closing Balance Ledger Rows for Len-Den & Registers ── */
.journal-opening-row td {
  background: #f0fdf4 !important;
  font-weight: 700;
  color: #166534 !important;
  border-bottom: 2px solid #bbf7d0 !important;
}

.journal-closing-row td {
  background: #f8fafc !important;
  font-weight: 800;
  color: #0f172a !important;
}

.journal-total-footer-row td {
  background: #0f172a !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 0.92rem !important;
  border-top: 2px solid #020617 !important;
  border-bottom: 3px double #020617 !important;
}

@media print {
  #lenDenHierarchyContainer,
  #lenDenInlineFormRow,
  #lenDenTable td:last-child,
  #lenDenTable th:last-child {
    display: none !important;
  }
}

/* ============================================================
   STOCK TREE EXPLORER (Category -> Brand -> Model)
   ============================================================ */
.stock-tree-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.stock-tree-header {
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.stock-tree-body {
  max-height: calc(100vh - 210px);
  min-height: 480px;
  overflow-y: auto;
  padding: 8px 6px;
}

.stock-tree-body::-webkit-scrollbar {
  width: 5px;
}
.stock-tree-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.stock-tree-ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.stock-tree-sub-ul {
  list-style: none;
  padding-left: 18px;
  margin-bottom: 0;
  position: relative;
}

.stock-tree-sub-ul::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 8px;
  width: 1px;
  background: #e2e8f0;
}

.stock-tree-item {
  position: relative;
  margin: 1px 0;
}

.stock-tree-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 0.83rem;
  color: #334155;
  transition: all 0.12s ease-in-out;
  border: 1px solid transparent;
}

.stock-tree-row:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.stock-tree-row.active,
.stock-tree-row.selected-model {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
  border: 1px solid #bfdbfe !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08);
}

.tree-toggle-btn {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
  cursor: pointer;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
  transition: all 0.15s ease;
}

.tree-toggle-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.tree-badge-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  font-family: 'JetBrains Mono', monospace;
  margin-left: auto;
}

.tree-node-cat-tag {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: #e0e7ff;
  color: #3730a3;
  margin-right: 2px;
}

.tree-node-brand-tag {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: #fef3c7;
  color: #92400e;
  margin-right: 2px;
}

.tree-node-model-tag {
  font-size: 0.60rem;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: #dcfce7;
  color: #166534;
  margin-right: 2px;
}

/* ── Multi-Device Stock Table Navigation Focus & Modern UI Styles ────────── */
#multiStockTable {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

#multiStockTable th {
  background-color: #f8fafc !important;
  color: #475569 !important;
  font-weight: 700 !important;
  font-size: 0.70rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  padding: 8px 8px !important;
  border-top: none !important;
  border-bottom: 2px solid #cbd5e1 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
  white-space: nowrap !important;
}

#multiStockTable td {
  padding: 5px 6px !important;
  border-top: none !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-left: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
  vertical-align: middle !important;
  background-color: #ffffff;
}

#multiStockTable tbody tr:hover td {
  background-color: #f8fafc !important;
}

#multiStockTable input,
#multiStockTable select {
  height: 34px !important;
  font-size: 0.80rem !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  transition: all 0.15s ease-in-out;
  padding: 4px 8px !important;
  box-shadow: none !important;
}

#multiStockTable input:hover,
#multiStockTable select:hover {
  border-color: #94a3b8 !important;
}

#multiStockTable input:focus,
#multiStockTable select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18) !important;
  outline: 0 !important;
  background-color: #ffffff !important;
}

#multiStockTable .multi-stock-add-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  background-color: #2563eb !important;
  border: none !important;
  color: #fff !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25) !important;
}

#multiStockTable .multi-stock-add-btn:hover {
  background-color: #1d4ed8 !important;
  transform: scale(1.06);
}

#multiStockTable .multi-stock-del-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px !important;
  background-color: #fff !important;
  border: 1px solid #fca5a5 !important;
  color: #ef4444 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease;
}

#multiStockTable .multi-stock-del-btn:hover {
  background-color: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
  transform: scale(1.06);
}

#multiStockTable .multi-stock-add-btn:focus,
#multiStockTable button:focus {
  outline: 2px solid #1d4ed8 !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.4) !important;
}

#multiStockTable input.is-invalid,
#multiStockTable select.is-invalid {
  border-color: #dc2626 !important;
  background-color: #fff8f8 !important;
  box-shadow: 0 0 0 2.5px rgba(220, 38, 38, 0.25) !important;
}

/* ── Universal Document Viewer Modal & Gap Utilities ── */
.gap-1\.5,
.gap-1-5 {
  gap: 0.375rem !important; /* 6px */
}

.btn-close-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.btn-close-modal-white {
  color: #cbd5e1;
}

/* ── Global Submit Button Locked State ── */
.btn-submit-locked,
button[disabled].btn-submit-locked {
  opacity: 0.72 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(15%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* ── 2-Slip Printable Receipt Modal & Print Styles (Accessories & Repairing) ── */
.receipt-dual-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.receipt-slip-yellow {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background-color: #fefce8 !important;
  border: 1.5px dashed #ca8a04 !important;
  border-radius: 8px;
  padding: 14px 16px;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  page-break-inside: avoid;
  break-inside: avoid;
}

.receipt-slip-blue {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background-color: #eff6ff !important;
  border: 1.5px dashed #2563eb !important;
  border-radius: 8px;
  padding: 14px 16px;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  page-break-inside: avoid;
  break-inside: avoid;
}

.receipt-slip-bw {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  background-color: #ffffff !important;
  border: 1.5px solid #000000 !important;
  border-radius: 6px;
  padding: 14px 16px;
  color: #000000;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  page-break-inside: avoid;
  break-inside: avoid;
}

.receipt-cut-separator {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 6px 0 !important;
  width: 24px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  box-sizing: border-box !important;
}

.receipt-cut-separator::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 2px dashed #94a3b8;
  z-index: 1;
}

.receipt-cut-icon {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: 3px 2px;
  font-size: 14px;
  color: #64748b;
  line-height: 1;
}