/* EZFormz - Base Styles (extracted from layout.ts) */

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

:root {
	--primary: #4f46e5;
	--primary-hover: #4338ca;
	--primary-light: #eef2ff;
	--primary-fg: #ffffff;
	--danger: #ef4444;
	--danger-hover: #dc2626;
	--success: #10b981;
	--warning: #f59e0b;
	--gray-50: #f9fafb;
	--gray-100: #f3f4f6;
	--gray-200: #e5e7eb;
	--gray-300: #d1d5db;
	--gray-400: #9ca3af;
	--gray-500: #6b7280;
	--gray-600: #4b5563;
	--gray-700: #374151;
	--gray-800: #1f2937;
	--gray-900: #111827;

	/* Semantic surface + text tokens — these flip in dark mode */
	--bg-app: #f9fafb;
	--bg-surface: #ffffff;
	--bg-surface-2: #f9fafb;
	--bg-sunken: #f3f4f6;
	--bg-hover: #f3f4f6;
	--border: #e5e7eb;
	--border-strong: #d1d5db;
	--text: #111827;
	--text-muted: #6b7280;
	--text-faint: #9ca3af;

	/* Status surfaces (bg + fg + border) */
	--ok-bg: #ecfdf5;   --ok-fg: #065f46;   --ok-border: #a7f3d0;
	--warn-bg: #fffbeb; --warn-fg: #92400e; --warn-border: #fde68a;
	--err-bg: #fef2f2;  --err-fg: #991b1b;  --err-border: #fecaca;
	--info-bg: #eef2ff; --info-fg: #3730a3; --info-border: #c7d2fe;

	--radius: 8px;
	--radius-lg: 12px;
	--shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
	--shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
	--shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
}

/* ===== Dark theme overlay ===== */
:root[data-theme="dark"] {
	--primary: #818cf8;
	--primary-hover: #a5b4fc;
	--primary-light: rgba(129,140,248,0.14);
	--primary-fg: #0b0d14;
	--danger: #f87171;
	--danger-hover: #ef4444;
	--success: #34d399;
	--warning: #fbbf24;
	--gray-50: #1a1f2e;
	--gray-100: #242a3a;
	--gray-200: #2e3446;
	--gray-300: #3a4358;
	--gray-400: #6b7591;
	--gray-500: #8c96b0;
	--gray-600: #a8b1c7;
	--gray-700: #c4ccdc;
	--gray-800: #dde2ed;
	--gray-900: #eef1f7;

	--bg-app: #0b0d14;
	--bg-surface: #131724;
	--bg-surface-2: #1a1f2e;
	--bg-sunken: #0f131d;
	--bg-hover: #1f2536;
	--border: #2a3044;
	--border-strong: #3a4358;
	--text: #eef1f7;
	--text-muted: #8c96b0;
	--text-faint: #6b7591;

	--ok-bg: rgba(52,211,153,0.10);   --ok-fg: #6ee7b7;   --ok-border: rgba(52,211,153,0.30);
	--warn-bg: rgba(251,191,36,0.10); --warn-fg: #fcd34d; --warn-border: rgba(251,191,36,0.30);
	--err-bg: rgba(248,113,113,0.10); --err-fg: #fca5a5;  --err-border: rgba(248,113,113,0.30);
	--info-bg: rgba(129,140,248,0.12);--info-fg: #a5b4fc; --info-border: rgba(129,140,248,0.28);

	--shadow: 0 1px 3px rgba(0,0,0,.5), 0 1px 2px rgba(0,0,0,.4);
	--shadow-md: 0 4px 6px rgba(0,0,0,.5), 0 2px 4px rgba(0,0,0,.4);
	--shadow-lg: 0 18px 32px rgba(0,0,0,.55), 0 4px 8px rgba(0,0,0,.4);

	color-scheme: dark;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	background: var(--bg-app);
	color: var(--text);
	line-height: 1.6;
	min-height: 100vh;
	/* Prevent stray inner content (long URLs, oversized grids) from triggering
	 * horizontal scroll on the entire page on mobile. */
	overflow-x: hidden;
}

