/* ═══ DESIGN SYSTEM - Inventory Management ═══ */
/* Elite & Premium Dark Theme — Luxury Business */
:root {
  /* Core palette — Deep charcoal & warm obsidian */
  --bg: #0f1117;
  --surface: #1a1d26;
  --surface-alt: #22252f;
  --border: #2d313d;
  --border-light: #262a35;
  
  /* Primary — Rich Royal Gold */
  --primary: #d4a853;
  --primary-hover: #e6bc6a;
  --primary-light: rgba(212,168,83,0.1);
  --primary-muted: #b8944a;
  
  /* Accent — Platinum Silver */
  --accent: #a8b4c4;
  --accent-light: rgba(168,180,196,0.08);
  --accent-hover: #c4d0e0;
  
  /* Text — Crisp whites on dark */
  --text: #f0f0f2;
  --text-muted: #8b91a0;
  --text-light: #5c6272;
  
  /* Status — Refined tones */
  --success: #5cb87a;
  --success-bg: rgba(92,184,122,0.1);
  --warning: #e6a44c;
  --warning-bg: rgba(230,164,76,0.1);
  --error: #e05670;
  --error-bg: rgba(224,86,112,0.1);
  
  /* Shadows — Deeper, luxurious */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
  --duration-lg: 300ms;
  
  /* Sidebar */
  --sidebar-width: 260px;
  --sidebar-collapsed: 64px;
}

/* ═══ RESET & BASE ═══ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'General Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══ TYPOGRAPHY ═══ */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 600; }
h4 { font-size: 0.95rem; font-weight: 600; }

.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

/* Tabular numbers for currency/data */
.num, .currency, td:nth-child(n+3) {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ═══ LAYOUT ═══ */
#app {
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: var(--sidebar-width);
  background: #14161e;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--duration-lg) var(--ease), width var(--duration-lg) var(--ease);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #b8944a);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f1117;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-brand {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.sidebar-brand small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

.sidebar-nav {
  padding: 12px 10px;
  flex: 1;
}

.nav-section {
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  padding: 8px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  user-select: none;
}

.nav-item:hover {
  background: var(--surface-alt);
  color: var(--text);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  padding-left: 9px;
}

.nav-item .icon {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px 14px;
  border-top: 1px solid var(--border-light);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--duration) var(--ease);
}

.user-card:hover {
  background: var(--surface-alt);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #b8944a);
  color: #0f1117;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ═══ MAIN CONTENT ═══ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  transition: margin-left var(--duration-lg) var(--ease);
}

.page-header {
  padding: 20px 28px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  backdrop-filter: blur(12px);
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.page-body {
  padding: 24px 28px;
  animation: fadeIn var(--duration-lg) var(--ease);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ CARDS ═══ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration) var(--ease);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(212,168,83,0.2);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* ═══ KPI CARDS ═══ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-sm);
}

.kpi-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.kpi-icon.sales { background: var(--success-bg); color: var(--success); }
.kpi-icon.purchase { background: var(--warning-bg); color: var(--warning); }
.kpi-icon.stock { background: var(--primary-light); color: var(--primary); }
.kpi-icon.customer { background: var(--accent-light); color: var(--accent); }
.kpi-icon.error { background: var(--error-bg); color: var(--error); }

.kpi-content { flex: 1; }

.kpi-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ═══ BUTTONS ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #b8944a);
  color: #0f1117;
  font-weight: 700;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-hover), var(--primary)); }

.btn-accent {
  background: var(--accent);
  color: white;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #3d6521; }

.btn-error { background: var(--error); color: white; }
.btn-error:hover { background: #7a2745; }

.btn-sm { padding: 5px 10px; font-size: 0.75rem; }
.btn-lg { padding: 11px 22px; font-size: 0.9rem; }

/* ═══ FORMS ═══ */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.15);
}

.form-input::placeholder { color: var(--text-light); }

.form-textarea { min-height: 80px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ═══ TABLE ═══ */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table th {
  background: var(--surface-alt);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }

.table tr:hover td {
  background: var(--surface-alt);
}

.table .actions {
  display: flex;
  gap: 6px;
}

/* ═══ BADGES ═══ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-muted { background: var(--surface-alt); color: var(--text-muted); border: 1px solid var(--border); }

/* ═══ MODAL ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeOverlay var(--duration) var(--ease);
}

@keyframes fadeOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp var(--duration-lg) var(--ease);
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1000px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--surface-alt);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--duration) var(--ease);
}

.modal-close:hover { background: var(--error-bg); color: var(--error); }

.modal-body {
  padding: 20px 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ═══ SEARCH ═══ */
.search-box {
  position: relative;
}

.search-box .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 0.9rem;
}

.search-box input {
  padding-left: 36px;
}

/* ═══ TABS ═══ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab {
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--duration) var(--ease);
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(212,168,83,0.3);
}

/* ═══ FILTER BAR ═══ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-bar .form-input,
.filter-bar .form-select {
  width: auto;
  min-width: 160px;
}

/* ═══ EMPTY STATE ═══ */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

