/* ============================================================
   BuildTrack Pro – Main Stylesheet
   ============================================================ */

:root {
  --primary:       #1a56db;
  --primary-dark:  #1143b0;
  --primary-light: #dbeafe;
  --accent:        #f59e0b;
  --success:       #10b981;
  --danger:        #ef4444;
  --warning:       #f59e0b;
  --bg:            #f0f4f8;
  --card:          #ffffff;
  --sidebar:       #0f1e3d;
  --sidebar-text:  #a8bbd8;
  --text:          #1e293b;
  --muted:         #64748b;
  --border:        #e2e8f0;
  --sidebar-w:     240px;
  --topbar-h:      64px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
}

h1,h2,h3,h4,h5,h6,
.DM Sans { font-family: 'DM Sans', sans-serif; }

/* ── SIDEBAR ──────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  height: 100vh; width: var(--sidebar-w);
  background: var(--sidebar);
  z-index: 1000;
  display: flex; flex-direction: column;
  transition: transform .3s ease;
}
.sidebar-logo {
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.logo-text { font-family:'DM Sans',sans-serif; font-weight:800; font-size:1.25rem; color:#fff; }
.logo-sub  { font-size:.65rem; color:var(--sidebar-text); letter-spacing:2px; text-transform:uppercase; }
.sidebar nav { flex: 1; padding: 14px 0; overflow-y: auto; }
.nav-section {
  padding: 8px 20px 4px;
  font-size: .62rem; text-transform: uppercase; letter-spacing: 2px;
  color: rgba(168,187,216,.45); font-weight: 600;
}
.nav-item a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  color: var(--sidebar-text); text-decoration: none;
  font-size: .86rem;
  border-left: 3px solid transparent;
  transition: all .2s;
}
.nav-item a:hover,
.nav-item a.active {
  color: #fff;
  background: rgba(26,86,219,.18);
  border-left-color: var(--primary);
}
.nav-item a i { font-size: .95rem; width: 18px; }
.sidebar-footer { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.user-pill { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .82rem; flex-shrink: 0;
}
.user-name { font-size: .82rem; color: #fff; font-weight: 500; }
.user-role { font-size: .7rem; color: var(--sidebar-text); }

/* ── TOPBAR ───────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0;
  left: var(--sidebar-w); right: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px;
  z-index: 999;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-title {
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 1.05rem;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  border: none; background: none; cursor: pointer;
  padding: 8px; border-radius: 8px;
  color: var(--muted); font-size: 1.1rem;
  transition: background .2s;
  position: relative;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar-btn:hover { background: var(--bg); color: var(--text); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger); border-radius: 50%; border: 2px solid #fff;
}
.hamburger { display: none; }

/* ── MAIN ─────────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 26px;
  min-height: calc(100vh - var(--topbar-h));
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary-custom {
  background: var(--primary); color: #fff;
  border: none; border-radius: 10px;
  padding: 9px 18px; font-size: .84rem; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
}
.btn-primary-custom:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,86,219,.3);
  color: #fff;
}
.btn-secondary-custom {
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--border);
  border-radius: 10px; padding: 8px 16px;
  font-size: .84rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; text-decoration: none;
  font-family: 'DM Sans', sans-serif;
}
.btn-secondary-custom:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger-custom {
  background: #fee2e2; color: var(--danger);
  border: none; border-radius: 8px;
  padding: 6px 14px; font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .2s;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'DM Sans', sans-serif; text-decoration: none;
}
.btn-danger-custom:hover { background: var(--danger); color: #fff; }
.btn-view {
  background: #f1f5f9; border: none; border-radius: 8px;
  padding: 6px 14px; font-size: .78rem; color: var(--primary);
  font-weight: 600; cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-view:hover { background: var(--primary); color: #fff; }
.btn-cancel {
  background: #f1f5f9; color: var(--muted);
  border: none; border-radius: 10px; padding: 10px 22px;
  font-size: .86rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; text-decoration: none;
  font-family: 'DM Sans', sans-serif;
}
.btn-cancel:hover { background: #e2e8f0; color: var(--text); }

/* ── CARDS ────────────────────────────────────────────────── */
.card-panel {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  animation: fadeUp .4s ease both;
}
.card-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.card-panel-title {
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem; font-weight: 700;
}