/* Nav */
.nav {
	background: var(--bg-surface);
	border-bottom: 1px solid var(--border);
	padding: 0 24px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 100;
}
.nav-brand {
	font-size: 20px;
	font-weight: 700;
	color: var(--primary);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 8px;
}
.nav-brand-icon {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	display: block;
	object-fit: contain;
	flex-shrink: 0;
}
.beta-tag {
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--warn-bg);
	color: #92400e;
	padding: 2px 6px;
	border-radius: 4px;
}
.beta-bar {
	background: var(--warn-bg);
	border-bottom: 1px solid #fde68a;
	padding: 6px 24px;
	font-size: 12px;
	color: #92400e;
	text-align: center;
	position: relative;
}
.beta-bar a, .beta-bar button:not(.beta-close) { color: #b45309; font-weight: 600; background: none; border: none; cursor: pointer; font-size: inherit; font-family: inherit; text-decoration: underline; padding: 0; }
.beta-close {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #92400e;
	font-size: 18px;
	padding: 4px;
	line-height: 1;
	opacity: 0.6;
}
.beta-close:hover { opacity: 1; }
/* Hamburger menu button (injected by shared.js, hidden on desktop) */
.nav-hamburger {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	color: var(--text-muted);
	-webkit-tap-highlight-color: transparent;
}
.nav-hamburger svg { display: block; }
/* Feedback modal */
.fb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; align-items: center; justify-content: center; padding: 24px; }
.fb-overlay.open { display: flex; }
.fb-modal { background: var(--bg-surface); border-radius: 12px; padding: 28px; width: 100%; max-width: 440px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); color: var(--text); }
.fb-modal h3 { font-size: 18px; margin: 0 0 4px; color: var(--text); }
.fb-modal p { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.fb-modal textarea { width: 100%; min-height: 120px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; font-family: inherit; resize: vertical; background: var(--bg-surface-2); color: var(--text); }
.fb-modal textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
.fb-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.fb-msg { font-size: 13px; margin-top: 10px; }
.nav-links { display: flex; gap: 16px; align-items: center; }
.nav-links a {
	color: var(--text-muted);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { font-weight: 600; color: var(--primary); }
.nav-links a.btn { color: white; }
.nav-links a.btn:hover { color: white; }

/* Nav layout helpers + user menu (Account / Help / Log Out dropdown) */
.nav-spacer { flex: 1; }
.nav-user-wrap { position: relative; display: inline-flex; align-items: center; }
.nav-user-btn {
	display: inline-flex; align-items: center; gap: 4px;
	background: transparent; border: 1px solid var(--border);
	color: var(--text-muted);
	padding: 6px 10px; border-radius: 999px;
	cursor: pointer; font: inherit;
	transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-user-btn:hover { color: var(--primary); border-color: var(--primary); }
.nav-user-btn.active { color: var(--primary); border-color: var(--primary); }
.nav-user-btn[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); background: var(--bg-surface-2); }
.nav-user-btn svg { display: block; }
.nav-user-chevron { font-size: 10px; line-height: 1; margin-left: 2px; opacity: 0.8; }
.nav-user-menu {
	position: absolute; top: calc(100% + 8px); right: 0;
	min-width: 180px;
	background: var(--bg-surface); border: 1px solid var(--border);
	border-radius: 10px; padding: 6px;
	box-shadow: 0 8px 24px rgba(15,23,42,0.12);
	z-index: 120;
	display: flex; flex-direction: column;
}
.nav-user-menu.hidden { display: none; }
.nav-user-menu a {
	display: block; padding: 9px 12px; font-size: 14px;
	color: var(--text); text-decoration: none; border-radius: 6px;
	transition: background 0.15s, color 0.15s;
}
.nav-user-menu a:hover { background: var(--bg-surface-2); color: var(--primary); }
.nav-user-menu a.active { color: var(--primary); font-weight: 600; }
.nav-user-menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 2px; }

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	border-radius: var(--radius);
	font-size: 14px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.15s;
	text-decoration: none;
	line-height: 1;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--bg-surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
	margin-bottom: 6px;
}
.form-input, .form-textarea, .form-select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius);
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
	background: var(--bg-surface);
	color: var(--text);
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-light);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* Cards */
.card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 24px;
	box-shadow: var(--shadow);
}

/* Container */
.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.container-sm { max-width: 480px; margin: 0 auto; padding: 24px; }
.container-md { max-width: 700px; margin: 0 auto; padding: 24px; }

