/* ═══════════════════════════════════════════════════════════════════════════
   Infotech Media — Performa Invoice Generator
   Main Stylesheet
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --sidebar-width:    260px;
  --topbar-height:    64px;
  --footer-height:    44px;
  --primary:          #2563eb;
  --primary-dark:     #1e3a5f;
  --primary-light:    #eff6ff;
  --purple:           #7c3aed;
  --purple-light:     #f5f3ff;
  --success:          #16a34a;
  --success-light:    #f0fdf4;
  --warning:          #d97706;
  --warning-light:    #fffbeb;
  --danger:           #dc2626;
  --danger-light:     #fff1f2;
  --info:             #0891b2;
  --info-light:       #ecfeff;
  --sidebar-bg:       #0f172a;
  --sidebar-border:   #1e293b;
  --sidebar-hover:    #1e293b;
  --sidebar-active:   #2563eb;
  --body-bg:          #f1f5f9;
  --card-bg:          #ffffff;
  --border-color:     #e2e8f0;
  --text-primary:     #1e293b;
  --text-muted:       #64748b;
  --text-light:       #94a3b8;
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-xl:        20px;
  --shadow-sm:        0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:        0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --transition:       0.2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--body-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  font-size: 0.9rem;
  -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ───────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  color: #fff;
  z-index: 1040;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-width))); }

/* Sidebar Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.brand-icon {
  width: auto; height: 48px; min-width: 48px;
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
  box-shadow: none;
  padding: 0;
}
.brand-icon img {
  width: auto;
  height: 100%;
  max-height: 48px;
  object-fit: contain;
  display: block;
  border-radius: 0;
}
.brand-name { font-size: 0.875rem; font-weight: 700; line-height: 1.2; display: block; }
.brand-sub  { font-size: 0.68rem; color: var(--text-light); display: block; }

/* Sidebar Nav */
.sidebar-nav { list-style: none; padding: 12px 10px; margin: 0; }
.sidebar-nav .nav-label {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: #475569;
  padding: 8px 12px 6px;
  display: block;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  color: #94a3b8; text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  position: relative;
}
.sidebar-link span { flex: 1; }
.sidebar-link:hover  { background: var(--sidebar-hover); color: #e2e8f0; }
.sidebar-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}
.sidebar-link i { font-size: 1rem; flex-shrink: 0; width: 18px; text-align: center; }

/* Sidebar User */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--sidebar-border);
  flex-shrink: 0;
}
.user-avatar {
  width: 34px; height: 34px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37,99,235,0.3);
}
.user-name  { font-size: 0.8rem; font-weight: 600; color: #f1f5f9; display: block; line-height: 1.2; }
.user-role  { font-size: 0.68rem; color: var(--text-light); display: block; }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1039;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

/* ── Main Content ──────────────────────────────────────────────────────────── */
#main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: margin-left var(--transition);
}
#main-content.expanded { margin-left: 0; }

/* ── Topbar ────────────────────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 20px 0 24px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
  gap: 8px;
  flex-shrink: 0;
}
.topbar-title-wrap { flex: 1; min-width: 0; }
.topbar-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-clock { font-size: 0.78rem; font-variant-numeric: tabular-nums; }

/* Topbar profile button */
.topbar-profile-btn {
  border: none; background: transparent;
  border-radius: var(--radius-md);
  padding: 6px 10px;
  transition: background var(--transition);
}
.topbar-profile-btn:hover { background: var(--body-bg); }
.topbar-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

/* Profile dropdown */
.profile-dropdown {
  min-width: 240px;
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  overflow: hidden;
}
.profile-dropdown .dropdown-header { background: var(--body-bg); }
.profile-avatar-lg {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.profile-dropdown .dropdown-item {
  font-size: 0.85rem;
  transition: background var(--transition);
}
.profile-dropdown .dropdown-item:hover { background: var(--body-bg); }

/* ── Page Content ──────────────────────────────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }

/* ── Page Footer ───────────────────────────────────────────────────────────── */
.page-footer {
  height: var(--footer-height);
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  display: flex; align-items: center;
  padding: 0 24px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Stats Cards ───────────────────────────────────────────────────────────── */
.stats-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
  display: block;
  height: 100%;
}
.stats-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.stats-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.stats-value {
  font-size: 1.65rem; font-weight: 800;
  color: var(--text-primary); line-height: 1;
  margin-top: 2px;
}
.stats-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted); margin-top: 4px;
}
.stats-sub { font-size: 0.72rem; color: var(--text-light); margin-top: 3px; }

