/* ==========================================================================
   MENORA TECHNOLOGIES LTD - DESIGN SYSTEM & STYLESHEET
   Brand Palette: Deep Pine (#072618, #0a3522), Vibrant Mint (#00d084), Warm Gold (#f5b700)
   Font: Plus Jakarta Sans
   ========================================================================== */

:root {
  /* Brand Colors */
  --brand-dark-deep: #061c12;
  --brand-dark: #092c1d;
  --brand-dark-surface: #0e3d29;
  --brand-dark-card: #134e35;
  --brand-accent: #00d084;
  --brand-accent-hover: #02ba76;
  --brand-accent-subtle: rgba(0, 208, 132, 0.12);
  --brand-accent-glow: rgba(0, 208, 132, 0.25);
  --brand-gold: #f5b700;
  --brand-gold-subtle: rgba(245, 183, 0, 0.14);
  --brand-gold-text: #b48400;

  /* Neutral Surface & Background Colors */
  --bg-body: #f6f8fa;
  --bg-sidebar: #f6f8fa;
  --bg-topbar: #f6f8fa;
  --bg-content: #ffffff;
  --bg-card: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-input: #ffffff;
  --bg-input-focus: #ffffff;
  --bg-hover: #edeef2;
  --border-light: #e6ebf1;
  --border-subtle: #edf2f7;
  --border-focus: #00d084;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #8e9bb0;
  --text-inverse: #ffffff;

  /* Status Colors */
  --status-paid-bg: #e6f9f0;
  --status-paid-text: #057a4a;
  --status-partial-bg: #fff8e6;
  --status-partial-text: #b48400;
  --status-pending-bg: #f1f5f9;
  --status-pending-text: #475569;
  --status-overdue-bg: #fef2f2;
  --status-overdue-text: #dc2626;

  /* Elevation & Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 16px -2px rgba(15, 23, 42, 0.07), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 14px 28px -4px rgba(15, 23, 42, 0.09), 0 6px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-float: 0 20px 38px -6px rgba(7, 38, 24, 0.18), 0 8px 16px -4px rgba(0, 0, 0, 0.06);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-spring: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-fast: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

/* Universal Thin Scrollbars (Contained within their elements) */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

html,
body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* App Shell Layout (Fixed 100vh Container) */
.app-container {
  display: flex;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-body);
  transition: opacity 0.15s ease;
}

/* Guard against dashboard flicker during auth checks */
body.auth-locked .app-container {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}


/* ==========================================================================
   SIDEBAR NAVIGATION (Sleek, Minimalist, Paystack-style Grey)
   ========================================================================== */
.sidebar {
  width: 225px;
  min-width: 225px;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-sidebar);
  border-right: none;
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px 6px 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo-img {
  max-width: 125px;
  height: auto;
  display: block;
  object-fit: contain;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.nav-category-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 14px 8px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
  transition: background-color 140ms ease, color 140ms ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

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

.nav-item.active {
  background-color: transparent;
  color: #059669;
  font-weight: 600;
  border: 1px solid transparent;
  box-shadow: none;
}

.nav-item.active:hover {
  background-color: rgba(5, 150, 105, 0.06);
  color: #059669;
}

.nav-item.active .nav-icon {
  color: #059669;
  stroke-width: 2.1;
}

.nav-icon {
  width: 16px;
  height: 16px;
  stroke-width: 1.8;
  color: var(--text-muted);
}

.nav-item.active .nav-badge {
  background: rgba(5, 150, 105, 0.12);
  color: #059669;
}

.nav-badge {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* Sidebar Minimal CTA Card */
.sidebar-cta-card {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.sidebar-cta-card h4 {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sidebar-cta-card p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.35;
}

.btn-sidebar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 5px 8px;
  border-radius: 4px;
  background: #ffffff;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  transition: all 140ms ease;
}

.btn-sidebar-cta:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #092c1d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  border: 1px solid var(--border-light);
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  color: var(--text-primary);
}

.user-role {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background-color: var(--bg-body);
  min-width: 0;
}

/* Top Header Bar (Paystack-style compact Grey) */
.top-header {
  position: relative;
  background: var(--bg-topbar);
  border-bottom: none;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 15;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Navigation Trigger & Brand (Hidden on Desktop) */
.mobile-menu-btn {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 120ms ease;
  flex-shrink: 0;
  padding: 0;
  box-shadow: none;
}

.mobile-menu-btn:hover {
  background: transparent;
  color: var(--brand-accent);
}

.mobile-menu-btn:active {
  transform: scale(0.92);
  opacity: 0.7;
}

.mobile-brand-link {
  display: none;
  align-items: center;
}

.mobile-brand-logo {
  height: 22px;
  max-width: 105px;
  object-fit: contain;
  display: block;
}

.mobile-sidebar-close-btn {
  display: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
  transition: all 120ms ease;
}

.mobile-sidebar-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.sidebar-backdrop {
  display: none;
}

.header-search {
  position: relative;
  width: 260px;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 5px 10px 5px 30px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-input);
  font-size: 12px;
  color: var(--text-primary);
  transition: all 140ms ease;
  height: 30px;
}

.search-input:focus {
  background: #ffffff;
  border-color: var(--brand-accent);
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Paystack Live Mode Switch */
.paystack-live-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  user-select: none;
}

.paystack-switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}

