/**
 * Community dashboard (/configuracoes/) layout.
 *
 * @package SuperPortistas
 */

.sp-community-dashboard {
	background-color: var(--sp-surface-muted, #f4f7fb);
	background-image:
		radial-gradient(circle at 100% 0%, rgba(0, 75, 155, 0.05) 0%, transparent 45%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(244, 247, 251, 0) 240px);
}

.sp-community-dashboard__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem;
	align-items: start;
}

@media (min-width: 1024px) {
	.sp-community-dashboard__grid {
		grid-template-columns: 15rem minmax(0, 1fr);
	}
}

.sp-community-dashboard__main {
	min-width: 0;
}

.sp-community-hero__row {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

@media (min-width: 640px) {
	.sp-community-hero__row {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
	}
}

.sp-community-hero__eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--sp-porto, #004b9b);
}

.sp-community-hero__title {
	margin: 0;
}

.sp-community-hero__subtitle {
	margin: 0.35rem 0 0;
	color: var(--sp-ink-muted, #475569);
}

/* Sidebar / mobile pills */
.sp-community-nav__scroll {
	display: flex;
	flex-direction: row;
	gap: 0.5rem;
	overflow-x: auto;
	padding: 0.25rem 0 0.75rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

@media (min-width: 1024px) {
	.sp-community-nav__scroll {
		flex-direction: column;
		overflow: visible;
		padding: 0;
		position: sticky;
		top: calc(var(--sp-header-height, 4rem) + 1rem);
	}
}

.sp-community-nav__group {
	display: contents;
}

@media (min-width: 1024px) {
	.sp-community-nav__group {
		display: block;
		margin-bottom: 1.25rem;
	}
}

.sp-community-nav__group-label {
	display: none;
	margin: 0 0 0.5rem;
	padding: 0 0.75rem;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--sp-ink-faint, #94a3b8);
}

@media (min-width: 1024px) {
	.sp-community-nav__group-label {
		display: block;
	}
}

.sp-community-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	border-radius: 9999px;
	border: 1px solid var(--sp-border, #e2e8f0);
	background: #fff;
	color: var(--sp-ink-muted, #475569);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sp-community-nav__icon {
	flex-shrink: 0;
	width: 1.125rem;
	height: 1.125rem;
	opacity: 0.85;
}

.sp-community-nav__link:hover .sp-community-nav__icon,
.sp-community-nav__link.is-active .sp-community-nav__icon,
.sp-community-nav__link[aria-current="page"] .sp-community-nav__icon {
	opacity: 1;
}

.sp-community-nav__label {
	min-width: 0;
}

@media (min-width: 1024px) {
	.sp-community-nav__link {
		display: flex;
		width: 100%;
		border-radius: 0.625rem;
		margin-bottom: 0.25rem;
	}
}

.sp-community-nav__link:hover {
	border-color: rgba(0, 75, 155, 0.25);
	color: var(--sp-porto, #004b9b);
}

.sp-community-nav__link.is-active,
.sp-community-nav__link[aria-current="page"] {
	border-color: rgba(0, 75, 155, 0.35);
	background: rgba(0, 75, 155, 0.08);
	color: var(--sp-porto, #004b9b);
	font-weight: 600;
	box-shadow: inset 3px 0 0 var(--sp-porto, #004b9b);
}

@media (max-width: 1023px) {
	.sp-community-nav__link.is-active,
	.sp-community-nav__link[aria-current="page"] {
		box-shadow: none;
		background: var(--sp-porto, #004b9b);
		color: #fff;
		border-color: var(--sp-porto, #004b9b);
	}

	.sp-community-nav__link.is-active .sp-community-nav__icon,
	.sp-community-nav__link[aria-current="page"] .sp-community-nav__icon {
		color: #fff;
	}
}

/* Filter pills */
.sp-community-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.sp-community-pills__link {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
	border: 1px solid var(--sp-border, #e2e8f0);
	background: #fff;
	color: var(--sp-ink-muted, #475569);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sp-community-pills__link.is-active {
	background: var(--sp-porto, #004b9b);
	border-color: var(--sp-porto, #004b9b);
	color: #fff;
}

.sp-community-pills__link.is-active--amber {
	background: #d97706;
	border-color: #d97706;
	color: #fff;
}

.sp-community-pills__link.is-active--green {
	background: #16a34a;
	border-color: #16a34a;
	color: #fff;
}

.sp-community-pills__link.is-active--muted {
	background: var(--sp-ink-muted, #475569);
	border-color: var(--sp-ink-muted, #475569);
	color: #fff;
}

.sp-community-pills__link:focus {
	outline: none;
}

.sp-community-pills__link:focus-visible {
	outline: 2px solid var(--sp-porto, #004b9b);
	outline-offset: 2px;
}

.sp-community-pills__link:not(.is-active):hover {
	background: var(--sp-surface-subtle, #f8fafc);
	border-color: var(--sp-border, #e2e8f0);
	color: var(--sp-ink, #0f172a);
}

.sp-community-pills__link.is-active:hover {
	border-color: var(--sp-porto, #004b9b);
}

/* Leaderboard table */
.sp-community-leaderboard-table {
	width: 100%;
	border-collapse: collapse;
}

.sp-community-leaderboard-table th,
.sp-community-leaderboard-table td {
	padding: 0.875rem 1rem;
	text-align: left;
	border-bottom: 1px solid var(--sp-border, #e2e8f0);
}

.sp-community-leaderboard-table th {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sp-ink-faint, #94a3b8);
	background: var(--sp-surface-subtle, #f8fafc);
}

.sp-community-leaderboard-table tr:hover td {
	background: var(--sp-surface-subtle, #f8fafc);
}

.sp-community-leaderboard-table tr.is-current td {
	background: rgba(0, 75, 155, 0.06);
}

.sp-community-leaderboard-table tr.is-current td:first-child {
	border-left: 3px solid var(--sp-porto, #004b9b);
}

.sp-community-rank-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 9999px;
	font-weight: 700;
	font-size: 0.875rem;
	background: var(--sp-surface-muted, #f1f5f9);
	color: var(--sp-ink-muted, #475569);
}

.sp-community-rank-badge.is-gold {
	background: #fef3c7;
	color: #92400e;
}

.sp-community-rank-badge.is-silver {
	background: #e2e8f0;
	color: #475569;
}

.sp-community-rank-badge.is-bronze {
	background: #ffedd5;
	color: #9a3412;
}

.sp-community-empty {
	padding: 3rem 1.5rem;
	text-align: center;
}

.sp-community-empty__icon {
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1rem;
	border-radius: 9999px;
	background: var(--sp-surface-muted, #f1f5f9);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--sp-ink-faint, #94a3b8);
}

.sp-community-restricted {
	max-width: 28rem;
	margin: 0 auto;
}

.sp-community-dashboard__panel > * + * {
	margin-top: 0;
}

/* Tab panel shell */
.sp-community-tab-panel {
	background: #fff;
	border: 1px solid var(--sp-border, #e2e8f0);
	border-radius: 0.875rem;
	padding: 1.5rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sp-community-tab-section {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Form system */
.sp-community-form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 768px) {
	.sp-community-form-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.sp-community-field--full {
	grid-column: 1 / -1;
}

.sp-community-field-hint {
	margin: 0.35rem 0 0;
	font-size: 0.75rem;
	color: var(--sp-ink-faint, #94a3b8);
}

.sp-community-input {
	display: block;
	width: 100%;
	padding: 0.625rem 0.875rem;
	border: 1px solid var(--sp-border, #e2e8f0);
	border-radius: 0.5rem;
	background: #fff;
	color: var(--sp-ink, #0f172a);
	font-size: 0.9375rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sp-community-input:focus {
	outline: none;
	border-color: var(--sp-porto, #004b9b);
	box-shadow: 0 0 0 3px rgba(0, 75, 155, 0.12);
}

.sp-community-input--readonly {
	background: var(--sp-surface-muted, #f4f7fb);
	color: var(--sp-ink-muted, #475569);
	cursor: not-allowed;
}

.sp-community-profile-progress {
	min-width: min(100%, 14rem);
	padding: 1rem;
	border-radius: 0.625rem;
	border: 1px solid rgba(0, 75, 155, 0.15);
	background: rgba(0, 75, 155, 0.04);
}

.sp-community-progress {
	width: 100%;
	height: 0.5rem;
	border-radius: 9999px;
	background: var(--sp-surface-muted, #f1f5f9);
	overflow: hidden;
}

.sp-community-progress__bar {
	height: 100%;
	border-radius: 9999px;
	background: var(--sp-porto, #004b9b);
	transition: width 0.3s ease;
}

.sp-community-stat {
	padding: 0.75rem 1rem;
	border-radius: 0.625rem;
	border: 1px solid var(--sp-border, #e2e8f0);
	background: var(--sp-surface-subtle, #f8fafc);
}

.sp-community-stat__value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--sp-porto, #004b9b);
	line-height: 1.2;
}

.sp-community-stat__label {
	display: block;
	margin-top: 0.15rem;
	font-size: 0.75rem;
	color: var(--sp-ink-muted, #475569);
}

.sp-community-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

@media (min-width: 768px) {
	.sp-community-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.sp-community-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sp-community-card {
	padding: 1.25rem;
	border: 1px solid var(--sp-border, #e2e8f0);
	border-radius: 0.75rem;
	background: #fff;
}

.sp-community-inline-stat {
	text-align: right;
}

.sp-community-inline-stat__value {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--sp-porto, #004b9b);
	line-height: 1.1;
}

.sp-community-inline-stat__label {
	font-size: 0.75rem;
	color: var(--sp-ink-faint, #94a3b8);
}

.sp-community-subsection {
	padding: 1.25rem;
	border: 1px solid var(--sp-border, #e2e8f0);
	border-radius: 0.75rem;
	background: #fff;
}

.sp-community-subsection + .sp-community-subsection {
	margin-top: 1rem;
}

.sp-community-tab-panel .sp-widget {
	box-shadow: none;
}

/* Disable card accent bar inside dashboard tabs (overlaps content on hover). */
.sp-community-tab-panel .sp-widget::before {
	display: none;
}

.sp-community-tab-panel > .sp-widget {
	padding: 1.25rem;
	border: 1px solid var(--sp-border, #e2e8f0);
	border-radius: 0.75rem;
	background: #fff;
	overflow: visible;
}

.sp-community-tab-panel > .sp-widget.overflow-hidden {
	padding: 0;
	overflow: hidden;
}

.sp-community-profile-avatar label.sp-btn-outline {
	margin: 0;
}

.sp-community-profile-avatar img {
	display: block;
}
