/* ============================================
   BizHub — Premium Dark-Mode Design System
   ============================================ */

/* Google Fonts loaded in HTML */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  /* Dark Theme Colors */
  --bg-body: #0b0f19;
  --bg-sidebar: #0f1423;
  --bg-card: #141a2e;
  --bg-card-hover: #1a2240;
  --bg-input: #1a2240;
  --bg-glass: rgba(20, 26, 46, 0.85);
  --bg-surface: #111827;

  --border-color: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-heading: #ffffff;

  /* Accent Palette */
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.25);

  /* Status Colors */
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.12);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.12);
  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);
  --cyan: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.12);
  --purple: #a855f7;
  --purple-bg: rgba(168, 85, 247, 0.12);

  /* Business Type Colors */
  --biz-service: #f472b6;
  --biz-manufacturing: #fb923c;
  --biz-retail: #22d3ee;
  --biz-agriculture: #a78bfa;
  --biz-financial: #10b981;
  --biz-other: #6366f1;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Sidebar width */
  --sidebar-width: 270px;
}

/* Light Theme Variables */
.light-theme {
  --bg-body: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f1f5f9;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --bg-surface: #f1f5f9;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.light-theme .card, 
.light-theme .stat-card, 
.light-theme .biz-card {
  box-shadow: var(--shadow-sm);
}

.light-theme input:focus, 
.light-theme textarea:focus, 
.light-theme select:focus {
  background: #ffffff;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.3;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.2); border-radius: 3px; }
.light-theme ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, 0.3); }

/* =======================
   ANIMATIONS & UX
   ======================= */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-slide-up { animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-fade-in { animation: fadeIn 0.3s ease-in forwards; }
.animate-scale-up { animation: scaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

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

.toast {
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  min-width: 250px;
  border-left: 4px solid var(--accent);
}

.toast-success { border-left-color: var(--green); }
.toast-success svg { color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-error svg { color: var(--red); }

/* =======================
   LAYOUT
   ======================= */

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar-brand h1 {
  font-size: 1.35rem;
  background: linear-gradient(135deg, var(--accent-hover), #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* Business Switcher in Sidebar */
.biz-switcher {
  margin: 0.5rem 1rem 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  cursor: pointer;
  width: calc(100% - 2rem);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  transition: border-color var(--transition-fast);
}

.biz-switcher:hover,
.biz-switcher:focus {
  border-color: var(--accent);
  outline: none;
}

.biz-switcher option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-title {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 1rem 0.75rem 0.4rem;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-hover);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-item svg, .nav-item i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg, .nav-item.active i {
  opacity: 1;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* =======================
   PAGE HEADER
   ======================= */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.page-header-left h2 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.page-header-left p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* =======================
   CARDS
   ======================= */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-light);
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.3);
}

.glass-panel {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* =======================
   STAT / KPI CARDS
   ======================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card.accent-green::before { background: var(--green); }
.stat-card.accent-red::before { background: var(--red); }
.stat-card.accent-blue::before { background: var(--blue); }
.stat-card.accent-yellow::before { background: var(--yellow); }
.stat-card.accent-purple::before { background: var(--purple); }
.stat-card.accent-cyan::before { background: var(--cyan); }

.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon.green { background: var(--green-bg); color: var(--green); }
.stat-card-icon.red { background: var(--red-bg); color: var(--red); }
.stat-card-icon.blue { background: var(--blue-bg); color: var(--blue); }
.stat-card-icon.yellow { background: var(--yellow-bg); color: var(--yellow); }
.stat-card-icon.purple { background: var(--purple-bg); color: var(--purple); }
.stat-card-icon.cyan { background: var(--cyan-bg); color: var(--cyan); }

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-heading);
  line-height: 1;
}

.stat-card-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =======================
   BUTTONS
   ======================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.85rem;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn svg, .btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover), #8b5cf6);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-1px);
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--red);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 0.4rem 0.6rem;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

/* =======================
   FORM ELEMENTS
   ======================= */

input, textarea, select {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

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

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Checkbox */
input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

/* =======================
   TABLES
   ======================= */

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

.data-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

/* =======================
   STATUS BADGES
   ======================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-paid, .badge-accepted { background: var(--green-bg); color: var(--green); }
.badge-unpaid, .badge-draft { background: var(--yellow-bg); color: var(--yellow); }
.badge-overdue, .badge-rejected { background: var(--red-bg); color: var(--red); }
.badge-sent { background: var(--blue-bg); color: var(--blue); }
.badge-partial { background: var(--cyan-bg); color: var(--cyan); }

/* =======================
   CHART CONTAINERS
   ======================= */

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.chart-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.chart-wrapper {
  position: relative;
  height: 280px;
}

/* =======================
   GRID & LAYOUT HELPERS
   ======================= */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }
.col-span-4 { grid-column: span 4; }
.col-span-6 { grid-column: span 6; }
.col-span-8 { grid-column: span 8; }
.col-span-12 { grid-column: span 12; }

.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

/* =======================
   BUSINESS SELECTOR PAGE
   ======================= */

.biz-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background: var(--bg-body);
}

.biz-selector-title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent-hover), #c084fc, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.biz-selector-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.biz-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 1000px;
}

.biz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

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

