/*
 * Dashboard, tracker, plans.
 */

.mm-hero { margin: 0 0 var(--mm-gap); }

body.mm-canvas h1.mm-hero-title {
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 18px;
}

.mm-hero-title span {
	font-size: 16px;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--mm-text-soft);
}

.mm-hero-title em {
	font-style: normal;
	color: var(--mm-purple);
}

.mm-progress {
	height: 10px;
	border-radius: var(--mm-radius-pill);
	background: var(--mm-purple-soft);
	overflow: hidden;
}

.mm-progress-fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--mm-purple);
	border-radius: inherit;
	transition: width var(--mm-transition);
}

.mm-debt-board {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: var(--mm-gap-lg);
	align-items: start;
	margin-bottom: var(--mm-gap-lg);
}

.mm-donut-wrap {
	position: relative;
	height: 280px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mm-donut {
	width: 240px;
	height: 240px;
	overflow: visible;
}

.mm-donut-slice {
	cursor: pointer;
	pointer-events: stroke;
	transition: stroke-width 160ms ease;
}

.mm-donut-slice.is-hover {
	stroke-width: 20;
}

.mm-donut-tip {
	position: absolute;
	z-index: 6;
	min-width: 196px;
	padding: 10px 12px;
	background: var(--mm-card-bg);
	border-radius: 12px;
	box-shadow: var(--mm-shadow-heavy);
	font-size: var(--mm-text-sm);
	color: var(--mm-text-soft);
	pointer-events: none;
}

.mm-donut-tip[hidden] { display: none; }

.mm-donut-tip strong {
	display: block;
	margin-bottom: 8px;
	font-size: var(--mm-text-base);
	color: var(--mm-text);
}

.mm-donut-tip-row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 4px;
}

.mm-debt-table-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 16px 16px 0;
}

.mm-debt-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.mm-debt-toolbar .mm-section-title {
	margin: 0;
}

.mm-debt-toolbar-actions {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
}

.mm-debt-filter-wrap {
	position: relative;
	margin-bottom: 10px;
}

.mm-debt-filter {
	width: 100%;
	height: 40px;
	padding: 0 40px 0 16px;
	color: var(--mm-text);
	background: var(--mm-surface-alt);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-radius-pill);
	outline: none;
	transition: border-color var(--mm-transition);
}

.mm-debt-filter::placeholder {
	color: var(--mm-text-muted);
}

.mm-debt-filter:focus {
	border-color: var(--mm-purple);
}

.mm-debt-filter-wrap .mm-search-icon {
	right: 14px;
}

.mm-debt-table-wrap,
.mm-debt-list-table {
	min-width: 0;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
}

.mm-debt-table-wrap {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0 -16px;
	padding-bottom: 10px;
}

.mm-debt-table-pane {
	display: flex;
	flex-direction: column;
	min-width: 800px;
	width: max(100%, 800px);
}

.mm-debt-table {
	table-layout: fixed;
	width: 100%;
}

.mm-debt-col-name { width: 22%; }
.mm-debt-col-money { width: 15%; }
.mm-debt-col-date { width: 18%; }

.mm-debt-table-frozen,
.mm-debt-table-scroll,
.mm-debt-list-scroll {
	overflow-x: hidden;
	scrollbar-gutter: stable;
}

.mm-debt-table-frozen {
	overflow: hidden;
	flex-shrink: 0;
}

.mm-debt-table-scroll {
	height: 126px;
	max-height: 126px;
	overflow-y: auto;
}

.mm-debt-list-table {
	margin: 0 -10px;
}

.mm-debt-list-scroll {
	max-height: min(60vh, 520px);
	overflow-y: auto;
}

#mm-modal-debt-view {
	z-index: 110;
}

.mm-debt-table--head th,
.mm-debt-table--foot th {
	background: var(--mm-card-bg);
}

.mm-debt-table--foot {
	border-top: 1px solid var(--mm-border);
}

.mm-debt-table td:first-child,
.mm-debt-table th:first-child {
	overflow: hidden;
	text-overflow: ellipsis;
}

.mm-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 8px;
	vertical-align: middle;
}

.mm-plan-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--mm-gap);
}

