:root {
	--bg-a: #1B2227;
	--bg-b: #1B2227;
	--ink-900: #E9FEFF;
	--ink-700: #9BD9FE;
	--ink-500: #6b7280;
	--mint-600: #6DC6FE;
	--mint-500: #48B7FF;
	--orange-500: #ef8a29;
	--orange-400: #f2a04e;
	--paper: #1B2227;
	--paper-soft: #1B2227;
	--line: #3C454D;
	--ok: #9BD9FE;
	--warn: #b66a17;
	--danger: #ff4b4b;
	--radius-lg: 24px;
	--radius-md: 16px;
	--radius-sm: 12px;
	--shadow-1: none;
	/* Removed shadows for flat border-only aesthetic */
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	min-height: 100%;
}

body {
	font-family: "Lexend", sans-serif;
	color: var(--ink-900);
	background: radial-gradient(circle at 15% 15%, rgba(72, 183, 255, 0.1) 0%, transparent 40%),
		radial-gradient(circle at 85% 10%, rgba(109, 198, 254, 0.08) 0%, transparent 35%),
		linear-gradient(140deg, var(--bg-a) 0%, var(--bg-b) 100%);
	overflow-x: hidden;
}

.bg-glow {
	position: fixed;
	width: 340px;
	height: 340px;
	filter: blur(70px);
	z-index: 0;
	opacity: 0.35;
	pointer-events: none;
}

.bg-glow-a {
	top: -80px;
	left: -80px;
	background: #54d2af;
}

.bg-glow-b {
	right: -100px;
	bottom: -100px;
	background: #ffba69;
}

.layout {
	position: relative;
	z-index: 2;
	width: min(1200px, 96vw);
	margin: 2.2rem auto;
}

.panel {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(255, 255, 255, 0.75);
	box-shadow: var(--shadow-1);
	border-radius: var(--radius-lg);
	backdrop-filter: blur(8px);
}

.auth-panel {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 1.6rem;
	padding: 1.6rem;
	animation: fadeSlide 0.55s ease both;
}

.brand-column {
	padding: 1.2rem;
	border-radius: var(--radius-md);
	background: linear-gradient(140deg, rgba(15, 139, 117, 0.12), rgba(239, 138, 41, 0.12));
}

.eyebrow {
	margin: 0;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	color: var(--mint-600);
	font-weight: 800;
	font-size: 0.76rem;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 0.4rem;
	font-family: "Baloo 2", system-ui, sans-serif;
	color: var(--ink-900);
}

h1 {
	margin-top: 0.4rem;
	font-size: clamp(2rem, 4vw, 2.7rem);
	line-height: 1;
}

.subtitle {
	margin-top: 0.6rem;
	max-width: 55ch;
	color: var(--ink-700);
	font-size: 1rem;
}

.feature-list {
	margin: 1.2rem 0 0;
	padding-left: 1.1rem;
	display: grid;
	gap: 0.55rem;
}

.auth-column {
	background: var(--paper);
	border-radius: var(--radius-md);
	border: 1px solid var(--line);
	padding: 1.2rem;
}

.auth-switch {
	display: inline-flex;
	width: 100%;
	margin-bottom: 1rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	padding: 0.25rem;
	background: var(--paper-soft);
}

.switch-btn {
	width: 50%;
	border: 0;
	background: transparent;
	border-radius: 999px;
	padding: 0.6rem 0.9rem;
	font-weight: 700;
	color: var(--ink-700);
	cursor: pointer;
}

.switch-btn.active {
	background: linear-gradient(120deg, var(--mint-500), var(--mint-600));
	color: #fff;
}

.auth-form {
	display: grid;
	gap: 0.8rem;
}

.auth-form label,
.stack-form label {
	display: grid;
	gap: 0.34rem;
	font-weight: 700;
	color: var(--ink-700);
}

input,
select,
textarea,
button {
	font: inherit;
}

input,
select,
textarea {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #fff;
	padding: 0.68rem 0.8rem;
	color: var(--ink-900);
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--mint-500);
	box-shadow: 0 0 0 3px rgba(29, 168, 141, 0.18);
}

.consent-label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 600;
}

.consent-label input {
	width: 1rem;
	height: 1rem;
	margin-top: 0.18rem;
}

.terms-box {
	border: 1px dashed var(--line);
	border-radius: var(--radius-sm);
	padding: 0.65rem 0.85rem;
	background: var(--paper-soft);
}

.terms-box summary {
	cursor: pointer;
	font-weight: 700;
	color: var(--ink-700);
}

.btn {
	border: 0;
	border-radius: 999px;
	padding: 0.72rem 1.05rem;
	font-weight: 800;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
	transform: translateY(-1px);
}

.btn-primary {
	color: #fff;
	background: linear-gradient(120deg, var(--mint-500), var(--mint-600));
	box-shadow: 0 8px 18px rgba(15, 139, 117, 0.28);
}

.btn-ghost {
	color: var(--ink-900);
	background: rgba(255, 255, 255, 0.4);
	border: 1px solid var(--line);
}

.app-shell {
	padding: 1.25rem;
	animation: fadeSlide 0.45s ease both;
}

.app-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.tab-nav {
	margin-top: 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.tab-btn {
	border: 1px solid transparent;
	background: #edf5f3;
	color: var(--ink-700);
	border-radius: 999px;
	padding: 0.5rem 0.9rem;
	font-weight: 700;
	cursor: pointer;
}

.tab-btn.active {
	background: linear-gradient(120deg, #ffffff, #e7f8f3);
	border-color: var(--mint-500);
	color: var(--mint-600);
}

.status-bar {
	min-height: 1.4rem;
	margin: 0.9rem 0 0.2rem;
	font-weight: 700;
}

.status-bar.success {
	color: var(--ok);
}

.status-bar.error {
	color: var(--danger);
}

.status-bar.info {
	color: var(--ink-700);
}

.app-section {
	display: none;
	margin-top: 1rem;
}

.app-section.active {
	display: block;
}

.page-title-dashboard {
	display: none;
	width: 100%;
	margin: 0 0 1.25rem;
	padding: 0;
	text-align: left;
}

.content-area:has(#section-dashboard.active) .page-title-dashboard {
	display: block;
}

/* =========================================
   DASHBOARD
   ========================================= */
.dashboard-layout {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	max-width: min(1040px, 100%);
	margin: 0 auto;
}

.dashboard-toolbar {
	display: flex;
	justify-content: flex-start;
	align-items: center;
}

.dashboard-month-control {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--ink-700);
	position: relative;
}

.dashboard-month-control input {
	border: 2px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--paper);
	color: var(--ink-900);
	font-family: inherit;
	font-weight: 600;
	padding: 0.45rem 0.65rem;
	min-width: 120px;
	width: 100%;
}

.dashboard-kpi-row {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.85rem;
}