.paystack-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.paystack-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 150ms;
  border-radius: 18px;
}

.paystack-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 150ms;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.paystack-switch input:checked+.paystack-slider {
  background-color: #0084f4;
}

.paystack-switch input:checked+.paystack-slider:before {
  transform: translateX(14px);
}

.header-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: #ffffff;
  position: relative;
  transition: background-color 140ms ease;
}

.header-icon-btn.btn-sync-cloud {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.header-icon-btn.btn-sync-cloud:hover {
  background: var(--bg-hover);
  border-color: transparent;
}

.header-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header-icon-btn:active {
  transform: scale(0.96);
}

.header-icon-btn .badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  background: var(--brand-accent);
  border-radius: 50%;
}

/* Buttons (Paystack compact minimalistic sizing) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all 140ms ease;
  line-height: 1.2;
  box-shadow: none !important;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-accent);
  color: #061c12;
}

.btn-primary:hover {
  background: var(--brand-accent-hover);
}

.btn-dark {
  background: var(--brand-dark);
  color: #ffffff;
}

.btn-dark:hover {
  background: var(--brand-dark-deep);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: #cbd5e1;
}

.btn-outline-gold {
  border: 1px solid var(--brand-gold);
  color: var(--brand-gold-text);
  background: var(--brand-gold-subtle);
}

.btn-sm {
  padding: 4px 9px;
  font-size: 11.5px;
  border-radius: 5px;
}

.btn-lg {
  padding: 9px 18px;
  font-size: 13px;
  border-radius: 6px;
}

/* Top Area Header Action Buttons (Global UI Consistency across Dashboard, Create Invoice & Receipts) */
.page-title-row .btn,
.invoice-fields-header .btn,
#btn-open-write-receipt {
  height: 34px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  gap: 7px;
}

.page-title-row .btn i,
.invoice-fields-header .btn i {
  width: 14px;
  height: 14px;
}

/* Page View Containers (Fixed 100vh Shell: Header Fixed at Top, Body Scrolls Below) */
.page-view {
  display: none;
  flex: 1;
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background-color: var(--bg-content);
  border-top-left-radius: 14px;
  border: none;
  box-sizing: border-box;
}

.page-view.active {
  display: flex;
  flex-direction: column;
}

/* Page Header (Stationary at top, completely above the scroll container) */
.page-title-row {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 14px;
  background: var(--bg-content);
  border-top-left-radius: 14px;
  border-bottom: 1px solid var(--border-light);
  z-index: 10;
  position: relative;
  box-sizing: border-box;
}

/* Page Body Scroll Area (Only content below the title row scrolls) */
.page-body-scroll {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 28px 50px;
  box-sizing: border-box;
}

/* Smooth Minimalist Scrollbar */
.page-body-scroll::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.page-body-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.page-body-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.page-body-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.page-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ==========================================================================
   DASHBOARD VIEW (Paystack-style Sleek Metric Cards)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

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

.stat-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-subtext {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-subtext .trend-up {
  color: #059669;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* Dashboard 2-column Layout */
.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  overflow: hidden;
}

.card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 18px;
}

/* Cashflow Chart (SVG area graph) */
.chart-container {
  position: relative;
  width: 100%;
  height: 230px;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.emerald {
  background: #10b981;
}

.legend-dot.gold,
.legend-dot.amber {
  background: #f59e0b;
}

/* Grouped Bar Chart Interactive Styles */
.chart-bar-rect {
  transition: transform 180ms ease, opacity 140ms ease, filter 140ms ease;
  cursor: pointer;
  transform-origin: bottom;
}

.chart-bar-rect:hover {
  filter: brightness(1.14);
  opacity: 0.95;
}

/* Recent Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.activity-badge {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
}

.activity-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.activity-time {
  font-size: 11.5px;
  color: var(--text-muted);
}

.activity-amount {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

.activity-status {
  font-size: 11px;
}

/* Paystack Style Filter & Action Bar */
.paystack-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 18px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.paystack-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.paystack-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  height: 28px;
  font-size: 11.5px;
  font-weight: 500;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 120ms ease;
}

.paystack-filter-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.paystack-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  height: 28px;
  font-size: 11.5px;
  font-weight: 500;
  color: #1e293b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.paystack-active-filter-tag .tag-close {
  cursor: pointer;
  color: #64748b;
  font-size: 13px;
  line-height: 1;
  margin-left: 2px;
}

.paystack-active-filter-tag .tag-close:hover {
  color: #0f172a;
}

.paystack-clear-all {
  font-size: 11.5px;
  color: #0084f4;
  cursor: pointer;
  font-weight: 500;
  margin-left: 4px;
}

.paystack-clear-all:hover {
  text-decoration: underline;
}

.paystack-table-search {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.paystack-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: #94a3b8;
  pointer-events: none;
}

