/* ================================================================
   Techpullers Invoicing System — Main Stylesheet
   ================================================================ */

/* --- CSS Variables --- */
:root {
  --navy:         #1a1a2e;
  --navy-dark:    #121220;
  --navy-light:   #16213e;
  --orange:       #D85A30;
  --orange-hover: #c04e27;
  --orange-light: rgba(216,90,48,0.1);
  --bg:           #f4f6fb;
  --white:        #ffffff;
  --text:         #1e2a3b;
  --text-muted:   #6b7a92;
  --border:       #e2e8f0;
  --border-light: #f0f4f8;
  --shadow:       0 2px 8px rgba(26,26,46,0.07);
  --shadow-md:    0 4px 24px rgba(26,26,46,0.11);
  --shadow-lg:    0 8px 40px rgba(26,26,46,0.14);
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    14px;
  --sidebar-w:    244px;
  --font:         'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--orange); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--orange-hover); }
img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; width: 100%; }
ul { list-style: none; }

/* ================================================================
   APP LAYOUT
   ================================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: #dde3f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

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

.logo-icon {
  width: 38px; height: 38px;
  background: var(--orange);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}

.logo-text {
  font-size: 15px; font-weight: 700; color: #fff; line-height: 1.2;
  letter-spacing: -0.3px;
}

.logo-sub {
  font-size: 10.5px; color: rgba(221,227,240,0.5); font-weight: 500;
  letter-spacing: 0.5px; text-transform: uppercase;
}

.sidebar-logo-img {
  max-height: 46px; max-width: 190px; object-fit: contain;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
}

.nav-section-label {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(221,227,240,0.35);
  padding: 14px 10px 5px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: rgba(221,227,240,0.72);
  font-size: 13.5px; font-weight: 500;
  transition: all 0.17s;
  margin-bottom: 2px;
}

.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.17s; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item:hover svg { opacity: 1; }
.nav-item.active { background: var(--orange); color: #fff; font-weight: 600; }
.nav-item.active svg { opacity: 1; }
.nav-item-sub { padding-left: 22px; font-size: 13px; }

.sidebar-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; color: rgba(221,227,240,0.3);
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
}

.content-wrapper {
  padding: 28px 32px;
  max-width: 1300px;
}

/* ================================================================
   PAGE HEADER
   ================================================================ */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 26px; gap: 16px; flex-wrap: wrap;
}

.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.2; }
.page-subtitle { font-size: 13.5px; color: var(--text-muted); margin-top: 3px; }

/* ================================================================
   FLASH MESSAGES
   ================================================================ */
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: 14px; font-weight: 500;
}
.flash-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.flash-error   { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.flash-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }
.flash-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }

.flash-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: inherit; opacity: 0.5; padding: 0 2px; line-height: 1;
}
.flash-close:hover { opacity: 1; }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px;
}

.card-header {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px;
}
.card-title { font-size: 15px; font-weight: 700; }

/* ================================================================
   STAT CARDS
   ================================================================ */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px;
}