.dashboard-stat-card {
	display: flex;
	align-items: flex-start;
	gap: 0.85rem;
	padding: 1rem 1.1rem;
	border-radius: var(--radius-md);
	border: 2px solid var(--line);
	background: var(--paper);
	min-height: 108px;
}

.dashboard-stat-icon {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	border: 2px solid var(--line);
	display: grid;
	place-items: center;
	font-size: 1.35rem;
	color: var(--mint-500);
	background: rgba(72, 183, 255, 0.08);
}

.dashboard-stat-body {
	min-width: 0;
}

.dashboard-stat-card h3 {
	margin: 0 0 0.35rem;
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--ink-700);
	font-family: "Lexend", sans-serif;
}

.dashboard-stat-value {
	margin: 0;
	font-size: 1.75rem;
	line-height: 1.1;
	color: var(--mint-600);
	font-family: "Baloo 2", system-ui, sans-serif;
}

.dashboard-stat-hint {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.78rem;
	line-height: 1.3;
	color: var(--ink-700);
	font-weight: 600;
}

.dashboard-panel {
	border: 2px solid var(--line);
	border-radius: var(--radius-lg);
	background: var(--paper);
	padding: 1.15rem 1.25rem 1.25rem;
}

.dashboard-panel-header {
	margin-bottom: 1rem;
}

.dashboard-panel-header-split {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1rem;
	flex-wrap: wrap;
}

.dashboard-chart-toggle {
	display: inline-flex;
	border: 2px solid var(--line);
	border-radius: var(--radius-sm);
	overflow: hidden;
	flex-shrink: 0;
}

.dashboard-toggle-btn {
	border: 0;
	background: transparent;
	color: var(--ink-700);
	font-family: inherit;
	font-weight: 700;
	font-size: 0.78rem;
	padding: 0.45rem 0.7rem;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.dashboard-toggle-btn.active {
	background: rgba(72, 183, 255, 0.15);
	color: var(--mint-600);
}

.dashboard-heatmap {
	margin-bottom: 0.65rem;
}

.heatmap-weekdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.35rem;
	margin-bottom: 0.35rem;
}

.heatmap-weekday {
	text-align: center;
	font-size: 0.68rem;
	font-weight: 800;
	color: var(--ink-700);
	text-transform: uppercase;
}

.heatmap-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.35rem;
}

.heatmap-week-strip {
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.5rem;
	margin-bottom: 0.9rem;
}

.heatmap-day {
	aspect-ratio: 1;
	border-radius: 8px;
	border: 2px solid var(--line);
	display: grid;
	place-items: center;
	font-size: clamp(0.62rem, 1.4vw, 0.78rem);
	font-weight: 800;
	color: var(--ink-900);
	cursor: default;
	transition: transform 0.12s ease;
}

.heatmap-day:not(.heatmap-day-empty):hover {
	transform: scale(1.06);
}

.heatmap-day-empty {
	border-color: transparent;
	background: transparent;
	pointer-events: none;
}

.heatmap-day.level-none {
	background: rgba(155, 217, 254, 0.04);
	color: var(--ink-700);
	opacity: 0.65;
}

.heatmap-day.level-low {
	background: rgba(255, 183, 77, 0.22);
	border-color: rgba(255, 183, 77, 0.45);
}

.heatmap-day.level-mid {
	background: rgba(72, 183, 255, 0.28);
	border-color: rgba(72, 183, 255, 0.5);
}

.heatmap-day.level-high {
	background: rgba(46, 196, 182, 0.32);
	border-color: rgba(46, 196, 182, 0.55);
}

.heatmap-week-day {
	min-height: 92px;
	font-size: 0.95rem;
	font-family: "Baloo 2", system-ui, sans-serif;
	color: var(--ink-900);
	display: grid;
	place-items: center;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.dashboard-heatmap-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ink-700);
}

.dashboard-heatmap-legend span {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.legend-swatch {
	width: 14px;
	height: 14px;
	border-radius: 4px;
	border: 2px solid var(--line);
	display: inline-block;
}

.legend-swatch.level-none {
	background: rgba(155, 217, 254, 0.04);
}

.legend-swatch.level-low {
	background: rgba(255, 183, 77, 0.22);
	border-color: rgba(255, 183, 77, 0.45);
}

.legend-swatch.level-mid {
	background: rgba(72, 183, 255, 0.28);
}

.legend-swatch.level-high {
	background: rgba(46, 196, 182, 0.32);
	border-color: rgba(46, 196, 182, 0.55);
}

.dashboard-period-bars {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.period-bar-row {
	display: grid;
	gap: 0.3rem;
}

.period-bar-label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--ink-900);
}

.period-bar-label i {
	color: var(--mint-500);
	font-size: 1rem;
}

.period-bar-label strong {
	margin-left: auto;
	color: var(--mint-600);
}

.period-bar-track {
	height: 10px;
	border-radius: 99px;
	background: rgba(155, 217, 254, 0.1);
	border: 2px solid var(--line);
	overflow: hidden;
}

.period-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--mint-500), var(--mint-600));
	border-radius: 99px;
	transition: width 0.35s ease;
}

.period-bar-meta {
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--ink-700);
}

.dashboard-subheading {
	margin: 0.5rem 0 0.55rem;
	font-size: 0.88rem;
	font-family: "Baloo 2", system-ui, sans-serif;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--ink-900);
}

.dashboard-subheading i {
	color: var(--orange-500);
}

.dashboard-attention-block {
	margin-bottom: 1rem;
}

.dashboard-attention-list {
	max-height: none;
}

.dashboard-activity-item-good {
	border-color: rgba(46, 196, 182, 0.45) !important;
}

.dashboard-quiz-summary {
	margin: 0 0 0.65rem;
	font-size: 0.85rem;
	font-weight: 700;
	color: var(--mint-600);
}

.dashboard-inline-empty {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ink-700);
	font-weight: 600;
}

.dashboard-panel-header h3 {
	margin: 0 0 0.25rem;
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: 1.25rem;
	color: var(--ink-900);
}

.dashboard-panel-subtitle {
	margin: 0;
	font-size: 0.88rem;
	color: var(--ink-700);
	font-weight: 600;
}

.dashboard-chart {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 0.55rem;
	min-height: 200px;
	padding: 0.5rem 0.25rem 0;
}

.dashboard-chart-empty {
	margin: 0;
	padding: 2rem 1rem;
	text-align: center;
	color: var(--ink-700);
	font-weight: 600;
	width: 100%;
}

.chart-bar-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.45rem;
	height: 100%;
}

.chart-bar-track {
	width: 100%;
	max-width: 52px;
	flex: 1;
	position: relative;
	min-height: 150px;
	background: rgba(155, 217, 254, 0.08);
	border: 2px solid transparent;
	border-radius: 10px 10px 4px 4px;
	overflow: hidden;
}

