/* ==========================================================================
   CODEFIXER ACCOUNTING & HISAB PANEL - CORE STYLES & DESIGN TOKENS
   ========================================================================== */

:root {
  /* Clean White / Light Theme Default */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --border-color: #e2e8f0;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  /* Vibrant Accents */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: rgba(79, 70, 229, 0.08);
  
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --success-border: rgba(16, 185, 129, 0.25);

  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.25);

  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);

  --info: #0284c7;
  --info-bg: rgba(2, 132, 199, 0.1);

  /* Partner Colors */
  --sumit-color: #2563eb;
  --viral-color: #db2777;
  --jignesh-color: #7c3aed;

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 10px 25px -3px rgba(0, 0, 0, 0.08);
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Outfit', 'Noto Sans Gujarati', sans-serif;
}

/* Dark Theme Overrides */
body.dark-theme {
  --bg-main: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.85);
  --bg-sidebar: #1e293b;
  --border-color: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Cards & Elevated Containers */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  transition: var(--transition);
}

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

/* Helpers & Utility Classes */
.hidden { display: none !important; }
.hidden-field { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 0.75rem; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.d-flex { display: flex !important; }
.align-items-center { align-items: center !important; }

/* Spacing */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

/* Typography & Sizing */
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.fw-bold { font-weight: 700 !important; }
.d-block { display: block !important; }
.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }
.px-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
.opacity-50 { opacity: 0.5 !important; }
.small { font-size: 0.85rem !important; }
.border-top { border-top: 1px solid var(--border-color) !important; }
.border-bottom { border-bottom: 1px solid var(--border-color) !important; }

/* Small Form Control */
.form-control-sm {
  padding: 0.4rem 0.65rem !important;
  font-size: 0.85rem !important;
  height: auto !important;
}

/* Small Icon Button */
.btn-icon-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: var(--transition);
}

.btn-icon-sm:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-icon-sm.danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* Primary Outline Button */
.btn-outline-primary {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

/* Alert Box */
.alert-box {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.alert-box.error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}
.alert-box.success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: var(--success);
}

/* Quick Login */
.quick-login-box {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}
.quick-login-btns {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Button Group */
.btn-group {
  display: inline-flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.btn-group .btn {
  border-radius: 0;
  border: none;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }

/* Quick Actions Banner Component */
.quick-actions-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.quick-actions-banner .action-info h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
}
.quick-actions-banner .action-info .subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Section Title Component */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.75rem 0 1rem 0;
}
.section-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  display: flex;
  align-items: center;
}

/* Chart Card Component */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}
.card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Outline Buttons */
.btn-outline-success {
  background: transparent;
  border: 1px solid var(--success-border);
  color: var(--success);
}
.btn-outline-success:hover {
  background: var(--success);
  color: white;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid var(--danger-border);
  color: var(--danger);
}
.btn-outline-danger:hover {
  background: var(--danger);
  color: white;
}


/* -------------------------------------------------------------
   1. APP SIDEBAR LAYOUT & CODEFIXER PREMIUM SIDEBAR
   ------------------------------------------------------------- */
.app-layout-sidebar {
  display: flex;
  min-height: 100vh;
  position: relative;
  background: var(--bg-main);
}

.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  padding: 1.25rem 1.15rem;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
}

body.dark-theme .sidebar {
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.25);
}

/* Sidebar Brand Header */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.15rem;
  position: relative;
  min-height: 56px;
}

.brand-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.codefixer-logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.35);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 2;
}

.codefixer-logo:hover {
  transform: rotate(8deg) scale(1.06);
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.5);
}

.brand-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 13px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  filter: blur(10px);
  opacity: 0.4;
  z-index: 1;
  pointer-events: none;
}

.brand-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity 0.2s, max-width 0.2s;
  overflow: hidden;
}

.brand-title-wrap {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
}

.brand-name-code {
  color: var(--text-primary);
  font-weight: 900;
}

.brand-name-fixer {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
  margin-left: 1px;
}

.brand-tagline {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

/* Sidebar Toggle Collapse Button */
.sidebar-toggle-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 0;
}

.sidebar-toggle-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Login Modal Brand Overrides */
.codefixer-login-logo {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4) !important;
}
.brand-header .brand-code {
  color: var(--text-primary);
  font-weight: 900;
}
.brand-header .brand-fixer {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}

/* Sidebar Menu Navigation */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.sidebar-menu::-webkit-scrollbar {
  width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

/* Menu Item Container */
.menu-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  width: 100%;
  position: relative;
  text-decoration: none !important;
  user-select: none;
}

.menu-item:hover {
  background: rgba(241, 245, 249, 0.85);
  color: var(--text-primary);
  transform: translateX(3px);
  border-color: rgba(226, 232, 240, 0.9);
  text-decoration: none !important;
}

body.dark-theme .menu-item:hover {
  background: rgba(30, 41, 59, 0.8);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
  background: #ffffff;
  color: var(--text-primary);
  font-weight: 700;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.06), 0 2px 5px rgba(0, 0, 0, 0.02);
  text-decoration: none !important;
}

