/**
 * Business Finance Manager — standalone app stylesheet.
 * Covers: public landing page, login screen, and the internal app shell
 * (sidebar, dashboard cards, tables, forms). Always light theme —
 * intentionally ignores the device/browser's dark mode preference.
 */

:root {
	--bfm-primary: #4f46e5;
	--bfm-primary-dark: #4338ca;
	--bfm-primary-light: #eef2ff;
	--bfm-success: #16a34a;
	--bfm-danger: #dc2626;
	--bfm-warning: #d97706;
	--bfm-bg: #f4f5fa;
	--bfm-panel-bg: #ffffff;
	--bfm-border: #e5e7eb;
	--bfm-text: #1f2937;
	--bfm-text-muted: #6b7280;
	--bfm-radius: 14px;
	--bfm-radius-sm: 8px;
	--bfm-shadow: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
	--bfm-shadow-lg: 0 20px 40px -12px rgba(79,70,229,.25);
}

* { box-sizing: border-box; }

html {
	color-scheme: light only;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	background: var(--bfm-bg);
	color: var(--bfm-text);
}

a { color: var(--bfm-primary); text-decoration: none; }

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: 999px;
	padding: 11px 24px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-primary { background: var(--bfm-primary); color: #fff; }
.btn-primary:hover { background: var(--bfm-primary-dark); transform: translateY(-1px); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; box-shadow: var(--bfm-shadow-lg); }
.btn-block { width: 100%; padding: 12px; font-size: 14px; }
.btn-secondary { background: var(--bfm-panel-bg); color: var(--bfm-text); border: 1px solid var(--bfm-border); }
.btn-danger { background: #fff; color: var(--bfm-danger); border: 1px solid var(--bfm-danger); }

/* =====================================================================
   Landing page
   ===================================================================== */

.landing-body { background: radial-gradient(circle at top, #f7f8ff 0%, var(--bfm-bg) 55%); }

.landing-nav { padding: 22px 6vw; }
.landing-nav-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.landing-brand, .auth-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 18px;
	color: var(--bfm-text);
}

.landing-brand-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--bfm-primary), #7c3aed);
	color: #fff;
	font-weight: 700;
}

.hero { position: relative; padding: 70px 6vw 40px; text-align: center; overflow: hidden; }

.hero-glow {
	position: absolute;
	top: -160px;
	left: 50%;
	transform: translateX(-50%);
	width: 700px;
	height: 700px;
	background: radial-gradient(circle, rgba(124,58,237,.18), transparent 65%);
	pointer-events: none;
}

.hero-inner { position: relative; max-width: 780px; margin: 0 auto; }

.hero-eyebrow {
	display: inline-block;
	padding: 6px 16px;
	border-radius: 999px;
	background: var(--bfm-primary-light);
	color: var(--bfm-primary);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.hero h1 { font-size: 42px; line-height: 1.2; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero-sub { font-size: 17px; color: var(--bfm-text-muted); line-height: 1.6; margin-bottom: 32px; }
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.features { padding: 30px 6vw 80px; }
.features-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.feature-card {
	background: var(--bfm-panel-bg);
	border: 1px solid var(--bfm-border);
	border-radius: var(--bfm-radius);
	padding: 28px 24px;
	box-shadow: var(--bfm-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}

.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px -8px rgba(16,24,40,.15); }
.feature-icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { margin: 0 0 8px; font-size: 16px; }
.feature-card p { margin: 0; color: var(--bfm-text-muted); font-size: 13.5px; line-height: 1.6; }

.landing-footer { text-align: center; padding: 26px 20px 40px; color: var(--bfm-text-muted); font-size: 12.5px; }

/* =====================================================================
   Auth (login) page
   ===================================================================== */

.auth-body {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: radial-gradient(circle at top, #f7f8ff 0%, var(--bfm-bg) 55%);
	padding: 20px;
}

.auth-card {
	width: 100%;
	max-width: 400px;
	background: var(--bfm-panel-bg);
	border: 1px solid var(--bfm-border);
	border-radius: var(--bfm-radius);
	box-shadow: var(--bfm-shadow-lg);
	padding: 36px 32px;
}

.auth-brand { justify-content: center; margin-bottom: 20px; }
.auth-card h1 { text-align: center; font-size: 22px; margin: 0 0 6px; }
.auth-sub { text-align: center; color: var(--bfm-text-muted); font-size: 13.5px; margin: 0 0 22px; }

.auth-form label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; }
.auth-form input {
	width: 100%;
	padding: 11px 14px;
	border-radius: var(--bfm-radius-sm);
	border: 1px solid var(--bfm-border);
	background: var(--bfm-bg);
	color: var(--bfm-text);
	font-size: 14px;
}

.auth-form .btn { margin-top: 22px; }
.auth-back-link { display: block; text-align: center; margin-top: 20px; font-size: 13px; color: var(--bfm-text-muted); }

.alert { padding: 10px 14px; border-radius: var(--bfm-radius-sm); font-size: 13px; margin-bottom: 6px; }
.alert-error { background: #fef2f2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

/* =====================================================================
   App shell (sidebar + topbar)
   ===================================================================== */

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

.app-sidebar {
	width: 240px;
	flex-shrink: 0;
	background: var(--bfm-panel-bg);
	border-right: 1px solid var(--bfm-border);
	padding: 22px 16px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.app-sidebar-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 800;
	font-size: 15px;
	padding: 0 8px 20px;
}

.app-nav { list-style: none; margin: 0; padding: 0; }
.app-nav li { margin-bottom: 2px; }

.app-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--bfm-radius-sm);
	color: var(--bfm-text-muted);
	font-size: 13.5px;
	font-weight: 600;
}

.app-nav a:hover { background: var(--bfm-bg); color: var(--bfm-text); }
.app-nav a.is-active { background: var(--bfm-primary-light); color: var(--bfm-primary); }
.app-nav .nav-icon { font-size: 16px; width: 20px; text-align: center; }

.app-main { flex: 1; min-width: 0; padding: 24px 28px 60px; }

.app-topbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 22px;
}

.app-topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.app-page-title { font-size: 22px; font-weight: 800; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Hamburger toggle — hidden on desktop, shown only below the sidebar breakpoint. */
.sidebar-toggle {
	display: none;
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: var(--bfm-radius-sm);
	border: 1px solid var(--bfm-border);
	background: var(--bfm-panel-bg);
	color: var(--bfm-text);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.sidebar-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 20, 32, 0.5);
	z-index: 199;
}

.sidebar-overlay.is-visible { display: block; }

.global-search {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--bfm-bg);
	border: 1px solid var(--bfm-border);
	border-radius: 999px;
	padding: 7px 14px;
	min-width: 260px;
}