.chart-bar-fill {
	min-height: 6px;
	background: linear-gradient(180deg, var(--mint-600), var(--mint-500));
	border-radius: 8px 8px 2px 2px;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: var(--bar-height, 0%);
	transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar-label {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--ink-700);
	text-transform: uppercase;
}

.chart-bar-value {
	font-size: 0.7rem;
	font-weight: 800;
	color: var(--mint-600);
}

.dashboard-activity-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	align-items: start;
}

.datepicker-grid.month-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.4rem;
	padding-top: 0.25rem;
}

.month-day {
	min-height: 42px;
	padding: 0.55rem 0.35rem;
	font-size: 0.75rem;
	font-weight: 700;
	border: 2px solid transparent;
	background: rgba(155, 217, 254, 0.05);
	color: var(--ink-900);
	transition: background 0.2s, border-color 0.2s, transform 0.12s ease;
}

.month-day:hover {
	background: rgba(72, 183, 255, 0.15);
	border-color: rgba(72, 183, 255, 0.3);
}

.month-day.selected {
	background: rgba(72, 183, 255, 0.18);
	border-color: rgba(72, 183, 255, 0.5);
}

.dashboard-activity-block h4 i {
	color: var(--mint-500);
	font-size: 1.1rem;
}

.dashboard-activity-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0;
	margin: 0 0 0.9rem;
}

#dashboardRecentQuiz {
	max-height: 160px;
	overflow-y: auto;
	padding-right: 4px;
}

#dashboardRecentQuiz::-webkit-scrollbar {
	width: 6px;
}

#dashboardRecentQuiz::-webkit-scrollbar-track {
	background: transparent;
}

#dashboardRecentQuiz::-webkit-scrollbar-thumb {
	background: var(--line);
	border-radius: 99px;
}

#dashboardRecentQuiz::-webkit-scrollbar-thumb:hover {
	background: var(--ink-700);
}

.dashboard-activity-item {
	border: 2px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0.65rem 0.95rem;
	background: var(--paper-soft);
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	transition: border-color 0.15s, transform 0.15s;
}

.dashboard-activity-item:hover {
	border-color: rgba(72, 183, 255, 0.4);
	transform: translateY(-1px);
}

.dashboard-activity-item strong {
	display: block;
	font-size: 0.85rem;
	color: var(--ink-900);
	font-family: "Baloo 2", system-ui, sans-serif;
	font-weight: 700;
}

.dashboard-activity-item span {
	font-size: 0.8rem;
	color: var(--ink-700);
	font-weight: 600;
	line-height: 1.35;
	text-align: right;
}

@media (max-width: 480px) {
	.dashboard-activity-item {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}
	.dashboard-activity-item span {
		text-align: left;
	}
}

.dashboard-activity-item .activity-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-top: 0.35rem;
}

.activity-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	padding: 0.15rem 0.45rem;
	border-radius: 99px;
	font-size: 0.7rem;
	font-weight: 700;
	border: 1px solid var(--line);
}

.activity-pill.done {
	color: #12756b;
	border-color: rgba(46, 196, 182, 0.45);
	background: rgba(46, 196, 182, 0.12);
}

.activity-pill.missed {
	color: var(--ink-700);
	opacity: 0.85;
}

.activity-pill.quiz-good {
	color: #12756b;
	border-color: rgba(46, 196, 182, 0.45);
	background: rgba(46, 196, 182, 0.12);
}

.activity-pill.quiz-low {
	color: var(--danger);
	border-color: rgba(255, 75, 75, 0.35);
	background: rgba(255, 75, 75, 0.1);
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.8rem;
}

.stat-card {
	padding: 1rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--line);
	background: var(--paper);
}

.stat-card p {
	margin: 0;
	font-size: 1.8rem;
	color: var(--mint-600);
	font-family: "Baloo 2", system-ui, sans-serif;
}

.inline-control {
	display: inline-grid;
	gap: 0.35rem;
	margin-top: 1rem;
	font-weight: 700;
}

.history-box,
.card {
	margin-top: 1rem;
	border: 2px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--paper);
	padding: 0.95rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

th,
td {
	border-bottom: 1px solid var(--line);
	text-align: left;
	padding: 0.6rem 0.35rem;
}

th {
	color: var(--ink-700);
}

.stack-form {
	display: grid;
	gap: 0.85rem;
}

.checkbox-line {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
}

.checkbox-line label {
	display: flex;
	align-items: center;
	gap: 0.42rem;
	font-weight: 700;
	color: var(--ink-700);
}

.checkbox-line input {
	width: 1rem;
	height: 1rem;
}

/* =========================================
   GUIA DE ESCOVAÇÃO - TIMELINE CENTRALIZADA
   ========================================= */

#section-guide h3 {
	text-align: center;
	font-size: 2.2rem;
	margin-bottom: 1rem;
	color: var(--ink-900);
}

.guide-grid {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2.5rem;
	padding: 2rem 0;
	max-width: 650px;
	margin: 0 auto;
}

/* Linha vertical da timeline com gradiente suave que some ao final */
.guide-grid::before {
	content: '';
	position: absolute;
	top: 54px;
	bottom: 80px;
	left: 50%;
	width: 4px;
	background: linear-gradient(to bottom, var(--mint-500) 0%, var(--mint-600) 70%, transparent 100%);
	transform: translateX(-50%);
	z-index: 1;
	border-radius: 2px;
}

.timeline-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	z-index: 2;
}

.timeline-badge {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--mint-500), var(--mint-600));
	color: #ffffff;
	font-family: "Baloo 2", system-ui, sans-serif;
	font-weight: 700;
	font-size: 1.25rem;
	border: 4px solid var(--paper);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
	margin-bottom: 1rem;
	transition: transform 0.2s ease, background-color 0.2s ease;
	z-index: 3;
}

.timeline-item:hover .timeline-badge {
	transform: scale(1.12);
}

.guide-card {
	display: flex;
	flex-direction: row;
	gap: 1.2rem;
	padding: 1.2rem;
	background: var(--paper);
	border: 2px solid var(--line);
	border-radius: var(--radius-md);
	width: 100%;
	z-index: 2;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.guide-card:hover {
	transform: translateY(-4px);
	border-color: var(--mint-500);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.guide-card-img-wrapper {
	flex: 0 0 20%;
	width: 20%;
	min-width: 70px;
	aspect-ratio: 1 / 1;
	border-radius: var(--radius-sm);
	overflow: hidden;
	background-color: var(--paper-soft);
	border: 1px solid var(--line);
}

.guide-card-img-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.guide-card .inner {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	justify-content: center;
	padding: 0;
}

.guide-card .inner h4 {
	margin: 0;
	font-size: 1.2rem;
	color: var(--ink-900);
}

.guide-card .inner p {
	margin: 0;
	font-size: 0.95rem;
	color: var(--ink-700);
	line-height: 1.45;
}

/* =========================================
   QUIZ INTERATIVO - ESTILO DUOLINGO
   ========================================= */

.quiz-container-box {
	width: 100%;
	max-width: min(1040px, 100%);
	margin: 0 auto;
}

.quiz-state-view {
	width: 100%;
}

/* Altura útil da aba Quiz (sem cabeçalho welcomeName) */
#section-quiz.active .quiz-state-view:not(.hidden) {
	height: calc(100dvh - 4.5rem);
	max-height: calc(100dvh - 4.5rem);
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.content-area:has(#section-quiz.active .quiz-state-view:not(.hidden)) {
	overflow: hidden;
}

#quizStateStart {
	gap: 1rem;
}

#quizStateActive {
	--quiz-head-h: 7.25rem;
	--quiz-options-count: 3;
	--quiz-options-gap: 0.75rem;
	--quiz-option-max-h: 3.85rem;
	--quiz-option-min-h: 2.7rem;
	--quiz-footer-h: 6.75rem;
	flex-direction: column;
	padding: 0 0.5rem;
}

