/* ── OffertAI Design System & SaaS Stylesheet ── */
:root {
	color-scheme: dark;
	--bg-canvas: #090d16;
	--bg-surface: #111726;
	--bg-surface-hover: #171f33;
	--bg-elevated: #182238;
	--bg-card: #131c30;
	--bg-card-subtle: #0f1728;
	--bg-input: #0b111e;

	--text-primary: #f8fafc;
	--text-secondary: #cbd5e1;
	--text-muted: #94a3b8;
	--text-subtle: #64748b;

	--border-default: #1e293b;
	--border-strong: #334155;
	--border-focus: #6366f1;

	/* Brand & Accents */
	--brand-primary: #6366f1; /* Indigo 500 */
	--brand-hover: #4f46e5; /* Indigo 600 */
	--brand-active: #4338ca;
	--brand-glow: rgba(99, 102, 241, 0.25);
	--brand-subtle: rgba(99, 102, 241, 0.12);
	--brand-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
	--brand-emerald: #10b981;
	--brand-emerald-subtle: rgba(16, 185, 129, 0.15);

	/* Status Colors */
	--success-text: #34d399;
	--success-bg: rgba(16, 185, 129, 0.14);
	--success-border: rgba(16, 185, 129, 0.3);

	--warning-text: #fbbf24;
	--warning-bg: rgba(245, 158, 11, 0.14);
	--warning-border: rgba(245, 158, 11, 0.3);

	--info-text: #60a5fa;
	--info-bg: rgba(59, 130, 246, 0.14);
	--info-border: rgba(59, 130, 246, 0.3);

	--danger-text: #f87171;
	--danger-bg: rgba(239, 68, 68, 0.14);
	--danger-border: rgba(239, 68, 68, 0.3);

	/* Typography & Dimensions */
	--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 14px;
	--radius-xl: 20px;
	--radius-full: 9999px;

	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
	--shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.5);
	--shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
	--shadow-glow: 0 0 25px rgba(99, 102, 241, 0.18);

	--ring-focus: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

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

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	scroll-behavior: smooth;
	background: var(--bg-canvas);
	color: var(--text-primary);
	font-family: var(--font-sans);
}

body {
	margin: 0;
	padding: 0;
	background: var(--bg-canvas);
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 14px;
	line-height: 1.5;
	min-height: 100vh;
}

/* Background mesh glow */
.bg-mesh {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	pointer-events: none;
	background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.1) 0%, transparent 60%),
				radial-gradient(circle at 100% 40%, rgba(139, 92, 246, 0.06) 0%, transparent 40%),
				radial-gradient(circle at 0% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 45%);
	z-index: 0;
}

.app-wrapper {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* Container */
.container {
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 1.25rem;
}

.container-narrow {
	max-width: 960px;
}

.container-wide {
	max-width: 1400px;
}

/* ── Typography & Headings ── */
h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); line-height: 1.2; }
h3 { font-size: 1.35rem; line-height: 1.3; }
h4 { font-size: 1.1rem; line-height: 1.4; }

p {
	margin: 0 0 1rem;
	color: var(--text-secondary);
}

p:last-child {
	margin-bottom: 0;
}

.gradient-text {
	background: var(--brand-gradient);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.mono {
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
}

/* ── Navbar ── */
.navbar {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(9, 13, 22, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-default);
	height: 68px;
	display: flex;
	align-items: center;
}

.navbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.brand-logo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	text-decoration: none;
	color: var(--text-primary);
	font-weight: 800;
	font-size: 1.35rem;
	letter-spacing: -0.03em;
	cursor: pointer;
}

.brand-icon {
	width: 34px;
	height: 34px;
	border-radius: var(--radius-sm);
	background: var(--brand-gradient);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
	color: #fff;
	font-size: 1.1rem;
}

