/* =====================================================================
   GST BILLING SOFTWARE - PREMIUM DARK UI
   BillPro GST v1.0
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700&display=swap');

/* === CSS VARIABLES === */
:root {
  --primary: #c5a021; /* Metallic Gold */
  --primary-dark: #a1811a;
  --primary-light: #d4af37;
  --primary-glow: rgba(197, 160, 33, 0.15);
  --secondary: #27ae60;
  --secondary-dark: #1e8449;
  --accent: #b8860b;
  --danger: #e74c3c;
  --danger-dark: #c0392b;
  --warning: #f39c12;
  --info: #3498db;

  --bg-darkest: #f4f6f8;
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card2: #fcfcfc;
  --bg-sidebar: #ffffff;
  --bg-hover: rgba(197,160,33,0.06);
  --bg-active: rgba(197,160,33,0.1);

  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-dim: #a0aec0;

  --border: rgba(197,160,33,0.12);
  --border-accent: rgba(197,160,33,0.25);

  --sidebar-width: 260px;
  --header-height: 65px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 10px 25px rgba(197,160,33,0.08);
  --shadow-glow: 0 0 30px rgba(197,160,33,0.1);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

html, body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul, ol { list-style: none; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-accent); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
  overflow: hidden;
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 15px var(--primary-glow);
  flex-shrink: 0;
}

.brand-text { flex: 1; }
.brand-text h2 {
  font-size: 15px; font-weight: 700;
  color: var(--primary);
}
.brand-text span {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.nav-section {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

.nav-item {
  margin: 2px 10px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--bg-active);
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--primary);
}

.nav-link .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 15px;
}