.paystack-search-input {
  height: 30px;
  width: 220px;
  padding: 4px 10px 4px 28px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11.5px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.paystack-search-input:focus {
  border-color: #0084f4;
}


/* Modern Data Table (Paystack-style clean and organized) */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

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

.data-table th {
  background: #fafbfc;
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid var(--border-light);
  text-transform: none;
  letter-spacing: normal;
}

.data-table td {
  padding: 10px 14px;
  font-size: 12.5px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background-color 120ms ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.data-table td.primary-text {
  font-weight: 600;
  color: var(--text-primary);
}

/* Status Badges (Paystack subtle pill tags) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.badge-paid {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-partial {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.badge-pending {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.badge-overdue {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   CREATE INVOICE VIEW (SEAMLESS SPLIT LAYOUT - GLOBAL UI CONSISTENCY)
   ========================================================================== */
.page-view.page-view-split {
  background-color: var(--bg-body);
  border-top-left-radius: 14px;
  border: none;
  padding: 0;
  margin: 0;
}

.create-invoice-split-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  padding: 0;
  margin: 0;
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  box-sizing: border-box;
}

/* CONTAINER 1 (LEFT): INVOICE FIELDS (SCROLLABLE WITH STICKY HEADER - ZERO LEFT MARGIN) */
.invoice-fields-container {
  background: #ffffff;
  border-right: 1px solid var(--border-light);
  border-top: none;
  border-left: none;
  border-bottom: none;
  border-radius: 14px 0 0 0;
  margin: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: none;
}

.invoice-fields-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-light);
  border-top-left-radius: 14px;
  box-sizing: border-box;
  z-index: 5;
}

.invoice-fields-header .page-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
  margin: 0;
}

.invoice-fields-scroll-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 22px 28px 50px;
  box-sizing: border-box;
}

.invoice-fields-scroll-content::-webkit-scrollbar {
  width: 4px;
}

.invoice-fields-scroll-content::-webkit-scrollbar-track {
  background: transparent;
}

.invoice-fields-scroll-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.invoice-fields-scroll-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.form-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  font-size: 12px;
  color: var(--text-primary);
  height: 33px;
  transition: all 120ms ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background: #ffffff;
  border-color: var(--brand-accent);
  outline: none;
}

.form-textarea {
  height: auto;
  min-height: 64px;
  resize: vertical;
}

/* Milestone / Downpayment Banner Box */
.payment-type-selector {
  background: #fafbfc;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 16px;
}

.payment-type-radios {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.radio-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 5px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 120ms ease;
  font-size: 11.5px;
  font-weight: 500;
}

.radio-card:hover {
  border-color: #cbd5e1;
}

.radio-card.selected {
  border-color: #059669;
  background: rgba(0, 208, 132, 0.08);
  color: #065f46;
}

.downpayment-config-panel {
  display: none;
  background: #ffffff;
  border-radius: 5px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  animation: fadeIn 150ms ease;
}

.downpayment-config-panel.visible {
  display: block;
}

.downpayment-presets {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.preset-chip {
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 120ms ease;
}

.preset-chip:hover {
  background: #e2e8f0;
}

.preset-chip.active {
  background: var(--brand-gold);
  color: #072618;
  font-weight: 700;
  border-color: var(--brand-gold);
}

/* Line Items Table Builder */
.line-items-wrapper {
  margin-bottom: 16px;
}

.line-item-row {
  display: grid;
  grid-template-columns: 2.4fr 0.7fr 1.2fr 1fr 30px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  animation: fadeIn 150ms ease;
}

.line-item-row .form-input {
  height: 30px;
  padding: 4px 8px;
  font-size: 11.5px;
}

.line-item-row .btn-remove-item {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-muted);
  transition: all 120ms ease;
}

.line-item-row .btn-remove-item:hover {
  background: #fee2e2;
  color: #dc2626;
}

.line-item-amount {
  font-weight: 600;
  font-size: 12px;
  text-align: right;
  padding-right: 4px;
}

.btn-add-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(0, 208, 132, 0.1);
  transition: all 120ms ease;
  margin-top: 4px;
}

.btn-add-item:hover {
  background: rgba(0, 208, 132, 0.18);
}

/* Invoice Summary Totals Box */
.invoice-summary-box {
  background: #fafbfc;
  border-radius: 6px;
  padding: 12px 14px;
  margin-top: 14px;
  border: 1px solid var(--border-light);
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.summary-line.total-highlight {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: 8px;
}

.summary-line.downpayment-highlight {
  background: var(--brand-gold-subtle);
  border: 1px dashed var(--brand-gold);
  border-radius: 4px;
  padding: 6px 10px;
  margin-top: 8px;
  color: var(--brand-gold-text);
  font-weight: 700;
  font-size: 12px;
}

/* ==========================================================================
   RIGHT COLUMN: PURE A4 PREVIEW (NO CONTAINER BORDERS, BUTTONS BELOW)
   ========================================================================== */
.invoice-preview-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  box-shadow: none;
}

/* Scaled A4 Viewing Stage (Contained completely inside viewport) */
.a4-preview-stage {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: transparent;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}