.global-search input { border: none; background: transparent; outline: none; width: 100%; color: var(--bfm-text); font-size: 13px; }

.search-results {
	display: none;
	position: absolute;
	top: 110%;
	left: 0;
	right: 0;
	background: var(--bfm-panel-bg);
	border: 1px solid var(--bfm-border);
	border-radius: var(--bfm-radius-sm);
	box-shadow: var(--bfm-shadow-lg);
	z-index: 100;
	max-height: 320px;
	overflow-y: auto;
}

.search-results.is-visible { display: block; }
.search-result-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--bfm-border); color: var(--bfm-text); font-size: 13px; }
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bfm-bg); }
.search-result-type { font-size: 10.5px; text-transform: uppercase; color: var(--bfm-primary); font-weight: 700; margin-right: 6px; }

.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--bfm-primary-light); color: var(--bfm-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* =====================================================================
   Cards / panels / tables (shared by every app page)
   ===================================================================== */

.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
	background: var(--bfm-panel-bg);
	border: 1px solid var(--bfm-border);
	border-radius: var(--bfm-radius);
	box-shadow: var(--bfm-shadow);
	padding: 18px 20px;
	position: relative;
}

.card-icon { position: absolute; top: 16px; right: 18px; font-size: 20px; opacity: .55; }
.card-label { font-size: 12.5px; color: var(--bfm-text-muted); margin-bottom: 6px; }
.card-label small { display: block; font-size: 11px; opacity: .8; }
.card-value { font-size: 21px; font-weight: 800; }
.card-income .card-value { color: var(--bfm-success); }
.card-expense .card-value, .card-overdue .card-value { color: var(--bfm-danger); }