.brand-badge {
	font-size: 0.7rem;
	padding: 0.15rem 0.45rem;
	border-radius: var(--radius-full);
	background: var(--brand-subtle);
	color: #a5b4fc;
	border: 1px solid rgba(99, 102, 241, 0.3);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.nav-links {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav-link {
	padding: 0.5rem 0.85rem;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	transition: color 0.15s, background-color 0.15s;
	cursor: pointer;
	border: none;
	background: transparent;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.nav-link:hover {
	color: var(--text-primary);
	background: var(--bg-surface-hover);
}

.nav-link.active {
	color: var(--text-primary);
	background: var(--brand-subtle);
	border: 1px solid rgba(99, 102, 241, 0.25);
	font-weight: 600;
}

.nav-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

/* Mobile Nav Toggle */
.mobile-toggle {
	display: none;
	background: var(--bg-surface);
	border: 1px solid var(--border-default);
	color: var(--text-primary);
	padding: 0.45rem 0.65rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
}

/* ── Buttons ── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.65rem 1.15rem;
	border-radius: var(--radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease-out;
	user-select: none;
	white-space: nowrap;
}

.btn:focus-visible {
	outline: none;
	box-shadow: var(--ring-focus);
}

.btn-lg {
	padding: 0.85rem 1.5rem;
	font-size: 1rem;
	border-radius: var(--radius-md);
}

.btn-sm {
	padding: 0.4rem 0.75rem;
	font-size: 0.8rem;
}

.btn-icon-only {
	padding: 0.5rem;
	width: 34px;
	height: 34px;
}

.btn-primary {
	background: var(--brand-primary);
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
	background: var(--brand-hover);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

.btn-primary:active {
	background: var(--brand-active);
	transform: translateY(0);
}

.btn-emerald {
	background: #10b981;
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.btn-emerald:hover {
	background: #059669;
	transform: translateY(-1px);
}

.btn-secondary {
	background: var(--bg-surface);
	color: var(--text-primary);
	border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
	background: var(--bg-surface-hover);
	border-color: #475569;
	color: #fff;
}

.btn-ghost {
	background: transparent;
	color: var(--text-muted);
}

.btn-ghost:hover {
	background: var(--bg-surface-hover);
	color: var(--text-primary);
}

.btn-danger {
	background: var(--danger-bg);
	color: var(--danger-text);
	border: 1px solid var(--danger-border);
}

.btn-danger:hover {
	background: #ef4444;
	color: #fff;
	border-color: #ef4444;
}

/* ── Hero Section ── */
.hero-section {
	padding: 4.5rem 0 3.5rem;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.hero-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0.9rem;
	border-radius: var(--radius-full);
	background: var(--bg-surface);
	border: 1px solid var(--border-strong);
	color: var(--text-secondary);
	font-size: 0.825rem;
	font-weight: 500;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-sm);
}

.hero-title {
	max-width: 820px;
	margin: 0 auto 1.25rem;
}

.hero-desc {
	max-width: 620px;
	margin: 0 auto 2.25rem;
	font-size: 1.15rem;
	color: var(--text-muted);
	line-height: 1.6;
}

.hero-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 3.5rem;
}

.hero-badges {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 2rem;
	flex-wrap: wrap;
	color: var(--text-muted);
	font-size: 0.85rem;
}

.hero-badge-item {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

/* ── Live Interactive Generator Teaser ── */
.hero-preview-frame {
	margin: 2rem auto 0;
	max-width: 980px;
	background: var(--bg-card);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), var(--shadow-glow);
	overflow: hidden;
	text-align: left;
}

.preview-topbar {
	background: var(--bg-surface);
	padding: 0.75rem 1.25rem;
	border-bottom: 1px solid var(--border-default);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.preview-dots {
	display: flex;
	gap: 6px;
}

.preview-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #334155;
}

/* ── Features & How it works ── */
.section {
	padding: 4.5rem 0;
	position: relative;
}

.section-header {
	text-align: center;
	max-width: 680px;
	margin: 0 auto 3rem;
}

.section-tag {
	text-transform: uppercase;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	color: var(--brand-primary);
	margin-bottom: 0.6rem;
	display: block;
}

.section-title {
	margin-bottom: 0.8rem;
}

.section-desc {
	font-size: 1.05rem;
	color: var(--text-muted);
}

/* Step Cards */
.steps-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}