.mm-plans {
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.mm-plans[hidden] { display: none; }

.mm-plans-card {
	flex: 1;
	height: 100%;
	padding: 22px 24px;
}

.mm-timeline-panel {
	min-width: 0;
	height: 100%;
	padding: 22px 24px;
}

.mm-timeline-head {
	margin-bottom: var(--mm-gap-sm);
}

.mm-timeline-head .mm-section-title {
	margin-bottom: 6px;
}

.mm-week-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mm-week-range {
	margin: 0;
	font-size: var(--mm-text-sm);
	font-weight: 600;
	color: var(--mm-text-soft);
	white-space: nowrap;
}

.mm-timeline-wrap {
	position: relative;
	width: 100%;
	min-width: 0;
}

.mm-timeline {
	--mm-timeline-line: var(--mm-purple);
	--mm-timeline-rail-w: 4px;
	--mm-timeline-node-size: 13px;
	--mm-timeline-row-alt: #ffffff;
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: min(52vh, 420px);
	overflow-x: visible;
	overflow-y: auto;
	scrollbar-width: thin;
	background: transparent;
}

[data-theme='dark'] .mm-timeline {
	--mm-timeline-row-alt: var(--mm-card-bg);
}

.mm-timeline-item {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
	cursor: pointer;
	z-index: 0;
}

.mm-timeline-item::marker {
	content: none;
}

.mm-timeline-item::before {
	content: '';
	position: absolute;
	top: 50%;
	left: calc(var(--mm-timeline-rail-w) / 2);
	width: var(--mm-timeline-node-size);
	height: var(--mm-timeline-node-size);
	border-radius: 50%;
	background: var(--mm-timeline-line);
	transform: translate(-50%, -50%);
	z-index: 3;
	pointer-events: none;
}

.mm-timeline-item.is-in::before {
	background: var(--mm-status-ready);
}

.mm-timeline-item.is-short::before {
	background: var(--mm-status-expired);
}

.mm-timeline-node {
	display: none !important;
}

.mm-timeline-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 12px 16px 12px 24px;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	border: 0;
	z-index: 0;
}

.mm-timeline-card::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--mm-timeline-rail-w);
	background: var(--mm-timeline-line);
	z-index: 1;
	pointer-events: none;
}

.mm-timeline-item:nth-child(even) .mm-timeline-card {
	background: var(--mm-timeline-row-alt);
}

.mm-timeline-date {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--mm-text);
	line-height: 1.35;
}

.mm-timeline-title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--mm-text);
	letter-spacing: -0.01em;
	line-height: 1.3;
}

.mm-timeline-amount {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: var(--mm-text);
	line-height: 1.35;
}

.mm-timeline-item.is-done,
.mm-timeline-item.is-skip {
	opacity: 0.45;
}

.mm-timeline-item.is-done .mm-timeline-title {
	text-decoration: line-through;
}

.mm-timeline-empty {
	position: relative;
	list-style: none;
	margin: 0;
	padding: 14px 16px;
	border: 0;
	font-size: var(--mm-text-base);
	color: var(--mm-text-muted);
	background: transparent;
}

.mm-timeline-empty::before {
	display: none;
}

.mm-shortfall-flag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--mm-status-expired);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.mm-dot--shortfall {
	width: 8px;
	height: 8px;
	margin-right: 0;
	background: var(--mm-status-expired);
}

.mm-shortfall-note {
	margin: 0 0 var(--mm-gap-sm);
	padding: 10px 12px;
	border-radius: var(--mm-radius-row);
	background: color-mix(in srgb, var(--mm-status-expired) 16%, var(--mm-card-bg));
	color: var(--mm-status-expired);
	font-weight: 700;
}

.mm-shortfall-note[hidden] {
	display: none;
}

.mm-arrangement-warning {
	grid-column: 1 / -1;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.mm-shortfall-when {
	display: inline;
	margin-left: 0.35em;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

.mm-shortfall-shift {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	margin: 0 0 var(--mm-gap-sm);
}

.mm-shortfall-shift[hidden] {
	display: none;
}

.mm-shortfall-shift .mm-field {
	flex: 1 1 160px;
	margin: 0;
}

.mm-note-log {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 12px;
}

.mm-note-log[hidden] {
	display: none;
}

.mm-note-log-item {
	padding: 10px 12px;
	border-radius: var(--mm-radius-row);
	background: var(--mm-surface-alt, color-mix(in srgb, var(--mm-text) 6%, var(--mm-card-bg)));
}

.mm-note-log-meta {
	display: block;
	margin-bottom: 4px;
	font-size: var(--mm-text-sm);
	font-weight: 600;
	color: var(--mm-text-soft);
}

.mm-note-log-body {
	white-space: pre-wrap;
}

.mm-plans-intro {
	margin: 0 0 var(--mm-gap);
	font-size: var(--mm-text-base);
	color: var(--mm-text-soft);
}

.mm-plans-intro[hidden] { display: none; }

.mm-plan-note {
	margin: 0 0 12px;
	font-size: var(--mm-text-sm);
	font-weight: 500;
	color: var(--mm-text-soft);
	line-height: 1.45;
}

.mm-summary-panel {
	min-width: 0;
	height: 100%;
	padding: 22px 24px;
}

.mm-summary-panel .mm-section-title {
	margin-bottom: var(--mm-gap-sm);
}

.mm-stat-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mm-stat-list li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--mm-border);
	font-size: var(--mm-text-base);
	color: var(--mm-text-soft);
}