#quizStateActive .quiz-header {
	flex-shrink: 0;
	margin-bottom: 1.25rem;
}

#quizStateActive .quiz-question-container {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	margin-bottom: 0;
	overflow: hidden;
}

#quizStateActive .quiz-question-head {
	flex-shrink: 0;
	min-height: var(--quiz-head-h);
	max-height: var(--quiz-head-h);
}

#quizStateActive .quiz-footer {
	flex-shrink: 0;
	margin-top: 0;
	min-height: var(--quiz-footer-h);
	max-height: var(--quiz-footer-h);
	padding-top: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

#quizStateActive .quiz-footer-divider {
	margin: 0.65rem 0;
	flex-shrink: 0;
}

/* Tela de início */
.quiz-start-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: clamp(2.5rem, 6vh, 4rem) clamp(2rem, 5vw, 3.5rem);
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1.75rem;
	box-shadow: var(--shadow-1);
	flex: 1;
	min-height: 0;
	width: 100%;
}

.quiz-start-card h3 {
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: clamp(1.75rem, 3vw, 2.2rem);
	color: var(--ink-900);
	margin: 0;
	width: 100%;
}

.quiz-play-btn {
	background: var(--paper);
	border: 4px solid var(--line);
	border-radius: 50%;
	width: 92px;
	height: 92px;
	display: grid;
	place-items: center;
	cursor: pointer;
	font-size: 2.5rem;
	color: var(--mint-500);
	transition: all 0.2s ease-in-out;
	padding: 0;
	margin: 0 auto;
	flex-shrink: 0;
}

.quiz-play-btn:hover {
	transform: scale(1.08);
	border-color: var(--mint-500);
	color: var(--mint-600);
}

.quiz-play-btn i {
	margin: 0;
	line-height: 1;
	display: block;
}

#quizStateStart .quiz-history-box {
	flex-shrink: 0;
	max-height: 11rem;
	overflow-y: auto;
	margin: 0;
}

/* Header & Barra de Progresso */
.quiz-header {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 2rem;
	width: 100%;
}

.quiz-close-btn {
	background: none;
	border: none;
	font-size: 1.8rem;
	color: var(--ink-700);
	cursor: pointer;
	transition: color 0.2s;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.quiz-close-btn:hover {
	color: var(--ink-900);
}

.quiz-progress-wrapper {
	flex-grow: 1;
}

.quiz-progress-track {
	background: var(--line);
	border-radius: 99px;
	height: 16px;
	width: 100%;
	overflow: hidden;
}

.quiz-progress-fill {
	background: var(--mint-500);
	height: 100%;
	border-radius: 99px;
	transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Question Section */
#quizStateActive .quiz-category-badge {
	font-size: 0.9rem;
	margin-bottom: 0.35rem;
	flex-shrink: 0;
}

.quiz-question-container {
	margin-bottom: 1.5rem;
}

.quiz-category-badge {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--mint-500);
	margin-bottom: 0.5rem;
	letter-spacing: 0.05em;
}

#quizStateActive .quiz-question-title {
	font-size: clamp(1.55rem, 2.5vw, 1.95rem);
	margin: 0;
	line-height: 1.3;
	min-height: calc(1.3em * 2);
	max-height: calc(1.3em * 2);
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.quiz-question-title {
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: 1.6rem;
	color: var(--ink-900);
	margin: 0 0 1.5rem 0;
	line-height: 1.3;
}

/* Opções */
#quizStateActive .quiz-options-stack {
	flex: 1;
	min-height: 0;
	gap: var(--quiz-options-gap);
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	overflow: hidden;
}

.quiz-options-stack {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	margin-bottom: 1.5rem;
}

#quizStateActive .quiz-option-item {
	--slot-h: calc(
		(100% - (var(--quiz-options-count) - 1) * var(--quiz-options-gap)) / var(--quiz-options-count)
	);
	height: clamp(var(--quiz-option-min-h), var(--slot-h), var(--quiz-option-max-h));
	min-height: clamp(var(--quiz-option-min-h), var(--slot-h), var(--quiz-option-max-h));
	max-height: clamp(var(--quiz-option-min-h), var(--slot-h), var(--quiz-option-max-h));
	padding: 0 1.25rem;
	gap: 1rem;
	flex-shrink: 0;
}

#quizStateActive .quiz-option-item:hover:not(.disabled) {
	transform: none;
}

.quiz-option-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.9rem 1.2rem;
	border: 2px solid var(--line);
	border-radius: var(--radius-md);
	background: var(--paper);
	cursor: pointer;
	transition: all 0.15s ease-in-out;
	user-select: none;
}

.quiz-option-item:hover:not(.disabled) {
	border-color: var(--mint-500);
	transform: translateY(-1px);
}

#quizStateActive .quiz-option-index {
	width: 34px;
	height: 34px;
	font-size: 0.95rem;
}

.quiz-option-index {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 2px solid var(--line);
	border-radius: 8px;
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--ink-700);
	transition: all 0.15s;
	background: var(--paper-soft);
}

#quizStateActive .quiz-option-text {
	font-size: 1.05rem;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.quiz-option-text {
	font-size: 1rem;
	font-weight: 600;
	color: var(--ink-900);
	line-height: 1.3;
}

/* Opção Selecionada */
.quiz-option-item.selected {
	border-color: var(--mint-500);
	background: rgba(72, 183, 255, 0.06);
}

.quiz-option-item.selected .quiz-option-index {
	border-color: var(--mint-500);
	background: var(--mint-500);
	color: #FFF;
}

/* Opção Correta (Verificada) */
.quiz-option-item.correct {
	border-color: #2ec4b6 !important;
	background: rgba(46, 196, 182, 0.06) !important;
}

.quiz-option-item.correct .quiz-option-index {
	border-color: #2ec4b6 !important;
	background: #2ec4b6 !important;
	color: #FFF !important;
}