.step-card {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	padding: 1.75rem;
	position: relative;
	transition: transform 0.2s, border-color 0.2s;
}

.step-card:hover {
	transform: translateY(-3px);
	border-color: var(--border-strong);
}

.step-number {
	width: 36px;
	height: 36px;
	border-radius: var(--radius-sm);
	background: var(--brand-subtle);
	color: #a5b4fc;
	border: 1px solid rgba(99, 102, 241, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.05rem;
	margin-bottom: 1.25rem;
}

/* Feature Grid */
.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 1.5rem;
}

.feature-card {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	padding: 1.75rem;
	transition: all 0.2s;
}

.feature-card:hover {
	border-color: rgba(99, 102, 241, 0.4);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.feature-icon {
	font-size: 1.8rem;
	margin-bottom: 1rem;
	display: inline-block;
}

/* ── Pricing Cards ── */
.pricing-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1.5rem;
	align-items: stretch;
}

.pricing-card {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	padding: 2.25rem 2rem;
	display: flex;
	flex-direction: column;
	position: relative;
	transition: transform 0.2s;
}

.pricing-card.popular {
	border-color: var(--brand-primary);
	box-shadow: 0 0 35px rgba(99, 102, 241, 0.25);
	background: linear-gradient(180deg, rgba(99, 102, 241, 0.08) 0%, var(--bg-card) 40%);
	transform: scale(1.02);
}

.popular-badge {
	position: absolute;
	top: -12px;
	left: 50%;
	transform: translateX(-50%);
	background: var(--brand-primary);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 0.25rem 0.85rem;
	border-radius: var(--radius-full);
	box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.pricing-price {
	font-size: 2.5rem;
	font-weight: 800;
	color: var(--text-primary);
	margin: 1rem 0 0.5rem;
	display: flex;
	align-items: baseline;
	gap: 0.35rem;
}

.pricing-period {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--text-muted);
}

.pricing-features {
	list-style: none;
	margin: 1.75rem 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex-grow: 1;
}

.pricing-feature-item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--text-secondary);
	font-size: 0.9rem;
}

.pricing-feature-item svg {
	color: var(--brand-emerald);
	flex-shrink: 0;
}

/* ── FAQ Accordion ── */
.faq-list {
	max-width: 760px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.faq-item {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.faq-question {
	width: 100%;
	text-align: left;
	padding: 1.25rem 1.5rem;
	background: transparent;
	border: none;
	color: var(--text-primary);
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.faq-question:hover {
	color: #a5b4fc;
}

.faq-answer {
	padding: 0 1.5rem 1.25rem;
	color: var(--text-muted);
	line-height: 1.6;
	font-size: 0.925rem;
}

/* ── App Shell / Dashboard Layout ── */
.app-shell {
	display: flex;
	min-height: calc(100vh - 68px);
}

.app-sidebar {
	width: 260px;
	background: var(--bg-surface);
	border-right: 1px solid var(--border-default);
	padding: 1.5rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex-shrink: 0;
}

.app-main {
	flex: 1;
	padding: 2rem 2.5rem;
	overflow-y: auto;
	background: var(--bg-canvas);
}

.sidebar-nav-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 0.9rem;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.9rem;
	transition: all 0.15s;
	cursor: pointer;
	border: none;
	background: transparent;
	width: 100%;
	text-align: left;
}

.sidebar-nav-item:hover {
	color: var(--text-primary);
	background: var(--bg-surface-hover);
}

.sidebar-nav-item.active {
	color: var(--text-primary);
	background: var(--brand-subtle);
	border: 1px solid rgba(99, 102, 241, 0.25);
	font-weight: 600;
}

/* KPI Cards */
.kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 1rem;
	margin-bottom: 2rem;
}

.kpi-card {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	padding: 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

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

.kpi-value {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--text-primary);
	letter-spacing: -0.02em;
}

.kpi-sub {
	font-size: 0.775rem;
	color: var(--text-subtle);
}

/* ── Tables ── */
.table-wrapper {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.table-toolbar {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var(--border-default);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
}

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

.data-table th {
	background: var(--bg-surface);
	padding: 0.75rem 1rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border-default);
}

.data-table td {
	padding: 0.9rem 1rem;
	border-bottom: 1px solid var(--border-default);
	color: var(--text-secondary);
}

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

.data-table tr:hover td {
	background: var(--bg-surface-hover);
}

/* Status Badges */
.status-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.2rem 0.6rem;
	border-radius: var(--radius-full);
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: capitalize;
}

