/* Shared navigation, theme, search, notification, modal, and responsive overrides. */
.field textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--input);
	color: var(--ink);
	padding: 12px 13px;
	font: 13px inherit;
	outline: 0;
	resize: vertical;
}
.field textarea:focus {
	border-color: var(--purple);
	box-shadow: 0 0 0 3px #7359e81c;
}
.field.is-disabled label {
	color: var(--muted);
}
.field.is-required label::after {
	content: ' *';
	color: var(--red);
}
.field.is-disabled select {
	cursor: not-allowed;
	opacity: 0.6;
}
.brand-mark {
	flex: 0 0 30px;
}
.compact-search-button {
	display: none;
	border: 0;
	background: var(--soft-purple);
	color: var(--purple);
	border-radius: 8px;
	width: 34px;
	height: 34px;
	cursor: pointer;
	font-size: 16px;
}
.notification-bell {
	position: relative;
	display: block;
	width: 13px;
	height: 13px;
	border: 1.7px solid currentColor;
	border-radius: 8px 8px 4px 4px;
}
.notification-bell::before {
	content: "";
	position: absolute;
	left: -3px;
	right: -3px;
	bottom: -3px;
	border-bottom: 1.7px solid currentColor;
	border-radius: 50%;
}
.notification-bell::after {
	content: "";
	position: absolute;
	left: 4px;
	bottom: -5px;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: currentColor;
}
.search-modal-form {
	width: min(100%, 560px);
	position: relative;
}
.search-modal-form input {
	width: 100%;
	height: 50px;
	border: 1px solid var(--line);
	border-radius: 11px;
	background: var(--surface);
	color: var(--ink);
	padding: 0 52px 0 16px;
	font:
		14px "DM Sans",
		sans-serif;
	outline: 0;
}
.search-modal-form button {
	position: absolute;
	right: 6px;
	top: 6px;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 8px;
	background: var(--purple);
	color: #fff;
	cursor: pointer;
}
.search-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 110;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 18vh 20px 20px;
	background: #110d1e99;
	backdrop-filter: blur(5px);
}
.search-modal-card {
	width: min(100%, 620px);
	padding: 22px;
	border: 1px solid var(--line);
	border-radius: 15px;
	background: var(--surface);
	box-shadow: 0 25px 80px #110d1e44;
}
.search-modal-card h2 {
	font-family: Manrope;
	font-size: 18px;
	margin: 0 0 14px;
}
.search-modal-card p {
	color: var(--muted);
	font-size: 11px;
	margin: 0 0 15px;
}