/* Summary cards */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--card); border-radius: 16px;
  padding: 20px; border: 1px solid var(--border);
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  animation: fadeUp .4s ease both;
}
.summary-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.09); }
.card-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; margin-bottom: 12px;
}
.card-icon.blue  { background: #dbeafe; color: var(--primary); }
.card-icon.amber { background: #fef3c7; color: #d97706; }
.card-icon.green { background: #d1fae5; color: #059669; }
.card-icon.red   { background: #fee2e2; color: #dc2626; }
.card-label {
  font-size: .72rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  font-weight: 500; margin-bottom: 4px;
}
.card-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.55rem; font-weight: 700; color: var(--text);
}
.card-sub { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.card-decor {
  position: absolute; right: -20px; bottom: -20px;
  width: 80px; height: 80px;
  border-radius: 50%; opacity: .06;
}
.card-decor.blue  { background: var(--primary); }
.card-decor.amber { background: var(--accent); }
.card-decor.green { background: var(--success); }
.card-decor.red   { background: var(--danger); }

/* ── TABLE ────────────────────────────────────────────────── */
.table { margin: 0; }
.table thead th {
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
  font-size: .72rem; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted);
  font-weight: 600; padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
}
.table tbody td {
  padding: 12px 16px; vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
  font-size: .86rem;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #f8fafc; }

/* ── BADGES ───────────────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: .72rem; font-weight: 600;
}
.status-badge.active    { background: #d1fae5; color: #065f46; }
.status-badge.completed { background: #dbeafe; color: #1e40af; }
.status-badge.pending   { background: #fef3c7; color: #92400e; }
.status-badge.onhold    { background: #f3e8ff; color: #6b21a8; }

.category-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.cat-1  { background: #fef3c7; color: #92400e; } /* Material */
.cat-2  { background: #d1fae5; color: #065f46; } /* Labour */
.cat-3  { background: #dbeafe; color: #1e40af; } /* Structural */
.cat-4  { background: #f3e8ff; color: #6b21a8; } /* Equipment */
.cat-5  { background: #f1f5f9; color: #475569; } /* Other */

.mode-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.mode-cash  { background: #fef3c7; color: #92400e; }
.mode-upi   { background: #eff6ff; color: #1e40af; }
.mode-bank  { background: #d1fae5; color: #065f46; }
.mode-cheque{ background: #f3e8ff; color: #6b21a8; }

/* ── FORMS ────────────────────────────────────────────────── */
.form-card { background: #fff; border-radius: 20px; border: 1px solid var(--border); overflow: hidden; animation: fadeUp .4s ease both; }
.form-header { padding: 24px 28px; }
.form-header h4 { color: #fff; font-weight: 800; font-size: 1.15rem; }
.form-header p  { color: rgba(255,255,255,.75); font-size: .82rem; margin-top: 4px; }
.form-header.blue    { background: linear-gradient(135deg,#1143b0,#1a56db); }
.form-header.amber   { background: linear-gradient(135deg,#b45309,#d97706); }
.form-header.green   { background: linear-gradient(135deg,#047857,#059669); }
.form-header.sidebar { background: var(--sidebar); }
.form-body { padding: 26px; }
.form-section-title {
  font-family: 'DM Sans', sans-serif; font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin: 18px 0 12px;
  display: flex; align-items: center; gap: 8px;
}
.form-section-title.blue  { color: var(--primary); }
.form-section-title.amber { color: #d97706; }
.form-section-title.green { color: #059669; }
.form-section-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
label { font-size: .82rem; font-weight: 500; color: var(--text); margin-bottom: 5px; display: block; }
.form-control, .form-select {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 9px 13px; font-size: .88rem;
  font-family: 'DM Sans', sans-serif;
  transition: border .2s; outline: none; width: 100%;
  background: #fff; color: var(--text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 36px; }
.input-icon-wrap > i {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); color: var(--muted); font-size: .9rem;
}
textarea.form-control { resize: vertical; }
.form-text { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* ── UPLOAD ZONE ──────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 22px; text-align: center; cursor: pointer;
  transition: border .2s;
}
.upload-zone:hover { border-color: var(--primary); background: #eff6ff; }
.upload-zone i { font-size: 2rem; color: var(--muted); display: block; margin-bottom: 6px; }
.upload-zone p { font-size: .8rem; color: var(--muted); margin: 0; }

/* ── PROGRESS ─────────────────────────────────────────────── */
.progress-thin { height: 5px; border-radius: 10px; background: #e2e8f0; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; background: var(--primary); }
.progress-fill.warn { background: var(--accent); }
.progress-fill.done { background: var(--success); }

/* ── FLASH ────────────────────────────────────────────────── */
.flash-alert {
  border-radius: 12px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem; margin-bottom: 18px;
  animation: fadeUp .3s ease;
}
.alert-success-custom { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error-custom   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ── LOGIN PAGE ───────────────────────────────────────────── */
.login-page {
  min-height: 100vh; background: var(--sidebar);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-card {
  background: #fff; border-radius: 24px;
  width: 100%; max-width: 420px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  animation: fadeUp .5s ease;
}
.login-header {
  background: linear-gradient(135deg, #0f1e3d, #1a56db);
  padding: 36px 32px; text-align: center;
}
.login-logo { width: 56px; height: 56px; background: rgba(255,255,255,.15); border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; color: #fff; margin-bottom: 14px; }
.login-title { font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: 1.5rem; color: #fff; }
.login-sub   { font-size: .8rem; color: rgba(255,255,255,.65); margin-top: 4px; }
.login-body  { padding: 32px; }
.login-error { background: #fee2e2; color: #991b1b; border-radius: 10px; padding: 10px 14px; font-size: .83rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ── MINI SUMMARY (project detail) ────────────────────────── */
.mini-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.mini-card  { background: #fff; border-radius: 14px; padding: 16px 18px; border: 1px solid var(--border); }
.mini-card-label { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; }
.mini-card-value { font-family: 'DM Sans', sans-serif; font-size: 1.2rem; font-weight: 700; }

/* ── TABS ─────────────────────────────────────────────────── */
.tab-bar {
  display: flex; background: #fff;
  border-radius: 14px 14px 0 0; border: 1px solid var(--border);
  border-bottom: none; overflow-x: auto;
}
.tab-btn {
  border: none; background: none;
  padding: 13px 20px; font-size: .86rem; font-weight: 600;
  cursor: pointer; color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: all .2s; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Sans', sans-serif;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover  { color: var(--text); }
.tab-panel { background: #fff; border-radius: 0 0 14px 14px; border: 1px solid var(--border); border-top: none; }
.tab-panel-inner { padding: 20px; display: none; }
.tab-panel-inner.active { display: block; }

/* ── PHOTOS GRID ─────────────────────────────────────────── */
.photos-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.photo-item  { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); cursor: pointer; transition: transform .2s; }
.photo-item:hover { transform: scale(1.02); }
.photo-thumb { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.photo-placeholder { aspect-ratio: 4/3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); }
.photo-caption { padding: 8px 12px; font-size: .76rem; font-weight: 500; background: #fff; }

/* ── TOTAL BOX ────────────────────────────────────────────── */
.total-box {
  background: #fef3c7; border: 1.5px solid #fbbf24;
  border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.total-box .t-label { font-size: .82rem; color: #92400e; font-weight: 600; }
.total-box .t-amount { font-family: 'DM Sans',sans-serif; font-size: 1.5rem; font-weight: 800; color: #92400e; }

/* ── SEARCH BAR ─────────────────────────────────────────── */
.search-bar { position: relative; flex: 1; max-width: 340px; }
.search-bar input {
  width: 100%; padding: 9px 14px 9px 38px;
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .86rem; outline: none; transition: border .2s; background: #fff;
  font-family: 'DM Sans', sans-serif;
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ── FILTER BUTTONS ─────────────────────────────────────── */
.filter-bar { display: flex; gap: 7px; flex-wrap: wrap; }
.filter-btn {
  border: 1.5px solid var(--border); background: #fff;
  border-radius: 20px; padding: 5px 13px;
  font-size: .77rem; cursor: pointer; transition: all .2s;
  color: var(--muted); font-family: 'DM Sans', sans-serif;
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--primary); color: var(--primary); background: #eff6ff;
}

/* ── QUICK ACTION ────────────────────────────────────────── */
.quick-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; padding: 16px 10px;
  background: #f8fafc; border: 1.5px solid var(--border);
  border-radius: 14px; text-decoration: none; color: var(--text);
  font-size: .78rem; font-weight: 500; transition: all .2s; text-align: center;
}
.quick-action-btn:hover { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.quick-action-btn i { font-size: 1.35rem; }

/* ── ADMIN PROFILE CARD ──────────────────────────────────── */
.profile-card { background: var(--sidebar); border-radius: 20px; padding: 32px; text-align: center; color: #fff; }
.profile-avatar-lg {
  width: 80px; height: 80px; background: var(--primary);
  border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DM Sans',sans-serif; font-size: 1.8rem; font-weight: 800; color: #fff;
}
.role-pill { display: inline-block; background: rgba(26,86,219,.3); color: #93c5fd; padding: 4px 14px; border-radius: 20px; font-size: .75rem; font-weight: 600; margin-top: 6px; }

/* ── SIDEBAR OVERLAY ─────────────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 999;
}
.sidebar-overlay.show { display: block; }

/* ── ANIMATION ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-delay-1 { animation-delay: .05s; }
.anim-delay-2 { animation-delay: .10s; }
.anim-delay-3 { animation-delay: .15s; }
.anim-delay-4 { animation-delay: .20s; }
.anim-delay-5 { animation-delay: .25s; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1199px) {
  .summary-grid  { grid-template-columns: repeat(2,1fr); }
  .mini-cards    { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 991px) {
  .sidebar       { transform: translateX(-100%); }
  .sidebar.open  { transform: translateX(0); }
  .topbar        { left: 0; }
  .main-content  { margin-left: 0; }
  .hamburger     { display: block; }
  .photos-grid   { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 767px) {
  .summary-grid  { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mini-cards    { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 575px) {
  .main-content  { padding: 14px; }
  .form-body     { padding: 18px; }
  .card-value    { font-size: 1.2rem; }
  .photos-grid   { grid-template-columns: 1fr 1fr; }
}

/* ── CLICKABLE TABLE ROWS ───────────────────────────────── */
.tr-link { cursor: pointer; }
.tr-link:hover td { background: #eff6ff !important; }

/* ── MILESTONE BADGES ────────────────────────────────────── */
.milestone-badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: .72rem; font-weight: 600; }
.milestone-pending  { background: #fef3c7; color: #92400e; }
.milestone-paid     { background: #d1fae5; color: #065f46; }
.milestone-partial  { background: #dbeafe; color: #1e40af; }
.milestone-overdue  { background: #fee2e2; color: #991b1b; }

/* ── PRINT / INVOICE ─────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .tab-bar, .filter-bar,
  .btn-primary-custom, .btn-secondary-custom, .btn-danger-custom,
  .btn-cancel, .btn-view, .no-print, .flash-alert,
  .sidebar-overlay { display: none !important; }

  body { background: #fff !important; font-size: 12px; color: #000; }
  .main-content { margin-left: 0 !important; padding-top: 0 !important; padding: 0 !important; }
  .card-panel { box-shadow: none !important; border: 1px solid #ccc !important; border-radius: 4px !important; }
  table { page-break-inside: auto; width: 100% !important; }
  tr    { page-break-inside: avoid; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }

  .invoice-wrap { padding: 0 !important; }
  .invoice-actions { display: none !important; }
}

/* ── INVOICE PAGE (screen) ───────────────────────────────── */
.invoice-wrap { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 16px; border: 1px solid var(--border); overflow: hidden; }
.invoice-header-bar { background: linear-gradient(135deg, #0f1e3d, #1a56db); color: #fff; padding: 28px 32px; }
.invoice-section { padding: 20px 32px; border-bottom: 1px solid var(--border); }
.invoice-section:last-child { border-bottom: none; }
.invoice-section-title { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); margin-bottom: 12px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.invoice-table th { background: #f8fafc; padding: 8px 12px; text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); border-bottom: 2px solid var(--border); }
.invoice-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.invoice-table tbody tr:last-child td { border-bottom: none; }
.invoice-table tfoot td { font-weight: 700; background: #f8fafc; padding: 10px 12px; }

/* ── WORKER / LABOUR MODULE ──────────────────────────────── */
.txn-badge { padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:600; display:inline-block; }
.txn-salary        { background:#d1fae5; color:#065f46; }
.txn-advance       { background:#fef3c7; color:#92400e; }
.txn-extra_advance { background:#fee2e2; color:#991b1b; }
.txn-adjustment    { background:#dbeafe; color:#1e40af; }
.worker-badge-active   { background:#d1fae5; color:#065f46; padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:600; display:inline-block; }
.worker-badge-inactive { background:#f1f5f9; color:#64748b; padding:3px 10px; border-radius:20px; font-size:.72rem; font-weight:600; display:inline-block; }
.worker-summary-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-bottom:20px; }
@media(max-width:768px){ .worker-summary-grid { grid-template-columns:repeat(2,1fr); } }
@media(max-width:480px){ .worker-summary-grid { grid-template-columns:1fr; } }
.worker-stat-card { background:#fff; border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
.worker-stat-label { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.8px; margin-bottom:4px; }
.worker-stat-value { font-family:'DM Sans',sans-serif; font-size:1.15rem; font-weight:700; }

/* ── PAGINATION (Bootstrap override to match app theme) ─────── */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border);
  border-radius: 8px !important;
  margin: 0 2px;
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 12px;
  transition: all .15s;
}
.pagination .page-link:hover {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
}
.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.pagination .page-item.disabled .page-link {
  color: #adb5bd;
  border-color: var(--border);
}
