/* GST INVOICE MAKER - FULL RESPONSIVE PC & MOBILE DESIGN SYSTEM */

:root {
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --border-color: #e2e8f0;
  --sidebar-width: 250px;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* APP CONTAINER LAYOUT */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* SIDEBAR STYLING */
.sidebar {
  width: var(--sidebar-width);
  background-color: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
  margin-bottom: 24px;
}

.brand-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.brand-sub {
  font-size: 11px;
  color: #94a3b8;
}

.btn-new-invoice {
  width: 100%;
  padding: 10px 16px;
  background: var(--primary-600);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-new-invoice:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
}

.sidebar-nav {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #94a3b8;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 4px;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: white;
  background: var(--primary-600);
  font-weight: 600;
}

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

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

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--primary-700);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
}

.user-email {
  font-size: 10px;
  color: #94a3b8;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}

.btn-logout:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

/* SIDEBAR OVERLAY FOR MOBILE */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 999;
  display: none;
}

.sidebar-overlay.active {
  display: block;
}

/* MOBILE NAV BAR BAR FOR SMALL SCREENS */
.mobile-nav-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: #0f172a;
  color: white;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 900;
}

.mobile-menu-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

/* MAIN WRAPPER LAYOUT */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-header {
  height: 64px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
}

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

.content-body {
  padding: 24px;
  flex: 1;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* BUTTON SYSTEM */
.btn-primary {
  background-color: var(--primary-600);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-700);
}

.btn-secondary {
  background-color: white;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
}

.btn-danger {
  background-color: #ef4444;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* METRICS CARDS GRID */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.metric-card.primary-card {
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  color: white;
  border: none;
}

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

.metric-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.primary-card .metric-title {
  color: var(--primary-200);
}

.metric-val {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.primary-card .metric-sub {
  color: var(--primary-100);
}

/* SECTION HEADER BAR */
.section-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
}

/* TABLE SYSTEM & TOUCH WRAPPER */
.table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  min-width: 650px;
}

.custom-table th {
  background-color: #f8fafc;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: #e0f2fe;
  color: #0369a1;
}

.type-badge.quotation {
  background-color: #fef3c7;
  color: #b45309;
}

.type-badge.cashmemo {
  background-color: #dcfce7;
  color: #15803d;
}

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.paid {
  background-color: #dcfce7;
  color: #166534;
}

.status-badge.unpaid {
  background-color: #fee2e2;
  color: #991b1b;
}

.status-badge.draft {
  background-color: #f1f5f9;
  color: #475569;
}

.inv-code {
  font-weight: 700;
  color: var(--primary-600);
  text-decoration: none;
}

.inv-code:hover {
  text-decoration: underline;
}

/* FILTER & SEARCH BAR */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  width: 16px;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
}

.filter-tabs {
  display: flex;
  background-color: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius);
  overflow-x: auto;
}

.filter-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.filter-btn.active {
  background: white;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* PAGINATION CONTROLS ("PAGER") */
.pager-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  background-color: #fafafa;
  flex-wrap: wrap;
  gap: 12px;
}

.pager-info {
  font-size: 13px;
  color: var(--text-muted);
}

.pager-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager-select {
  padding: 4px 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  background: white;
}

.pager-btn {
  padding: 4px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: white;
  font-size: 13px;
  cursor: pointer;
}

.pager-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pager-pages {
  display: flex;
  gap: 4px;
}

.page-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.page-num.active {
  background: var(--primary-600);
  color: white;
  font-weight: bold;
}

/* FORM CREATOR ENGINE */
.creator-container {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.creator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-col {
  flex: 1;
  min-width: 0;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-500);
}

.form-control.uppercase {
  text-transform: uppercase;
}

/* ITEMS TABLE IN CREATOR */
.items-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 12px;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 700px;
}

.items-table th {
  background-color: #f1f5f9;
  padding: 8px 12px;
  text-align: left;
  border: 1px solid var(--border-color);
}

.items-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  vertical-align: top;
}

.btn-remove-row {
  background: transparent;
  border: none;
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
}

/* CALCULATIONS & SUMMARY GRID */
.calculation-summary {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-top: 24px;
  background: #f8fafc;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.snippet-btn {
  background: #e2e8f0;
  border: none;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.amount-words-box {
  background: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 12px;
  border: 1px solid var(--border-color);
}

.total-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
}

.total-row.grand-total {
  font-size: 16px;
  font-weight: 800;
  border-top: 2px solid var(--text-main);
  margin-top: 8px;
  padding-top: 8px;
}

/* PROFILE CARD & TABS */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
}