/* Opção Incorreta (Verificada) */
.quiz-option-item.incorrect {
	border-color: var(--danger) !important;
	background: rgba(255, 75, 75, 0.06) !important;
}

.quiz-option-item.incorrect .quiz-option-index {
	border-color: var(--danger) !important;
	background: var(--danger) !important;
	color: #FFF !important;
}

.quiz-option-item.disabled {
	cursor: not-allowed;
	opacity: 0.85;
}

/* Banner de Feedback (entre os botões do rodapé) */
.quiz-feedback-banner {
	flex: 1;
	min-width: 0;
	padding: 0.85rem 1.1rem;
	border-radius: var(--radius-md);
	margin: 0;
	display: flex;
	align-items: center;
	animation: quizSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.quiz-footer-buttons .feedback-content {
	min-width: 0;
	width: 100%;
}

.quiz-footer-buttons .feedback-text p {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.quiz-feedback-banner.hidden {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.quiz-feedback-banner.correct {
	background: rgba(46, 196, 182, 0.1);
	border: 1px solid rgba(46, 196, 182, 0.25);
	color: #1a8a7f;
}

body.mode-light .quiz-feedback-banner.correct {
	color: #12756b;
}

.quiz-feedback-banner.incorrect {
	background: rgba(255, 75, 75, 0.1);
	border: 1px solid rgba(255, 75, 75, 0.25);
	color: #d43f3f;
}

.feedback-content {
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.feedback-content i {
	font-size: 1.6rem;
	margin-top: 0.1rem;
}

.quiz-footer-buttons .feedback-text strong {
	font-size: 1rem;
}

.feedback-text strong {
	display: block;
	font-size: 1.05rem;
	margin-bottom: 0.2rem;
}

.quiz-footer-buttons .feedback-text p {
	font-size: 0.88rem;
	line-height: 1.35;
}

.feedback-text p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.4;
}

@keyframes quizSlideIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Rodapé do Quiz */
.quiz-footer {
	margin-top: 1.5rem;
	width: 100%;
}

.quiz-footer-divider {
	border: 0;
	height: 1px;
	background: var(--line);
	margin: 1.5rem 0;
}

#quizStateActive .quiz-footer-buttons {
	min-height: 4.25rem;
	max-height: 4.25rem;
}

.quiz-footer-buttons {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	width: 100%;
}

.quiz-footer-buttons .quiz-btn-exit,
.quiz-footer-buttons .quiz-btn-action {
	flex-shrink: 0;
	align-self: center;
}

#quizStateActive .quiz-btn-exit,
#quizStateActive .quiz-btn-action {
	padding: 0.85rem 1.75rem;
	font-size: 1.05rem;
	min-width: 140px;
}

#quizStateActive .quiz-progress-track {
	height: 18px;
}

.quiz-btn-exit {
	background: transparent;
	border: 2px solid var(--danger);
	color: var(--danger);
	font-weight: 700;
	padding: 0.7rem 1.5rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: all 0.15s;
}

.quiz-btn-exit:hover {
	background: var(--danger);
	color: #fff;
}

.quiz-btn-action {
	font-weight: 700;
	padding: 0.7rem 2rem;
	border-radius: var(--radius-sm);
	border: 2px solid var(--line);
	background: var(--paper);
	color: var(--ink-500);
	transition: all 0.15s;
	min-width: 130px;
	cursor: pointer;
}

.quiz-btn-action:disabled {
	background: var(--paper);
	border-color: var(--line);
	color: var(--ink-500);
	cursor: not-allowed;
	opacity: 0.5;
}

.quiz-btn-action.ready {
	background: #2ec4b6;
	border-color: #2ec4b6;
	color: #fff;
	cursor: pointer;
}

.quiz-btn-action.ready:hover {
	background: #239b90;
	border-color: #239b90;
}

.quiz-btn-action.continue-correct {
	background: #2ec4b6;
	border-color: #2ec4b6;
	color: #fff;
	cursor: pointer;
}

.quiz-btn-action.continue-correct:hover {
	background: #239b90;
	border-color: #239b90;
}

.quiz-btn-action.continue-incorrect {
	background: var(--danger);
	border-color: var(--danger);
	color: #fff;
	cursor: pointer;
}

.quiz-btn-action.continue-incorrect:hover {
	background: #c93535;
	border-color: #c93535;
}

@media (max-width: 720px) {
	#quizStateActive {
		padding: 0;
		--quiz-head-h: 6.5rem;
		--quiz-option-max-h: 3.35rem;
		--quiz-option-min-h: 2.5rem;
		--quiz-options-gap: 0.55rem;
		--quiz-footer-h: 6.25rem;
	}

	#quizStateActive .quiz-question-title {
		font-size: 1.45rem;
	}

	#quizStateActive .quiz-btn-exit,
	#quizStateActive .quiz-btn-action {
		min-width: 0;
		padding: 0.75rem 1rem;
		font-size: 0.95rem;
	}

	.quiz-footer-buttons .feedback-text p {
		-webkit-line-clamp: 2;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}

/* Tela de Resultados */
#quizStateResults .quiz-results-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.25rem 1.75rem 1rem;
	text-align: center;
	box-shadow: var(--shadow-1);
	flex: 1;
	min-height: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.quiz-results-card {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 3rem 2rem;
	text-align: center;
	box-shadow: var(--shadow-1);
}

#quizStateResults .results-header {
	margin-bottom: 0.85rem;
	flex-shrink: 0;
}

.results-header {
	margin-bottom: 2rem;
}

#quizStateResults .trophy-icon {
	font-size: 2.5rem;
	margin-bottom: 0.35rem;
}

.trophy-icon {
	font-size: 3.5rem;
	color: #ffb703;
	margin-bottom: 1rem;
}

#quizStateResults .results-header h2 {
	font-size: 1.65rem;
}

.results-header h2 {
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: 2rem;
	color: var(--ink-900);
	margin: 0 0 0.5rem 0;
}

#quizStateResults .results-subtitle {
	font-size: 0.88rem;
}

.results-subtitle {
	color: var(--ink-700);
	font-size: 0.95rem;
	margin: 0;
}

#quizStateResults .results-stats {
	margin-bottom: 0.85rem;
	flex-shrink: 0;
}

.results-stats {
	display: flex;
	gap: 1rem;
	justify-content: center;
	margin-bottom: 2rem;
}

.result-stat-item {
	flex: 1;
	background: var(--paper-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.stat-label {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--ink-700);
}

.stat-value {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--mint-500);
}

#quizStateResults .results-feedback-list {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	text-align: left;
	border-top: 1px solid var(--line);
	padding-top: 0.75rem;
	margin-bottom: 0.75rem;
}

.results-feedback-list {
	text-align: left;
	border-top: 1px solid var(--line);
	padding-top: 1.5rem;
	margin-bottom: 1.5rem;
}

#quizStateResults .results-feedback-list h3 {
	font-size: 1rem;
	margin: 0 0 0.5rem 0;
	flex-shrink: 0;
}