body.dark-theme .menu-item.active {
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.menu-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

.menu-active-pill {
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 8px;
  margin-left: auto;
  opacity: 0;
  transform: scaleY(0.3);
  transition: all 0.22s ease;
}

.menu-item.active .menu-active-pill {
  opacity: 1;
  transform: scaleY(1);
}

/* -------------------------------------------------------------
   INDIVIDUAL VIBRANT MENU ICON BOXES & UNIQUE GLOW EFFECTS
   ------------------------------------------------------------- */
.menu-icon-box {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

/* 1. Dashboard: Indigo-Violet Tech */
.icon-dashboard {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.25);
}
.menu-item:hover .icon-dashboard {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}
.menu-item.active .icon-dashboard {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

/* 2. Income (Avak): Emerald Mint Growth */
.icon-avak {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.menu-item:hover .icon-avak {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}
.menu-item.active .icon-avak {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* 3. Expense & Upad (Javak): Rose Fire Dynamic */
.icon-javak {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.menu-item:hover .icon-javak {
  background: linear-gradient(135deg, #ef4444, #f43f5e);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}
.menu-item.active .icon-javak {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* 4. 3 Partners: Electric Cyan Trust */
.icon-partners {
  background: rgba(14, 165, 233, 0.12);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.25);
}
.menu-item:hover .icon-partners {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08) rotate(4deg);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.45);
}
.menu-item.active .icon-partners {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

/* 5. Daybook (Rojmel): Amber Gold Radiant */
.icon-rojmel {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.menu-item:hover .icon-rojmel {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.45);
}
.menu-item.active .icon-rojmel {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

/* 6. Billing Report: Neon Magenta Spark */
.icon-bills {
  background: rgba(217, 70, 239, 0.12);
  color: #d946ef;
  border: 1px solid rgba(217, 70, 239, 0.25);
}
.menu-item:hover .icon-bills {
  background: linear-gradient(135deg, #d946ef, #e879f9);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(217, 70, 239, 0.45);
}
.menu-item.active .icon-bills {
  background: linear-gradient(135deg, #c026d3, #d946ef);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.5);
}

/* 7. Categories: Vivid Tangerine Ember */
.icon-categories {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.25);
}
.menu-item:hover .icon-categories {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08) rotate(-4deg);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45);
}
.menu-item.active .icon-categories {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.5);
}

/* 8. Customers: Aqua Ocean Cyan */
.icon-customers {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.25);
}
.menu-item:hover .icon-customers {
  background: linear-gradient(135deg, #06b6d4, #22d3ee);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.45);
}
.menu-item.active .icon-customers {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.5);
}

/* 9. Customer Ledger: Jade Mint Harmony */
.icon-khatavahi {
  background: rgba(20, 184, 166, 0.12);
  color: #14b8a6;
  border: 1px solid rgba(20, 184, 166, 0.25);
}
.menu-item:hover .icon-khatavahi {
  background: linear-gradient(135deg, #14b8a6, #2dd4bf);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.45);
}
.menu-item.active .icon-khatavahi {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.5);
}

/* 10. Profit & Loss Analytics: Emerald Jewel & Growth */
.icon-profit {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.menu-item:hover .icon-profit {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #ffffff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}
.menu-item.active .icon-profit {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

/* Sidebar Footer */
.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.user-profile-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-main);
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.user-avatar-icon {
  font-size: 1.6rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.user-meta span {
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.user-card-actions {
  display: flex;
  gap: 0.25rem;
}

/* -------------------------------------------------------------
   COLLAPSED SIDEBAR STATE & FLOATING TOOLTIPS
   ------------------------------------------------------------- */
.sidebar.collapsed {
  width: 82px;
  padding: 1.25rem 0.65rem;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.sidebar.collapsed .brand-text {
  display: none !important;
}

.sidebar.collapsed .sidebar-toggle-btn {
  position: absolute;
  top: 50%;
  right: -15px;
  transform: translateY(-50%);
  z-index: 1001;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  background: var(--bg-card);
}

.sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 0.55rem 0;
  gap: 0;
}

.sidebar.collapsed .menu-label,
.sidebar.collapsed .menu-active-pill {
  display: none !important;
}

.sidebar.collapsed .user-meta,
.sidebar.collapsed .user-card-actions {
  display: none !important;
}

.sidebar.collapsed .user-profile-card {
  justify-content: center;
  padding: 0.55rem 0;
  border: none;
  background: transparent;
}

.sidebar.collapsed .user-avatar-icon {
  font-size: 1.85rem;
}

/* Floating Tooltip in Collapsed Mode */
.sidebar.collapsed .menu-item {
  position: relative;
}

.sidebar.collapsed .menu-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 99999;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar.collapsed .menu-item::before {
  content: '';
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  border-width: 5px 6px 5px 0;
  border-style: solid;
  border-color: transparent #0f172a transparent transparent;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 99999;
}

.sidebar.collapsed .menu-item:hover::after,
.sidebar.collapsed .menu-item:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

/* Main wrapper adjustments when collapsed */
.main-wrapper {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-main);
}

.app-layout-sidebar.sidebar-collapsed .main-wrapper,
.sidebar-collapsed .main-wrapper,
.sidebar.collapsed ~ .main-wrapper {
  margin-left: 82px;
}

/* Header toggle button */
.header-sidebar-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.header-sidebar-toggle:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
}

/* -------------------------------------------------------------
   2. MAIN WRAPPER & TOP HEADER
   ------------------------------------------------------------- */
.main-wrapper {
  margin-left: 280px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-main);
}

.app-layout-sidebar.sidebar-collapsed .main-wrapper,
.sidebar-collapsed .main-wrapper,
.sidebar.collapsed ~ .main-wrapper {
  margin-left: 82px;
}

.top-header {
  height: 70px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.top-header h2 {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-lang-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.main-content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* -------------------------------------------------------------
   3. BUTTONS & FORM CONTROLS
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-secondary {
  background: #e2e8f0;
  color: var(--text-primary);
}

body.dark-theme .btn-secondary { background: rgba(255, 255, 255, 0.1); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover, .btn-outline.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid var(--danger-border);
  color: var(--danger);
}

.btn-danger-outline:hover {
  background: var(--danger-bg);
}

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

.btn-lg {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* -------------------------------------------------------------
   4. REDESIGNED AVAK KPI & FILTER CARDS
   ------------------------------------------------------------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.kpi-mini-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-main);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

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

.kpi-icon.success { background: var(--success-bg); color: var(--success); }
.kpi-icon.info { background: var(--info-bg); color: var(--info); }
.kpi-icon.primary { background: var(--primary-light); color: var(--primary); }
.kpi-icon.warning { background: var(--warning-bg); color: var(--warning); }

.partner-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.775rem;
  font-weight: 600;
}
.partner-pill.sumit { background: #dbeafe; color: #1e40af; }
.partner-pill.viral { background: #fce7f3; color: #9d174d; }
.partner-pill.jignesh { background: #f3e8ff; color: #6b21a8; }

body.dark-theme .partner-pill.sumit { background: rgba(37, 99, 235, 0.2); color: #93c5fd; }
body.dark-theme .partner-pill.viral { background: rgba(219, 39, 119, 0.2); color: #fbcfe8; }
body.dark-theme .partner-pill.jignesh { background: rgba(124, 58, 237, 0.2); color: #e9d5ff; }

.kpi-label {
  font-size: 0.775rem;
  color: var(--text-secondary);
  font-weight: 600;
  display: block;
}

.kpi-mini-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-top: 0.1rem;
}

/* Filter Card System */
.filter-card {
  background: var(--bg-card);
}

.filter-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.preset-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preset-label {
  font-size: 0.775rem;
  color: var(--text-muted);
  font-weight: 600;
}

.preset-pill {
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.preset-pill:hover, .preset-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

#tab-javak .preset-pill:hover,
#tab-javak .preset-pill.active {
  background: var(--danger) !important;
  color: white !important;
  border-color: var(--danger) !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25) !important;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}

/* Universal Form Control & Input System */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label,
.field-wrap label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-control,
.form-group input,
.form-group select,
.modal-box input,
.modal-box select,
.login-card input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  transition: var(--transition);
  box-sizing: border-box;
}

select.form-control,
.form-group select,
.modal-box select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem !important;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 36px;
  color: var(--text-muted);
  font-size: 0.9rem;
  z-index: 2;
  pointer-events: none;
}

.input-with-icon .form-control {
  padding-left: 2.35rem !important;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.modal-box input:focus,
.modal-box select:focus,
.login-card input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: var(--bg-card);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 1.1rem;
}

/* Modern Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.modern-table,
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table th,
.table th {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border-color);
  padding: 0.9rem 1rem;
  text-align: left;
}

.modern-table td,
.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.875rem;
}

.table tbody tr:hover {
  background: rgba(79, 70, 229, 0.03);
}

body.dark-theme .table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

/* Customers Table Spacing & Action Button Alignment */
.customers-table {
  width: 100%;
}

.customers-table th,
.customers-table td {
  padding: 0.85rem 1.1rem;
}

.customers-table th:last-child,
.customers-table td:last-child {
  width: 220px;
  white-space: nowrap;
}

/* =========================================================
   PREMIUM KHATAVAHI (CUSTOMER LEDGER) FINTECH UI
   ========================================================= */
.modal-khatavahi-box {
  width: 100%;
  max-width: 540px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* FinTech Type Switcher */
.khatavahi-type-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
  background: var(--bg-main);
  padding: 0.4rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
}

.type-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.type-tab-btn .type-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.type-tab-btn.credit .type-icon-box {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.type-tab-btn.debit .type-icon-box {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.type-tab-btn .type-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.type-tab-btn .type-title {
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.type-tab-btn .type-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Active State for Credit */
.type-tab-btn.credit.active {
  background: #ffffff;
  border-color: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.18);
}
.type-tab-btn.credit.active .type-icon-box {
  background: #10b981;
  color: #ffffff;
}
.type-tab-btn.credit.active .type-title {
  color: #047857;
}

/* Active State for Debit */
.type-tab-btn.debit.active {
  background: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.18);
}
.type-tab-btn.debit.active .type-icon-box {
  background: #ef4444;
  color: #ffffff;
}
.type-tab-btn.debit.active .type-title {
  color: #b91c1c;
}

body.dark-theme .type-tab-btn.credit.active {
  background: rgba(16, 185, 129, 0.18);
}
body.dark-theme .type-tab-btn.debit.active {
  background: rgba(239, 68, 68, 0.18);
}

/* Hero Amount Box */
.khatavahi-hero-amount-box {
  background: var(--bg-main);
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.khatavahi-hero-amount-box.is-credit:focus-within {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
  background: var(--bg-card);
}

.khatavahi-hero-amount-box.is-debit:focus-within {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
  background: var(--bg-card);
}

.amount-prefix {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-right: 0.65rem;
  user-select: none;
}

.khatavahi-hero-amount-input {
  border: none !important;
  background: transparent !important;
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  color: var(--text-primary) !important;
  padding: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100%;
}

/* =========================================================
   NEW REDESIGNED DASHBOARD UI (LUXURY EXECUTIVE FINTECH)
   ========================================================= */

/* 1. Welcome Hero Banner */
.dash-welcome-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.85rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.07) 0%, rgba(16, 185, 129, 0.05) 50%, var(--bg-card) 100%);
  border: 1px solid rgba(79, 70, 229, 0.18);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

body.dark-theme .dash-welcome-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(99, 102, 241, 0.25);
}

.dash-welcome-banner::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.dash-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.3px;
}

body.dark-theme .dash-live-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  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); }
}

.dash-welcome-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
}

.dash-user-name {
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dash-welcome-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.dash-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.dash-badge-pill.highlight {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: #d97706;
}

body.dark-theme .dash-badge-pill.highlight {
  color: #fbbf24;
}

.btn-primary-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff !important;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transition: all 0.25s ease;
}

.btn-primary-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.4);
}