.status-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
}

.status-utkast {
	background: rgba(148, 163, 184, 0.15);
	color: #94a3b8;
	border: 1px solid rgba(148, 163, 184, 0.25);
}
.status-utkast::before { background: #94a3b8; }

.status-skickad {
	background: var(--info-bg);
	color: var(--info-text);
	border: 1px solid var(--info-border);
}
.status-skickad::before { background: #60a5fa; }

.status-accepterad {
	background: var(--success-bg);
	color: var(--success-text);
	border: 1px solid var(--success-border);
}
.status-accepterad::before { background: #10b981; }

.status-avvisad {
	background: var(--danger-bg);
	color: var(--danger-text);
	border: 1px solid var(--danger-border);
}
.status-avvisad::before { background: #ef4444; }

/* ── Form Controls & Inputs ── */
.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 1.15rem;
}

.form-label {
	font-size: 0.825rem;
	font-weight: 600;
	color: var(--text-secondary);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.form-input,
.form-select,
.form-textarea {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border-radius: var(--radius-sm);
	background: var(--bg-input);
	border: 1px solid var(--border-default);
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 0.875rem;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
	outline: none;
	border-color: var(--brand-primary);
	box-shadow: var(--ring-focus);
}

.form-input::placeholder,
.form-textarea::placeholder {
	color: var(--text-subtle);
}

.form-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}

.form-row-3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 1rem;
}

/* ── Offertverktyg / Editor Specific ── */
.quote-editor-layout {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 2rem;
	align-items: start;
}

.editor-card {
	background: var(--bg-card);
	border: 1px solid var(--border-default);
	border-radius: var(--radius-lg);
	padding: 1.75rem;
	margin-bottom: 1.5rem;
}

.editor-section-title {
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 1.25rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--border-default);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Line Item Rows */
.line-item-row {
	display: grid;
	grid-template-columns: 2.5fr 1fr 1fr 1.2fr 1.2fr 40px;
	gap: 0.6rem;
	align-items: center;
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid var(--border-default);
	background: var(--bg-card-subtle);
	border-radius: var(--radius-sm);
	margin-bottom: 0.5rem;
}

.line-item-header {
	display: grid;
	grid-template-columns: 2.5fr 1fr 1fr 1.2fr 1.2fr 40px;
	gap: 0.6rem;
	font-size: 0.725rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--text-muted);
	padding: 0.4rem 0.5rem;
}

/* Offert A4 Live Preview Sheet */
.quote-preview-sheet {
	background: #ffffff;
	color: #0f172a;
	padding: 2.5rem;
	border-radius: var(--radius-md);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
	font-family: var(--font-sans);
	font-size: 13px;
	line-height: 1.5;
	position: sticky;
	top: 85px;
	max-height: calc(100vh - 110px);
	overflow-y: auto;
}

.sheet-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	padding-bottom: 1.5rem;
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 1.5rem;
}

.sheet-company-title {
	font-size: 1.35rem;
	font-weight: 800;
	color: #0f172a;
}

.sheet-offert-title {
	font-size: 1.5rem;
	font-weight: 800;
	color: #4338ca;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	text-align: right;
}

.sheet-meta-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.sheet-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	padding: 0.85rem 1rem;
}

.sheet-box-title {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	color: #64748b;
	margin-bottom: 0.35rem;
}

.sheet-table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.25rem 0;
}

.sheet-table th {
	background: #f1f5f9;
	color: #475569;
	font-size: 11px;
	text-transform: uppercase;
	font-weight: 700;
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid #cbd5e1;
	text-align: left;
}

.sheet-table td {
	padding: 0.65rem;
	border-bottom: 1px solid #f1f5f9;
	color: #1e293b;
	font-size: 12.5px;
}