/* Color variants */
.stats-card--primary .stats-icon { background: var(--primary-light); color: var(--primary); }
.stats-card--purple  .stats-icon { background: var(--purple-light);  color: var(--purple); }
.stats-card--success .stats-icon { background: var(--success-light); color: var(--success); }
.stats-card--warning .stats-icon { background: var(--warning-light); color: var(--warning); }
.stats-card--danger  .stats-icon { background: var(--danger-light);  color: var(--danger); }
.stats-card--info    .stats-icon { background: var(--info-light);    color: var(--info); }

/* Trend badge */
.trend-badge {
  font-size: 0.68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
  display: inline-flex; align-items: center; gap: 2px;
}
.trend-badge--up   { background: var(--success-light); color: var(--success); }
.trend-badge--down { background: var(--danger-light);  color: var(--danger); }

/* ── Quick Actions ─────────────────────────────────────────────────────────── */
.quick-action-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card-bg); border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid var(--border-color);
  text-decoration: none; color: var(--text-primary);
  font-weight: 600; font-size: 0.875rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.quick-action-card i:first-child { font-size: 1.3rem; }
.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: #fff;
}
.quick-action-card--primary:hover { background: var(--primary); border-color: var(--primary); }
.quick-action-card--success:hover { background: var(--success); border-color: var(--success); }
.quick-action-card--purple:hover  { background: var(--purple);  border-color: var(--purple); }

/* ── Dashboard Table ───────────────────────────────────────────────────────── */
.dashboard-table thead th {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.dashboard-table tbody tr { transition: background var(--transition); }
.dashboard-table tbody tr:hover { background: #f8fafc; }
.dashboard-table td { font-size: 0.85rem; vertical-align: middle; }

/* DataTables overrides */
.dt-toolbar { padding: 16px 16px 0; }
.dt-footer  { padding: 0 16px 16px; }
.dataTables_filter input {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  padding: 6px 12px !important;
  font-size: 0.85rem !important;
}
.dataTables_filter input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.12) !important;
  outline: none;
}
.dataTables_length select {
  border-radius: var(--radius-sm) !important;
  border: 1px solid var(--border-color) !important;
  padding: 5px 28px 5px 10px !important;
  font-size: 0.85rem !important;
}
.dataTables_info { font-size: 0.8rem; color: var(--text-muted); }
.page-item .page-link { border-radius: var(--radius-sm) !important; font-size: 0.82rem; }