.results-feedback-list h3 {
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: 1.2rem;
	margin: 0 0 1rem 0;
}

#quizStateResults .results-review-list {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	gap: 0.5rem;
	padding-right: 0.25rem;
}

.results-review-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

#quizStateResults .results-review-item {
	padding: 0.55rem 0.75rem;
}

#quizStateResults .review-details strong {
	font-size: 0.88rem;
}

#quizStateResults .review-details p {
	font-size: 0.8rem;
}

#quizStateResults #quizRestartBtn {
	flex-shrink: 0;
	margin-top: 0 !important;
	width: 100%;
	max-width: 320px;
	margin-left: auto;
	margin-right: auto;
}

.results-review-item {
	background: var(--paper-soft);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	padding: 0.8rem 1rem;
	display: flex;
	gap: 0.8rem;
	align-items: flex-start;
}

.results-review-item.correct {
	border-left: 4px solid #2ec4b6;
}

.results-review-item.incorrect {
	border-left: 4px solid var(--danger);
}

.results-review-item i {
	font-size: 1.3rem;
	margin-top: 0.1rem;
}

.results-review-item.correct i {
	color: #2ec4b6;
}

.results-review-item.incorrect i {
	color: var(--danger);
}

.review-details {
	flex-grow: 1;
}

.review-details strong {
	display: block;
	font-size: 0.95rem;
	color: var(--ink-900);
	margin-bottom: 0.2rem;
}

.review-details p {
	margin: 0;
	font-size: 0.85rem;
	color: var(--ink-700);
	line-height: 1.4;
}

.attempt-list {
	margin: 0;
	padding-left: 1rem;
	display: grid;
	gap: 0.5rem;
}

.page-section-title {
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: clamp(1.5rem, 2.5vw, 1.9rem);
	font-weight: 700;
	color: var(--ink-900);
	text-align: left;
	line-height: 1.2;
}

.page-title-videos {
	display: none;
	width: 100%;
	max-width: none;
	margin: 0 0 1.25rem;
	padding: 0;
	text-align: left;
}

.content-area:has(#section-videos.active) .page-title-videos {
	display: block;
}

.video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 0.85rem;
}

.video-card {
	border: 1px solid var(--line);
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--paper);
}

.video-card iframe {
	width: 100%;
	border: 0;
	aspect-ratio: 16 / 9;
}

.video-content {
	padding: 0.8rem;
}

.hidden {
	display: none !important;
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 1.2rem 0;
}