.a4-preview-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 794px;
  height: 1123px;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(0.5);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  transition: transform 120ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  pointer-events: auto;
}

/* Action Buttons Below the Preview */
.preview-bottom-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 2px;
  box-sizing: border-box;
}

.preview-bottom-actions .btn {
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Mobile-only elements default hidden on desktop */
.mobile-invoice-view-tabs {
  display: none;
}
.mobile-preview-jump-card {
  display: none;
}
.mobile-only-btn {
  display: none !important;
}

@media (min-width: 901px) {
  .create-invoice-split-body {
    display: grid !important;
    grid-template-columns: 1.15fr 1fr !important;
    height: calc(100vh - 48px) !important;
    max-height: calc(100vh - 48px) !important;
    overflow: hidden !important;
  }
  .invoice-fields-container {
    display: flex !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    border-right: 1px solid var(--border-light) !important;
    border-bottom: none !important;
  }
  .invoice-fields-scroll-content {
    display: block !important;
    overflow-y: auto !important;
    flex: 1 !important;
  }
  .invoice-preview-panel {
    display: flex !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    padding: 0 !important;
    border-top: none !important;
  }
  .a4-preview-stage {
    flex: 1 !important;
    height: 100% !important;
    max-height: none !important;
  }
}

/* ==========================================================================
   MENORA OFFICIAL INVOICE TEMPLATE (Matches Official Invoice Exactly)
   ========================================================================== */
.paper-sheet {
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  padding: 44px 40px;
  position: relative;
  min-height: 780px;
  color: #000000;
  display: flex;
  flex-direction: column;
}

/* Standard A4 Paper Document inside preview */
.a4-preview-wrapper .paper-sheet {
  width: 794px !important;
  min-width: 794px !important;
  max-width: 794px !important;
  height: 1123px !important;
  min-height: 1123px !important;
  max-height: 1123px !important;
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 4px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  padding: 44px 40px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  color: #000000 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
}

/* A4 Export Mode: Formats cleanly for exact 210mm x 297mm PDF document */
.paper-sheet.a4-exporting {
  width: 794px !important;
  max-width: 794px !important;
  min-height: 1120px !important;
  padding: 48px 48px !important;
  margin: 0 auto !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}

.receipt-sheet.a4-exporting {
  width: 794px !important;
  max-width: 794px !important;
  min-height: 1120px !important;
  padding: 55px 50px !important;
  margin: 0 auto !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
}

.menora-inv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.menora-inv-logo {
  max-width: 175px;
  height: auto;
}

.menora-inv-wordmark {
  font-size: 40px;
  font-weight: 800;
  color: #128863;
  line-height: 1;
}

/* Meta section: Invoiced To & Number/Date */
.menora-inv-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.menora-invoiced-to-title {
  color: #128863;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.menora-invoiced-to-body {
  font-size: 14px;
  color: #000000;
  line-height: 1.45;
}

.menora-inv-right-meta {
  text-align: right;
}

.menora-inv-number-big {
  font-size: 21px;
  font-weight: 800;
  color: #000000;
  letter-spacing: -0.01em;
}

.menora-inv-date-text {
  font-size: 14px;
  font-weight: 500;
  color: #000000;
  margin-top: 4px;
}

/* Black Pill Bar Header */
.menora-table-header-pill {
  background: #000000;
  color: #ffffff;
  border-radius: 4px;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Table Items List */
.menora-table-items {
  width: 100%;
  border-collapse: collapse;
}

.menora-table-items td {
  padding: 14px 18px;
  font-size: 14px;
  color: #000000;
  vertical-align: middle;
}

.menora-table-items td:last-child {
  text-align: right;
  font-weight: 500;
}

.menora-table-items tr:last-child td {
  padding-bottom: 16px;
}

/* Black divider below items */
.menora-table-bottom-bar {
  height: 2.5px;
  background: #000000;
  width: 100%;
  margin-bottom: 8px;
}

/* Totals Area (Right-aligned) */
.menora-totals-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 28px;
}

.menora-totals-table {
  width: 320px;
}

.menora-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 14.5px;
  border-bottom: 1px solid #e2e8f0;
  color: #000000;
}

.menora-totals-row.grand-total {
  font-size: 16px;
  font-weight: 800;
  padding: 9px 0;
  border-bottom: 2.5px solid #000000;
}

.menora-totals-row.downpayment-row {
  color: #128863;
  font-weight: 700;
  background: rgba(18, 136, 99, 0.08);
  padding: 6px 8px;
  border-radius: 4px;
  margin-top: 4px;
  border-bottom: none;
}

.menora-totals-row.balance-row {
  color: #64748b;
  font-size: 13px;
  padding: 4px 8px;
  border-bottom: none;
}

/* Payment Instructions & Account Section */
.menora-payment-section {
  margin-top: 4px;
  margin-bottom: 32px;
}

.menora-payment-prompt {
  font-size: 13px;
  color: #000000;
  margin-bottom: 10px;
}

.menora-payment-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menora-account-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menora-account-number {
  font-size: 20px;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.02em;
}