.completion-container {
  margin-bottom: 24px;
}

.completion-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.completion-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.completion-fill {
  height: 100%;
  background: var(--primary-600);
}

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.tab-btn.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  background: #f8fafc;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-color);
  flex-wrap: wrap;
}

.upload-img-preview {
  height: 60px;
  max-width: 150px;
  object-fit: contain;
}

.gst-presets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.preset-card {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.preset-card.green { background-color: #f0fdf4; border-color: #bbf7d0; }
.preset-card.blue { background-color: #eff6ff; border-color: #bfdbfe; }
.preset-card.amber { background-color: #fffbeb; border-color: #fde68a; }

.preset-rate { font-size: 20px; font-weight: 800; }
.preset-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* MODAL OVERLAY & CANVAS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

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

.modal-content {
  background: white;
  border-radius: var(--radius);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
}

/* V A ENTERPRISES INVOICE PREVIEW CANVAS - GUARANTEED STRICT 1-PAGE A4 FIT */
.invoice-print-area {
  width: 100%;
  box-sizing: border-box;
  page-break-inside: avoid !important;
  page-break-after: avoid !important;
}

.va-boxed-container {
  width: 100%;
  max-height: 270mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: Arial, sans-serif;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  box-sizing: border-box;
  overflow: hidden;
  page-break-after: avoid !important;
  page-break-inside: avoid !important;
}

.va-copy-header {
  text-align: right;
  font-size: 10px;
  font-weight: bold;
  padding: 3px 8px;
  border-bottom: 1px solid #000;
  text-transform: uppercase;
}

.va-header-box {
  text-align: center;
  position: relative;
  padding: 6px 10px;
  border-bottom: 1px solid #000;
}

.va-title-badge {
  font-weight: bold;
  font-size: 14px;
  text-decoration: underline;
  margin-bottom: 2px;
}

.va-company-name {
  font-size: 18px;
  font-weight: 900;
  color: #dc2626;
  letter-spacing: 0.5px;
}

.va-address-line {
  font-size: 10px;
  font-weight: bold;
  margin-top: 1px;
}

.va-gstin-line {
  font-size: 12px;
  font-weight: 900;
  margin-top: 1px;
}

.va-transport-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #000;
  font-size: 10px;
}

.va-meta-col {
  padding: 4px 8px;
}

.va-meta-col:first-child {
  border-right: 1px solid #000;
}

.va-meta-row {
  display: flex;
  margin-bottom: 1px;
}

.va-meta-label {
  width: 110px;
  font-weight: bold;
}

.va-address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #000;
  font-size: 10px;
}

.va-address-box {
  padding: 6px 10px;
}

.va-address-box:first-child {
  border-right: 1px solid #000;
}

.va-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.va-table th {
  border-bottom: 1px solid #000;
  border-right: 1px solid #000;
  padding: 4px 6px;
  text-align: center;
  font-weight: bold;
  background-color: #f8fafc;
}

.va-table th:last-child {
  border-right: none;
}

.va-table td {
  padding: 4px 6px;
}

.va-item-subdesc {
  font-size: 9px;
  color: #475569;
  font-style: italic;
  margin-top: 1px;
}

.va-tax-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
}

.va-tax-table th, .va-tax-table td {
  border: 1px solid #000;
  padding: 3px 4px;
  text-align: right;
}

.va-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 10px;
  min-height: 90px;
}

.va-footer-left {
  padding: 6px 10px;
  border-right: 1px solid #000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.va-receiver-sign-line {
  margin-top: 12px;
  font-weight: bold;
}

.va-footer-right {
  padding: 6px 10px;
  text-align: right;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* MODERN BLUE THEME */
.modern-blue-container {
  padding: 20px;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  box-sizing: border-box;
}

.mb-header-banner {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: white;
  padding: 16px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mb-company-title { font-size: 20px; font-weight: 900; }
.mb-company-sub { font-size: 11px; opacity: 0.9; }

.mb-doc-badge {
  text-align: right;
}

.mb-doc-type { font-size: 16px; font-weight: 800; text-transform: uppercase; }
.mb-doc-num { font-size: 11px; opacity: 0.9; }

.mb-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.mb-card {
  background: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  font-size: 12px;
}

.mb-card-title {
  font-weight: 800;
  color: #2563eb;
  margin-bottom: 4px;
  font-size: 11px;
}

.mb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}

.mb-table th {
  background: #1e3a8a;
  color: white;
  padding: 8px;
  text-align: left;
}

.mb-table td {
  padding: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.mb-total-card {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 14px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* MINIMAL LUXURY THEME */
.minimal-luxury-container {
  padding: 20px;
  color: #0f172a;
  box-sizing: border-box;
}

.ml-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.ml-title { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; }

.ml-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 16px;
}

.ml-table th {
  border-bottom: 2px solid #0f172a;
  padding: 8px 0;
  text-align: left;
  font-weight: 800;
}

.ml-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 0;
}

/* CASH MEMO THEME */
.cashmemo-container {
  padding: 16px;
  border: 2px dashed #166534;
  border-radius: 8px;
  background: #fafdfa;
  box-sizing: border-box;
}

/* CLASSIC RED THEME */
.vansh-red-header {
  border-bottom: 3px double #dc2626;
  padding-bottom: 6px;
  margin-bottom: 12px;
  text-align: center;
}

.vansh-top-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: bold;
}