.sheet-totals {
	width: 280px;
	margin-left: auto;
	margin-top: 1rem;
	border-top: 2px solid #e2e8f0;
	padding-top: 0.5rem;
}

.sheet-total-row {
	display: flex;
	justify-content: space-between;
	padding: 0.3rem 0;
	font-size: 12.5px;
	color: #475569;
}

.sheet-total-row.grand {
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	border-top: 1px solid #cbd5e1;
	margin-top: 0.35rem;
	padding-top: 0.5rem;
}

/* ── Modals & Dialogs ── */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(4, 7, 13, 0.75);
	backdrop-filter: blur(4px);
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	animation: fadeIn 0.15s ease-out;
}

.modal-content {
	background: var(--bg-surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-lg);
	width: 100%;
	max-width: 520px;
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	animation: modalSlide 0.2s ease-out;
}

.modal-header {
	padding: 1.25rem 1.5rem;
	border-bottom: 1px solid var(--border-default);
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.modal-body {
	padding: 1.5rem;
	max-height: 80vh;
	overflow-y: auto;
}

.modal-footer {
	padding: 1rem 1.5rem;
	border-top: 1px solid var(--border-default);
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	background: var(--bg-surface-hover);
}

/* ── Toast Notifications ── */
.toast-container {
	position: fixed;
	bottom: 1.5rem;
	right: 1.5rem;
	z-index: 110;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	pointer-events: none;
}

.toast {
	pointer-events: auto;
	background: var(--bg-elevated);
	color: var(--text-primary);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-md);
	padding: 0.85rem 1.15rem;
	box-shadow: var(--shadow-lg);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.875rem;
	animation: toastSlide 0.2s ease-out;
}

.toast-success {
	border-left: 4px solid var(--brand-emerald);
}

.toast-error {
	border-left: 4px solid #ef4444;
}

/* ── Footer ── */
.footer {
	background: var(--bg-surface);
	border-top: 1px solid var(--border-default);
	padding: 3.5rem 0 2rem;
	margin-top: auto;
	color: var(--text-muted);
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr;
	gap: 2.5rem;
	margin-bottom: 3rem;
}

.footer-title {
	color: var(--text-primary);
	font-size: 0.95rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	font-size: 0.875rem;
}

.footer-link {
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.15s;
	cursor: pointer;
}

.footer-link:hover {
	color: var(--text-primary);
}

.footer-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border-default);
	font-size: 0.825rem;
}

/* ── Animations ── */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes modalSlide {
	from { transform: translateY(12px) scale(0.98); opacity: 0; }
	to { transform: translateY(0) scale(1); opacity: 1; }
}

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

/* ── Print / PDF Stylesheet ── */
@media print {
	body, html {
		background: #fff !important;
		color: #000 !important;
	}

	.navbar,
	.footer,
	.app-sidebar,
	.bg-mesh,
	.no-print,
	.quote-editor-form,
	.preview-topbar,
	.toast-container {
		display: none !important;
	}

	.app-wrapper,
	.app-shell,
	.app-main,
	.container {
		margin: 0 !important;
		padding: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	.quote-editor-layout {
		display: block !important;
	}

	.quote-preview-sheet {
		box-shadow: none !important;
		border: none !important;
		padding: 0 !important;
		max-height: none !important;
		position: static !important;
	}
}

/* ── Mobile Responsiveness ── */
@media (max-width: 1024px) {
	.quote-editor-layout {
		grid-template-columns: 1fr;
	}
	.quote-preview-sheet {
		position: static;
		max-height: none;
	}
}

@media (max-width: 768px) {
	.nav-links {
		display: none;
	}
	.mobile-toggle {
		display: block;
	}
	.app-shell {
		flex-direction: column;
	}
	.app-sidebar {
		width: 100%;
		border-right: none;
		border-bottom: 1px solid var(--border-default);
	}
	.app-main {
		padding: 1.25rem 1rem;
	}
	.line-item-row, .line-item-header {
		grid-template-columns: 1fr 1fr;
	}
	.form-row-2, .form-row-3 {
		grid-template-columns: 1fr;
	}
	.footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

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