.menora-bank-name {
  font-size: 15px;
  font-weight: 700;
  color: #000000;
}

.menora-account-name {
  font-size: 15px;
  font-weight: 700;
  color: #000000;
}

/* Pay Online CTA Card & Action Button */
.menora-pay-online-card {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.menora-pay-online-heading {
  font-size: 13px;
  color: #000000;
  font-weight: 700;
  line-height: 1.3;
}

.menora-pay-online-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #128863;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 28px;
  border-radius: 6px;
  text-decoration: none !important;
  border: none;
  box-shadow: none;
  transition: background-color 0.15s ease;
  cursor: pointer;
  letter-spacing: 0.02em;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.menora-pay-online-btn:hover {
  background: #0e6c4e;
  color: #ffffff !important;
}

.menora-pay-online-btn:active {
  background: #092c1d;
}

.menora-pay-online-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
}

.pay-channels-text {
  color: #64748b;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.pay-secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 1.5px 6px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Terms Footer */
.menora-terms-section {
  margin-top: auto;
  padding-top: 18px;
}

.menora-terms-title {
  color: #128863;
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.menora-terms-content {
  font-size: 11.5px;
  color: #333333;
  line-height: 1.45;
  max-width: 95%;
}

/* ==========================================================================
   RECEIPTS VIEW
   ========================================================================== */
.receipts-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.filter-pills {
  display: flex;
  gap: 8px;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 140ms ease;
}

.filter-pill.active {
  background: var(--brand-dark);
  color: #ffffff;
  border-color: var(--brand-dark);
}

/* Receipt Modal & Verification Stamp */
.paid-stamp {
  display: inline-block;
  padding: 4px 16px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.12em;
  color: #059669;
  border: 2px solid #059669;
  border-radius: var(--radius-xs);
  transform: rotate(-6deg);
  opacity: 0.88;
}

.paid-stamp.downpayment {
  color: var(--brand-gold-text);
  border-color: var(--brand-gold);
}

/* ==========================================================================
   MODALS (Paystack, Receipt, Settings)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 28, 18, 0.65);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 180ms ease;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalScaleUp 220ms var(--ease-spring);
}

.modal-dialog.modal-wide {
  max-width: 720px;
}

@keyframes modalScaleUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes bottomSheetSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0.8;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand-dark-deep);
}

/* Globally remove title icons from all modal headers */
.modal-header i[data-lucide]:not(.modal-close-btn i),
.modal-header svg:not(.modal-close-btn svg),
.modal-header .modal-title i,
.modal-header .modal-title svg {
  display: none !important;
}

.modal-dialog::before {
  display: none;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 140ms ease;
}

.modal-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Paystack Simulated / Interactive Box inside Modal */
.paystack-card-view {
  background: #f8fafc;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.paystack-logo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #001f3f;
  margin-bottom: 14px;
}

.paystack-qr-large {
  width: 180px;
  height: 180px;
  margin: 16px auto;
  background: #ffffff;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.paystack-qr-large img,
.paystack-qr-large canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--brand-dark-deep);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--brand-accent);
  font-size: 13.5px;
  font-weight: 500;
  animation: toastSlideIn 240ms var(--ease-spring);
}

.toast.toast-warning {
  border-left-color: var(--brand-gold);
}

.toast.toast-error {
  border-left-color: #ef4444;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================================
   PRINT STYLES (A4 INVOICE & RECEIPT DOWNLOAD)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .sidebar,
  .top-header,
  .page-title-row,
  .preview-panel-header,
  .preview-actions-bar,
  .preview-bottom-actions,
  .invoice-fields-container,
  .btn,
  .toast-container,
  .modal-backdrop:not(.print-active),
  #view-dashboard,
  #view-receipts,
  .invoice-editor-card {
    display: none !important;
  }

  .main-wrapper {
    height: auto !important;
    overflow: visible !important;
  }

  .page-view,
  .page-view.page-view-split {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: #ffffff !important;
    display: block !important;
  }

  .create-invoice-split-body {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .invoice-preview-panel {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: #ffffff !important;
  }

  .a4-preview-stage {
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
  }

  .a4-preview-wrapper {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
  }

  .paper-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }
}