.mm-stat-list li[role="button"] {
	cursor: pointer;
	border-radius: 8px;
}

.mm-stat-list li[role="button"]:hover span,
.mm-stat-list li[role="button"]:focus-visible span {
	color: var(--mm-text);
}

.mm-stat-list li[role="button"]:focus-visible {
	outline: 2px solid var(--mm-purple);
	outline-offset: 4px;
}

.mm-stat-list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.mm-stat-list small {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	font-weight: 500;
	color: var(--mm-text-muted);
}

.mm-stat-list strong {
	font-weight: 700;
	color: var(--mm-text);
	white-space: nowrap;
}

.mm-stat-list strong.is-neg {
	color: var(--mm-status-expired);
}

.mm-stat-cushion strong {
	white-space: normal;
	text-align: right;
}

.mm-cushion-note,
.mm-room-note {
	margin: 0 0 14px;
	color: var(--mm-text);
	line-height: 1.45;
}

.mm-room-note:last-child,
.mm-cushion-note:last-child {
	margin-bottom: 0;
}

.mm-stat-list li.mm-stat-empty {
	display: block;
	padding: 8px 0 0;
	border-bottom: 0;
	color: var(--mm-text-muted);
}

.mm-plan {
	background: var(--mm-card-bg);
	border-radius: var(--mm-radius-card);
	box-shadow: var(--mm-shadow-subtle);
	padding: 18px 20px;
	cursor: pointer;
	text-align: left;
	color: inherit;
	transition: box-shadow var(--mm-transition);
}

.mm-plan:hover {
	box-shadow: var(--mm-shadow-pill);
}

.mm-plan:focus-visible {
	outline: 2px solid var(--mm-purple);
	outline-offset: 2px;
	box-shadow: var(--mm-shadow-pill);
}

.mm-plan h3 {
	font-size: var(--mm-text-md);
	margin-bottom: 12px;
}

.mm-plan-row {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 0;
	font-size: var(--mm-text-base);
}

.mm-plan-total {
	display: flex;
	justify-content: space-between;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--mm-border);
	font-weight: 700;
}

.mm-page-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: var(--mm-gap);
}

.mm-page-title { font-size: 28px; font-weight: 700; }

.mm-tracker-head { justify-content: center; flex-wrap: wrap; }

.mm-tracker-tools {
	flex: 1 0 100%;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
}

.mm-fixed-board {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	margin-bottom: var(--mm-gap);
}

.mm-fixed-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}

.mm-fixed-head h3 { margin: 0; font-size: var(--mm-text-base); }

.mm-fixed-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 0;
	border-top: 1px solid var(--mm-border);
}

.mm-fixed-row strong,
.mm-fixed-row span { display: block; }

.mm-fixed-row span {
	color: var(--mm-text-muted);
	font-size: var(--mm-text-sm);
}

.mm-fixed-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: flex-end;
}

.mm-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	color: var(--mm-text-muted);
	border-radius: var(--mm-radius-pill);
}

.mm-icon-btn:hover {
	color: var(--mm-text);
	background: var(--mm-surface-sunken);
}

.mm-history-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 12px 0;
	border-top: 1px solid var(--mm-border);
}

.mm-history-row strong,
.mm-history-row span { display: block; }

.mm-history-row span {
	color: var(--mm-text-muted);
	font-size: var(--mm-text-sm);
}

.mm-history-row.is-undone { opacity: 0.72; }

.mm-overdue {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin-bottom: var(--mm-gap);
}

.mm-overdue-card {
	padding: 14px 16px;
	background: var(--mm-card-bg);
	border-radius: var(--mm-radius-card);
	box-shadow: var(--mm-shadow-subtle);
	cursor: pointer;
	border-left: 4px solid var(--mm-status-expired);
	text-align: left;
}