/* ── Activity Feed ─────────────────────────────────────────────────────────── */
.activity-feed { margin: 0; }
.activity-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f8fafc;
  transition: background var(--transition);
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: #f8fafc; }
.activity-dot {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0; margin-top: 5px;
}
.activity-dot--primary   { background: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.activity-dot--success   { background: var(--success); box-shadow: 0 0 0 3px rgba(22,163,74,0.15); }
.activity-dot--secondary { background: #94a3b8; box-shadow: 0 0 0 3px rgba(148,163,184,0.15); }
.activity-body { flex: 1; min-width: 0; }
.activity-title { color: var(--text-primary); font-size: 0.82rem; }
.activity-title:hover { color: var(--primary); }
.activity-sub { margin-top: 1px; }
.activity-time { flex-shrink: 0; font-size: 0.7rem; line-height: 1.4; }

/* ── Auth Page ─────────────────────────────────────────────────────────────── */
body.auth-page {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.auth-wrapper { width: 100%; max-width: 420px; }
.auth-card {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.05);
}
.auth-header {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  padding: 32px; text-align: center;
}
.auth-logo {
  width: 100px; height: auto;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.auth-logo img {
  border-radius: 8px;
}
.auth-title    { color: #fff; font-size: 1.2rem; font-weight: 700; margin: 0; }
.auth-subtitle { color: rgba(255,255,255,0.75); font-size: 0.8rem; margin: 4px 0 0; }
.auth-body     { padding: 28px 32px; }
.auth-footer   {
  background: #f8fafc; padding: 14px 32px;
  text-align: center; font-size: 0.75rem;
  color: var(--text-light); border-top: 1px solid var(--border-color);
}
.auth-card .form-control:focus,
.auth-card .form-check-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(37,99,235,0.15);
}
.auth-card .input-group-text {
  background: #f8fafc; border-color: var(--border-color); color: var(--text-muted);
}
.auth-card .form-control { border-color: var(--border-color); }
.auth-card .btn-primary {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  border: none; letter-spacing: 0.3px;
  transition: opacity var(--transition), transform 0.1s;
}
.auth-card .btn-primary:hover:not(:disabled) { opacity: 0.92; transform: translateY(-1px); }
.auth-card .btn-primary:disabled { opacity: 0.75; cursor: not-allowed; }

/* ── Customer Module ───────────────────────────────────────────────────────── */

/* Avatar circles */
.customer-avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; font-size: 0.78rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.customer-avatar-lg {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.customer-profile-avatar {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff; font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

/* Modal icon wrap */
.modal-icon-wrap {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}

/* Form section labels */
.form-section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  padding: 6px 0 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  display: flex; align-items: center;
}

/* Required field label */
.required-label::after {
  content: ' *';
  color: var(--danger);
  font-weight: 700;
}

/* Customer table */
.customer-table thead th {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); white-space: nowrap;
}
.customer-table tbody tr { transition: background var(--transition); }
.customer-table tbody tr:hover { background: #f8fafc; }
.customer-table td { font-size: 0.85rem; vertical-align: middle; }

/* Profile detail list */
.profile-detail-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f8fafc;
  gap: 12px;
}
.profile-detail-list li:last-child { border-bottom: none; }
.pdl-label {
  font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; flex-shrink: 0;
}
.pdl-value {
  font-size: 0.82rem; color: var(--text-primary);
  text-align: right; word-break: break-word;
  max-width: 60%;
}
.pdl-value a { color: var(--primary); text-decoration: none; }
.pdl-value a:hover { text-decoration: underline; }

/* Offcanvas detail list */
.oc-list { margin: 0; }
.oc-detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f8fafc;
  gap: 12px;
}
.oc-label {
  font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
  white-space: nowrap; flex-shrink: 0;
}
.oc-value { font-size: 0.82rem; text-align: right; word-break: break-word; }

/* Empty state */
.empty-state-icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; margin: 0 auto;
}

/* DataTable processing overlay */
.dt-processing {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 16px; font-size: 0.85rem; color: var(--text-muted);
}

/* ── Customer Dropdown (invoice form autocomplete) ──────────────────────────── */
.customer-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); overflow: hidden; margin-top: 4px;
}
.customer-item {
  padding: 10px 16px; cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.1s; font-size: 0.85rem;
}
.customer-item:last-child { border-bottom: none; }
.customer-item:hover { background: var(--primary-light); }

/* ── Invoice Summary ───────────────────────────────────────────────────────── */
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: 0.875rem;
}
.summary-total { font-size: 1rem; font-weight: 700; color: var(--primary-dark); }

/* ── Utilities ─────────────────────────────────────────────────────────────── */
.x-small       { font-size: 0.7rem !important; }
.font-monospace { font-family: 'Courier New', monospace; }
.text-purple   { color: var(--purple) !important; }
.bg-purple     { background-color: var(--purple) !important; }