/* Responsive Breakpoints */
@media (max-width: 1180px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {

  /* Prevent background scrolling when mobile sidebar is open */
  body.mobile-sidebar-active {
    overflow: hidden;
  }

  /* App Shell */
  .app-container {
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    position: relative;
  }

  .main-wrapper {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }

  /* Top Bar & Mobile Hamburger Trigger */
  .top-header {
    padding: 0 14px;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-menu-btn {
    display: flex;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .mobile-brand-link {
    display: flex;
  }

  .header-search {
    display: none;
  }

  /* Slide-Out Mobile Sidebar Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    min-width: 260px;
    max-width: 82vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 1000;
    border-right: 1px solid var(--border-light);
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.25);
    transform: translateX(-100%);
    transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 16px 12px;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .brand-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .mobile-sidebar-close-btn {
    display: flex;
  }

  /* Backdrop Overlay */
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  .sidebar-backdrop.active {
    opacity: 1;
    visibility: visible;
  }

  /* Page Views & Stationary Headers */
  .page-view {
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
    max-height: calc(100vh - 50px);
    border-radius: 0 !important;
  }

  .page-title-row {
    padding: 12px 14px;
    border-radius: 0 !important;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-title {
    font-size: 16.5px;
  }

  .page-title-row>div:last-child {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }

  .page-body-scroll {
    padding: 14px 14px 40px;
  }

  /* Dashboard Stats Grid */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 21px;
  }

  .dashboard-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* ========================================================================
     CREATE INVOICE VIEW - MOBILE OPTIMIZED (SEPARATED FORM & LIVE PREVIEW)
     ======================================================================== */
  .page-view.page-view-split {
    height: calc(100vh - 50px);
    height: calc(100dvh - 50px);
    max-height: calc(100vh - 50px);
    overflow: hidden;
  }

  .create-invoice-split-body {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    grid-template-columns: none !important;
  }

  .invoice-fields-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    border-right: none !important;
    border-radius: 0 !important;
    background: #ffffff;
  }

  .invoice-fields-header {
    padding: 10px 14px;
    border-radius: 0 !important;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--border-subtle);
    z-index: 10;
  }

  .invoice-fields-header .page-title {
    font-size: 16px;
  }

  .invoice-fields-header .btn {
    padding: 5px 10px;
    font-size: 11.5px;
    height: 32px;
  }

  /* Segmented Mobile Switcher Tabs */
  .mobile-invoice-view-tabs {
    display: flex !important;
    align-items: center;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
    margin: 6px 14px 8px;
    gap: 4px;
    flex-shrink: 0;
  }

  .mobile-tab-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 140ms ease;
    outline: none;
  }

  .mobile-tab-btn.active {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    font-weight: 700;
  }

  /* In Form Tab Mode (Default on Mobile: all fields scroll seamlessly, preview hidden) */
  .create-invoice-split-body:not([data-mobile-tab="preview"]) .invoice-fields-container,
  .create-invoice-split-body[data-mobile-tab="form"] .invoice-fields-container {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  .create-invoice-split-body:not([data-mobile-tab="preview"]) .invoice-fields-scroll-content,
  .create-invoice-split-body[data-mobile-tab="form"] .invoice-fields-scroll-content {
    display: block !important;
    flex: 1 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 40px !important;
  }

  .create-invoice-split-body:not([data-mobile-tab="preview"]) .invoice-preview-panel,
  .create-invoice-split-body[data-mobile-tab="form"] .invoice-preview-panel {
    display: none !important;
  }

  /* In Preview Tab Mode (Fields container collapses to header+tabs, preview panel fills space directly below) */
  .create-invoice-split-body[data-mobile-tab="preview"] .invoice-fields-container {
    flex: 0 0 auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }

  .create-invoice-split-body[data-mobile-tab="preview"] .invoice-fields-scroll-content {
    display: none !important;
  }

  .create-invoice-split-body[data-mobile-tab="preview"] .invoice-preview-panel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 10px 10px 30px !important;
    background: #f1f5f9;
  }

  .create-invoice-split-body[data-mobile-tab="preview"] .a4-preview-stage {
    width: 100% !important;
    height: 520px !important;
    min-height: 480px !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .mobile-preview-jump-card {
    display: block !important;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px 12px;
    margin-top: 24px;
    margin-bottom: 20px;
  }

  .mobile-only-btn {
    display: inline-flex !important;
  }

  .preview-bottom-actions {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0 10px !important;
  }

  /* Receipts Card Header & Filter Pills */
  .card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .filter-pills {
    overflow-x: auto;
    padding-bottom: 3px;
    width: 100%;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .filter-pill {
    flex-shrink: 0;
    white-space: nowrap;
  }

  /* ========================================================================
     MODALS AS NATIVE BOTTOM SHEETS ON MOBILE (< 768px)
     ======================================================================== */
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .modal-dialog,
  .modal-dialog.modal-wide {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: none !important;
    max-height: 88vh !important;
    max-height: 88dvh !important;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.35) !important;
    animation: bottomSheetSlideUp 260ms cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #ffffff !important;
  }

  /* Bottom sheet drag handle indicator */
  .modal-dialog::before {
    content: "" !important;
    display: block !important;
    width: 36px;
    height: 4.5px;
    background: #cbd5e1;
    border-radius: 999px;
    margin: 10px auto 4px;
    flex-shrink: 0;
  }

  .modal-header {
    padding: 8px 18px 12px !important;
    border-bottom: 1px solid var(--border-light) !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .modal-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--brand-dark-deep) !important;
  }

  .modal-body {
    padding: 16px 16px 20px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 !important;
  }

  .modal-footer {
    padding: 12px 16px 16px !important;
    padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--border-light) !important;
    flex-shrink: 0 !important;
    background: #ffffff !important;
    flex-direction: column-reverse !important;
    gap: 8px !important;
  }

  .modal-footer .btn {
    width: 100% !important;
    height: 38px !important;
    justify-content: center !important;
  }
}

