.icon-btn {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	color: var(--text-sub);
	font-size: 1rem;
}

.icon-btn i {
	line-height: 1;
}

.icon-btn.primary {
	color: var(--brand);
	font-weight: 800;
}

.icon-btn.danger {
	color: var(--danger);
}

.summary-card {
	background: linear-gradient(135deg, var(--brand), #2895ff);
	border-radius: var(--radius-md);
	color: #fff;
	padding: 18px;
	position: relative;
	box-shadow: 0 14px 24px rgba(31, 115, 241, 0.25);
}

.summary-card.compact {
	padding: 14px 18px;
}

.summary-label {
	opacity: 0.9;
    color: #fff;
}

.summary-sub {
	opacity: 0.8;
    color: #fff;
	margin-bottom: var(--space-1);
}

.wallet-badge {
	position: absolute;
	right: 16px;
	top: 24px;
	width: 52px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.2);
	display: grid;
	place-items: center;
}

.wallet-badge i {
	font-size: 1.1rem;
}

.today-strip {
	margin-top: var(--space-4);
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 13px 14px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
}

.today-strip strong {
	color: #2f63c6;
}

.link-btn {
	color: #2f63c6;
	font-weight: 700;
}

.expense-item {
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 12px;
	display: grid;
	grid-template-columns: 44px 1fr auto;
	gap: 10px;
	align-items: center;
}

.expense-icon {
	width: 40px;
	height: 40px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	font-size: 1rem;
}

.expense-name {
	font-weight: 700;
	margin-bottom: 3px;
}

.expense-note,
.expense-time,
.group-date,
.group-total,
.subtle-title,
.version {
	color: var(--text-sub);
}

.expense-price {
	text-align: right;
}

.expense-price strong {
	color: #c94444;
}

.expense-action {
	font-size: 0.75rem;
	color: #2f63c6;
	font-weight: 700;
}

.history-group {
	display: grid;
	gap: var(--space-2);
}

.group-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: var(--space-2);
}

.month-switcher {
	display: grid;
	grid-template-columns: 36px 1fr 36px;
	align-items: center;
	text-align: center;
	margin-bottom: var(--space-4);
}

.donut-chart {
	width: 190px;
	height: 190px;
	margin: 0 auto;
	border-radius: 999px;
	background: conic-gradient(#e7ebf3 0 100%);
	display: grid;
	place-items: center;
}

.donut-core {
	width: 120px;
	height: 120px;
	border-radius: 999px;
	background: #fff;
	display: grid;
	place-items: center;
	text-align: center;
	box-shadow: inset 0 0 0 1px var(--line);
}

.donut-core strong {
	font-size: 1.2rem;
}

.donut-core span {
	color: var(--text-sub);
	font-size: 0.8rem;
}

.category-row {
	display: grid;
	grid-template-columns: 14px 1fr auto auto;
	gap: 10px;
	align-items: center;
}

.swatch {
	width: 10px;
	height: 10px;
	border-radius: 999px;
}

.category-meta {
	color: var(--text-sub);
	min-width: 56px;
	text-align: right;
}

.field-card {
	background: var(--bg-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 10px 12px;
	display: grid;
	gap: 8px;
}

.field-card > span {
	font-weight: 700;
	font-size: 0.83rem;
}

.field-card input,
.field-card select {
	border: 0;
	outline: 0;
	background: transparent;
	width: 100%;
	font-size: 1rem;
	color: var(--text-main);
}

.amount-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.currency {
	font-weight: 800;
	font-size: 1.1rem;
}

.quick-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-3);
}

.quick-chip {
	border-radius: var(--radius-sm);
	background: var(--bg-soft);
	border: 1px solid var(--line);
	padding: 10px;
	display: grid;
	place-items: center;
	gap: 6px;
	font-size: 0.78rem;
	font-weight: 500;
}

.quick-chip-icon {
	font-size: 1.02rem;
}

.quick-chip.active {
	border-color: #90b9ff;
	box-shadow: inset 0 0 0 1px #90b9ff;
}

.primary-btn {
	margin-top: 12px;
	border-radius: 999px;
	padding: 13px;
	color: #fff;
	background: linear-gradient(135deg, var(--brand), var(--brand-2));
	font-weight: 700;
	box-shadow: 0 14px 24px rgba(31, 115, 241, 0.22);
}

.settings-group {
	display: grid;
	gap: 2px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--bg-soft);
	margin-bottom: var(--space-4);
	overflow: hidden;
}

.settings-group h3 {
	font-size: 0.85rem;
	color: var(--text-sub);
	padding: 12px 14px 8px;
}

.setting-row {
	padding: 13px 14px;
	background: #fff;
	border-bottom: 1px solid var(--line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-align: left;
	font-weight: 500;
}

.setting-row span {
	display: flex;
	align-items: center;
	gap: 10px;
}

.setting-icon {
	width: 16px;
	text-align: center;
	color: var(--text-sub);
}

.setting-row.danger .setting-icon {
	color: var(--danger);
}

.setting-row:last-child {
	border-bottom: 0;
}

.setting-row small {
	color: var(--text-sub);
}

.setting-row.danger {
	color: var(--danger);
}

.version {
	text-align: center;
	padding-top: 10px;
}

#bottomNav {
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: #fff;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px 10px 12px;
    flex-shrink: 0;
    z-index: 4;
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
}

.nav-item {
	display: grid;
	justify-items: center;
	gap: 4px;
	color: var(--text-light);
	font-size: 0.73rem;
	font-weight: 600;
}

.nav-item .nav-icon {
	font-size: 1rem;
}

.nav-item.active {
	color: var(--brand);
}

.fab {
	position: absolute;
	right: 18px;
	top: 10px;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--brand), var(--brand-2));
	color: #fff;
	display: flex !important;
    align-items: center;
    justify-content: center;
	font-size: 1.25rem;
	box-shadow: var(--shadow-soft);
    z-index: 15;
}

.toast-stack {
	position: absolute;
	top: 74px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(100% - 32px);
	display: grid;
	gap: 8px;
	pointer-events: none;
}

.toast {
	border-radius: 10px;
	padding: 10px 12px;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 600;
	animation: toast-in 180ms ease;
}

.toast.success {
	background: #149a4a;
}

.toast.error {
	background: #d23a3a;
}

.empty-state {
	text-align: center;
	color: var(--text-sub);
	border: 1px dashed #d2d7e4;
	border-radius: var(--radius-sm);
	padding: 18px;
	background: #fafbff;
}

@keyframes toast-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.history-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--space-3);
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.history-search-wrap i {
    color: var(--text-sub);
}

.history-search-wrap input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 0.92rem;
}

.history-filter-modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    align-items: end;
}

.filter-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
}

.filter-sheet {
    position: relative;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 12px 14px 16px;
    max-height: 82vh;
    overflow-y: auto;
    box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.12);
}

.filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.filter-body {
    display: grid;
    gap: 10px;
}

.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.secondary-btn {
    border-radius: 999px;
    padding: 13px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    color: var(--text-main);
    font-weight: 600;
}