.mht-cbt-tracker-app {
	--mht-primary: #2471e7;
	--mht-primary-dark: #0a1c40;
	--mht-primary-light: #e8f0fd;
	--mht-navy-tint: #f4f6fa;
	--mht-border: #e1e6ef;
	--mht-text-primary: #0a1c40;
	--mht-text-muted: #5c6b85;

	font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 620px;
	margin: 0 auto;
	padding: 32px;
	background: #ffffff;
	border: 1px solid var(--mht-border);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(10, 28, 64, 0.04), 0 8px 24px rgba(10, 28, 64, 0.06);
	color: var(--mht-text-primary);
	box-sizing: border-box;
}

.mht-cbt-tracker-app * {
	box-sizing: border-box;
}

.mht-cbt-tracker-support-link {
	max-width: 620px;
	margin: 12px auto 0;
	text-align: center;
	font-size: 13px;
}

.mht-cbt-tracker-support-link a {
	color: var(--mht-text-muted);
	text-decoration: underline;
}

.mht-cbt-loading,
.mht-cbt-error,
.mht-cbt-empty {
	text-align: center;
	color: var(--mht-text-muted);
	padding: 24px 0;
}

/* Tabs */
.mht-cbt-tabs {
	display: flex;
	gap: 6px;
	border-bottom: 1px solid var(--mht-border);
	margin-bottom: 24px;
}

.mht-cbt-tab {
	background: none;
	border: none;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
	color: var(--mht-text-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.mht-cbt-tab:hover {
	color: var(--mht-primary);
}

.mht-cbt-tab.is-active {
	color: var(--mht-primary);
	border-bottom-color: var(--mht-primary);
}

/* Form */
.mht-cbt-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--mht-text-primary);
	margin: 18px 0 6px;
}

.mht-cbt-label:first-child {
	margin-top: 0;
}

.mht-cbt-input {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid var(--mht-border);
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	color: var(--mht-text-primary);
	resize: vertical;
}

.mht-cbt-input:focus {
	outline: none;
	border-color: var(--mht-primary);
}

.mht-cbt-slider-row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.mht-cbt-slider {
	flex: 1;
}

.mht-cbt-slider-value {
	font-weight: 700;
	font-size: 14px;
	min-width: 28px;
	text-align: right;
}

.mht-cbt-distortions {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 8px;
}

.mht-cbt-distortion-option {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px;
	border: 1.5px solid var(--mht-border);
	border-radius: 10px;
	cursor: pointer;
	font-size: 13px;
}

.mht-cbt-distortion-option.is-checked {
	border-color: var(--mht-primary);
	background: var(--mht-primary-light);
}

.mht-cbt-distortion-option input {
	margin-right: 6px;
}

.mht-cbt-distortion-title {
	font-weight: 600;
	color: var(--mht-text-primary);
}

.mht-cbt-distortion-desc {
	color: var(--mht-text-muted);
	font-size: 12px;
	line-height: 1.4;
	margin-left: 20px;
}

.mht-cbt-reframe-hints {
	margin-top: 8px;
}

.mht-cbt-reframe-hints-title {
	font-size: 12px;
	font-weight: 600;
	color: var(--mht-primary);
	margin-bottom: 4px;
}

.mht-cbt-reframe-hint {
	font-size: 13px;
	color: var(--mht-text-muted);
	margin: 0 0 4px;
	font-style: italic;
}

.mht-cbt-btn {
	display: inline-block;
	margin-top: 20px;
	padding: 12px 28px;
	background: var(--mht-primary);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
}

.mht-cbt-btn:hover {
	background: #1c5ecf;
}

.mht-cbt-btn--ghost {
	background: transparent;
	color: var(--mht-primary);
	border: 1.5px solid var(--mht-border);
	margin-left: 8px;
}

.mht-cbt-btn--ghost:hover {
	background: var(--mht-navy-tint);
}

/* Confirmation */
.mht-cbt-confirmation {
	text-align: center;
	padding: 24px 0;
}

.mht-cbt-confirmation-title {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 8px;
}

.mht-cbt-confirmation-text {
	color: var(--mht-text-muted);
	font-size: 14px;
	margin-bottom: 8px;
}

/* Progress view */
.mht-cbt-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	margin-bottom: 24px;
}

.mht-cbt-stat {
	text-align: center;
	padding: 14px 8px;
	background: var(--mht-navy-tint);
	border-radius: 12px;
}

.mht-cbt-stat-value {
	font-size: 22px;
	font-weight: 700;
	color: var(--mht-text-primary);
}

.mht-cbt-stat-label {
	font-size: 11px;
	color: var(--mht-text-muted);
	margin-top: 2px;
}

.mht-cbt-frequency-title,
.mht-cbt-history-title {
	font-size: 15px;
	font-weight: 700;
	margin: 20px 0 12px;
}

.mht-cbt-bar-row {
	display: grid;
	grid-template-columns: 160px 1fr 30px;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 13px;
}

.mht-cbt-bar-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mht-cbt-bar-track {
	height: 8px;
	background: var(--mht-navy-tint);
	border-radius: 999px;
	overflow: hidden;
}

.mht-cbt-bar-fill {
	height: 100%;
	background: var(--mht-primary);
	border-radius: 999px;
}

.mht-cbt-bar-value {
	text-align: right;
	color: var(--mht-text-muted);
	font-weight: 600;
}

.mht-cbt-history-entry {
	border: 1px solid var(--mht-border);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 12px;
}

.mht-cbt-history-date {
	font-size: 11px;
	color: var(--mht-text-muted);
	margin-bottom: 8px;
}

.mht-cbt-history-field {
	font-size: 13px;
	margin: 0 0 6px;
	line-height: 1.5;
}

.mht-cbt-history-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

.mht-cbt-tag {
	background: var(--mht-primary-light);
	color: var(--mht-primary);
	font-size: 11px;
	font-weight: 600;
	padding: 3px 10px;
	border-radius: 999px;
}

.mht-cbt-history-mood {
	font-size: 12px;
	color: var(--mht-text-muted);
	margin: 6px 0;
}

.mht-cbt-delete-entry {
	background: none;
	border: none;
	color: #ff7145;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
	margin-top: 4px;
}

.mht-cbt-delete-entry:hover {
	text-decoration: underline;
}

/* Gate */
.mht-cbt-tracker-gate {
	text-align: center;
	padding: 44px 32px;
	max-width: 620px;
	margin: 0 auto;
	font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.mht-cbt-tracker-gate p {
	color: #5c6b85;
	margin-bottom: 20px;
}

.mht-cbt-tracker-btn {
	display: inline-block;
	padding: 12px 28px;
	background: #2471e7;
	color: #ffffff;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}

.mht-cbt-tracker-btn:hover {
	background: #1c5ecf;
	color: #ffffff;
}

.mht-cbt-tracker-lang-row {
	max-width: 620px;
	margin: 0 auto 12px;
	display: flex;
	justify-content: flex-end;
}

@media (max-width: 480px) {
	.mht-cbt-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