/* ========================================================================
   TABLET RESPONSIVE TABLE OPTIMIZATION (641px - 900px)
   ======================================================================== */
@media (min-width: 641px) and (max-width: 900px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 660px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
    font-size: 12px;
  }

  .data-table th:first-child,
  .data-table td:first-child {
    position: sticky;
    left: 0;
    background: #ffffff;
    z-index: 2;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.03);
  }

  .data-table th:first-child {
    background: #fafbfc;
  }
}

/* ========================================================================
   MOBILE DATA TABLE OPTIMIZATION (< 640px)
   Transforms multi-column tables into native, touch-friendly transaction cards
   ======================================================================== */
@media (max-width: 640px) {
  .table-responsive {
    overflow-x: visible !important;
    padding: 10px 12px 14px !important;
    background: #f8fafc;
  }

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

  .data-table,
  .data-table tbody {
    display: block !important;
    width: 100% !important;
  }

  /* Invoices Table Mobile Cards (Dashboard & All Invoices) */
  #dashboard-invoices-tbody tr,
  #invoices-page-table-body tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "meta status"
      "client amount"
      "date actions" !important;
    gap: 8px 10px !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 10px !important;
    padding: 13px 14px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    transition: transform 120ms ease, box-shadow 120ms ease !important;
  }

  #dashboard-invoices-tbody tr:active,
  #invoices-page-table-body tr:active {
    transform: scale(0.99);
  }

  #dashboard-invoices-tbody tr:last-child,
  #invoices-page-table-body tr:last-child {
    margin-bottom: 0 !important;
  }

  #dashboard-invoices-tbody td,
  #invoices-page-table-body td {
    display: block !important;
    padding: 0 !important;
    border-bottom: none !important;
  }

  #dashboard-invoices-tbody td:nth-child(1),
  #invoices-page-table-body td:nth-child(1) {
    grid-area: meta !important;
    font-family: monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-dark-card);
  }

  #dashboard-invoices-tbody td:nth-child(2),
  #invoices-page-table-body td:nth-child(2) {
    grid-area: client !important;
  }

  #dashboard-invoices-tbody td:nth-child(3),
  #invoices-page-table-body td:nth-child(3) {
    grid-area: date !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
  }

  #dashboard-invoices-tbody td:nth-child(4),
  #invoices-page-table-body td:nth-child(4) {
    grid-area: amount !important;
    text-align: right !important;
  }

  #dashboard-invoices-tbody td:nth-child(5),
  #invoices-page-table-body td:nth-child(5) {
    grid-area: status !important;
    text-align: right !important;
    justify-self: end !important;
  }

  #dashboard-invoices-tbody td:nth-child(6),
  #invoices-page-table-body td:nth-child(6) {
    grid-area: actions !important;
    text-align: right !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 5px !important;
  }

  #dashboard-invoices-tbody td:nth-child(6) .btn,
  #invoices-page-table-body td:nth-child(6) .btn {
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
  }

  /* Receipts Table Mobile Cards */
  #receipts-table-body tr {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "rec-meta rec-badge"
      "rec-client rec-amount"
      "rec-inv rec-inv"
      "rec-date rec-actions" !important;
    gap: 7px 10px !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 10px !important;
    padding: 13px 14px !important;
    margin-bottom: 10px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  }

  #receipts-table-body tr:last-child {
    margin-bottom: 0 !important;
  }

  #receipts-table-body td {
    display: block !important;
    padding: 0 !important;
    border-bottom: none !important;
  }

  #receipts-table-body td:nth-child(1) {
    grid-area: rec-meta !important;
    font-family: monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand-dark-card);
  }

  #receipts-table-body td:nth-child(2) {
    grid-area: rec-client !important;
  }

  #receipts-table-body td:nth-child(3) {
    grid-area: rec-inv !important;
    font-size: 11.5px !important;
  }

  #receipts-table-body td:nth-child(4) {
    grid-area: rec-date !important;
    font-size: 11.5px !important;
    color: var(--text-muted) !important;
  }

  #receipts-table-body td:nth-child(5) {
    grid-area: rec-amount !important;
    text-align: right !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
  }

  #receipts-table-body td:nth-child(6) {
    grid-area: rec-badge !important;
    text-align: right !important;
    justify-self: end !important;
  }

  #receipts-table-body td:nth-child(7) {
    grid-area: rec-actions !important;
    text-align: right !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 5px !important;
  }

  #receipts-table-body td:nth-child(7) .btn {
    height: 30px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    border-radius: 6px !important;
  }
}