.biz-card.type-service::before { background: linear-gradient(90deg, #f472b6, #e879f9); }
.biz-card.type-manufacturing::before { background: linear-gradient(90deg, #fb923c, #f59e0b); }
.biz-card.type-retail::before { background: linear-gradient(90deg, #22d3ee, #06b6d4); }
.biz-card.type-agriculture::before { background: linear-gradient(90deg, #a78bfa, #8b5cf6); }
.biz-card.type-financial::before { background: linear-gradient(90deg, #10b981, #34d399); }
.biz-card.type-other::before { background: linear-gradient(90deg, #6366f1, #818cf8); }

.biz-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.biz-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.biz-card.type-service .biz-card-icon { background: rgba(244, 114, 182, 0.15); color: #f472b6; }
.biz-card.type-manufacturing .biz-card-icon { background: rgba(251, 146, 60, 0.15); color: #fb923c; }
.biz-card.type-retail .biz-card-icon { background: rgba(34, 211, 238, 0.15); color: #22d3ee; }
.biz-card.type-agriculture .biz-card-icon { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.biz-card.type-financial .biz-card-icon { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.biz-card.type-other .biz-card-icon { background: rgba(99, 102, 241, 0.15); color: #6366f1; }

.biz-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.biz-card p {
  color: var(--text-secondary);
  font-size: 0.82rem;
  line-height: 1.4;
}

.biz-card-stats {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.biz-card-stat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.biz-card-stat span {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-heading);
  font-family: var(--font-display);
}

.biz-selector-footer {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
}

/* =======================
   EMPTY STATES
   ======================= */

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  opacity: 0.4;
}

.empty-state p {
  max-width: 400px;
  margin: 0 auto;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* =======================
   FILTERS BAR
   ======================= */

.filters-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-chip.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-hover);
}

.search-input {
  width: 260px;
  padding-left: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.75rem center;
}

/* =======================
   INVOICE PREVIEW (PRINT)
   ======================= */

.invoice-paper {
  background: white;
  color: #111;
  width: 100%;
  max-width: 210mm;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  font-family: Arial, sans-serif;
}

.excel-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #333;
}

.excel-table th, .excel-table td {
  border: 1px solid #333;
  padding: 6px 10px;
  vertical-align: top;
}

.excel-table th {
  font-weight: bold;
  text-align: center;
  background: #f1f5f9;
}

/* =======================
   ADDITIONAL ANIMATIONS
   ======================= */

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.animate-slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

/* Staggered animation for children */
.stagger-children > * {
  opacity: 0;
  animation: fadeIn 0.35s ease-out forwards;
}
.stagger-children > *:nth-child(1) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.3s; }

/* =======================
   PRINT STYLES
   ======================= */

@media print {
  body {
    background: white !important;
    color: black !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .no-print, .sidebar, .page-header-actions {
    display: none !important;
  }

  .print-only {
    display: block !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .card, .glass-panel, .invoice-paper {
    box-shadow: none !important;
    border: none !important;
  }

  @page {
    margin: 10mm;
    size: A4;
  }
}

.print-only {
  display: none;
}

/* =======================
   RESPONSIVE & MOBILE
   ======================= */

/* Mobile Header Bar */
.mobile-header {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.hamburger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hamburger-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--accent-hover), #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 99;
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  padding: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-link {
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.breadcrumb-link:hover {
  color: var(--accent-hover);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* =======================
   ENHANCED HOVER EFFECTS
   ======================= */

/* Table Zebra Striping */
.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.light-theme .data-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.015);
}

/* Stat Card Enhanced Hover */
.stat-card:hover {
  border-color: var(--border-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.08);
}

.stat-card.accent-green:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(34, 197, 94, 0.1); }
.stat-card.accent-red:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(239, 68, 68, 0.1); }
.stat-card.accent-blue:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.1); }
.stat-card.accent-yellow:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(245, 158, 11, 0.1); }
.stat-card.accent-purple:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(168, 85, 247, 0.1); }
.stat-card.accent-cyan:hover { box-shadow: var(--shadow-md), 0 0 20px rgba(6, 182, 212, 0.1); }

/* Business Selector Animated BG */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.biz-selector::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 50% 80%, rgba(244, 114, 182, 0.05) 0%, transparent 50%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  pointer-events: none;
  z-index: 0;
}

.biz-selector > * {
  position: relative;
  z-index: 1;
}

/* Business Card Enhanced Hover */
.biz-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3), 0 0 24px var(--accent-glow);
}

.light-theme .biz-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 0 16px rgba(99, 102, 241, 0.08);
}

/* Nav Item Enhanced */
.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.04), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.nav-item:hover::after {
  opacity: 1;
}

/* Button Press Effect */
.btn:active {
  transform: translateY(0) scale(0.98);
}

/* Card hover shimmer */
.card-interactive::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.02), transparent);
  transition: left 0.6s ease;
}

.card-interactive:hover::after {
  left: 100%;
}

/* =======================
   RESPONSIVE BREAKPOINTS
   ======================= */

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .col-span-4, .col-span-6, .col-span-8 { grid-column: span 12; }
}

@media (max-width: 768px) {
  .sidebar { 
    transform: translateX(-100%);
    transition: transform var(--transition-base);
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; }
  .mobile-header { display: flex; }
  .main-content { margin-left: 0; padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .biz-cards-grid { grid-template-columns: 1fr; }
  .filters-bar { flex-direction: column; align-items: stretch; }
  .search-input { width: 100%; }
  .page-header { flex-direction: column; gap: 1rem; }
  .page-header-actions { flex-wrap: wrap; }
  .breadcrumb { padding: 0 0 0.75rem; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .page-header-left h2 { font-size: 1.4rem; }
  .stat-card-value { font-size: 1.35rem; }
  .btn { padding: 0.45rem 0.9rem; font-size: 0.8rem; }
  .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.72rem; }
}