/* Grid */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* Utility */
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.gap-2 { gap: 16px; }
.gap-1 { gap: 8px; }
.hidden { display: none !important; }

/* Alert / Toast */
.alert {
	padding: 12px 16px;
	border-radius: var(--radius);
	font-size: 14px;
	margin-bottom: 16px;
}
.alert-success { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-border); }
.alert-error { background: var(--err-bg); color: var(--err-fg); border: 1px solid var(--err-border); }
.alert-info { background: var(--info-bg); color: var(--info-fg); border: 1px solid var(--info-border); }

/* Badge */
.badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}
.badge-active { background: var(--ok-bg); color: #065f46; }
.badge-inactive { background: var(--bg-hover); color: var(--text-muted); }
.badge-pending { background: var(--warn-bg); color: #92400e; }
.badge-confirmed { background: var(--ok-bg); color: #065f46; }
.badge-shipped { background: var(--info-bg); color: #3730a3; }
/* Drop-shipped from the vendor directly to the buyer — teal to distinguish
   from the indigo "Shipped" badge while staying in the same blue-ish family. */
.badge-vendor_shipped { background: #cffafe; color: #155e75; }
.badge-completed { background: var(--ok-bg); color: #065f46; }
.badge-cancelled { background: var(--err-bg); color: #991b1b; }

/* Loading spinner */
.spinner {
	width: 20px; height: 20px;
	border: 2px solid var(--gray-200);
	border-top-color: var(--primary);
	border-radius: 50%;
	animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Theme toggle (light/system/dark segmented control) */
.theme-toggle { display: inline-flex; padding: 3px; gap: 2px; background: var(--bg-surface-2); border: 1px solid var(--border); border-radius: 999px; }
.theme-toggle-opt { background: transparent; border: none; color: var(--text-muted); padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; border-radius: 999px; transition: background .15s, color .15s; }
.theme-toggle-opt:hover { color: var(--text); }
.theme-toggle-opt.on { background: var(--bg-surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

/* Compact nav theme toggle */
.theme-toggle-nav {
	background: transparent; border: 1px solid var(--border); color: var(--text-muted);
	width: 32px; height: 32px; border-radius: 999px; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 14px; line-height: 1; padding: 0;
	transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle-nav:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-strong); }

/* Toast Notifications (global)
   z-index 10001 puts toasts above the chat widget (.chat-widget z-index:9999)
   so error messages aren't hidden behind the Telegram bubble. Offset 92px from
   the right to clear the chat-widget's 60px button + its ~24px right offset. */
.toast-notification {
	position: fixed; bottom: 24px; right: 92px; z-index: 10001;
	padding: 12px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
	color: white; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
	opacity: 0; transform: translateY(10px);
	transition: opacity 0.3s, transform 0.3s;
}
.toast-notification.toast-visible { opacity: 1; transform: translateY(0); }
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: var(--primary); }

/* Skeleton loading */
@keyframes shimmer {
	0% { background-position: -400px 0; }
	100% { background-position: 400px 0; }
}
.skeleton {
	background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
	background-size: 800px 100%;
	animation: shimmer 1.5s infinite;
	border-radius: var(--radius);
}
.skeleton-card {
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 20px;
	box-shadow: var(--shadow);
}
.skeleton-line {
	height: 14px;
	margin-bottom: 10px;
}
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.h-6 { height: 24px; }

/* Fade-in animation */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease-out; }
@media (prefers-reduced-motion: reduce) { .fade-in { animation: none; } }

/* Responsive */
@media (max-width: 640px) {
	.container { padding: 12px; }
	.card { padding: 14px; }
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
	.hide-mobile { display: none; }
	.nav { padding: 0 12px; height: 52px; }
	.nav-brand { font-size: 18px; }
	.nav-hamburger { display: flex; align-items: center; }
	.nav-links {
		display: none;
		position: absolute;
		top: 52px;
		left: 0;
		right: 0;
		background: var(--bg-surface);
		border-bottom: 1px solid var(--border);
		flex-direction: column;
		padding: 8px 0;
		box-shadow: var(--shadow-md);
		z-index: 99;
	}
	.nav.open .nav-links { display: flex; }
	.nav-links a { padding: 12px 24px; font-size: 15px; }
	.nav-links a.btn { margin: 8px 24px; text-align: center; justify-content: center; }
	/* Flatten the user-menu dropdown into the mobile stack */
	.nav-spacer { display: none; }
	.nav-user-wrap { display: contents; }
	.nav-user-btn { display: none; }
	.nav-user-menu { position: static; display: flex !important; flex-direction: column; background: transparent; border: none; padding: 0; box-shadow: none; border-radius: 0; }
	.nav-user-menu.hidden { display: flex !important; }
	.nav-user-menu hr { display: none; }
	.nav-user-menu a { padding: 12px 24px; font-size: 15px; border-radius: 0; }
	.beta-bar { padding: 6px 36px 6px 12px; font-size: 11px; }
	.btn { min-height: 44px; }
	.form-input, .form-textarea, .form-select { min-height: 44px; font-size: 16px; }
}

/* Onboarding hint */
.onboarding-hint {
	position: fixed; bottom: 24px; right: 24px; z-index: 300;
	background: var(--primary); color: white; border-radius: var(--radius-lg);
	padding: 16px 20px; max-width: 320px; box-shadow: var(--shadow-lg);
	opacity: 0; transform: translateY(12px); transition: all 0.3s ease;
	font-size: 14px; line-height: 1.5;
}
.onboarding-hint.onboarding-visible { opacity: 1; transform: translateY(0); }
.onboarding-hint strong { display: block; margin-bottom: 4px; }
.onboarding-hint p { margin: 0; opacity: 0.9; font-size: 13px; }
.onboarding-close {
	position: absolute; top: 8px; right: 10px; background: none; border: none;
	color: white; font-size: 18px; cursor: pointer; opacity: 0.7; line-height: 1;
}
.onboarding-close:hover { opacity: 1; }

/* QR modal */
.qr-overlay {
	display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5);
	z-index: 200; align-items: center; justify-content: center; padding: 24px;
}
.qr-overlay.open { display: flex; }
.qr-modal {
	background: var(--bg-surface); border-radius: var(--radius-lg); padding: 28px;
	max-width: 360px; width: 100%; text-align: center; box-shadow: var(--shadow-lg);
	color: var(--text);
}
.qr-modal h3 { font-size: 18px; margin-bottom: 16px; }
.qr-modal canvas { margin: 0 auto 16px; display: block; }
.qr-modal .qr-url { font-size: 12px; color: var(--text-faint); word-break: break-all; margin-bottom: 16px; }

/* Multi-column layout for checkbox/radio/poll groups with many options.
   Uses CSS columns so items flow top-to-bottom within a column, then spill
   to the next column (newspaper-style) instead of left-to-right row-wrap. */
@media (min-width: 520px) {
	.cf-radio-group.cf-grid, .cf-checkbox-group.cf-grid {
		display: block; columns: 2; column-gap: 24px;
	}
	.cf-radio-group.cf-grid > label,
	.cf-checkbox-group.cf-grid > label {
		display: flex; break-inside: avoid; -webkit-column-break-inside: avoid;
		page-break-inside: avoid; margin-bottom: 6px;
	}
}
@media (min-width: 768px) {
	.cf-radio-group.cf-grid-3, .cf-checkbox-group.cf-grid-3 {
		columns: 3;
	}
}

/* ===== Donation surfaces ===== */

/* Subtle "Donate" item in the main nav — kept low-key, not screaming */
.nav-links .nav-donate {
	color: var(--text-muted);
	display: inline-flex; align-items: center; gap: 4px;
}
.nav-links .nav-donate::before {
	content: "\2665";
	color: #ef4444;
	font-size: 13px;
}
.nav-links .nav-donate:hover { color: var(--primary, #4f46e5); }

/* Donation strip on dashboard bottom */
.donate-strip {
	display: flex; align-items: center; gap: 16px;
	margin-top: 24px;
	padding: 18px 22px;
	background: linear-gradient(135deg, #f5f3ff 0%, #fefce8 100%);
	border: 1px solid var(--border);
	border-radius: 12px;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.donate-strip:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.06);
	border-color: var(--primary, #4f46e5);
}
.donate-strip-icon {
	flex: 0 0 44px; height: 44px;
	background: #fee2e2; color: #ef4444;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: 22px;
}
.donate-strip-content { flex: 1; min-width: 0; }
.donate-strip-title {
	font-size: 15px; font-weight: 600; color: var(--text);
	margin-bottom: 2px;
}
.donate-strip-sub {
	font-size: 13px; color: var(--text-muted); line-height: 1.5;
}
.donate-strip-cta {
	flex: 0 0 auto;
	font-size: 13px; font-weight: 600;
	color: var(--primary, #4f46e5);
	white-space: nowrap;
}

@media (max-width: 600px) {
	.donate-strip { flex-direction: column; text-align: center; }
	.donate-strip-cta { margin-top: 4px; }
}

/* =====================================================================
 * Notification bell + dropdown
 * ===================================================================== */
.notif-bell-wrap { position: relative; display: inline-flex; align-items: center; }
.notif-bell-btn {
	background: transparent; border: 1px solid var(--border);
	color: var(--text-muted); padding: 7px 9px;
	border-radius: 999px; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	position: relative; transition: color .15s, border-color .15s, background .15s;
}
.notif-bell-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.notif-bell-btn[aria-expanded="true"] { color: var(--primary); border-color: var(--primary); background: var(--bg-surface-2); }
.notif-bell-badge {
	position: absolute; top: -4px; right: -4px;
	min-width: 18px; height: 18px;
	background: var(--danger, #ef4444); color: white;
	border-radius: 999px; font-size: 10px; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0 5px; box-shadow: 0 0 0 2px var(--bg-surface);
	line-height: 1;
}

.notif-dropdown {
	position: absolute; top: calc(100% + 8px); right: 0;
	width: 360px; max-width: calc(100vw - 24px);
	background: var(--bg-surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .25), 0 1px 3px rgba(15, 23, 42, .08);
	z-index: 200;
	overflow: hidden;
}
.notif-dropdown-head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 12px 16px; border-bottom: 1px solid var(--border);
	gap: 12px;
}
.notif-dropdown-head strong { font-size: 14px; color: var(--text); }
.notif-dropdown-actions { display: inline-flex; gap: 6px; align-items: center; }
.notif-link-btn {
	background: transparent; border: none; padding: 4px 8px;
	color: var(--text-muted); font-size: 12px; cursor: pointer;
	border-radius: 4px; text-decoration: none;
}
.notif-link-btn:hover { background: var(--bg-hover); color: var(--text); }

.notif-dropdown-body {
	max-height: 480px; overflow-y: auto;
}
.notif-item {
	display: flex; align-items: flex-start; gap: 8px;
	padding: 12px 14px; border-bottom: 1px solid var(--border);
	cursor: pointer; transition: background .15s;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(79,70,229,.04); }
[data-theme="dark"] .notif-item.unread { background: rgba(129,140,248,.06); }
.notif-dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--primary); margin-top: 7px; flex-shrink: 0;
}
.notif-dot-spacer { width: 8px; flex-shrink: 0; }
.notif-item-body { flex: 1; min-width: 0; }
.notif-item-title { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.35; }
.notif-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.notif-item-time { font-size: 11px; color: var(--text-faint); margin-top: 4px; font-family: ui-monospace, monospace; }
.notif-item-x {
	background: transparent; border: none; color: var(--text-faint);
	font-size: 18px; line-height: 1; padding: 4px 6px;
	cursor: pointer; border-radius: 4px; flex-shrink: 0;
}
.notif-item-x:hover { background: var(--bg-hover); color: var(--text); }

.notif-empty {
	padding: 32px 20px; text-align: center;
	color: var(--text-muted); font-size: 13px;
}

@media (max-width: 540px) {
	.notif-dropdown {
		position: fixed; top: 60px; left: 12px; right: 12px; width: auto; max-width: none;
	}
}

/* Notification settings matrix in /account */
.notif-prefs-table {
	width: 100%; border-collapse: collapse; font-size: 13px;
}
.notif-prefs-table th, .notif-prefs-table td {
	padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left;
}
.notif-prefs-table th { font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.notif-prefs-table th.col-channel, .notif-prefs-table td.col-channel { text-align: center; width: 90px; }
.notif-prefs-table tbody tr:hover { background: var(--bg-hover); }
.notif-prefs-table input[type="checkbox"] { accent-color: var(--primary); width: 18px; height: 18px; cursor: pointer; }
.notif-prefs-row-name { color: var(--text); font-weight: 500; }
.notif-prefs-row-desc { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