/* 2. High-Impact 5-Card Financial Metric Grid */
.dash-metrics-container {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.15rem;
}

@media (max-width: 1350px) {
  .dash-metrics-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .dash-metrics-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .dash-metrics-container {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1.15rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

body.dark-theme .metric-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
}

.metric-card.metric-cash::before { background: linear-gradient(90deg, #4f46e5, #818cf8); }
.metric-card.metric-income::before { background: linear-gradient(90deg, #10b981, #34d399); }
.metric-card.metric-expense::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.metric-card.metric-upad::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.metric-card.metric-profit::before { background: linear-gradient(90deg, #059669, #10b981); }

.metric-card.metric-profit {
  cursor: pointer;
}

.metric-card.metric-profit:hover {
  border-color: #10b981;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.metric-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.metric-card:hover .metric-icon-wrap {
  transform: scale(1.08) rotate(3deg);
}

.icon-cash { background: rgba(79, 70, 229, 0.12); color: #4f46e5; }
.icon-income { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.icon-expense { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.icon-upad { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.icon-profit { background: rgba(16, 185, 129, 0.15); color: #059669; }

body.dark-theme .icon-cash { background: rgba(99, 102, 241, 0.2); color: #a5b4fc; }
body.dark-theme .icon-income { background: rgba(52, 211, 153, 0.2); color: #6ee7b7; }
body.dark-theme .icon-expense { background: rgba(251, 191, 36, 0.2); color: #fde68a; }
body.dark-theme .icon-upad { background: rgba(248, 113, 113, 0.2); color: #fca5a5; }
body.dark-theme .icon-profit { background: rgba(52, 211, 153, 0.25); color: #34d399; }

.metric-value-wrap {
  margin: 0.25rem 0 0.85rem;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.text-mint { color: #059669; }
body.dark-theme .text-mint { color: #34d399; }

.metric-footer {
  font-size: 0.78rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 0.65rem;
  color: var(--text-secondary);
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.76rem;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.pill-cash {
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
}

body.dark-theme .pill-cash {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.pill-profit {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

body.dark-theme .pill-profit {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.metric-link {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.metric-link:hover {
  color: var(--primary);
  transform: translate(2px, -2px);
}

/* 3. Modern Action Command Center */
.dash-command-center {
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
}

.command-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.85rem;
}

.command-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.command-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.command-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
}

.cmd-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
}

.cmd-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px -3px rgba(0, 0, 0, 0.08);
}

.cmd-btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.cmd-btn:hover .cmd-btn-icon {
  transform: scale(1.1);
}

.cmd-btn-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cmd-btn-text strong {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.cmd-btn-text small {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.cmd-btn-arrow {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.4;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cmd-btn:hover .cmd-btn-arrow {
  transform: translateX(3px);
  opacity: 1;
}

/* Individual Command Button Accents */
.cmd-avak .cmd-btn-icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.cmd-avak:hover { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.03); }

.cmd-javak .cmd-btn-icon { background: rgba(79, 70, 229, 0.12); color: #4f46e5; }
.cmd-javak:hover { border-color: rgba(79, 70, 229, 0.4); background: rgba(79, 70, 229, 0.03); }

.cmd-upad .cmd-btn-icon { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.cmd-upad:hover { border-color: rgba(239, 68, 68, 0.4); background: rgba(239, 68, 68, 0.03); }

.cmd-partner-add .cmd-btn-icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.cmd-partner-add:hover { border-color: rgba(139, 92, 246, 0.4); background: rgba(139, 92, 246, 0.03); }

.cmd-profit .cmd-btn-icon { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.cmd-profit:hover { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.03); }

/* 4. Partners Live Summary Cards Grid */
.section-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.partners-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
}

.partner-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.partner-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -4px rgba(0, 0, 0, 0.09);
  border-color: rgba(79, 70, 229, 0.3);
}

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

.pw-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.pw-tag-verified {
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  display: inline-block;
  margin-left: 0.5rem;
}

.pw-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.pw-stat-chip {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.pw-stat-chip.chip-danger {
  background: rgba(239, 68, 68, 0.04);
  border-color: rgba(239, 68, 68, 0.15);
}

.pw-stat-chip.chip-success {
  background: rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.15);
}

.pw-chip-lbl {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.pw-chip-val {
  font-size: 1.05rem;
  font-weight: 800;
}

.pw-balance-strip {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.pw-balance-strip.receivable {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

body.dark-theme .pw-balance-strip.receivable {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
}

.pw-balance-strip.payable {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

body.dark-theme .pw-balance-strip.payable {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

/* 5. Modern Chart Cards */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
}

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

.chart-card {
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
}

.chart-container {
  position: relative;
  height: 290px;
  width: 100%;
}

.chart-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.chart-icon-box.icon-bar {
  background: rgba(79, 70, 229, 0.12);
  color: #4f46e5;
}

.chart-icon-box.icon-doughnut {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

/* 6. Recent Transactions Table Card */
.recent-trans-card {
  border-radius: 18px;
  padding: 1.35rem 1.5rem;
}

.trans-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(2, 132, 199, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.modern-table thead th {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.modern-table thead th:first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.modern-table thead th:last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }

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

.modern-table tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.03);
}

body.dark-theme .modern-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.modern-table tbody td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  vertical-align: middle;
}

/* Modals System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2.25rem;
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
}
.brand-header {
  text-align: center;
  margin-bottom: 1.75rem;
}
.brand-header .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: white;
  margin-bottom: 0.85rem;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.modal-box {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  border-radius: 22px;
  background: var(--bg-card);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
}
.modal-box.sm { max-width: 420px; }
.modal-box.lg { max-width: 820px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}
.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.btn-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.btn-close:hover {
  background: var(--primary-light);
  color: var(--primary);
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* Toast Notifications */
#toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 10000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { padding: 0.8rem 1.2rem; border-radius: var(--radius-md); color: white; font-weight: 600; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); animation: toastIn 0.3s ease; }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }

@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =========================================================
   ROJMEL (DAILY CASH BOOK) MODERN STYLING
   ========================================================= */
.rojmel-sheet {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.rojmel-sheet-header {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.rojmel-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.rojmel-col {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}

.col-head {
  padding: 0.85rem 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
}

.col-head.success-bg {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-bottom: 2px solid #10b981;
}

.col-head.danger-bg {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border-bottom: 2px solid #ef4444;
}

.rojmel-table {
  width: 100%;
  border-collapse: collapse;
}

.rojmel-table th {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.825rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
}

.rojmel-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  vertical-align: middle;
}

.rojmel-table tbody tr:hover {
  background: rgba(79, 70, 229, 0.04);
}

.rojmel-table tfoot th {
  background: var(--bg-main);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 0.9rem;
  border-top: 2px solid var(--border-color);
}

.balance-strip {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 700;
}

.balance-strip.opening-strip {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  border-left: 4px solid var(--primary);
}

.balance-strip.closing-strip {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.3);
}

.partner-rojmel-box {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.partner-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 0.85rem;
}

.pr-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pr-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}

.pr-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

/* =========================================================
   3 PARTNERS LEDGER STYLING
   ========================================================= */
.partner-select-header {
  padding: 1.25rem 1.5rem;
}

.partner-tab-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.pt-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 30px;
  border: 1px solid var(--border-color);
  background: var(--bg-main);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.pt-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.pt-btn.active {
  background: linear-gradient(135deg, var(--primary), #6366f1);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

.partner-summary-banner {
  padding-bottom: 1.25rem;
  border-bottom: 2px dashed var(--border-color);
  margin-bottom: 1.5rem;
}

.row-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .row-2-cols {
    grid-template-columns: 1fr;
  }
}

.ledger-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.box-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}

.box-header h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.box-header.success-header {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border-bottom: 2px solid #10b981;
}

.box-header.danger-header {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border-bottom: 2px solid #ef4444;
}

/* =========================================================
   KHATAVAHI (CUSTOMER LEDGER) REDESIGNED MODAL STYLES
   ========================================================= */
.modal-khatavahi-box {
  width: 100%;
  max-width: 620px;
  padding: 1.5rem 1.75rem;
  border-radius: 20px;
  background: var(--bg-card);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--border-color);
  animation: khatavahiModalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

@keyframes khatavahiModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

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

.khatavahi-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.khatavahi-modal-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

/* Manual Amount Received & Amount Given Dual Cards */
.manual-amt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

@media (max-width: 540px) {
  .manual-amt-row {
    grid-template-columns: 1fr;
  }
}

.manual-amt-card {
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  background: var(--bg-main);
  transition: all 0.2s ease;
  position: relative;
}

.manual-amt-card.manual-amt-avak {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.03);
}

.manual-amt-card.manual-amt-avak:focus-within,
.manual-amt-card.manual-amt-avak.is-active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.08);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}

.manual-amt-card.manual-amt-javak {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.03);
}

.manual-amt-card.manual-amt-javak:focus-within,
.manual-amt-card.manual-amt-javak.is-active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2);
}

.manual-amt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.manual-amt-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  display: flex;
  align-items: center;
}

.manual-amt-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.manual-amt-tag.tag-avak {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.manual-amt-tag.tag-javak {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.manual-amt-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.currency-symbol {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.manual-amt-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1.6rem;
  font-weight: 800;
  font-family: inherit;
  color: var(--text-primary);
  line-height: 1.2;
  padding: 0;
}

.manual-amt-input::placeholder {
  color: var(--text-muted);
  opacity: 0.35;
}

/* Compact Modal Fields Grid */
.khatavahi-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 540px) {
  .khatavahi-form-grid {
    grid-template-columns: 1fr;
  }
}

.khatavahi-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.khatavahi-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
}

.khatavahi-field .form-control {
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--border-color);
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background: var(--bg-main);
  color: var(--text-primary);
}

.khatavahi-field .form-control:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Dynamic Action Buttons */
.btn-khatavahi-submit {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-khatavahi-submit.submit-avak {
  background: linear-gradient(135deg, #10b981, #059669) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
}

.btn-khatavahi-submit.submit-avak:hover {
  background: linear-gradient(135deg, #059669, #047857) !important;
  transform: translateY(-1px);
}

.btn-khatavahi-submit.submit-javak {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4) !important;
}

.btn-khatavahi-submit.submit-javak:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
  transform: translateY(-1px);
}

.btn-khatavahi-cancel {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-khatavahi-cancel:hover {
  background: var(--bg-main);
  color: var(--text-primary);
}

/* Quick Action Header Buttons in Khatavahi Tab */
.khatavahi-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-khatavahi-quick-avak {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.65rem 1.15rem;
  border: none;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-khatavahi-quick-avak:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.45);
}

.btn-khatavahi-quick-javak {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.65rem 1.15rem;
  border: none;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-khatavahi-quick-javak:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

/* Print CSS */
@media print {
  body { background: #ffffff !important; color: #000000 !important; }
  .sidebar, .top-header, .no-print, #toast-container, .modal-overlay, .btn-khatavahi-quick-avak, .btn-khatavahi-quick-javak { display: none !important; }
  .main-wrapper { margin-left: 0 !important; }
  .main-content { padding: 0 !important; }
  .tab-content { display: none !important; }
  .tab-content.active { display: block !important; }
  .rojmel-sheet { box-shadow: none !important; border: none !important; padding: 0 !important; }
  .glass-card { box-shadow: none !important; border: 1px solid #cbd5e1 !important; background: #ffffff !important; }
}


/* ==========================================================================
   MODERN TABLE ACTIONS (AMBER PENCIL & RED TRASH ICONS)
   ========================================================================== */
.table-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 16px !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
}

.table-action-btn {
  background: transparent !important;
  border: none !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  text-decoration: none;
  box-shadow: none !important;
  outline: none;
}

/* Edit Icon: Warm Amber / Golden Yellow */
.table-action-btn.action-edit,
.table-action-btn.edit-btn {
  color: #f59e0b !important;
  font-size: 1.15rem;
}

.table-action-btn.action-edit i,
.table-action-btn.edit-btn i {
  color: #f59e0b !important;
  filter: drop-shadow(0 1px 2px rgba(245, 158, 11, 0.2));
}

.table-action-btn.action-edit:hover,
.table-action-btn.edit-btn:hover {
  color: #d97706 !important;
  background: rgba(245, 158, 11, 0.14) !important;
  transform: scale(1.2);
}

/* Delete Icon: Vibrant Coral / Red */
.table-action-btn.action-delete,
.table-action-btn.delete-btn {
  color: #ef4444 !important;
  font-size: 1.15rem;
}

.table-action-btn.action-delete i,
.table-action-btn.delete-btn i {
  color: #ef4444 !important;
  filter: drop-shadow(0 1px 2px rgba(239, 68, 68, 0.2));
}

.table-action-btn.action-delete:hover,
.table-action-btn.delete-btn:hover {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.14) !important;
  transform: scale(1.2);
}

/* Multi-row remove button */
.btn-del-row {
  background: transparent !important;
  border: none !important;
  color: #ef4444 !important;
  font-size: 1.15rem !important;
  padding: 6px !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none !important;
}

.btn-del-row:hover {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.14) !important;
  transform: scale(1.2);
}

/* Universal Fallback for any action buttons inside table cells */
table td > .btn-secondary:has(i.fa-pen),
table td > .btn-outline-primary:has(i.fa-pen),
table td > .btn-outline-primary:has(i.fa-pen-to-square),
table td .table-actions > .btn-secondary,
table td .table-actions > .btn-outline-primary {
  background: transparent !important;
  border: none !important;
  color: #f59e0b !important;
  font-size: 1.15rem !important;
  padding: 6px 8px !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
table td > .btn-secondary:has(i.fa-pen):hover,
table td > .btn-outline-primary:has(i.fa-pen):hover {
  color: #d97706 !important;
  background: rgba(245, 158, 11, 0.14) !important;
  transform: scale(1.2);
}

table td > .btn-danger-outline:has(i.fa-trash),
table td .table-actions > .btn-danger-outline {
  background: transparent !important;
  border: none !important;
  color: #ef4444 !important;
  font-size: 1.15rem !important;
  padding: 6px 8px !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
}
table td > .btn-danger-outline:has(i.fa-trash):hover {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.14) !important;
  transform: scale(1.2);
}

/* Dark Theme Overrides */
body.dark-theme .table-action-btn.action-edit,
body.dark-theme .table-action-btn.edit-btn {
  color: #fbbf24 !important;
}
body.dark-theme .table-action-btn.action-edit:hover,
body.dark-theme .table-action-btn.edit-btn:hover {
  background: rgba(251, 191, 36, 0.2) !important;
}

body.dark-theme .table-action-btn.action-delete,
body.dark-theme .table-action-btn.delete-btn,
body.dark-theme .btn-del-row {
  color: #f87171 !important;
}
body.dark-theme .table-action-btn.action-delete:hover,
body.dark-theme .table-action-btn.delete-btn:hover,
body.dark-theme .btn-del-row:hover {
  background: rgba(248, 113, 113, 0.2) !important;
}

/* ==========================================================================
   PROFIT & LOSS (P&L) ANALYTICS - REDESIGNED SPACIOUS PREMIUM UI
   ========================================================================== */

/* 1. Header Banner */
.profit-header-card {
  padding: 1.5rem 1.85rem;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.profit-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.profit-badge-pill .live-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.profit-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.35rem 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.profit-toolbar {
  gap: 0.75rem;
}

.profit-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.profit-select-wrap .select-icon {
  position: absolute;
  left: 14px;
  pointer-events: none;
  font-size: 0.95rem;
}

.profit-year-dropdown {
  padding-left: 2.4rem !important;
  min-width: 170px;
  height: 42px;
  font-weight: 600;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  background: var(--bg-input) !important;
}

/* 2. KPI Cards Grid - Spacious, Vertical Hierarchy (NO SQUEEZING) */
.profit-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (min-width: 1380px) {
  .profit-kpi-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.profit-kpi-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem 1.45rem;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.035);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
  position: relative;
  min-height: 185px;
}

.profit-kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* Featured Hero: Net Profit Card */
.profit-kpi-card.card-net-profit {
  border: 2px solid rgba(16, 185, 129, 0.5);
  background: linear-gradient(145deg, var(--bg-card), rgba(16, 185, 129, 0.05));
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.12);
}

.profit-kpi-card.card-net-profit:hover {
  border-color: #10b981;
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.22);
}

.profit-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.kpi-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.kpi-icon-wrap.growth {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
}

.kpi-icon-wrap.expense {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
}

.kpi-icon-wrap.profit {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(5, 150, 105, 0.3));
  color: #059669;
}

.kpi-icon-wrap.upad {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.kpi-icon-wrap.savings {
  background: rgba(99, 102, 241, 0.14);
  color: #6366f1;
}

.kpi-tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.kpi-tag.success { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi-tag.danger { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.kpi-tag.warning { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.kpi-tag.primary { background: rgba(99, 102, 241, 0.12); color: #6366f1; }

.profit-margin-badge {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.profit-margin-badge.negative {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.profit-kpi-body {
  margin-bottom: 0.75rem;
}

.profit-kpi-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.35rem;
}

.profit-kpi-value {
  font-size: 1.65rem;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.15;
  letter-spacing: -0.5px;
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profit-kpi-card.card-net-profit .profit-kpi-value {
  font-size: 1.85rem;
}

.profit-kpi-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.65rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
}

/* 3. Partner Cards Grid - Generous Spacing */
.profit-partner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.profit-partner-card {
  padding: 1.4rem 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.035);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.profit-partner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.profit-partner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(180deg, #6366f1, #8b5cf6);
}

.profit-partner-card.sumit::before {
  background: linear-gradient(180deg, #3b82f6, #60a5fa);
}

.profit-partner-card.viral::before {
  background: linear-gradient(180deg, #10b981, #34d399);
}

.profit-partner-card.jignesh::before {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.profit-partner-card.p4::before {
  background: linear-gradient(180deg, #8b5cf6, #a78bfa);
}

.profit-partner-card.p5::before {
  background: linear-gradient(180deg, #ec4899, #f472b6);
}

.profit-partner-card.p6::before {
  background: linear-gradient(180deg, #06b6d4, #22d3ee);
}

.partner-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.partner-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: #ffffff;
}

.partner-avatar.sumit { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.partner-avatar.viral { background: linear-gradient(135deg, #059669, #10b981); }
.partner-avatar.jignesh { background: linear-gradient(135deg, #d97706, #f59e0b); }

.profit-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.profit-stat-row.highlight {
  border-top: 1px dashed var(--border-color);
  margin-top: 0.65rem;
  padding-top: 0.85rem;
  font-weight: 700;
}

.badge-profit {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-loss {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profit-table td.profit-col-highlight {
  background: rgba(16, 185, 129, 0.05);
  font-weight: 700;
}

body.dark-theme .profit-table td.profit-col-highlight {
  background: rgba(16, 185, 129, 0.12);
}

/* ==========================================================================
   CODEFIXER ULTIMATE MOBILE & TABLET RESPONSIVE SYSTEM
   ========================================================================== */

/* 1. Universal Mobile Utility Overrides & Touch Scrolling */
html, body {
  max-width: 100vw;
  overflow-x: hidden !important;
}

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

/* 2. Sidebar Backdrop Blur Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

/* 3. Mobile Bottom Navigation Dock (Default Hidden on Desktop) */
.mobile-bottom-nav {
  display: none;
}

/* 4. Modal Multi-Row Items Table (Desktop & General Base) */
.modal-items-table-wrap {
  max-height: 340px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.modal-entry-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 650px;
}

.modal-entry-table thead th {
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.75rem 0.85rem;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.modal-entry-table tbody td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.modal-entry-table tbody tr:last-child td {
  border-bottom: none;
}

.modal-entry-table .form-control {
  font-size: 0.88rem;
  padding: 0.45rem 0.7rem;
}

.badge-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
}

.mobile-only-label {
  display: none !important;
}

.mobile-del-text {
  display: none;
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINT: TABLET & SMALL LAPTOPS (<= 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  /* Sidebar transforms into off-canvas drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: -320px !important;
    width: 285px !important;
    z-index: 9600 !important;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35) !important;
    transition: left 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }

  .sidebar.mobile-open {
    left: 0 !important;
  }

  /* Main wrapper expands to 100% full width */
  .main-wrapper,
  .app-layout-sidebar.sidebar-collapsed .main-wrapper,
  .sidebar-collapsed .main-wrapper,
  .sidebar.collapsed ~ .main-wrapper {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
  }

  /* Collapsed sidebar tooltips disabled on touch/mobile */
  .sidebar.collapsed .menu-item::after,
  .sidebar.collapsed .menu-item::before {
    display: none !important;
  }

  /* Content area padding adjustment */
  .main-content {
    padding: 1.5rem 1.25rem !important;
  }

  /* Two columns layouts collapse */
  .rojmel-two-columns,
  .row-2-cols,
  .charts-grid,
  .partners-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINT: MOBILE PHONES & PHABLETS (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Mobile Bottom Navigation Dock Activation */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 64px !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.08) !important;
    z-index: 9000 !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 0 0.4rem !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
  }

  body.dark-theme .mobile-bottom-nav {
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.4) !important;
  }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-family);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 12px;
    transition: var(--transition);
    flex: 1;
    max-width: 74px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-nav-item i {
    font-size: 1.15rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  }

  .mob-nav-item.active {
    color: var(--primary) !important;
    font-weight: 700;
    background: var(--primary-light);
  }

  .mob-nav-item.active i {
    transform: translateY(-2px);
  }

  .mob-nav-item:active {
    transform: scale(0.92);
  }

  /* Main content offset so bottom dock never overlaps content */
  .main-content {
    padding: 1rem 0.85rem !important;
    padding-bottom: 85px !important;
  }

  /* Compact Touch Top Header */
  .top-header {
    height: 60px !important;
    padding: 0 0.85rem !important;
  }

  .top-header h2 {
    font-size: 1rem !important;
    max-width: 135px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .header-left {
    gap: 0.5rem !important;
  }

  .header-right {
    gap: 0.4rem !important;
  }

  .header-sidebar-toggle {
    width: 35px !important;
    height: 35px !important;
    font-size: 0.9rem !important;
  }

  .header-lang-wrap select {
    padding: 0.25rem 1.4rem 0.25rem 0.45rem !important;
    font-size: 0.76rem !important;
  }

  .btn-danger-outline span,
  #header-change-pw-btn span {
    display: none !important;
  }

  .btn-danger-outline,
  #header-change-pw-btn {
    padding: 0.35rem 0.6rem !important;
    font-size: 0.82rem !important;
  }

  #theme-toggle-btn {
    width: 35px !important;
    height: 35px !important;
    font-size: 0.9rem !important;
  }

  /* Welcome Banner on Dashboard */
  .dash-welcome-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
    padding: 1.15rem 1rem !important;
  }

  .dash-welcome-title {
    font-size: 1.25rem !important;
  }

  .dash-welcome-sub {
    font-size: 0.82rem !important;
  }

  .dash-welcome-right {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .dash-welcome-right .dash-badge-pill {
    font-size: 0.76rem !important;
    padding: 0.35rem 0.65rem !important;
  }

  .dash-welcome-right .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* 5-Card Metrics Grid -> 2 columns */
  .dash-metrics-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .metric-card {
    padding: 0.85rem 0.85rem 0.75rem !important;
    border-radius: 15px !important;
  }

  .metric-label {
    font-size: 0.73rem !important;
  }

  .metric-value {
    font-size: 1.3rem !important;
  }

  .metric-icon-wrap {
    width: 34px !important;
    height: 34px !important;
    font-size: 0.95rem !important;
  }

  .metric-sub {
    font-size: 0.7rem !important;
  }

  .metric-pill {
    font-size: 0.68rem !important;
    padding: 0.15rem 0.4rem !important;
  }

  /* Command Center & Actions */
  .dash-command-center {
    padding: 1.1rem !important;
  }

  .command-buttons-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .cmd-btn {
    padding: 0.75rem 0.85rem !important;
  }

  .quick-actions-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1rem !important;
    gap: 0.85rem !important;
  }

  .quick-actions-banner .action-btns-group {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .quick-actions-banner .action-btns-group .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* KPI Rows (Avak, Javak, etc.) */
  .kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem !important;
  }

  .kpi-mini-card {
    padding: 0.7rem 0.8rem !important;
    gap: 0.6rem !important;
  }

  .kpi-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 1rem !important;
  }

  .kpi-label {
    font-size: 0.7rem !important;
  }

  .kpi-mini-card h3 {
    font-size: 1.05rem !important;
  }

  /* Module Headers (Avak, Javak, Partners, Khatavahi, etc.) */
  .module-header-card .flex-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.85rem !important;
  }

  .module-header-card .flex-between .flex-gap,
  .module-header-card .flex-between .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Filter Systems & Preset Pills */
  .filter-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .preset-pills {
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 0.35rem !important;
  }

  .preset-pill {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.73rem !important;
  }

  .filter-grid,
  .filter-card .filter-grid,
  .filter-card .filter-grid[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .filter-card .filter-grid > .d-flex {
    width: 100% !important;
  }

  .filter-card .filter-grid > .d-flex .btn {
    flex: 1 !important;
    justify-content: center !important;
  }

  /* Partner Dynamic Ribbon Tabs */
  #partner-tabs-container {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 0.5rem !important;
    padding-bottom: 8px !important;
    margin-bottom: 0.75rem !important;
    scrollbar-width: none !important;
  }

  #partner-tabs-container::-webkit-scrollbar {
    display: none !important;
  }

  #partner-tabs-container .pt-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.82rem !important;
  }

  /* Khatavahi Customer Ledger Mobile */
  .khatavahi-header-actions {
    display: flex !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .khatavahi-header-actions button {
    flex: 1 !important;
    justify-content: center !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .card-header.flex-between {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }

  .card-header.flex-between > div {
    width: 100% !important;
    flex-wrap: wrap !important;
  }

  /* Modals as Native-feeling Bottom Sheet on Mobile */
  .modal-overlay {
    padding: 0.5rem 0.5rem 1rem 0.5rem !important;
    align-items: flex-end !important;
    z-index: 100000 !important;
  }

  .modal-overlay.active {
    z-index: 100000 !important;
  }

  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    padding: 1.25rem 1rem !important;
    border-radius: 22px 22px 14px 14px !important;
    margin: 0 !important;
    z-index: 100001 !important;
  }

  .modal-box.sm,
  .modal-box.lg {
    max-width: 100% !important;
  }

  .modal-header h3 {
    font-size: 1.1rem !important;
  }

  .form-row {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .form-grid-2,
  .form-grid-3,
  .khatavahi-form-grid,
  .manual-amt-row,
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .modal-footer {
    display: flex !important;
    flex-direction: row !important;
    width: 100% !important;
    gap: 0.65rem !important;
    margin-top: 1.25rem !important;
    padding-top: 0.85rem !important;
  }

  .modal-footer .btn {
    flex: 1 !important;
    width: 100% !important;
    justify-content: center !important;
    padding: 0.65rem 1rem !important;
  }

  /* Modal Multi-Row Items Table (Mobile Touch Card Adaptation) */
  .modal-items-table-wrap {
    max-height: 380px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    border: none !important;
    background: transparent !important;
    padding: 2px !important;
    margin-bottom: 0.75rem !important;
  }

  .modal-entry-table {
    min-width: 100% !important;
    width: 100% !important;
    display: block !important;
    border: none !important;
  }

  .modal-entry-table thead {
    display: none !important;
  }

  .modal-entry-table tbody {
    display: block !important;
    width: 100% !important;
    border: none !important;
  }

  .modal-entry-table tr.modal-row-item {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem 0.7rem !important;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    border-radius: 16px !important;
    padding: 0.85rem !important;
    margin-bottom: 0.85rem !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  }

  body.dark-theme .modal-entry-table tr.modal-row-item {
    background: rgba(30, 41, 59, 0.95) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
  }

  .modal-entry-table td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    width: 100% !important;
  }

  .modal-entry-table td.col-index {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
    text-align: left !important;
  }

  .modal-entry-table td.col-action {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    text-align: right !important;
  }

  .modal-entry-table td.col-title {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }

  .modal-entry-table td.col-category {
    grid-column: 1 !important;
    grid-row: 3 !important;
  }

  .modal-entry-table td.col-amount {
    grid-column: 2 !important;
    grid-row: 3 !important;
  }

  .modal-entry-table td.col-remark {
    grid-column: 1 / -1 !important;
    grid-row: 4 !important;
  }

  .mobile-only-label {
    display: flex !important;
    align-items: center;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: var(--text-secondary) !important;
    margin-bottom: 0.25rem !important;
  }

  .mobile-del-text {
    display: inline !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
  }

  .btn-del-row {
    padding: 0.35rem 0.65rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
  }

  .modal-entry-table .form-control {
    font-size: 15px !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 10px !important;
    background: var(--bg-main) !important;
  }

  .modal-entry-table .badge-index {
    font-size: 0.82rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 8px !important;
  }

  /* Touch-friendly 16px Font on Inputs to Prevent iOS/Android Auto Zoom */
  .form-control,
  .form-group input,
  .form-group select,
  .modal-box input,
  .modal-box select,
  .login-card input {
    font-size: 16px !important;
  }

  /* Tables Touch Scroll and Formatting */
  .table-responsive {
    overflow-x: auto !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 0.75rem !important;
  }

  .modern-table th,
  .modern-table td,
  .table th,
  .table td {
    padding: 0.65rem 0.65rem !important;
    font-size: 0.82rem !important;
    white-space: nowrap;
  }

  /* Login Card */
  .login-card {
    padding: 1.75rem 1.25rem !important;
    border-radius: 20px !important;
  }

  .quick-login-btns {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
  }

  .quick-login-btns .btn {
    width: 100% !important;
    font-size: 0.78rem !important;
    padding: 0.35rem 0.5rem !important;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE BREAKPOINT: ULTRA COMPACT SCREENS (<= 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .dash-metrics-container {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  .kpi-row {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .pw-stats-row {
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
  }

  .top-header h2 {
    max-width: 110px !important;
    font-size: 0.92rem !important;
  }

  .profit-partner-grid,
  .profit-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .dash-badge-pill {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* Partner Direct Entry Card Styling */
.partner-entry-card {
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.partner-entry-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.box-header .btn {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.box-header .btn:hover {
  transform: translateY(-1px);
}

/* ==========================================================================
   MODERN ENTERPRISE SPLIT-SCREEN SHOWCASE LOGIN PORTAL
   ========================================================================== */
#login-modal.login-screen-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: #050811 !important;
  background-image: 
    radial-gradient(circle at 12% 18%, rgba(79, 70, 229, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(6, 182, 212, 0.20) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 55%) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 1.5rem !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  z-index: 100000 !important;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  box-sizing: border-box !important;
}

#login-modal.login-screen-overlay.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Background Effects Container */
.login-bg-effects {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* Tech Dot Grid Pattern */
.login-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.12) 1.2px, transparent 1.2px),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 32px 32px, 96px 96px, 96px 96px;
  mask-image: radial-gradient(circle at 50% 50%, black 55%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 55%, transparent 90%);
  opacity: 0.85;
}

/* Aurora Glowing Mesh Orbs */
.login-aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  mix-blend-mode: screen;
  animation: floatAurora 20s ease-in-out infinite alternate;
}

.login-aurora.orb-1 {
  width: 620px;
  height: 620px;
  top: -160px;
  left: -140px;
  background: radial-gradient(circle, #4f46e5 0%, #7c3aed 45%, transparent 72%);
  animation-duration: 20s;
}

.login-aurora.orb-2 {
  width: 580px;
  height: 580px;
  bottom: -140px;
  right: -120px;
  background: radial-gradient(circle, #06b6d4 0%, #0284c7 45%, transparent 72%);
  animation-duration: 24s;
  animation-delay: -6s;
}

.login-aurora.orb-3 {
  width: 460px;
  height: 460px;
  top: 45%;
  right: 18%;
  background: radial-gradient(circle, #10b981 0%, #059669 40%, transparent 72%);
  opacity: 0.35;
  animation-duration: 22s;
  animation-delay: -12s;
}

.login-aurora.orb-4 {
  width: 440px;
  height: 440px;
  bottom: 5%;
  left: 20%;
  background: radial-gradient(circle, #d946ef 0%, #9333ea 40%, transparent 72%);
  opacity: 0.32;
  animation-duration: 26s;
  animation-delay: -4s;
}

@keyframes floatAurora {
  0% { transform: translate(0px, 0px) scale(1); }
  50% { transform: translate(65px, 50px) scale(1.12); }
  100% { transform: translate(-50px, 65px) scale(0.95); }
}

/* ==========================================================================
   CENTERED ANIMATED LUXURY LOGIN CARD & NEON BORDER BEAM
   ========================================================================== */
.login-animated-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 460px;
  margin: auto;
  border-radius: 28px;
  padding: 2.5px;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: 
    0 35px 80px -15px rgba(0, 0, 0, 0.92),
    0 0 55px rgba(99, 102, 241, 0.28);
  animation: 
    cardEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    cardFloatingPhysics 6s ease-in-out infinite 0.7s alternate;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: translateY(32px) scale(0.92);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardFloatingPhysics {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Rotating Conic Border Beam Light Animation */
.login-card-border-glow {
  position: absolute;
  width: 240%;
  height: 240%;
  top: -70%;
  left: -70%;
  background: conic-gradient(
    transparent 0deg,
    transparent 60deg,
    #06b6d4 130deg,
    #6366f1 180deg,
    #d946ef 230deg,
    transparent 300deg,
    transparent 360deg
  );
  animation: spinBorderBeam 4.5s linear infinite;
  z-index: 0;
  pointer-events: none;
  opacity: 0.95;
  filter: blur(5px);
}

@keyframes spinBorderBeam {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Glass Card Body */
.login-card-animated {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 2.4rem 2.2rem 2rem !important;
  background: rgba(11, 18, 33, 0.88) !important;
  backdrop-filter: blur(36px) saturate(210%) !important;
  -webkit-backdrop-filter: blur(36px) saturate(210%) !important;
  border-radius: 26px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.4) !important;
  overflow: hidden;
  box-sizing: border-box !important;
}

/* Glowing Top Accent Bar */
.login-top-glow-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #06b6d4, #10b981, #d946ef, #4f46e5);
  background-size: 300% 100%;
  animation: borderGlowSweep 5s linear infinite;
}

@keyframes borderGlowSweep {
  0% { background-position: 0% 0%; }
  100% { background-position: 300% 0%; }
}

/* Card Header & Brand */
.login-box-header {
  text-align: center;
  margin-bottom: 1.6rem;
}

.login-brand-halo {
  position: relative;
  width: 66px;
  height: 66px;
  margin: 0 auto 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-icon {
  position: relative;
  z-index: 2;
  width: 60px;
  height: 60px;
  border-radius: 19px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.45);
  animation: logoFloat 4s ease-in-out infinite alternate;
}

@keyframes logoFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}

.login-halo-rings {
  position: absolute;
  inset: -6px;
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.65), rgba(6, 182, 212, 0.65));
  filter: blur(14px);
  z-index: 1;
  animation: haloPulse 3s ease-in-out infinite alternate;
}

@keyframes haloPulse {
  0% { opacity: 0.4; transform: scale(0.95); }
  100% { opacity: 0.9; transform: scale(1.08); }
}

.login-brand-title {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.25rem 0;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.login-brand-title .brand-code {
  background: linear-gradient(135deg, #ffffff 40%, #c7d2fe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-brand-title .brand-fixer {
  background: linear-gradient(135deg, #06b6d4 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-version-badge {
  font-size: 0.66rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 0.16rem 0.5rem;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

.login-box-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
  margin: 0 0 0.65rem 0;
  font-weight: 500;
}

.login-welcome-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(129, 140, 248, 0.28);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Inputs & Form Controls */
.login-field-label {
  display: flex;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 0.45rem;
  letter-spacing: 0.2px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 1rem;
  color: #64748b;
  font-size: 0.95rem;
  pointer-events: none;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.login-input-wrap:focus-within .login-input-icon {
  color: #38bdf8;
  transform: scale(1.1);
}

.login-form-control {
  width: 100% !important;
  padding: 0.85rem 2.85rem 0.85rem 2.75rem !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 13px !important;
  color: #ffffff !important;
  font-size: 0.94rem !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.login-form-control::placeholder {
  color: #64748b !important;
  font-size: 0.88rem !important;
}

.login-form-control:focus {
  background: rgba(15, 23, 42, 0.94) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3.5px rgba(56, 189, 248, 0.25), 0 4px 18px rgba(56, 189, 248, 0.22) !important;
  outline: none !important;
}

.login-form-control:-webkit-autofill,
.login-form-control:-webkit-autofill:hover, 
.login-form-control:-webkit-autofill:focus {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0px 1000px #0f172a inset !important;
  box-shadow: 0 0 0px 1000px #0f172a inset !important;
  transition: background-color 5000s ease-in-out 0s;
  caret-color: #ffffff !important;
}

.login-pw-toggle {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.15s ease;
  z-index: 2;
}

.login-pw-toggle:hover {
  color: #38bdf8;
  transform: scale(1.15);
}

/* Gradient Submit Button with Shimmer Sweep */
.btn-login-gradient {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #06b6d4 100%) !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 0.98rem !important;
  font-weight: 700 !important;
  padding: 0.95rem 1.25rem !important;
  border-radius: 13px !important;
  cursor: pointer;
  box-shadow: 0 10px 25px -4px rgba(79, 70, 229, 0.55), 0 0 25px rgba(6, 182, 212, 0.28) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-login-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -4px rgba(79, 70, 229, 0.75), 0 0 35px rgba(6, 182, 212, 0.45) !important;
}

.btn-login-gradient:active {
  transform: translateY(0);
}

.btn-arrow-animate {
  display: inline-block;
  animation: arrowNudge 1.6s ease-in-out infinite;
}

@keyframes arrowNudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(5px); }
}

.btn-shine-sweep {
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-25deg);
  transition: left 0.8s ease;
}

.btn-login-gradient:hover .btn-shine-sweep {
  left: 140%;
}

/* Card Security Footer */
.login-box-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.6rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
}

.status-indicator-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

.footer-security-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.4px;
}

/* Text Colors */
.text-cyan {
  color: #22d3ee !important;
}

/* Mobile Responsiveness */
@media (max-width: 520px) {
  #login-modal.login-screen-overlay {
    padding: 1.25rem 0.85rem !important;
  }
  .login-card-animated {
    padding: 2rem 1.4rem 1.6rem !important;
    border-radius: 22px !important;
  }
  .login-brand-title {
    font-size: 1.65rem;
  }
  .login-brand-icon {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
  }
}