@keyframes fadeSlide {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

body.mode-high-contrast {
	--bg-a: #f7f7f7;
	--bg-b: #f7f7f7;
	--ink-900: #111;
	--ink-700: #1d1d1d;
	--ink-500: #2c2c2c;
	--mint-600: #004d4f;
	--mint-500: #006f73;
	--line: rgba(0, 0, 0, 0.28);
}

body.mode-large-text {
	font-size: 1.06rem;
}

@media (max-width: 1000px) {
	.auth-panel {
		grid-template-columns: 1fr;
	}

	.stats-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 700px) {
	.layout {
		width: min(95vw, 1200px);
	}

	.panel {
		border-radius: 16px;
	}

	.stats-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-kpi-row {
		grid-template-columns: 1fr;
	}

	.dashboard-activity-grid {
		grid-template-columns: 1fr;
	}

	.dashboard-chart {
		min-height: 170px;
	}

	.dashboard-panel-header-split {
		flex-direction: column;
		align-items: stretch;
	}

	.dashboard-chart-toggle {
		width: 100%;
	}

	.dashboard-toggle-btn {
		flex: 1;
	}

	.video-grid {
		grid-template-columns: 1fr;
	}

	.tab-nav {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.tab-btn {
		text-align: center;
	}
}

/* =========================================
   DUOLINGO STYLE SIDEBAR & LAYOUT
   ========================================= */

:root {
	--sidebar-bg: #1B2227;
	--sidebar-hover: rgba(155, 217, 254, 0.08);
	--sidebar-text: rgba(155, 217, 254, 0.7);
	--sidebar-text-active: #E9FEFF;
	--sidebar-active-bg: rgba(155, 217, 254, 0.15);
	--sidebar-border: #3C454D;
	--danger-red: #ff4b4b;
	--danger-red-hover: #ff6b6b;
	--brand-green: #48B7FF;
	/* Dark sidebar with light blue tones */
}

/* Base Layout for the App Shell */
.app-layout {
	display: grid;
	grid-template-columns: 250px 1fr;
	min-height: 100vh;
	background-color: var(--bg-a);
	/* keep original background for content */
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	z-index: 10;
}

/* Sidebar Container */
.sidebar {
	background-color: var(--sidebar-bg);
	border-right: 2px solid var(--sidebar-border);
	display: flex;
	flex-direction: column;
	padding: 1.5rem 1rem;
	height: 100vh;
	color: var(--sidebar-text);
}

.sidebar-brand {
	padding: 0 1rem 2rem 1rem;
}

.sidebar-brand .brand-title {
	color: var(--brand-green);
	font-size: 1.5rem;
	margin: 0;
	font-weight: 800;
	letter-spacing: -0.5px;
}

/* Navigation List */
.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

/* Sidebar Buttons */
.sidebar-nav .tab-btn {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: transparent;
	border: 2px solid transparent;
	color: var(--sidebar-text);
	padding: 0.75rem 1rem;
	border-radius: 12px;
	font-weight: 700;
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
}

.sidebar-nav .tab-btn i {
	font-size: 1.5rem;
}

.sidebar-nav .tab-btn:hover {
	background-color: var(--sidebar-hover);
	border-color: var(--sidebar-hover);
	transform: none;
	/* override original .btn */
}

.sidebar-nav .tab-btn.active {
	background-color: var(--sidebar-active-bg);
	color: var(--sidebar-text-active);
	border-color: var(--sidebar-active-bg);
}

/* Sidebar Footer (Sair) */
.sidebar-footer {
	padding-top: 1rem;
	border-top: 2px solid var(--sidebar-border);
}

.btn-logout {
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	background: transparent;
	border: 2px solid transparent;
	color: var(--danger-red);
	padding: 0.75rem 1rem;
	border-radius: 12px;
	font-weight: 700;
	font-size: 1.05rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-align: left;
}

.btn-logout i {
	font-size: 1.5rem;
}

.btn-logout:hover {
	background-color: rgba(255, 75, 75, 0.1);
	color: var(--danger-red-hover);
}

/* Main Content Area */
.content-area {
	padding: 2rem 3rem;
	overflow-y: auto;
	height: 100vh;
}

.content-header {
	margin-bottom: 2rem;
}

.content-wrapper {
	max-width: 900px;
	margin: 0 auto;
}

.content-wrapper:has(#section-quiz.active) {
	max-width: min(1040px, 100%);
}

/* Utility spacing used in index.html */
.mt-4 {
	margin-top: 1rem;
}

/* Responsive Rules for Mobile (Bottom Navigation) */
@media (max-width: 768px) {
	.app-layout {
		grid-template-columns: 1fr;
		grid-template-rows: 1fr 70px;
	}

	.content-area {
		padding: 1.5rem;
		height: calc(100vh - 70px);
	}

	#section-quiz.active .quiz-state-view:not(.hidden) {
		height: calc(100dvh - 70px - 3.5rem);
		max-height: calc(100dvh - 70px - 3.5rem);
	}

	.sidebar {
		flex-direction: row;
		height: 70px;
		padding: 0.5rem;
		border-right: none;
		border-top: 2px solid var(--sidebar-border);
		align-items: center;
		justify-content: space-around;
		position: fixed;
		bottom: 0;
		width: 100vw;
		z-index: 50;
	}

	.sidebar-brand,
	.sidebar-footer {
		display: none;
		/* Hide brand and logout on mobile bottom bar */
	}

	.sidebar-nav {
		flex-direction: row;
		justify-content: space-around;
		width: 100%;
		gap: 0;
	}

	.sidebar-nav .tab-btn {
		flex-direction: column;
		gap: 0.2rem;
		padding: 0.4rem;
		border: none !important;
		background: transparent !important;
	}

	.sidebar-nav .tab-btn span {
		display: none;
		/* Hide text, keep icons only */
	}

	.sidebar-nav .tab-btn i {
		font-size: 1.8rem;
	}

	.sidebar-nav .tab-btn.active {
		color: var(--brand-green);
	}
}

/* =========================================
   CHECKLIST CUSTOM UI COMPONENTS
   ========================================= */

.checklist-title {
	text-align: center;
	font-size: 1.8rem;
	margin-bottom: 1.5rem;
	color: var(--ink-900);
}

.text-center {
	text-align: center;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
}

.custom-input {
	border: 2px solid var(--line);
	border-radius: var(--radius-md);
	padding: 0.8rem 1rem;
	font-family: inherit;
	font-weight: 600;
	font-size: 1rem;
	color: var(--ink-900);
	background: var(--paper-soft);
	transition: all 0.2s ease;
}

.custom-input:focus {
	outline: none;
	border-color: var(--mint-500);
	box-shadow: 0 0 0 4px rgba(72, 183, 255, 0.15);
}

/* Time Selector Row */
.time-selector {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 0.5rem;
}

.time-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 2px solid var(--line);
	background: var(--paper-soft);
	color: var(--ink-700);
	font-size: 2rem;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.time-btn:hover {
	border-color: var(--mint-500);
	color: var(--mint-500);
	transform: translateY(-2px);
}

.time-btn.active {
	background: var(--mint-500);
	color: #fff;
	border-color: var(--mint-500);
	box-shadow: 0 4px 12px rgba(72, 183, 255, 0.3);
	transform: scale(1.05);
}

/* Resistance Selector Row */
.resistance-selector {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.res-btn {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 55px;
	height: 55px;
	border-radius: 50%;
	border: 2px solid transparent;
	background: var(--paper-soft);
	color: var(--ink-500);
	font-size: 2.5rem;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.res-btn:hover {
	transform: translateY(-2px);
	filter: brightness(0.95);
}

/* Base Colors for Resistance Buttons (Inactive) */
.res-btn.extreme-negative {
	color: #fca5a5;
}

.res-btn.negative {
	color: #fdba74;
}

.res-btn.neutral {
	color: #d1d5db;
}

.res-btn.positive {
	color: #86efac;
}

.res-btn.extreme-positive {
	color: #34d399;
}

/* Active Colors for Resistance Buttons */
.res-btn.extreme-negative.active {
	background: #fee2e2;
	color: #ef4444;
	/* Bright Red */
	border-color: #ef4444;
	transform: scale(1.1);
}

.res-btn.negative.active {
	background: #ffedd5;
	color: #f97316;
	/* Orange */
	border-color: #f97316;
	transform: scale(1.1);
}

.res-btn.neutral.active {
	background: #f3f4f6;
	color: #6b7280;
	/* Gray */
	border-color: #6b7280;
	transform: scale(1.1);
}

.res-btn.positive.active {
	background: #dcfce3;
	color: #22c55e;
	/* Light Green */
	border-color: #22c55e;
	transform: scale(1.1);
}

.res-btn.extreme-positive.active {
	background: #d1fae5;
	color: #10b981;
	/* Dark Green */
	border-color: #10b981;
	transform: scale(1.1);
}

/* =========================================
   CUSTOM UI ADDITIONS (DATEPICKER, TOAST, ICONS, TEXTAREA)
   ========================================= */

/* Textarea Constraints */
.custom-textarea {
	resize: none !important;
	height: 120px;
	overflow-y: auto;
}

/* Sober Colors for Time Buttons */
.time-btn[data-time="morning"] i {
	color: #FCD34D;
}

/* Soft Yellow */
.time-btn[data-time="afternoon"] i {
	color: #FB923C;
}

/* Soft Orange */
.time-btn[data-time="night"] i {
	color: #818CF8;
}

/* Soft Indigo */

.time-btn.active[data-time="morning"] {
	background: #FCD34D;
	color: #fff;
	border-color: #FCD34D;
}

.time-btn.active[data-time="afternoon"] {
	background: #FB923C;
	color: #fff;
	border-color: #FB923C;
}

.time-btn.active[data-time="night"] {
	background: #818CF8;
	color: #fff;
	border-color: #818CF8;
}

.time-btn.active i {
	color: #fff !important;
}

/* Custom Datepicker popup */
.relative-group {
	position: relative;
}

.date-input {
	cursor: pointer;
}

.custom-datepicker {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 100%;
	background: #1B2227;
	border: 2px solid #3C454D;
	border-radius: var(--radius-md);
	padding: 1rem;
	z-index: 100;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	animation: fadeSlide 0.2s ease-out forwards;
}

.datepicker-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	font-weight: 700;
	color: var(--ink-900);
}

.datepicker-header button {
	background: transparent;
	border: none;
	color: var(--mint-500);
	cursor: pointer;
	font-size: 1.2rem;
	padding: 0.2rem;
}

.datepicker-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.2rem;
	text-align: center;
}

.days-header span {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--ink-700);
	margin-bottom: 0.5rem;
}

.dp-day {
	padding: 0.5rem 0;
	cursor: pointer;
	border-radius: 8px;
	font-weight: 600;
	color: var(--ink-900);
	transition: background 0.2s;
}

.dp-day:hover {
	background: rgba(72, 183, 255, 0.15);
}

.dp-day.empty {
	cursor: default;
}

.dp-day.empty:hover {
	background: transparent;
}

.dp-day.selected {
	background: var(--mint-500);
	color: #fff;
}