.vansh-brand-row {
  margin: 4px 0;
}

.vansh-company-title {
  font-size: 24px;
  font-weight: 900;
  color: #dc2626;
}

.vansh-address {
  font-size: 11px;
  font-weight: bold;
}

.vansh-doc-title {
  text-align: center;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
  margin: 10px 0;
  text-decoration: underline;
}

.vansh-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 10px;
}

.vansh-client-box {
  border: 1px solid #000;
  padding: 8px;
  font-size: 12px;
  margin-bottom: 12px;
}

.vansh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 12px;
}

.vansh-table th, .vansh-table td {
  border: 1px solid #000;
  padding: 6px;
}

/* TOAST NOTIFICATION STYLING */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background-color: #0f172a;
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

/* RESPONSIVE MEDIA QUERIES FOR PC & MOBILE COMPATIBILITY */

@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* COOL MOBILE BOTTOM APP NAV BAR FOR SMARTPHONES */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.mobile-bottom-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex: 1;
  user-select: none;
}

.mobile-bottom-item i {
  width: 20px;
  height: 20px;
  margin-bottom: 3px;
  transition: transform 0.2s ease;
}

.mobile-bottom-item.active {
  color: #3b82f6;
  font-weight: 700;
}

.mobile-bottom-item.active i {
  transform: translateY(-2px);
  color: #60a5fa;
}

.mobile-bottom-item.fab-item {
  position: relative;
  top: -16px;
}

.mobile-fab {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
  border: 4px solid #0f172a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-bottom-item.fab-item:active .mobile-fab {
  transform: scale(0.92);
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
  }

  .content-body {
    padding-bottom: 80px !important;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .mobile-nav-bar {
    display: flex;
    background: #0f172a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .top-header {
    display: none; /* Mobile navigation uses top sticky mobile-nav-bar & bottom app nav */
  }

  .content-body {
    padding: 14px;
  }

  .creator-container, .profile-card {
    padding: 14px;
    border-radius: 12px;
  }

  .form-control, .btn-primary, .btn-secondary {
    min-height: 42px;
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-col {
    margin-bottom: 12px;
  }

  .calculation-summary {
    grid-template-columns: 1fr;
  }

  .gst-presets-grid {
    grid-template-columns: 1fr;
  }

  .mb-grid-2, .va-transport-grid, .va-address-grid, .va-footer-grid {
    grid-template-columns: 1fr;
  }

  .va-meta-col:first-child, .va-address-box:first-child, .va-footer-left {
    border-right: none;
    border-bottom: 1px solid #000;
  }

  .mb-header-banner, .ml-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .mb-doc-badge {
    text-align: left;
  }

  .modal-content {
    max-height: 95vh;
    border-radius: 16px;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .modal-body {
    padding: 10px;
  }

  .invoice-print-area {
    padding: 6px !important;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    width: 100%;
  }

  .pager-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .va-company-name {
    font-size: 16px;
  }

  .va-meta-row {
    flex-direction: column;
  }

  .va-meta-label {
    width: 100%;
  }
}

/* STRICT A4 SINGLE-PAGE PRINT SPECIFICATIONS FOR HARDCOPY & PDF EXPORT */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  
  html, body {
    width: 210mm;
    height: 297mm;
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .sidebar, .top-header, .mobile-nav-bar, .modal-header, .toast-container, .sidebar-overlay {
    display: none !important;
  }

  .main-wrapper {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  .modal-overlay {
    position: relative !important;
    background: transparent !important;
    display: block !important;
    padding: 0 !important;
    min-height: auto !important;
  }

  .modal-content {
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
    border-radius: 0 !important;
  }

  .modal-body {
    padding: 0 !important;
    background: white !important;
    overflow: visible !important;
  }

  .invoice-print-area {
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 210mm !important;
    max-width: 210mm !important;
    box-sizing: border-box !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
  }
}