/* ═══ TOAST ═══ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  animation: slideIn var(--duration-lg) var(--ease);
  max-width: 380px;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--error); }
.toast.warning { border-left: 3px solid var(--warning); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ═══ LOGIN PAGE ═══ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at top, #1a1d26 0%, #0f1117 70%);
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,83,0.1);
  text-align: center;
}

.login-logo {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #b8944a);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f1117;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 18px;
  box-shadow: 0 4px 16px rgba(212,168,83,0.3);
}

.login-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ═══ INVOICE PRINT ═══ */
@media print {
  body { background: white; color: #000; }
  .sidebar, .page-header, .no-print { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .invoice-print { padding: 20px; }
}

/* Invoice area always white for readability */
#invoice-print-area {
  color: #22201b;
}

#invoice-print-area .table th {
  color: #555;
}

#invoice-print-area .text-muted {
  color: #6f6b63;
}

#invoice-print-area .num {
  color: #22201b;
}

/* ═══ RESPONSIVE ═══ */
.mobile-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

@media (max-width: 1024px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .main-content {
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .page-header {
    padding: 14px 16px;
  }
  .page-body {
    padding: 16px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .form-row, .form-row-3 {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-bar .form-input,
  .filter-bar .form-select {
    width: 100%;
    min-width: unset;
  }
  .modal {
    max-height: 95vh;
    margin: 10px;
  }
}

@media (max-width: 480px) {
  .page-title { font-size: 1.1rem; }
  .kpi-value { font-size: 1.2rem; }
  .table { font-size: 0.75rem; }
  .table th, .table td { padding: 8px 10px; }
}

/* ═══ UTILITY ═══ */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 14px; }
.gap-lg { gap: 20px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


/* ═══ RETAIL INVOICE STYLES (In-modal preview) ═══ */
.invoice-retail {
  background: #fff;
  color: #1a1a1a;
  padding: 24px;
  border-radius: 6px;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
}

.inv-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid #1a3a5c;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.inv-brand-name {
  font-size: 20px;
  font-weight: 800;
  color: #1a3a5c;
  letter-spacing: -0.5px;
}

.inv-brand-sub {
  font-size: 10px;
  color: #555;
  margin-top: 1px;
}

.inv-title-block { text-align: right; }

.inv-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a3a5c;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.inv-original {
  font-size: 9px;
  color: #888;
  font-style: italic;
  margin-top: 2px;
}

.inv-meta-row {
  display: flex;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.inv-meta-left {
  flex: 1;
  padding: 10px 14px;
  border-right: 1px solid #ddd;
}

.inv-meta-right {
  flex: 1;
  padding: 10px 14px;
}

.inv-meta-table { width: 100%; font-size: 11px; }
.inv-meta-table td { padding: 2px 0; }
.inv-lbl { color: #777; width: 85px; font-size: 10px; }
.inv-val { color: #1a1a1a; }

.inv-section-title {
  font-size: 9px;
  font-weight: 700;
  color: #1a3a5c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.inv-cust-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 3px;
}

.inv-cust-detail {
  font-size: 10.5px;
  color: #444;
  line-height: 1.5;
}

.inv-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
  font-size: 11px;
}

.inv-items-table th {
  background: #1a3a5c;
  color: #fff;
  padding: 7px 8px;
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.inv-items-table td {
  padding: 7px 8px;
  border-bottom: 1px solid #e8e8e8;
  color: #222;
}

.inv-items-table tbody tr:nth-child(even) { background: #f9f9f8; }
.inv-items-table tbody tr:last-child td { border-bottom: 2px solid #1a3a5c; }

.inv-items-table .tc { text-align: center; }
.inv-items-table .tr, .inv-gst-table .tr, .inv-totals-table .tr { text-align: right; font-variant-numeric: tabular-nums; }

.inv-gst-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 12px;
  font-size: 10px;
  border: 1px solid #ddd;
}

.inv-gst-table th {
  background: #f0f0ee;
  padding: 5px 8px;
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  border-bottom: 1px solid #ddd;
}

.inv-gst-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #eee;
  color: #333;
}

.inv-gst-table .tc { text-align: center; }

.inv-totals-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-top: 8px;
}

.inv-words { flex: 1; padding-right: 20px; }
.inv-words-text { font-size: 11.5px; color: #1a1a1a; margin-top: 3px; font-weight: 500; }

.inv-totals { width: 220px; }
.inv-totals-table { width: 100%; font-size: 11px; }
.inv-totals-table td { padding: 4px 0; color: #333; }
.inv-grand-total { border-top: 2px solid #1a3a5c; border-bottom: 2px solid #1a3a5c; }
.inv-grand-total td { padding: 8px 0 !important; font-size: 14px; color: #1a1a1a; }

.inv-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #ddd;
}

.inv-footer-left { flex: 1; }
.inv-terms { font-size: 9px; color: #777; line-height: 1.7; }

.inv-footer-right { width: 180px; text-align: center; }
.inv-sig-area { height: 45px; display: flex; align-items: flex-end; justify-content: center; }
.inv-sig-line { border-top: 1px solid #333; margin-top: 6px; margin-bottom: 4px; }
.inv-sig-label { font-size: 9.5px; font-weight: 600; color: #333; }
.inv-sig-name { font-size: 9px; color: #666; margin-top: 1px; }

.inv-bottom-strip {
  text-align: center;
  margin-top: 14px;
  padding: 6px;
  background: #f5f5f3;
  border-radius: 3px;
  font-size: 9px;
  color: #999;
}