html[data-theme="light"] {
	color-scheme: light;
}
html[data-theme="dark"] {
	color-scheme: dark;
}
.field input[type="date"] {
	color-scheme: light;
}
html[data-theme="dark"] .field input[type="date"] {
	color-scheme: dark;
}
html[data-theme="dark"] .field input[type="date"]::-webkit-calendar-picker-indicator {
	filter: invert(1) brightness(1.4);
}
html[data-theme="dark"] body {
	background: var(--bg);
	color: var(--ink);
}
html[data-theme="dark"] .auth-page {
	background: radial-gradient(circle at top right, #30265b 0, #171427 45%);
}
html[data-theme="dark"] .activity-icon.expense {
	background: #482d3a;
}
html[data-theme="dark"] .activity-icon.income {
	background: #193f3a;
}
html[data-theme="dark"] .message.success {
	background: #193f3a;
	color: #87e2c2;
}
html[data-theme="dark"] .message.error {
	background: #482d3a;
	color: #ffadb0;
}
html[data-theme="dark"] .nav-badge {
	background: #193f3a;
}
html[data-theme="dark"] .insight-banner {
	border-color: #4a3c7c;
}
.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
}
.sidebar {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	overflow-x: hidden;
}
.sidebar::-webkit-scrollbar {
	width: 5px;
}
.sidebar::-webkit-scrollbar-thumb {
	background: var(--line);
	border-radius: 8px;
}
.menu-button {
	display: block;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 10px;
	background: var(--soft-purple);
	color: var(--purple);
	cursor: pointer;
	padding: 0;
	margin-right: auto;
	font-size: 20px;
	line-height: 1;
}
.sidebar-menu-button {
	display: none;
	margin-left: auto;
	border: 0;
	background: var(--soft-purple);
	color: var(--purple);
	border-radius: 7px;
	width: 28px;
	height: 28px;
	cursor: pointer;
	font-size: 14px;
}
.topbar .theme-toggle-top {
	display: none;
}
.edit-link {
	color: var(--purple);
	font-size: 11px;
	font-weight: 700;
	text-decoration: none;
}
.edit-link:hover {
	text-decoration: underline;
}
.nav-coming-soon {
	cursor: default;
	opacity: 0.72;
}
.nav-coming-soon:hover {
	background: transparent;
	color: var(--muted);
}
.logout-link {
	cursor: pointer;
	border: 0;
	background: none;
	font: inherit;
}
.topbar-search {
	position: relative;
	width: min(360px, 38vw);
	margin-left: auto;
	margin-right: 22px;
}
.topbar-search input {
	width: 100%;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--ink);
	padding: 0 38px 0 14px;
	font:
		12px "DM Sans",
		sans-serif;
	outline: 0;
}
.topbar-search input:focus {
	border-color: var(--purple);
	box-shadow: 0 0 0 3px #7359e81c;
}
.topbar-search button {
	position: absolute;
	right: 5px;
	top: 4px;
	width: 30px;
	height: 30px;
	border: 0;
	border-radius: 7px;
	background: var(--soft-purple);
	color: var(--purple);
	cursor: pointer;
}
.notification-wrap {
	position: relative;
}
.notification-button {
	position: relative;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--muted);
	font-size: 21px;
	cursor: pointer;
}
.notification-button:hover {
	background: var(--soft-purple);
	color: var(--purple);
}
.notification-count {
	position: absolute;
	top: -3px;
	right: -4px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 20px;
	background: var(--red);
	color: #fff;
	font-size: 9px;
	line-height: 16px;
}
.notification-menu {
	display: none;
	position: absolute;
	right: 0;
	top: 46px;
	width: 340px;
	z-index: 30;
	border: 1px solid var(--line);
	border-radius: 13px;
	background: var(--surface);
	box-shadow: 0 20px 50px #17122722;
	overflow: hidden;
}
.notification-menu.show {
	display: block;
}
.notification-menu-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid var(--line);
}
.notification-menu-head strong {
	display: block;
	font-family: Manrope;
	font-size: 13px;
}
.notification-menu-head small {
	display: block;
	color: var(--muted);
	font-size: 10px;
	margin-top: 4px;
}
.notification-menu-head > span {
	color: var(--purple);
	font-size: 10px;
	font-weight: 700;
}
.notification-items {
	max-height: 330px;
	overflow-y: auto;
}
.notification-item {
	display: flex;
	gap: 10px;
	padding: 13px 15px;
	text-decoration: none;
	border-bottom: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
}
.notification-item:hover,
.notification-item.unread {
	background: var(--soft-purple);
}
.notification-item-icon {
	display: grid;
	place-items: center;
	flex: 0 0 28px;
	height: 28px;
	border-radius: 8px;
	background: #eaf8f2;
	color: var(--green);
	font-size: 13px;
}
.notification-item strong,
.notification-item small,
.notification-item em {
	display: block;
}
.notification-item strong {
	font-size: 11px;
	color: var(--ink);
}
.notification-item small {
	font-size: 10px;
	color: var(--muted);
	line-height: 1.45;
	margin-top: 3px;
}
.notification-item em {
	font-size: 9px;
	color: #aaa5b7;
	font-style: normal;
	margin-top: 5px;
}
.notification-empty {
	padding: 28px 15px;
	text-align: center;
	color: var(--muted);
	font-size: 11px;
}
.logout-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: grid;
	place-items: center;
	padding: 20px;
	background: #110d1e99;
	backdrop-filter: blur(4px);
}
.logout-modal {
	width: min(100%, 390px);
	padding: 28px;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: var(--surface);
	box-shadow: 0 25px 80px #110d1e44;
}
.logout-modal h2 {
	font-family: Manrope;
	font-size: 20px;
	margin: 0 0 8px;
}
.logout-modal p {
	color: var(--muted);
	font-size: 12px;
	line-height: 1.6;
	margin: 0;
}
.modal-icon {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background: var(--soft-purple);
	color: var(--purple);
	font-size: 20px;
	margin-bottom: 17px;
}
.modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	margin-top: 24px;
}
.modal-actions .secondary-button {
	margin: 0;
}
.auth-page {
	position: relative;
}
.auth-theme-toggle {
	position: fixed;
	top: 22px;
	right: 24px;
	border: 1px solid var(--line);
	border-radius: 8px;
	background: var(--surface);
	color: var(--muted);
	padding: 9px 12px;
	font:
		11px "DM Sans",
		sans-serif;
	cursor: pointer;
}
.auth-theme-toggle span {
	margin-right: 5px;
}
.form-nav {
	margin-top: 45px;
}
.chart-panel,
.activity-panel {
	min-width: 0;
	overflow: hidden;
}
.bar-chart {
	width: 100%;
	min-width: 0;
	gap: clamp(4px, 1vw, 13px);
	overflow: hidden;
}
.bars {
	width: 100%;
	min-width: 0;
	gap: clamp(2px, 0.7vw, 5px);
}
.bar {
	width: clamp(7px, 1.5vw, 18px);
}
@media (max-width: 760px) {
	.dashboard-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.chart-panel,
	.activity-panel {
		width: 100%;
		min-width: 0;
	}
	.bar-chart {
		height: 205px;
		padding: 0 2px;
	}
	.bars {
		height: 175px;
	}
	.bar {
		width: clamp(6px, 2.8vw, 14px);
	}
}
@media (min-width: 681px) {
	.sidebar-collapsed .sidebar {
		width: 82px;
	}
	.sidebar-collapsed .sidebar .brand > span:last-of-type,
	.sidebar-collapsed .workspace span:not(.workspace-dot),
	.sidebar-collapsed .workspace-chevron,
	.sidebar-collapsed .nav-label,
	.sidebar-collapsed .nav-badge,
	.sidebar-collapsed .sidebar-footer > div:not(.avatar),
	.sidebar-collapsed .logout-link {
		display: none;
	}
	.sidebar-collapsed .nav-link {
		width: 48px;
		justify-content: center;
		padding: 12px 0;
		margin-left: auto;
		margin-right: auto;
		font-size: 0;
        column-gap: normal;
	}
	.sidebar-collapsed .nav-link span:first-child {
		width: auto;
		font-size: 17px;
	}
	.sidebar-collapsed .brand {
		padding: 0;
		justify-content: center;
		flex-direction: column;
		gap: 10px;
	}
	.sidebar-collapsed .sidebar-menu-button {
		margin-left: 0;
	}
	.sidebar-collapsed .workspace {
		justify-content: center;
	}
	.sidebar-collapsed .workspace-dot {
		margin: 0;
	}
	.sidebar-collapsed .sidebar-footer {
		justify-content: center;
		padding-left: 0;
		padding-right: 0;
	}
}
@media (max-width: 420px) {
	.topbar {
		padding: 0 10px;
	}
	.mobile-brand {
		font-size: 12px;
	}
	.topbar-actions {
		gap: 5px;
	}
	.topbar .theme-toggle-top {
		display: none;
	}
	.metric-grid,
	.member-grid {
		grid-template-columns: 1fr;
	}
	.page-heading h1 {
		font-size: 22px;
	}
	.page-heading .subtitle {
		font-size: 11px;
	}
	.panel {
		padding: 15px 12px;
	}
	.activity-item {
		gap: 7px;
	}
	.content-wrap {
		padding: 20px 12px;
	}
	.notification-menu {
		top: 59px;
	}
}
@media (max-width: 760px) {
	.topbar-search {
		display: none;
	}
	.compact-search-button {
		display: grid;
		place-items: center;
		margin-left: auto;
		margin-right: 8px;
	}
}
@media (max-width: 680px) {
	.menu-button {
		display: block;
	}
	.sidebar-menu-button {
		display: none;
		background: transparent;
		color: var(--muted);
		font-size: 21px;
		width: 30px;
	}
	.sidebar {
		position: fixed;
		top: 64px;
		height: calc(100dvh - 64px);
		min-height: calc(100dvh - 64px);
		overflow-y: auto;
	}
	.sidebar-open .sidebar-overlay {
		display: block;
		top: 64px;
	}
	.topbar {
		position: sticky;
		top: 0;
		z-index: 20;
	}
	.topbar .theme-toggle-top {
		display: block;
		margin-right: 10px;
	}
	.topbar-search {
		width: auto;
		flex: 1;
		margin: 0 10px;
	}
	.topbar-search input {
		height: 34px;
	}
	.topbar-search button {
		height: 26px;
		width: 26px;
		top: 4px;
	}
	.topbar-search button {
		font-size: 11px;
	}
	.content-wrap {
		width: 100%;
		overflow: hidden;
	}
	.page-heading .primary-button {
		width: 100%;
	}
	.dashboard-grid,
	.metric-grid,
	.member-grid {
		width: 100%;
	}
	.bar-chart {
		min-width: 0;
		width: 100%;
	}
	.transaction-form {
		padding: 20px;
	}
	.table-panel {
		width: 100%;
	}
	.auth-theme-toggle {
		top: 15px;
		right: 15px;
	}
	.auth-card {
		margin-top: 25px;
	}
	.notification-menu {
		position: fixed;
		top: 63px;
		right: 10px;
		width: min(340px, calc(100vw - 20px));
	}
}