.mm-overdue-card strong {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.mm-calendar {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 8px;
}

.mm-cal-head {
	text-align: center;
	font-size: var(--mm-text-sm);
	font-weight: 700;
	color: var(--mm-text-muted);
	padding: 6px;
}

.mm-cal-day {
	min-height: 120px;
	min-width: 0;
	padding: 8px;
	background: var(--mm-card-bg);
	border-radius: 14px;
	box-shadow: var(--mm-shadow-subtle);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: stretch;
}

.mm-cal-day.is-muted { opacity: 0.45; }
.mm-cal-day.is-today { outline: 2px solid var(--mm-purple); }

.mm-cal-num { font-weight: 700; font-size: var(--mm-text-sm); }

.mm-cal-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-width: 0;
	max-width: 100%;
	font-size: 11px;
	padding: 3px 6px;
	border-radius: 8px;
	text-align: left;
}

.mm-cal-item-text {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mm-cal-item-amount {
	max-width: 100%;
	font-weight: 600;
	white-space: nowrap;
}

.mm-cal-item.is-in { background: color-mix(in srgb, var(--mm-status-ready) 40%, var(--mm-card-bg)); }
.mm-cal-item.is-out { background: var(--mm-purple-soft); }
.mm-cal-item.is-done { opacity: 0.45; text-decoration: line-through; }
.mm-cal-item.is-skip { opacity: 0.4; }

.mm-term-list { margin-top: 16px; }
.mm-term-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-top: 1px solid var(--mm-border);
}

.mm-debt-notes-form { margin: var(--mm-gap) 0 var(--mm-gap-sm); }

.mm-note-compose {
	position: relative;
}

.mm-note-compose textarea {
	padding-bottom: 44px;
}

.mm-note-compose-actions {
	position: absolute;
	right: 6px;
	bottom: 6px;
	display: flex;
	align-items: center;
	gap: 2px;
}

.mm-note-history {
	width: auto;
	padding: 0 8px;
	gap: 4px;
}

.mm-note-count {
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.mm-note-compose-actions button[type="submit"] {
	color: var(--mm-purple);
}

.mm-debt-pay-form { margin: 0 0 var(--mm-gap); }

.mm-debt-pay-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
}

.mm-debt-pay-row .mm-field {
	flex: 1 1 160px;
	margin: 0;
}

.mm-debt-pay-row .mm-btn { flex: 0 0 auto; }

#mm-modal-debt-notes { z-index: 110; }

.mm-budget-group {
	margin: 0 0 var(--mm-gap);
}

.mm-budget-group:last-child {
	margin-bottom: 0;
}

.mm-budget-group h3 {
	margin-bottom: 8px;
	font-size: var(--mm-text-base);
	color: var(--mm-text-muted);
}

.mm-budget-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
	border-bottom: 1px solid var(--mm-border);
	font-size: var(--mm-text-base);
}

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

.mm-budget-row span {
	min-width: 0;
}

.mm-budget-row small {
	display: block;
	margin-top: 2px;
	color: var(--mm-text-muted);
	font-size: var(--mm-text-sm);
}

.mm-budget-row strong {
	white-space: nowrap;
}

.mm-budget-total {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--mm-border);
	font-weight: 700;
}

.mm-budget-total.is-neg {
	color: var(--mm-status-expired);
}

.mm-dl { display: grid; grid-template-columns: 200px 1fr; gap: 6px 16px; font-size: var(--mm-text-base); }
.mm-dl[hidden] { display: none; }
.mm-tracker-item-pay { margin: 0 0 var(--mm-gap-sm); }
.mm-dl dt { color: var(--mm-text-muted); }

.mm-end-after {
	display: block;
	margin-top: 4px;
	color: var(--mm-text-soft);
	font-weight: 500;
}

.mm-copy-dd {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.mm-copy-dd span {
	min-width: 0;
	word-break: break-word;
}

.mm-copy-btn {
	flex: 0 0 auto;
	padding: 4px 10px;
	font-size: var(--mm-text-sm);
	font-weight: 600;
	color: var(--mm-purple);
	background: var(--mm-purple-soft);
	border-radius: var(--mm-radius-pill);
}

.mm-copy-btn:hover { opacity: 0.9; }

.mm-plan-pay + .mm-plan-pay {
	margin-top: 8px;
	padding-top: 18px;
	border-top: 1px solid var(--mm-border);
}

.mm-plan-pay h3 {
	font-size: var(--mm-text-md);
	margin-bottom: 12px;
}

.mm-plan-pay-total {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid var(--mm-border);
	font-size: var(--mm-text-md);
}

.mm-welcome { margin-bottom: 16px; color: var(--mm-text-soft); }
.mm-danger { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--mm-border); }

