/* WBU Dashboard – clean, modern, mobile-first */

.wbu-dashboard {
	max-width: 800px;
	margin: 0 auto;
	padding: 1rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	color: #1a1a2e;
}

/* Header & Stats */
.wbu-dash-header {
	margin-bottom: 2rem;
}

.wbu-dash-header h2 {
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 1rem;
	color: #16213e;
}

.wbu-stats-bar {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.wbu-stat {
	flex: 1;
	min-width: 120px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border-radius: 12px;
	padding: 1rem 1.2rem;
	text-align: center;
}

.wbu-stat-num {
	display: block;
	font-size: 1.8rem;
	font-weight: 800;
	line-height: 1.2;
}

.wbu-stat-label {
	display: block;
	font-size: 0.8rem;
	opacity: 0.85;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* Sections */
.wbu-section {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wbu-section h3 {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 0 0 1rem;
	color: #16213e;
	border-bottom: 2px solid #667eea;
	padding-bottom: 0.4rem;
}

.wbu-section h3 small {
	font-weight: 400;
	color: #718096;
	font-size: 0.85rem;
	margin-left: 0.5rem;
}

/* Habit list */
.wbu-habit-list {
	list-style: none;
	padding: 0;
	margin: 0 0 1rem;
}

.wbu-habit-list li {
	padding: 0.6rem 0;
	border-bottom: 1px solid #f0f0f5;
}

.wbu-habit-list li:last-child {
	border-bottom: none;
}

.wbu-habit-list label {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	cursor: pointer;
	font-size: 0.95rem;
}

.wbu-habit-list input[type="checkbox"] {
	width: 1.15rem;
	height: 1.15rem;
	accent-color: #667eea;
}

.wbu-habit-list input[type="checkbox"]:checked + input + input + * {
	/* Pseudo: nothing needed, but we style via parent */
}

/* Form grid */
.wbu-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0.8rem;
	margin-bottom: 1rem;
}

.wbu-field {
	display: flex;
	flex-direction: column;
}

.wbu-field-full {
	grid-column: 1 / -1;
}

.wbu-field label {
	font-size: 0.82rem;
	font-weight: 600;
	color: #4a5568;
	margin-bottom: 0.25rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.wbu-field input,
.wbu-field select,
.wbu-field textarea {
	padding: 0.55rem 0.75rem;
	border: 1px solid #cbd5e0;
	border-radius: 8px;
	font-size: 0.92rem;
	transition: border-color 0.2s;
	background: #f7fafc;
}

.wbu-field input:focus,
.wbu-field select:focus,
.wbu-field textarea:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Button */
.wbu-btn {
	display: inline-block;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	padding: 0.65rem 1.5rem;
	border-radius: 8px;
	font-size: 0.92rem;
	font-weight: 600;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
}

.wbu-btn:hover {
	opacity: 0.9;
}

.wbu-btn:active {
	transform: scale(0.98);
}

/* Log table */
.wbu-log-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.wbu-log-table th {
	text-align: left;
	font-weight: 600;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #718096;
	padding: 0.5rem 0.6rem;
	border-bottom: 2px solid #e2e8f0;
}

.wbu-log-table td {
	padding: 0.55rem 0.6rem;
	border-bottom: 1px solid #f0f0f5;
}

.wbu-log-table tbody tr:hover {
	background: #f7fafc;
}

/* Tags */
.wbu-tag {
	display: inline-block;
	padding: 0.15rem 0.55rem;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wbu-tag-workout {
	background: #e6fffa;
	color: #234e52;
}

.wbu-tag-diet {
	background: #fefcbf;
	color: #744210;
}

.wbu-tag-general {
	background: #ebf4ff;
	color: #2a4365;
}

/* Empty state */
.wbu-empty {
	text-align: center;
	color: #a0aec0;
	padding: 1.5rem;
	font-style: italic;
}

/* Desc text */
.wbu-desc {
	color: #718096;
	font-size: 0.9rem;
	margin-bottom: 1.5rem;
}

/* Leaderboard / coach / corporate reuse .wbu-log-table */
.wbu-coach-table .small,
.wbu-corporate-table .small {
	font-size: 0.8rem;
	color: #718096;
}

/* Retreats list */
.wbu-retreats {
	max-width: 800px;
	margin: 0 auto;
	padding: 1rem;
}

.wbu-retreats h2 {
	font-size: 1.4rem;
	margin-bottom: 1rem;
}

.wbu-retreats ul {
	list-style: none;
	padding: 0;
}

.wbu-retreats li {
	padding: 0.75rem 0;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: baseline;
}

.wbu-retreats li a {
	font-weight: 600;
	color: #667eea;
	text-decoration: none;
}

.wbu-retreats li a:hover {
	text-decoration: underline;
}

.wbu-retreats .wbu-retreat-meta {
	font-size: 0.9rem;
	color: #718096;
}

/* Responsive */
@media (max-width: 600px) {
	.wbu-stats-bar {
		flex-direction: column;
	}
	.wbu-form-grid {
		grid-template-columns: 1fr;
	}
	.wbu-log-table {
		font-size: 0.82rem;
	}
	.wbu-log-table th,
	.wbu-log-table td {
		padding: 0.4rem;
	}
}