/* Bootstrap overrides */
.card          { border-radius: var(--radius-md) !important; }
.btn           { border-radius: var(--radius-sm) !important; }
.form-control,
.form-select   { border-radius: var(--radius-sm) !important; }
.badge         { border-radius: 6px !important; }
.table > :not(caption) > * > * { padding: 0.7rem 1rem; }
.card-header   { border-radius: var(--radius-md) var(--radius-md) 0 0 !important; }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-width)));
    z-index: 1050;
  }
  .sidebar.open { transform: translateX(0); }
  #main-content { margin-left: 0; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
}

@media (max-width: 767.98px) {
  .stats-value { font-size: 1.4rem; }
  .page-footer { padding: 0 16px; }
}

@media (max-width: 575.98px) {
  .auth-body { padding: 20px; }
  .stats-card { padding: 14px; }
  .stats-icon { width: 38px; height: 38px; font-size: 1rem; }
}

/* ── Invoice Module ────────────────────────────────────────────────────────── */

/* Customer details panel (form) */
.customer-details-panel {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}
.detail-field { display: flex; flex-direction: column; gap: 2px; }
.detail-label {
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.detail-value { font-size: 0.85rem; color: var(--text-primary); }

/* Sticky summary */
.invoice-summary-sticky {
  position: sticky;
  top: calc(var(--topbar-height) + 16px);
}

/* Summary rows */
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; font-size: 0.875rem;
}
.summary-total { font-size: 1.05rem; font-weight: 800; color: var(--primary-dark); }

/* Amount words box */
.amount-words-box {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px; margin-top: 8px;
  font-size: 0.78rem; line-height: 1.5;
}

/* Items table (form) */
.items-table thead th {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); white-space: nowrap;
  padding: 10px 8px;
}
.items-table td { padding: 6px 8px !important; vertical-align: middle; }
.items-table .form-control-sm,
.items-table .form-select-sm { font-size: 0.82rem; }
.items-table .item-total { font-size: 0.82rem; white-space: nowrap; }

/* Invoice list table (index) */
.invoice-table thead th {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-muted); white-space: nowrap;
}
.invoice-table tbody tr { transition: background var(--transition); }
.invoice-table tbody tr:hover { background: #f8fafc; }
.invoice-table td { font-size: 0.85rem; vertical-align: middle; }

/* ── Invoice Preview (view page) ───────────────────────────────────────────── */

.invoice-header-band {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  padding: 28px 32px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.invoice-logo { max-height: 56px; max-width: 160px; object-fit: contain; display: block; }
.invoice-title-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff; font-size: 0.7rem; font-weight: 800;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 6px;
  backdrop-filter: blur(4px);
}

.bill-to-box {
  background: #f8fafc; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 16px; height: 100%;
}
.bill-to-label {
  font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 2px; color: var(--primary); margin-bottom: 8px;
}

.invoice-meta-box {
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: var(--radius-md); padding: 16px; height: 100%;
}

.invoice-items-table thead tr { background: #1e3a5f; color: #fff; }
.invoice-items-table thead th { font-size: 0.78rem; font-weight: 600; padding: 10px 12px; border: none; }
.invoice-items-table tbody td { padding: 10px 12px; border-color: #e2e8f0; }
.invoice-items-table tbody tr:nth-child(even) { background: #f8fafc; }

.invoice-totals-table td { padding: 5px 8px !important; font-size: 0.85rem; }
.invoice-grand-total-row td {
  border-top: 2px solid var(--border-color) !important;
  padding-top: 10px !important;
}

.amount-words-display {
  background: var(--primary-light); border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm); padding: 8px 12px;
  margin-top: 8px; font-size: 0.78rem; line-height: 1.5;
}

.bank-details-box {
  background: #f8fafc; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: 14px 16px;
}
.bank-details-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 10px;
}

.terms-box { border-top: 1px solid var(--border-color); padding-top: 14px; margin-top: 14px; }
.terms-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px;
}

.invoice-footer-note {
  text-align: center; font-size: 0.72rem; color: var(--text-light);
  margin-top: 24px; padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

/* ── Responsive additions ───────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
  .invoice-summary-sticky { position: static; }
  .invoice-header-band { padding: 20px; }
}
@media (max-width: 767.98px) {
  .items-table { min-width: 700px; }
}