.panel { background: var(--bfm-panel-bg); border: 1px solid var(--bfm-border); border-radius: var(--bfm-radius); box-shadow: var(--bfm-shadow); margin-bottom: 24px; overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--bfm-border); }
.panel-header h2 { font-size: 15.5px; margin: 0; }
.panel-body { padding: 20px; }
.fy-badge { background: var(--bfm-bg); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; color: var(--bfm-primary); }

.chart-container { position: relative; height: 320px; }
@media (max-width: 782px) {
	.chart-container { height: 260px; }
}

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.table { width: 100%; min-width: 560px; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--bfm-text-muted); padding: 10px 14px; border-bottom: 1px solid var(--bfm-border); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--bfm-border); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.mini-table td { padding: 8px 4px; font-size: 13px; border-bottom: 1px solid var(--bfm-border); }
.empty-row { text-align: center; color: var(--bfm-text-muted); padding: 30px !important; }
.actions-col { white-space: nowrap; text-align: right; }
.amount { font-weight: 700; text-align: right; }
.amount-positive { color: var(--bfm-success); }
.amount-negative { color: var(--bfm-danger); }
.subtext { color: var(--bfm-text-muted); font-size: 12px; }
.text-danger { color: var(--bfm-danger); font-weight: 600; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: capitalize; background: var(--bfm-bg); color: var(--bfm-text-muted); }
.badge-active, .badge-paid, .badge-confirmed { background: #dcfce7; color: #166534; }
.badge-inactive, .badge-cancelled { background: #f3f4f6; color: #6b7280; }
.badge-draft { background: #e0e7ff; color: #3730a3; }
.badge-sent { background: #dbeafe; color: #1e40af; }
.badge-partially_paid, .badge-pending { background: #fef3c7; color: #92400e; }
.badge-overdue { background: #fee2e2; color: #991b1b; }

.alerts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.app-alert { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: var(--bfm-radius); font-size: 13px; }
.app-alert a { margin-left: auto; font-weight: 700; }
.app-alert-danger { background: #fef2f2; color: #991b1b; }
.app-alert-info { background: #eff6ff; color: #1e40af; }

/* Select2 — restyled to match the app's rounded, light-gray inputs */
.select2-container--default .select2-selection--single {
	border: 1px solid var(--bfm-border);
	border-radius: var(--bfm-radius-sm);
	background: var(--bfm-bg);
	height: auto;
	padding: 8px 10px;
}
.form-field .select2-container--default .select2-selection--single { padding: 9px 12px; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--bfm-text);
	line-height: 1.4;
	padding: 0;
	padding-right: 20px;
	font-size: 13.5px;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--bfm-text-muted); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; top: 0; right: 6px; }
.select2-container--default .select2-selection--single .select2-selection__clear {
	color: var(--bfm-text-muted);
	margin-right: 6px;
}
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--bfm-primary);
}
.select2-dropdown { border-color: var(--bfm-border); border-radius: var(--bfm-radius-sm); overflow: hidden; }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--bfm-primary); }
.select2-search--dropdown .select2-search__field { border: 1px solid var(--bfm-border); border-radius: 6px; padding: 6px 8px; }
.filter-bar .select2-container { flex: 0 0 auto; max-width: 100%; }

/* Filter bar / pagination */
.filter-bar, .export-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--bfm-panel-bg); border: 1px solid var(--bfm-border); border-radius: var(--bfm-radius); padding: 14px 16px; margin-bottom: 20px; }
.filter-bar input, .filter-bar select { border: 1px solid var(--bfm-border); border-radius: var(--bfm-radius-sm); padding: 7px 10px; background: var(--bfm-bg); color: var(--bfm-text); font-size: 13px; }