/* Toast Container */
/* Modal de confirmação */
.app-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.app-modal.hidden {
	display: none !important;
}

.app-modal-backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(8, 14, 18, 0.72);
	backdrop-filter: blur(4px);
	cursor: pointer;
	padding: 0;
}

.app-modal-card {
	position: relative;
	z-index: 1;
	width: min(100%, 400px);
	background: var(--paper);
	border: 2px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 1.75rem 1.5rem 1.35rem;
	text-align: center;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
	animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-modal-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 1.85rem;
	border: 2px solid var(--line);
	background: var(--paper-soft);
	color: var(--mint-500);
}

.app-modal-icon.is-danger {
	color: var(--danger);
	border-color: rgba(255, 75, 75, 0.35);
	background: rgba(255, 75, 75, 0.08);
}

.app-modal-title {
	font-family: "Baloo 2", system-ui, sans-serif;
	font-size: 1.45rem;
	color: var(--ink-900);
	margin: 0 0 0.5rem;
	line-height: 1.2;
}

.app-modal-message {
	margin: 0 0 1.35rem;
	font-size: 0.95rem;
	line-height: 1.45;
	color: var(--ink-700);
}

.app-modal-actions {
	display: flex;
	gap: 0.65rem;
	justify-content: center;
}

.app-modal-btn {
	flex: 1;
	border-radius: var(--radius-sm);
	padding: 0.72rem 1rem;
	font-weight: 700;
	font-size: 0.95rem;
	font-family: "Lexend", sans-serif;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.app-modal-btn:hover {
	transform: translateY(-1px);
}

.app-modal-btn-cancel {
	background: transparent;
	border: 2px solid var(--line);
	color: var(--ink-900);
}

.app-modal-btn-cancel:hover {
	border-color: var(--mint-500);
	color: var(--mint-600);
}

.app-modal-btn-confirm {
	background: transparent;
	border: 2px solid var(--mint-500);
	color: var(--mint-600);
}

.app-modal-btn-confirm:hover {
	background: rgba(72, 183, 255, 0.12);
}

.app-modal-btn-confirm.is-danger {
	border-color: var(--danger);
	color: var(--danger);
}

.app-modal-btn-confirm.is-danger:hover {
	background: var(--danger);
	color: #fff;
}

body.modal-open {
	overflow: hidden;
}

@keyframes modalPopIn {
	from {
		opacity: 0;
		transform: scale(0.94) translateY(6px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.toast-container {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.toast {
	min-width: 250px;
	padding: 1rem 1.2rem;
	border-radius: var(--radius-md);
	color: #fff;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 0.8rem;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
	animation: slideInRight 0.3s ease-out forwards;
}

.toast.hiding {
	animation: fadeOutRight 0.3s ease-in forwards;
}

.toast.success {
	background: var(--ok);
	color: #000;
}

.toast.error {
	background: var(--danger);
}

.toast.warning {
	background: var(--warn);
}

.toast.info {
	background: var(--mint-600);
	color: #000;
}

@keyframes slideInRight {
	from {
		opacity: 0;
		transform: translateX(100%);
	}

	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes fadeOutRight {
	from {
		opacity: 1;
		transform: translateX(0);
	}

	to {
		opacity: 0;
		transform: translateX(100%);
	}
}

/* Adjust top spacing for Checklist to fit on screen */
.content-area:has(#section-checklist.active) {
	padding-top: 0;
}

.content-area:has(#section-checklist.active) .content-header {
	display: none;
	margin-bottom: 0;
}

#section-checklist {
	margin-top: 4px;
}

#section-checklist .checklist-title {
	margin-top: 0;
	margin-bottom: 0.8rem;
}

#section-checklist .checklist-card {
	margin-top: 0;
}

/* =========================================
   LIGHT MODE (TEA-FRIENDLY)
   ========================================= */
body.mode-light {
	--bg-a: #F4F6F8;
	/* Fundo principal suave */
	--bg-b: #F4F6F8;
	--paper: #FFFFFF;
	/* Cards brancos */
	--paper-soft: #F9FAFB;
	--line: #E5E7EB;
	/* Bordas cinza bem claro */

	--ink-900: #1E293B;
	/* Texto principal escuro (azul marinho quase preto) */
	--ink-700: #475569;
	/* Texto secundário */
	--ink-500: #94A3B8;

	/* Sidebar específicas */
	--sidebar-bg: #F4F6F8;
	--sidebar-hover: rgba(0, 0, 0, 0.04);
	--sidebar-text: #475569;
	--sidebar-text-active: #1E293B;
	--sidebar-active-bg: rgba(72, 183, 255, 0.15);
	--sidebar-border: #E5E7EB;
}

/* Ajustes finos do Modo Claro para os componentes isolados */
body.mode-light input,
body.mode-light select,
body.mode-light textarea {
	background: #FFFFFF;
	color: var(--ink-900);
	border-color: var(--line);
}

body.mode-light .custom-datepicker {
	background: var(--paper);
	border-color: var(--line);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body.mode-light .datepicker-header {
	color: var(--ink-900);
}

body.mode-light .dp-day {
	color: var(--ink-900);
}

body.mode-light .dp-day:hover {
	background: rgba(72, 183, 255, 0.15);
}

body.mode-light .card,
body.mode-light .history-box,
body.mode-light .stat-card,
body.mode-light .dashboard-stat-card,
body.mode-light .dashboard-panel,
body.mode-light .quiz-start-card,
body.mode-light .quiz-results-card,
body.mode-light .quiz-option-item,
body.mode-light .guide-card {
	background: var(--paper);
	border-color: var(--line);
}

/* =========================================
   BLUE MODE (TEA-FRIENDLY LIGHT BLUE)
   ========================================= */
body.mode-blue {
	--bg-a: #C5EBFE;
	--bg-b: #C5EBFE;
	--sidebar-bg: #C5EBFE;
	--paper: #C5EBFE; /* Cards blending with the background */
	--paper-soft: #C5EBFE;
	--line: #8ABDDD; /* Slightly darker border for the blue theme */
	--sidebar-border: #8ABDDD;
}

body.mode-blue input, 
body.mode-blue select, 
body.mode-blue textarea {
	background: var(--paper);
}

/* =========================================
   PAGINAÇÃO DO DASHBOARD
   ========================================= */
.dashboard-pagination-footer {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.85rem;
}

.pagination-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 0.5rem;
	border: 2px solid var(--line);
	border-radius: 8px;
	background: var(--paper);
	color: var(--ink-700);
	font-family: "Baloo 2", system-ui, sans-serif;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.pagination-btn:hover:not(:disabled) {
	background: rgba(72, 183, 255, 0.08);
	border-color: rgba(72, 183, 255, 0.4);
	transform: translateY(-1px);
}

.pagination-btn.active {
	background: rgba(72, 183, 255, 0.15);
	border-color: var(--mint-500);
	color: var(--mint-600);
}

.pagination-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}