.nav-link .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.nav-sub {
  margin-left: 30px;
  border-left: 1px solid var(--border);
  padding-left: 10px;
  display: none;
}
.nav-sub.open { display: block; }
.nav-sub .nav-link { font-size: 13px; padding: 7px 10px; }
.nav-toggle-arrow { margin-left: auto; transition: transform 0.2s; }
.nav-toggle-arrow.open { transform: rotate(90deg); }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.user-profile-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.user-profile-mini:hover { background: var(--bg-hover); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

.user-info-mini h4 { font-size: 13px; font-weight: 600; }
.user-info-mini span { font-size: 11px; color: var(--text-muted); }

/* === MAIN CONTENT === */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* === HEADER === */
.app-header {
  height: var(--header-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-title {
  flex: 1;
  min-width: 0; /* Allow shrinking to prevent overflow */
}
.header-title h1 {
  font-size: 18px; font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-title span { font-size: 12px; color: var(--text-muted); display: block; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.header-search {
  position: relative;
}
.header-search input {
  width: 220px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px 8px 38px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  width: 260px;
}
.header-search .search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}
.icon-btn .notif-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* === PAGE CONTENT === */
.page-content {
  flex: 1;
  padding: 24px;
  background: #fdfdfd;
}

/* =====================================================================
   CARDS
   ===================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-header h3 { font-size: 15px; font-weight: 600; flex: 1; }

.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =====================================================================
   STATS CARDS
   ===================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.stat-card.primary::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card.success::before { background: linear-gradient(90deg, var(--secondary), #34d399); }
.stat-card.warning::before { background: linear-gradient(90deg, var(--accent), #fcd34d); }
.stat-card.danger::before { background: linear-gradient(90deg, var(--danger), #f87171); }
.stat-card.info::before { background: linear-gradient(90deg, var(--info), #60a5fa); }

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border-accent);
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.stat-card.primary .stat-icon { background: rgba(197, 160, 33, 0.1); color: var(--primary); }
.stat-card.success .stat-icon { background: rgba(39, 174, 96, 0.1); color: var(--secondary); }
.stat-card.warning .stat-icon { background: rgba(184, 134, 11, 0.1); color: var(--accent); }
.stat-card.danger .stat-icon { background: rgba(231, 76, 60, 0.1); color: var(--danger); }
.stat-card.info .stat-icon { background: rgba(52, 152, 219, 0.1); color: var(--info); }

.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-change {
  font-size: 12px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up { color: var(--secondary); }
.stat-change.down { color: var(--danger); }

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  outline: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-success {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 15px rgba(16,185,129,0.25);
}
.btn-success:hover { background: var(--secondary-dark); transform: translateY(-1px); }

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 15px rgba(239,68,68,0.25);
}
.btn-danger:hover { background: var(--danger-dark); transform: translateY(-1px); }

.btn-warning {
  background: var(--accent);
  color: #111;
}
.btn-warning:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-ghost {
  background: var(--bg-card2);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }

/* =====================================================================
   FORMS
   ===================================================================== */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-label .required { color: var(--danger); margin-left: 2px; }

.form-control {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}
.form-control::placeholder { color: var(--text-dim); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  gap: 16px;
}
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.input-group {
  display: flex;
  align-items: center;
}
.input-group .input-prefix,
.input-group .input-suffix {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 13px;
  white-space: nowrap;
}
.input-group .input-prefix { border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .input-suffix { border-left: none; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .form-control { border-radius: 0; }
.input-group .form-control:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .form-control:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* =====================================================================
   TABLES
   ===================================================================== */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  background: var(--bg-card2);
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-primary);
}

.table tbody tr {
  transition: background 0.15s;
}
.table tbody tr:hover { background: var(--bg-hover); }
.table tbody tr:last-child td { border-bottom: none; }
/* SEARCH DROPDOWN */
.header-search { position: relative; }
.search-results-dropdown {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 1000; overflow: hidden; display: none; min-width: 300px;
}
.search-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  text-decoration: none; border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg-card2); }
.search-icon-mini {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-card2); display: flex; align-items: center; justify-content: center;
  color: var(--primary-light); font-size: 14px;
}
.search-item:hover .search-icon-mini { background: var(--primary); color: white; }
.search-body { flex: 1; }
.search-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.search-sub { font-size: 11.5px; color: var(--text-muted); }

.table .actions {
  display: flex;
  gap: 8px;
}

/* =====================================================================
   BADGES
   ===================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-success { background: rgba(16,185,129,0.15); color: #34d399; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-warning { background: rgba(245,158,11,0.15); color: #fcd34d; }
.badge-primary { background: rgba(99,102,241,0.15); color: #818cf8; }
.badge-info    { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-muted   { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* =====================================================================
   INVOICE BUILDER
   ===================================================================== */
.invoice-builder {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.invoice-items-table th, .invoice-items-table td {
  padding: 8px 10px;
  font-size: 13px;
}
.invoice-items-table input, .invoice-items-table select {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.invoice-items-table input:focus, .invoice-items-table select:focus {
  border-color: var(--primary);
  background: var(--bg-card2);
}

.invoice-totals {
  background: var(--bg-card2);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.total-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  font-size: 13.5px;
}
.total-row.highlight {
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-light);
}

/* =====================================================================
   MODAL
   ===================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-lg { max-width: 900px; }
.modal-xl { max-width: 1200px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(-20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; flex: 1; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger); color: white; border-color: var(--danger); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* =====================================================================
   ALERTS & TOAST
   ===================================================================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-danger  { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #f87171; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info    { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3);  color: #60a5fa; }

#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: toastIn 0.3s ease;
  font-size: 13.5px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.success { border-left: 4px solid var(--secondary); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--accent); }
.toast.info    { border-left: 4px solid var(--info); }

/* =====================================================================
   LOGIN PAGE
   ===================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darkest);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(99,102,241,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(16,185,129,0.1) 0%, transparent 50%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  z-index: 1;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5), var(--shadow-glow);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 70px; height: 70px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 14px;
  box-shadow: 0 10px 30px var(--primary-glow);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.login-logo h1 { font-size: 24px; font-weight: 800; }
.login-logo h1 span { color: var(--primary-light); }
.login-logo p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* =====================================================================
   DASHBOARD CHARTS
   ===================================================================== */
.chart-container {
  position: relative;
  height: 280px;
}

/* =====================================================================
   PAGINATION
   ===================================================================== */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 16px;
}
.page-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* =====================================================================
   PRINT INVOICE STYLES
   ===================================================================== */
@media print {
  .sidebar, .app-header, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .page-content { padding: 0 !important; }
  body, .app-wrapper { background: white !important; color: black !important; }
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1024px) {
  :root { --sidebar-width: 60px; }
  .brand-text, .nav-link span, .sidebar-footer .user-info-mini, .nav-section { display: none; }
  .nav-link { justify-content: center; padding: 12px; }
  .nav-sub { display: none !important; }
  .nav-toggle-arrow { display: none; }
  .sidebar { overflow: visible; }
}

.responsive-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px !important; }
  .sidebar { 
    transform: translateX(-100%); 
    width: 260px !important; 
    position: fixed; 
    z-index: 999;
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar.mobile-open .nav-link span, 
  .sidebar.mobile-open .brand-text, 
  .sidebar.mobile-open .nav-section { display: block !important; }
  .sidebar.mobile-open .nav-link { justify-content: flex-start; padding: 10px 16px; }
  .main-content { margin-left: 0 !important; width: 100% !important; }
  
  .form-row.cols-2, .form-row.cols-3, .form-row.cols-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 16px; }

  .responsive-grid { grid-template-columns: 1fr; }
  .app-header { padding: 0 16px; gap: 8px; justify-content: space-between; }
  .header-search { display: none !important; }
  .header-title { flex: 1; margin: 0 8px; }
  .header-title h1 { font-size: 15px; }
  #sidebarToggle { display: flex !important; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .header-title span { display: none; }
  .hide-mobile-text { display: none; }
  .header-actions { gap: 8px; }
  .app-header { gap: 8px; padding: 0 12px; }
}

/* =====================================================================
   MISC UTILITIES
   ===================================================================== */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-4 { margin-top: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--accent); }
.text-primary-c { color: var(--primary-light); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-16 { font-size: 16px; }
.w-100 { width: 100%; }

.separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-size: 16px; margin-bottom: 8px; color: var(--text-secondary); }

/* Loader */
.loader {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Glow effect for important elements */
.glow-primary { box-shadow: 0 0 20px var(--primary-glow); }
.glow-success { box-shadow: 0 0 20px rgba(16,185,129,0.25); }