.pagination { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.pagination-links { display: flex; gap: 6px; }
.page-link { padding: 6px 12px; border-radius: var(--bfm-radius-sm); border: 1px solid var(--bfm-border); background: var(--bfm-panel-bg); color: var(--bfm-text); font-size: 13px; }
.page-link.is-active { background: var(--bfm-primary); border-color: var(--bfm-primary); color: #fff; }

/* Forms */
.form-panel { padding: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; margin-bottom: 20px; }
.form-field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.form-field .required { color: var(--bfm-danger); }
.form-field input[type=text], .form-field input[type=email], .form-field input[type=url], .form-field input[type=number],
.form-field input[type=date], .form-field input[type=password], .form-field select, .form-field textarea {
	width: 100%; border: 1px solid var(--bfm-border); border-radius: var(--bfm-radius-sm); padding: 9px 12px;
	background: var(--bfm-bg); color: var(--bfm-text); font-size: 13.5px;
}
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; padding-top: 10px; border-top: 1px solid var(--bfm-border); }
.toggle-row { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; }
.hidden { display: none !important; }

.media-field .media-preview img { max-width: 100px; max-height: 100px; border-radius: 8px; display: block; margin-bottom: 8px; border: 1px solid var(--bfm-border); }
.file-input { width: 100%; font-size: 13px; }

/* Invoice item table */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 4px; }
.item-table { min-width: 760px; }
.item-table input { width: 100%; border: 1px solid var(--bfm-border); border-radius: 6px; padding: 6px 8px; background: var(--bfm-bg); color: var(--bfm-text); font-size: 13px; }
.remove-row { color: var(--bfm-danger); font-weight: 700; background: none; border: 1px solid var(--bfm-border); border-radius: 6px; cursor: pointer; }
.invoice-totals { max-width: 340px; margin-left: auto; margin-top: 16px; margin-bottom: 20px; }
.totals-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--bfm-border); font-size: 13px; }
.totals-grand { font-size: 16px; font-weight: 800; border-bottom: none; color: var(--bfm-primary); }