.stat-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 22px; position: relative; overflow: hidden;
}
.stat-card::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
}
.stat-card.green::after  { background: #10b981; }
.stat-card.orange::after { background: var(--orange); }
.stat-card.blue::after   { background: #3b82f6; }
.stat-card.purple::after { background: #8b5cf6; }
.stat-card.red::after    { background: #ef4444; }

.stat-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 9px;
}
.stat-value { font-size: 25px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.1; }
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; cursor: pointer; border: none;
  transition: all 0.17s; text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary   { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-hover); color: #fff; }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-light); color: #fff; }
.btn-outline   { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--bg); border-color: #c5cdd8; }
.btn-success   { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger    { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-blue      { background: #3b82f6; color: #fff; }
.btn-blue:hover { background: #2563eb; color: #fff; }

.btn-sm { padding: 6px 13px; font-size: 12.5px; }
.btn-lg { padding: 12px 26px; font-size: 15.5px; }

.btn-icon {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--bg);
  border: 1.5px solid var(--border); cursor: pointer; color: var(--text-muted);
  transition: all 0.17s; flex-shrink: 0;
}
.btn-icon:hover { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn-icon svg { width: 15px; height: 15px; }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-grey   { background: #f1f5f9; color: #64748b; }
.badge-blue   { background: #eff6ff; color: #1d4ed8; }
.badge-green  { background: #ecfdf5; color: #065f46; }
.badge-red    { background: #fef2f2; color: #991b1b; }
.badge-orange { background: #fff7ed; color: #c2410c; }

/* ================================================================
   TABLES
   ================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

table.data-table {
  width: 100%; background: var(--white);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.data-table thead th {
  padding: 11px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted);
  background: var(--bg); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table thead tr th:first-child { border-radius: var(--radius) 0 0 0; }
.data-table thead tr th:last-child  { border-radius: 0 var(--radius) 0 0; }
.data-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background 0.12s; }
.data-table tbody tr:last-child { border-bottom: none; }
.data-table tbody tr:hover { background: #fafbfd; }
.data-table tbody td { padding: 12px 16px; font-size: 13.5px; }
.data-table .actions { display: flex; align-items: center; gap: 5px; }

/* ================================================================
   FORMS
   ================================================================ */
.form-grid   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid-4 { grid-template-columns: repeat(4, 1fr); }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label { font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: 0.2px; }
.form-label .req { color: var(--orange); margin-left: 2px; }

.form-control {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--text); background: var(--white);
  transition: border-color 0.18s, box-shadow 0.18s; outline: none;
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(216,90,48,0.1); }
.form-control::placeholder { color: #b5beca; }
textarea.form-control { resize: vertical; min-height: 82px; }
select.form-control { cursor: pointer; }

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

.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--orange); cursor: pointer; }
.form-check-label { font-size: 13.5px; }

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.filter-bar .form-control { min-width: 140px; }
.filter-label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* ================================================================
   INVOICE BUILDER
   ================================================================ */
.invoice-builder {
  display: grid; grid-template-columns: 1fr 310px; gap: 20px; align-items: start;
}

.section-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px;
}
.section-card-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.section-card-title { font-size: 14px; font-weight: 700; }
.section-card-body  { padding: 20px; }

/* Line items */
.items-table { width: 100%; }
.items-table th {
  padding: 9px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.7px; color: var(--text-muted); background: var(--bg);
  border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap;
}
.items-table td { padding: 7px 5px; vertical-align: middle; border-bottom: 1px solid var(--border-light); }
.items-table td .form-control { padding: 7px 8px; font-size: 13px; }

.item-remove {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 4px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; transition: all 0.15s;
}
.item-remove:hover { background: #fef2f2; color: #ef4444; }
.item-remove svg { width: 14px; height: 14px; }

.add-item-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; background: none; border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm); color: var(--text-muted);
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.18s; margin-top: 12px;
}
.add-item-btn:hover { border-color: var(--orange); color: var(--orange); background: var(--orange-light); }
.add-item-btn svg { width: 15px; height: 15px; }

/* Invoice totals sidebar */
.invoice-totals {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; position: sticky; top: 24px;
}
.invoice-totals-title { font-size: 13px; font-weight: 700; margin-bottom: 14px; }

.totals-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--border-light);
}
.totals-row:last-child { border-bottom: none; }
.totals-row .lbl { color: var(--text-muted); }
.totals-row .val { font-weight: 600; }

.totals-row.grand-total {
  padding-top: 13px; border-top: 2px solid var(--border); border-bottom: none; margin-top: 5px;
}
.totals-row.grand-total .lbl,
.totals-row.grand-total .val { font-size: 18px; font-weight: 800; }

.amount-in-words {
  background: var(--bg); border-radius: var(--radius-sm); padding: 10px 13px;
  font-size: 12px; color: var(--text-muted); font-style: italic; margin-top: 13px; line-height: 1.5;
}

/* Tax toggle */
.tax-type-toggle {
  display: flex; gap: 6px; background: var(--bg);
  padding: 4px; border-radius: var(--radius-sm); width: fit-content; margin-bottom: 14px;
}
.tax-toggle-btn {
  padding: 6px 16px; border-radius: 4px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; border: none; background: none; color: var(--text-muted); transition: all 0.18s;
}
.tax-toggle-btn.active { background: var(--white); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* ================================================================
   CUSTOMER SEARCH DROPDOWN
   ================================================================ */
.customer-search-wrap { position: relative; }
.customer-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  z-index: 200; max-height: 220px; overflow-y: auto; display: none;
}
.customer-dropdown.open { display: block; }
.customer-option {
  padding: 10px 14px; cursor: pointer; transition: background 0.12s;
  border-bottom: 1px solid var(--border-light);
}
.customer-option:last-child { border-bottom: none; }
.customer-option:hover { background: var(--bg); }
.customer-option .cname { font-size: 13.5px; font-weight: 600; }
.customer-option .cmeta { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* ================================================================
   INVOICE VIEW (Professional Layout)
   ================================================================ */
.invoice-view-actions {
  display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 18px; flex-wrap: wrap;
}

.invoice-doc {
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  max-width: 860px; margin: 0 auto; overflow: hidden;
}

.inv-header {
  background: var(--navy); color: #fff; padding: 30px 36px;
  display: flex; justify-content: space-between; align-items: flex-start;
}
.inv-company-name { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.inv-company-details { font-size: 12.5px; line-height: 1.8; opacity: 0.82; margin-top: 6px; }
.inv-label { text-align: right; }
.inv-label .word { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.6; }
.inv-label .number { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; margin-top: 3px; }
.inv-label .dates { font-size: 12.5px; opacity: 0.75; margin-top: 8px; line-height: 1.8; }

.inv-body { padding: 28px 36px; }

.inv-addresses {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 26px;
}
.inv-address-box { }
.inv-address-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 8px; }
.inv-address-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.inv-address-details { font-size: 13px; line-height: 1.8; color: var(--text-muted); }

.inv-items-table { width: 100%; margin-bottom: 18px; }
.inv-items-table th {
  padding: 10px 12px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; background: var(--bg); color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}
.inv-items-table td { padding: 11px 12px; font-size: 13.5px; border-bottom: 1px solid var(--border-light); }
.inv-items-table tbody tr:last-child td { border-bottom: 2px solid var(--border); }

.inv-totals-wrap { display: flex; justify-content: flex-end; margin-bottom: 22px; }
.inv-totals { width: 300px; }
.inv-totals-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13.5px; }
.inv-totals-row .l { color: var(--text-muted); }
.inv-totals-row .r { font-weight: 600; }
.inv-totals-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.inv-totals-grand { border-top: 2px solid var(--navy); padding-top: 10px; margin-top: 4px; }
.inv-totals-grand .l { font-size: 16px; font-weight: 800; }
.inv-totals-grand .r { font-size: 16px; font-weight: 800; color: var(--orange); }

.inv-words { background: #fffbf0; border: 1px solid #fde68a; border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; color: #92400e; margin-bottom: 22px; }

.inv-footer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  border-top: 1px solid var(--border); padding-top: 20px; margin-top: 8px;
}
.inv-footer-section h4 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px; }
.inv-footer-section p  { font-size: 13px; line-height: 1.8; color: var(--text); }

.inv-stamp { text-align: right; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.inv-stamp p { font-size: 12px; color: var(--text-muted); }
.inv-stamp .sig-line { border-top: 1px solid var(--text); width: 160px; margin: 40px 0 8px auto; }

/* ================================================================
   TABS
   ================================================================ */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 22px; }
.tab-btn {
  padding: 10px 20px; border: none; background: none;
  font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.17s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--orange); border-bottom-color: var(--orange); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ================================================================
   MISC UTILITIES
   ================================================================ */
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1  { gap: 6px; }
.gap-2  { gap: 10px; }
.gap-3  { gap: 16px; }
.mt-1   { margin-top: 8px; }
.mt-2   { margin-top: 16px; }
.mt-3   { margin-top: 24px; }
.mb-1   { margin-bottom: 8px; }
.mb-2   { margin-bottom: 16px; }
.mb-3   { margin-bottom: 24px; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

.empty-state { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty-state svg { width: 48px; height: 48px; margin-bottom: 14px; opacity: 0.25; }
.empty-state h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.empty-state p  { font-size: 13.5px; }

.alert { padding: 13px 17px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-danger  { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-info    { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }
.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }

.type-gst     { color: #1d4ed8; font-weight: 600; font-size: 12px; }
.type-non-gst { color: var(--orange); font-weight: 600; font-size: 12px; }

/* ================================================================
   INVOICE BRANDED FOOTER
   ================================================================ */
.inv-brand-footer {
  background: #1a1a2e; color: #fff; padding: 28px 36px 20px;
}
.ibf-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 18px;
  flex-wrap: wrap;
}
.ibf-brand { flex-shrink: 0; min-width: 160px; }
.ibf-brand-name { font-size: 15px; font-weight: 800; color: #fff; }
.ibf-brand-tag  { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.ibf-brand-contact { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 8px; line-height: 1.8; }
.ibf-services { flex: 1; min-width: 200px; }
.ibf-services-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.4); margin-bottom: 9px; }
.ibf-services-grid  { display: flex; flex-wrap: wrap; gap: 6px; }
.ibf-service-tag {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.78); border-radius: 20px; padding: 4px 11px; font-size: 10.5px; font-weight: 500;
}
.ibf-certs { flex-shrink: 0; }
.ibf-certs-label { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(255,255,255,0.4); margin-bottom: 9px; }
.ibf-cert-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px; padding: 5px 10px; margin: 2px; font-size: 10.5px; color: #fff;
}
.ibf-cert-badge .cert-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ibf-cert-badge .cert-dot.google  { background: #4285F4; }
.ibf-cert-badge .cert-dot.hubspot { background: #ff7a59; }
.ibf-stats {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.ibf-stat { text-align: center; flex: 1; min-width: 60px; }
.ibf-stat-val { font-size: 17px; font-weight: 800; color: #D85A30; letter-spacing: -0.5px; }
.ibf-stat-lbl { font-size: 9.5px; color: rgba(255,255,255,0.45); margin-top: 2px; font-weight: 500; }
.ibf-stat-divider { width: 1px; height: 28px; background: rgba(255,255,255,0.1); flex-shrink: 0; }
.ibf-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 10px; color: rgba(255,255,255,0.35);
}

/* ================================================================
   SMART PASTE PANEL
   ================================================================ */
#smartPastePanel { transition: border-color 0.2s; }
#smartPasteInput:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
#smartPasteInput::placeholder { color: #94a3b8; font-style: italic; font-size: 12px; }

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  .no-print, .sidebar, .invoice-view-actions, .flash, .btn,
  .filter-bar, .page-header .btn, nav { display: none !important; }

  .main-content { margin-left: 0 !important; }
  .content-wrapper { padding: 0 !important; max-width: 100% !important; }
  body { background: white !important; }

  .invoice-doc { box-shadow: none !important; border-radius: 0 !important; max-width: 100% !important; }

  @page { margin: 12mm 14mm; size: A4; }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .invoice-builder { grid-template-columns: 1fr; }
  .invoice-totals  { position: static; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .content-wrapper { padding: 16px; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .inv-header  { flex-direction: column; gap: 16px; }
  .inv-label   { text-align: left; }
  .inv-addresses { grid-template-columns: 1fr; }
  .inv-footer    { grid-template-columns: 1fr; }
}