.mm-empty { color: var(--mm-text-muted); padding: 24px 12px; text-align: center; }

.mm-account-panel[hidden] { display: none !important; }

.mm-account-card {
	margin-bottom: var(--mm-gap);
	padding: var(--mm-gap) 24px;
}

.mm-account-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	width: 100%;
	min-width: 0;
	margin: 18px 0 0;
	padding: 0;
	border: 0;
}

.mm-account-term {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-radius-pill);
	font-size: var(--mm-text-md);
	font-weight: 600;
	cursor: pointer;
}

.mm-account-term:has(input:checked) {
	border-color: var(--mm-purple);
	background: var(--mm-purple-soft);
}

.mm-account-term input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--mm-purple);
}

.mm-account-term__price {
	font-weight: 500;
	color: var(--mm-text-soft);
}

.mm-account-card > h2 {
	font-size: var(--mm-text-lg);
	font-weight: 700;
	margin-bottom: var(--mm-gap-xs);
}

.mm-account-plan__title {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: var(--mm-gap-xs) var(--mm-gap-sm);
	font-size: var(--mm-text-xl);
	font-weight: 700;
}

.mm-account-plan__price { color: var(--mm-purple); }

.mm-account-plan__meta {
	margin-top: var(--mm-gap-xs);
	color: var(--mm-text-soft);
}

.mm-account-badge {
	padding: 3px 12px;
	border-radius: var(--mm-radius-pill);
	background: var(--mm-purple-soft);
	color: var(--mm-purple);
	font-size: var(--mm-text-sm);
	font-weight: 600;
}

.mm-account-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--mm-gap-sm);
	margin-top: var(--mm-gap);
}

.mm-account-switch {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: var(--mm-gap-sm);
	margin-top: var(--mm-gap-sm);
}

.mm-account-switch .mm-field { margin: 0; min-width: 220px; }

.mm-account-switch input[type='number'] { max-width: 6em; }

.mm-account-company,
.mm-account-details {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--mm-gap-sm);
	margin-top: var(--mm-gap-sm);
}

.mm-account-company .mm-form-actions,
.mm-account-details .mm-form-actions { grid-column: 1 / -1; }

@media (max-width: 782px) {
	.mm-account-company,
	.mm-account-details { grid-template-columns: 1fr; }
	.mm-account-switch .mm-field { min-width: 0; width: 100%; }
}

@media (max-width: 1024px) {
	.mm-debt-board { grid-template-columns: 1fr; }
	.mm-donut-wrap { height: auto; min-height: 240px; }
	.mm-debt-table-card { height: auto; }
	.mm-calendar { grid-template-columns: repeat(7, minmax(0, 1fr)); }
	.mm-timeline { max-height: min(48vh, 360px); }
}

@media (max-width: 782px) {
	body.mm-canvas h1.mm-hero-title, .mm-page-title { font-size: 22px; }
	.mm-hero-title span { font-size: 14px; }
	.mm-dl { grid-template-columns: 1fr; }
	.mm-fixed-board { grid-template-columns: 1fr; }
	.mm-tracker-tools { flex: 1 0 100%; }

	.mm-calendar {
		gap: 0;
		height: calc(100dvh - 210px);
		min-height: 420px;
		border-top: 1px solid var(--mm-border);
		border-left: 1px solid var(--mm-border);
		grid-template-rows: auto;
		grid-auto-rows: minmax(0, 1fr);
	}

	.mm-cal-head {
		padding: 4px 0;
		font-size: 11px;
		border-right: 1px solid var(--mm-border);
		border-bottom: 1px solid var(--mm-border);
	}

	.mm-cal-day {
		min-height: 0;
		padding: 2px;
		gap: 1px;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
		overflow: auto;
		scrollbar-width: none;
		border-right: 1px solid var(--mm-border);
		border-bottom: 1px solid var(--mm-border);
	}

	.mm-cal-day::-webkit-scrollbar { display: none; }
	.mm-cal-day.is-today { outline: none; }

	.mm-cal-day.is-today .mm-cal-num {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 22px;
		height: 22px;
		border-radius: 999px;
		background: var(--mm-purple);
		color: #fff;
	}

	.mm-cal-num { font-size: 11px; line-height: 1; }

	.mm-cal-item {
		flex-direction: row;
		align-items: center;
		width: 100%;
		padding: 0 3px;
		border-radius: 3px;
		font-size: 10px;
		line-height: 1.35;
	}

	.mm-cal-item-amount,
	.mm-cal-item .mm-shortfall-flag { display: none; }
}