/* Invoice preview — its own accent color (independent of the app theme) */
.invoice-preview {
	--invoice-accent: #6B54A2;
	--invoice-accent-dark: #56417F;
	--invoice-dark: #1f2937;
	padding: 40px;
	border-top: 6px solid var(--invoice-accent);
}
.invoice-preview-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 30px;
	margin-bottom: 28px;
	padding-bottom: 28px;
	border-bottom: 2px solid var(--bfm-border);
}
.invoice-brand h2 { margin: 10px 0 6px; font-size: 20px; }
.invoice-brand .subtext { line-height: 1.6; }
.invoice-logo { max-width: 150px; max-height: 74px; display: block; }
.invoice-meta { text-align: right; }
.invoice-meta h1 { color: var(--invoice-accent); letter-spacing: .08em; margin: 0 0 10px; font-size: 28px; }
.invoice-meta .badge { margin-bottom: 14px; }
.meta-table { margin-left: auto; }
.meta-table td { padding: 3px 0 3px 16px; font-size: 13px; text-align: right; }
.meta-table .meta-label { color: var(--bfm-text-muted); text-align: left; padding-left: 0; }
.invoice-bill-to { margin-bottom: 24px; background: var(--bfm-bg); border-radius: var(--bfm-radius-sm); padding: 14px 16px; border-left: 3px solid var(--invoice-accent); }
.invoice-bill-to h4 { margin: 0 0 8px; color: var(--invoice-accent); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.bill-to-grid { display: flex; justify-content: space-between; gap: 20px; }
.bill-to-name, .bill-to-contact { line-height: 1.6; }
.bill-to-contact { text-align: right; flex-shrink: 0; }

.invoice-items-table thead th { background: var(--invoice-dark); color: #fff; }

.invoice-totals .totals-grand {
	background: var(--invoice-accent);
	color: #fff;
	padding: 10px 16px;
	border-radius: var(--bfm-radius-sm);
	border-bottom: none;
	margin-top: 8px;
}

.invoice-payment, .invoice-notes, .invoice-terms { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--bfm-border); }
.invoice-payment h4, .invoice-notes h4, .invoice-terms h4 { margin: 0 0 10px; color: var(--invoice-accent); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.payment-methods { display: flex; flex-wrap: wrap; gap: 12px; }
.payment-method-card {
	flex: 1 1 200px;
	background: var(--bfm-bg);
	border: 1px solid var(--bfm-border);
	border-radius: var(--bfm-radius-sm);
	padding: 12px 14px;
	font-size: 13px;
	line-height: 1.6;
}
.payment-method-title { font-weight: 700; margin-bottom: 6px; color: var(--invoice-accent-dark); }
.payment-method-card .btn-primary { background: var(--invoice-accent); }
.payment-method-card-razorpay { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.payment-amount-due { font-weight: 700; margin-bottom: 8px; }
.payment-qr { flex-shrink: 0; text-align: center; }
.payment-qr img { display: block; border: 1px solid var(--bfm-border); border-radius: 6px; background: #fff; padding: 4px; }
.payment-qr-caption { font-size: 11px; color: var(--bfm-text-muted); margin-top: 4px; }
.payment-method-card .btn-primary:hover { background: var(--invoice-accent-dark); }

.invoice-footer-block { margin-top: 30px; text-align: center; color: var(--bfm-text-muted); font-size: 12px; }
.invoice-actions { margin-bottom: 20px; }

.profile-card { display: flex; gap: 24px; align-items: flex-start; padding: 24px; }
.profile-logo img { border-radius: var(--bfm-radius); max-width: 90px; }
.detail-list { list-style: none; margin: 12px 0; padding: 0; }
.detail-list li { margin-bottom: 4px; font-size: 13px; }
.avatar-round { border-radius: 50%; }
.avatar-placeholder { font-size: 26px; color: var(--bfm-text-muted); }

.tab-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--bfm-border); margin-bottom: 20px; padding: 0 24px; }
.tab-link { padding: 12px 16px; color: var(--bfm-text-muted); font-weight: 700; font-size: 13px; border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
.tab-link.is-active { color: var(--bfm-primary); border-bottom-color: var(--bfm-primary); }
.tab-panel { display: none; padding: 0 24px; }
.tab-panel.is-active { display: block; }

/* =====================================================================
   Responsive
   ===================================================================== */

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

/* Below this width the sidebar becomes an off-canvas drawer, opened via
   the hamburger button, instead of a full-height list pushing content down. */
@media (max-width: 900px) {
	.sidebar-toggle { display: inline-flex; align-items: center; justify-content: center; }

	.app-sidebar {
		position: fixed;
		top: 0;
		left: 0;
		width: 260px;
		max-width: 82vw;
		height: 100vh;
		z-index: 200;
		transform: translateX(-100%);
		transition: transform .2s ease;
		box-shadow: var(--bfm-shadow-lg);
	}

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

	.app-main { padding: 16px 16px 40px; }
	.features-inner { grid-template-columns: 1fr; }
	.hero h1 { font-size: 30px; }
	.hero { padding: 50px 6vw 30px; }
}

@media (max-width: 782px) {
	.columns { grid-template-columns: 1fr; }
	.form-grid { grid-template-columns: 1fr; }
	.cards-grid, .cards-grid-3, .cards-grid-4 { grid-template-columns: 1fr; }
	.invoice-preview-header, .profile-card, .bill-to-grid, .payment-method-card-razorpay { flex-direction: column; }
	.invoice-meta { text-align: left; }
	.meta-table, .meta-table td { text-align: left; }
	.meta-table { margin-left: 0; }
	.bill-to-contact { text-align: left; }
	.invoice-preview { padding: 22px 16px; }
	.form-panel { padding: 18px; }
	.panel-body { padding: 16px; }

	.app-page-title { font-size: 18px; max-width: 55vw; }
	.app-topbar-right { width: 100%; }
	.global-search { flex: 1 1 100%; min-width: 0; order: 3; }
	.user-chip span:last-child { display: none; }

	.filter-bar, .export-bar { flex-direction: column; align-items: stretch; }
	.filter-bar input, .filter-bar select { width: 100%; }
	.filter-bar .select2-container { width: 100% !important; min-width: 0; }

	.tab-nav { overflow-x: auto; padding: 0 16px; white-space: nowrap; }
	.tab-panel { padding: 0 16px; }
}

@media print {
	.app-sidebar, .app-topbar, .invoice-actions, .sidebar-overlay { display: none !important; }
	.app-main { padding: 0; }
}