/* Extra Small Phones (< 600px) */
@media (max-width: 600px) {

  .form-grid-2,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .payment-type-radios {
    flex-direction: column;
    gap: 8px;
  }

  .line-items-header-row {
    display: none !important;
  }

  .line-item-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    background: #f8fafc !important;
    padding: 12px !important;
    border-radius: 8px !important;
    border: 1px solid var(--border-light) !important;
    position: relative !important;
    gap: 8px !important;
  }

  .line-item-row > div:nth-child(1) {
    grid-column: 1 / -1;
  }

  .line-item-row > div:nth-child(2) {
    grid-column: 1;
  }

  .line-item-row > div:nth-child(3) {
    grid-column: 2;
  }

  .line-item-row .line-item-amount {
    grid-column: 1;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
  }

  .line-item-row > div:nth-child(5) {
    grid-column: 2;
    display: flex;
    justify-content: flex-end;
  }

  .line-item-row .btn-remove-item {
    position: static !important;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #printable-receipt-card {
    padding: 16px 12px !important;
  }
}

/* ==========================================================================
   AUTHENTICATION: PAYSTACK-INSPIRED SLEEK LOGIN (login.html)
   ========================================================================== */
.login-standalone-wrapper,
.login-container {
  width: 100%;
  max-width: 440px;
  margin: auto;
  padding: 40px 24px;
  box-sizing: border-box;
  text-align: left;
}

.login-brand {
  text-align: center;
  margin-bottom: 34px;
}

.login-logo-img {
  max-width: 165px;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

.login-headline {
  text-align: center;
  margin-bottom: 28px;
}

.login-title-line1 {
  font-size: 21px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.login-title-line2 {
  font-size: 20px;
  font-weight: 700;
  color: #475569;
  letter-spacing: -0.015em;
  margin-top: 4px;
}

.login-form {
  width: 100%;
}

.login-input {
  height: 44px;
  font-size: 13.5px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  padding: 10px 14px;
  width: 100%;
  transition: all 140ms ease;
  color: #0f172a;
  box-sizing: border-box;
}

.login-input:focus {
  border-color: #0084f4;
  box-shadow: 0 0 0 3px rgba(0, 132, 244, 0.15);
  outline: none;
}

.password-input-wrap {
  position: relative;
  width: 100%;
}

.password-input-wrap .login-input {
  padding-right: 42px;
}

.btn-password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 4px;
  transition: color 120ms ease;
}

.btn-password-toggle:hover {
  color: #0f172a;
}

.auth-link {
  color: #0f4a30;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: color 120ms ease;
}

.auth-link:hover {
  text-decoration: underline;
}

.btn-auth-submit {
  width: 100%;
  height: 44px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  background: #0f4a30;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: background-color 140ms ease, transform 100ms ease;
  box-shadow: none !important;
}

.btn-auth-submit:hover {
  background: #0b3824;
}

.btn-auth-submit:active {
  transform: scale(0.99);
}

.auth-switch-text {
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  margin-top: 20px;
}

.login-alert-box {
  display: none;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  margin-bottom: 18px;
  line-height: 1.4;
}

.login-alert-box.visible {
  display: block;
  animation: fadeIn 150ms ease;
}

.login-alert-box.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-alert-box.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.login-alert-box.warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  color: #92400e;
}

/* ==========================================================================
   GLOBAL CUSTOM CONFIRMATION MODAL (Paystack & Linear Craft)
   ========================================================================== */
.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 10005;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: confirmFadeIn 160ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.confirm-modal-backdrop.open {
  display: flex;
}

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

.confirm-modal-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 1px 1px rgba(15, 23, 42, 0.06);
  width: 100%;
  max-width: 420px;
  padding: 24px;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  animation: confirmCardSpring 200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.confirm-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.confirm-icon-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirm-icon-badge.danger {
  background: #fee2e2;
  color: #dc2626;
}

.confirm-icon-badge.warning {
  background: #fef3c7;
  color: #d97706;
}

.confirm-icon-badge.primary {
  background: #e6f4ec;
  color: #128863;
}

.confirm-modal-texts {
  flex: 1;
}

.confirm-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 6px 0;
}

.confirm-modal-message {
  font-size: 13.5px;
  line-height: 1.5;
  color: #64748b;
  margin: 0;
}

.confirm-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.btn-confirm-cancel {
  height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.btn-confirm-cancel:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-confirm-action {
  height: 38px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 120ms ease, transform 100ms ease;
  box-shadow: none !important;
}

.btn-confirm-action:active {
  transform: scale(0.98);
}

.btn-confirm-action.danger {
  background: #dc2626;
}

.btn-confirm-action.danger:hover {
  background: #b91c1c;
}

.btn-confirm-action.warning {
  background: #d97706;
}

.btn-confirm-action.warning:hover {
  background: #b45309;
}

.btn-confirm-action.primary {
  background: #0f4a30;
}

.btn-confirm-action.primary:hover {
  background: #0b3824;
}

/* ==========================================================================
   GLOBAL TABLE EMPTY STATE (Hides table entirely, matches Services & Rates)
   ========================================================================== */
.table-empty-state {
  padding: 44px 24px;
  text-align: center;
  animation: fadeIn 200ms ease;
}

.table-empty-state-icon,
svg.table-empty-state-icon {
  width: 36px !important;
  height: 36px !important;
  color: var(--brand-accent);
  margin: 0 auto 12px;
  display: block;
}

.table-empty-state-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--brand-dark-deep);
}

.table-empty-state-desc {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 20px;
  font-size: 13.5px;
  line-height: 1.5;
}