/* ==========================================================================
   OFFICIAL URDU TYPOGRAPHY: JAMEEL NOORI NASTALEEQ (خالص جمیل نوری نستعلیق)
   Strictly enforced for all Urdu lettering, invoices & ledgers
   ========================================================================== */
@font-face {
  font-family: 'Jameel Noori Nastaleeq';
  src: url('/fonts/jameel-noori-nastaleeq.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}

@font-face {
  font-family: 'Jameel Noori';
  src: url('/fonts/jameel-noori-nastaleeq.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --leaf-red: #C8102E;
  --leaf-red-dark: #9E0A20;
  --leaf-red-light: #E02847;
  --leaf-red-glow: rgba(200, 16, 46, 0.16);
  --leaf-red-subtle: rgba(200, 16, 46, 0.06);

  /* Workspace Layout & Colors */
  --sidebar-bg: #12141A;
  --sidebar-border: #1F232D;
  --sidebar-text: #8E95A5;
  --sidebar-text-active: #FFFFFF;

  --workspace-bg: #F4F6F9;
  --card-bg: #FFFFFF;
  --card-border: #E5E9F0;
  
  --text-main: #181C26;
  --text-secondary: #576071;
  --text-muted: #8E95A5;
  
  --gold-accent: #C69229;
  --gold-gradient: linear-gradient(135deg, #DFBA54 0%, #B88928 100%);
  
  --status-paid: #10B981;
  --status-paid-bg: rgba(16, 185, 129, 0.1);
  --status-partial: #F59E0B;
  --status-partial-bg: rgba(245, 158, 11, 0.1);
  --status-unpaid: #EF4444;
  --status-unpaid-bg: rgba(239, 68, 68, 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-urdu: 'Jameel Noori Nastaleeq', 'Jameel Noori';
}

/* Universal Strict Urdu Font Enforcer for ERP & Invoicing */
:lang(ur),
[lang="ur"],
.urdu-text,
.urdu-label,
.urdu-title,
.inv-company-tag,
.khata-urdu {
  font-family: 'Jameel Noori Nastaleeq', 'Jameel Noori' !important;
  direction: rtl;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--workspace-bg);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */

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

/* Sidebar */
.app-sidebar {
  width: 270px;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.sidebar-brand-name {
  font-size: 1rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.sidebar-brand-sub {
  font-size: 0.725rem;
  color: var(--leaf-red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sidebar-nav {
  flex-grow: 1;
  padding: 18px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #555D6E;
  padding: 12px 14px 6px;
  margin-top: 6px;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  font-size: 0.875rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item-btn svg {
  flex-shrink: 0;
  color: #6C7486;
  transition: color 0.15s ease;
}

.nav-item-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
}

.nav-item-btn:hover svg {
  color: #FFFFFF;
}

.nav-item-btn.active {
  background: linear-gradient(90deg, rgba(200, 16, 46, 0.18) 0%, rgba(200, 16, 46, 0.05) 100%);
  color: #FFFFFF;
  font-weight: 700;
  border-left: 3px solid var(--leaf-red);
}

.nav-item-btn.active svg {
  color: var(--leaf-red);
}

.nav-badge-pill {
  margin-left: auto;
  background: var(--leaf-red);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #242936;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid #333A4A;
}

.user-meta-name {
  font-size: 0.825rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.user-meta-role {
  font-size: 0.725rem;
  color: var(--text-muted);
}

.sidebar-logout-btn {
  background: none;
  border: none;
  color: #6C7486;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.sidebar-logout-btn:hover {
  color: #FF5A70;
  background: rgba(200, 16, 46, 0.1);
}

/* Main Workspace */
.app-main {
  margin-left: 270px;
  flex-grow: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.app-topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--card-border);
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.topbar-breadcrumbs strong {
  color: var(--text-main);
  font-size: 1.05rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.system-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: #F3F4F6;
  font-size: 0.775rem;
  font-weight: 600;
  color: #4B5563;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
}

/* Content Area */
.app-content {
  padding: 32px;
  flex-grow: 1;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--leaf-red);
  color: #FFFFFF;
  border: 1px solid var(--leaf-red);
  box-shadow: 0 2px 8px var(--leaf-red-glow);
}

.btn-primary:hover {
  background: var(--leaf-red-dark);
  border-color: var(--leaf-red-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: #F9FAFB;
  border-color: #D1D5DB;
}

.btn-success {
  background: #10B981;
  color: #FFFFFF;
  border: 1px solid #10B981;
}

.btn-success:hover {
  background: #059669;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-badge.paid {
  background: var(--status-paid-bg);
  color: var(--status-paid);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.partial {
  background: var(--status-partial-bg);
  color: var(--status-partial);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.status-badge.unpaid, .status-badge.overdue {
  background: var(--status-unpaid-bg);
  color: var(--status-unpaid);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   KPI DASHBOARD METRIC CARDS
   ========================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-border);
}

.kpi-card.accent-red::before { background: var(--leaf-red); }
.kpi-card.accent-green::before { background: #10B981; }
.kpi-card.accent-amber::before { background: #F59E0B; }
.kpi-card.accent-gold::before { background: #D4AF37; }

.kpi-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.kpi-subtext {
  font-size: 0.775rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Dashboard 2-column Grid */
.dashboard-columns-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.dashboard-panel {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.panel-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.panel-body {
  padding: 24px;
}

/* Bank Account List */
.bank-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #F3F4F6;
}

.bank-account-item:last-child {
  border-bottom: none;
}

.bank-acc-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-main);
}

.bank-acc-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bank-acc-balance {
  font-size: 0.95rem;
  font-weight: 800;
  color: #10B981;
}

/* ==========================================================================
   DATA TABLES (INVOICES, CUSTOMERS, EXPENSES)
   ========================================================================== */

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.table-search-input {
  padding: 9px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  width: 280px;
  background: #FFFFFF;
  outline: none;
}

.table-search-input:focus {
  border-color: var(--leaf-red);
}

.filter-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #E5E9F0;
  padding: 3px;
  border-radius: var(--radius-sm);
}

.filter-pill {
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill.active {
  background: #FFFFFF;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.data-table-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.data-table th {
  background: #F9FAFC;
  padding: 13px 18px;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.data-table td {
  padding: 14px 18px;
  font-size: 0.875rem;
  border-bottom: 1px solid #F3F4F6;
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #FAFBFC;
}

.amount-col {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.action-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

/* ==========================================================================
   MODALS & DIALOGS
   ========================================================================== */

.app-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 17, 21, 0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.app-modal.active {
  display: flex;
}

.modal-sheet {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.modal-sheet-lg {
  max-width: 960px;
}

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: var(--leaf-red);
}

.modal-body {
  padding: 28px;
  overflow-y: auto;
  flex-grow: 1;
}

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

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-main);
  background: #FFFFFF;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--leaf-red);
  box-shadow: 0 0 0 3px var(--leaf-red-glow);
}

/* Format Switcher & Report Selector */
.format-switcher-bar {
  display: inline-flex;
  background: #E5E9F0;
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 4px;
}

.format-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.775rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.format-switch-btn:hover {
  color: var(--text-main);
}

.format-switch-btn.active {
  background: #FFFFFF;
  color: var(--leaf-red);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.format-switch-btn.active svg {
  color: var(--leaf-red);
}

.report-selector-card {
  transition: all 0.2s ease;
  border: 1px solid var(--card-border);
}

.report-selector-card:hover {
  border-color: #CBD5E1;
  transform: translateY(-2px);
}

.report-selector-card.active {
  border-color: var(--leaf-red) !important;
  background: #FFF8F8 !important;
  box-shadow: 0 4px 12px var(--leaf-red-glow) !important;
}

.report-selector-card.active::before {
  background: var(--leaf-red) !important;
}

/* ==========================================================================
   AUTHENTIC A4 & A5 INVOICE DOCUMENT ENGINE
   ========================================================================== */

.invoice-preview-stage {
  background: #737782;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  min-height: 400px;
}

/* A4 Sheet Dimensions: 210mm x 297mm */
.doc-sheet-a4 {
  width: 210mm;
  min-height: 297mm;
  background: #FFFFFF;
  padding: 14mm 16mm;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  box-sizing: border-box;
  color: #11141D;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 auto;
}

/* A5 Sheet Dimensions: 210mm x 148mm (Landscape) or 148mm x 210mm (Portrait) */
.doc-sheet-a5 {
  width: 210mm;
  min-height: 148mm;
  background: #FFFFFF;
  padding: 9mm 12mm;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
  box-sizing: border-box;
  color: #11141D;
  font-size: 11.5px;
  line-height: 1.35;
  margin: 0 auto;
}

/* Invoice Header */
.inv-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--leaf-red);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.inv-company-logo {
  height: 48px;
  width: auto;
  margin-bottom: 6px;
}

.inv-company-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: #11141D;
  letter-spacing: -0.01em;
}

.inv-company-tag {
  font-size: 0.8rem;
  color: var(--leaf-red);
  font-weight: 700;
  margin-bottom: 4px;
}

.inv-company-details {
  font-size: 0.8rem;
  color: #555D6E;
  line-height: 1.4;
}

.inv-title-box {
  text-align: right;
}

.inv-doc-type {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--leaf-red);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.inv-doc-type-a5 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--leaf-red);
}

.inv-number {
  font-size: 1rem;
  font-weight: 800;
  color: #11141D;
}

/* Meta Grid: Billed To vs Dates */
.inv-meta-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 18px;
  background: #F9FAFC;
  border: 1px solid #EBEFF5;
  border-radius: 6px;
  padding: 12px 16px;
}

.inv-meta-block-title {
  font-size: 0.725rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--leaf-red);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.inv-client-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #11141D;
}

.inv-client-details {
  font-size: 0.8rem;
  color: #555D6E;
  line-height: 1.4;
}

.inv-dates-table {
  width: 100%;
  font-size: 0.8rem;
}

.inv-dates-table td {
  padding: 2px 0;
}

.inv-dates-table td:last-child {
  text-align: right;
  font-weight: 700;
}

/* Invoice Line Items Table */
.inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 18px;
}

.inv-items-table th {
  background: #181C26;
  color: #FFFFFF;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 9px 12px;
}

.inv-items-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #E5E9F0;
  font-size: 0.825rem;
}

.inv-items-table tr:nth-child(even) td {
  background: #FAFBFC;
}

/* Totals & Signature Block */
.inv-totals-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.inv-bank-box {
  background: #F8F9FB;
  border: 1px dashed #D1D5DB;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 0.775rem;
  color: #4B5563;
}

.inv-bank-title {
  font-weight: 800;
  color: var(--leaf-red);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.inv-calculation-table {
  width: 100%;
  font-size: 0.85rem;
}

.inv-calculation-table td {
  padding: 4px 0;
}

.inv-calculation-table td:last-child {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.inv-grand-total-row td {
  border-top: 2px solid #181C26;
  border-bottom: 2px solid #181C26;
  padding: 8px 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--leaf-red);
}

.inv-signatures-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 14px;
}

.inv-stamp-box {
  width: 110px;
  height: 110px;
  border: 2px dashed var(--leaf-red);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--leaf-red);
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  transform: rotate(-10deg);
  opacity: 0.85;
}

.inv-sig-line {
  width: 190px;
  border-top: 1px solid #181C26;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding-top: 4px;
  color: #4B5563;
}

/* ==========================================================================
   FINANCIAL REPORTS PRINT / PREVIEW STYLES
   ========================================================================== */

.report-preview-sheet {
  width: 210mm;
  min-height: 297mm;
  background: #FFFFFF;
  padding: 16mm 18mm;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  margin: 0 auto;
  box-sizing: border-box;
}

.report-header-banner {
  text-align: center;
  border-bottom: 2px solid #181C26;
  padding-bottom: 14px;
  margin-bottom: 22px;
}

.report-title-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #181C26;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.report-period-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--leaf-red);
  margin-top: 2px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.report-table th {
  background: #F3F4F6;
  padding: 9px 12px;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 800;
  color: #374151;
  border-top: 1px solid #D1D5DB;
  border-bottom: 1px solid #D1D5DB;
}

.report-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #E5E7EB;
}

.report-subtotal-row td {
  font-weight: 700;
  background: #F9FAFB;
}

.report-grand-row td {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--leaf-red);
  border-top: 2px solid #181C26;
  border-bottom: 2px solid #181C26;
  background: #FFF5F6;
}

/* ==========================================================================
   PRINT ENGINE STYLES (@media print)
   ========================================================================== */

@media print {
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    padding: 0 !important;
  }

  /* Hide entire web application UI during print */
  .app-sidebar,
  .app-topbar,
  .app-content,
  .modal-header,
  .modal-footer,
  .format-switcher-bar,
  .no-print {
    display: none !important;
  }

  .app-modal {
    position: static !important;
    display: block !important;
    background: none !important;
    padding: 0 !important;
  }

  .modal-sheet {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
  }

  .invoice-preview-stage {
    background: none !important;
    padding: 0 !important;
  }

  .doc-sheet-a4, .report-preview-sheet {
    width: 100% !important;
    min-height: auto !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .doc-sheet-a5 {
    width: 100% !important;
    min-height: auto !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

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