/* ==========================================================================
   Certificados MAIA — Premium Dashboard & Login Styles
   Palette: Crimson (#d50036), Ink (#19191d), Light Slate (#f8fafc), White (#fff)
   ========================================================================== */

.cert-app,
.cert-login {
	--c-red: #d50036;
	--c-red-dark: #9f0029;
	--c-red-soft: #fff0f3;
	--c-chat-sent: #cc3366;
	--c-chat-sent-text: #ffffff;
	--c-chat-received: #fff0f3;
	--c-chat-received-text: #19191d;
	--c-ink: #19191d;
	--c-muted: #64748b;
	--c-muted-strong: #475569;
	--c-line: #e2e8f0;
	--c-line-strong: #cbd5e1;
	--c-green: #16a34a;
	--c-green-soft: #f0fdf4;
	--c-green-border: #bbf7d0;
	--c-amber: #f59e0b;
	--c-amber-soft: #fffbeb;
	--c-amber-border: #fde68a;
	--c-blue: #2563eb;
	--c-blue-soft: #eff6ff;
	--c-blue-border: #bfdbfe;
	--c-purple: #9333ea;
	--c-purple-soft: #faf5ff;
	--c-purple-border: #e9d5ff;
	--c-bg: #f8fafc;
	--c-card: #ffffff;
	--c-soft: #f8fafc;
	--c-radius: 18px;
	--c-radius-sm: 12px;
	--c-radius-lg: 24px;
	--c-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.02);
	--c-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
	--c-shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--c-ink);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.cert-app *,
.cert-login * {
	box-sizing: border-box;
}

.cert-app h1, .cert-app h2, .cert-app h3, .cert-app h4,
.cert-login h1, .cert-login h2 {
	margin: 0;
	color: var(--c-ink);
	letter-spacing: -0.02em;
}

.cert-app p { margin: 0; }
.cert-app a { text-decoration: none; }
.ci { flex-shrink: 0; }

.ci-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: ci-spin 0.7s linear infinite;
}

@keyframes ci-spin {
	to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   App Shell (Dashboard)
   ------------------------------------------------------------------------ */
.cert-app {
	background: var(--c-bg);
	min-height: 100vh;
	padding-bottom: 48px;
}

.cert-topbar {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(180%) blur(20px);
	border-bottom: 1px solid var(--c-line);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cert-topbar-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.cert-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--c-ink);
	text-decoration: none;
}

.cert-brand-mark {
	width: 42px;
	height: 42px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: linear-gradient(150deg, #f52252, #d40037 55%, #a90030);
	color: #fff;
	box-shadow: 0 8px 20px rgba(213, 0, 54, 0.3);
	flex-shrink: 0;
}

.cert-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}

.cert-brand-text strong {
	font-size: 1.05rem;
	font-weight: 900;
	letter-spacing: -0.02em;
}

.cert-brand-badge {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--c-red);
	background: var(--c-red-soft);
	padding: 2px 8px;
	border-radius: 6px;
	border: 1px solid rgba(213, 0, 54, 0.15);
	align-self: flex-start;
}

.cert-topbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cert-topbar-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 10px;
	color: var(--c-muted-strong);
	font-size: 0.84rem;
	font-weight: 700;
	transition: all 0.15s ease;
	background: transparent;
	border: 1px solid transparent;
}

.cert-topbar-btn:hover {
	background: var(--c-soft);
	color: var(--c-ink);
	border-color: var(--c-line);
}

.cert-topbar-btn-logout:hover {
	background: var(--c-red-soft);
	color: var(--c-red);
	border-color: rgba(213, 0, 54, 0.2);
}

.cert-app-body {
	max-width: 1280px;
	margin: 0 auto;
	padding: 28px 24px 0;
	display: grid;
	grid-template-columns: 290px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

/* --------------------------------------------------------------------------
   Sidebar
   ------------------------------------------------------------------------ */
.cert-sidebar {
	position: sticky;
	top: 100px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cert-user-card {
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
	padding: 18px;
	display: flex;
	gap: 14px;
	align-items: center;
	box-shadow: var(--c-shadow-sm);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.cert-user-card:hover {
	box-shadow: var(--c-shadow);
	border-color: var(--c-line-strong);
}

.cert-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.cert-avatar {
	width: 50px;
	height: 50px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	font-weight: 900;
	font-size: 1.25rem;
	color: #fff;
	background: linear-gradient(150deg, #f52252, #d40037 55%, #a90030);
	box-shadow: 0 4px 12px rgba(213, 0, 54, 0.25);
}

.cert-avatar-online {
	position: absolute;
	bottom: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--c-green);
	border: 3px solid var(--c-card);
	box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.cert-user-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cert-user-info strong {
	font-size: 0.96rem;
	font-weight: 800;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cert-user-info small {
	color: var(--c-muted);
	font-size: 0.78rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cert-user-role {
	margin-top: 6px;
	align-self: flex-start;
	font-size: 0.64rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--c-red);
	background: var(--c-red-soft);
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid rgba(213, 0, 54, 0.12);
}

.cert-nav-list {
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
	padding: 10px;
	box-shadow: var(--c-shadow-sm);
}

.cert-nav-heading {
	padding: 4px 10px 8px;
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--c-muted);
}

.cert-nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	color: var(--c-muted-strong);
	font-weight: 700;
	font-size: 0.88rem;
	transition: all 0.15s ease;
	position: relative;
}

.cert-nav-item:hover {
	background: var(--c-soft);
	color: var(--c-ink);
}

.cert-nav-item.is-active {
	background: var(--c-red-soft);
	color: var(--c-red);
}

.cert-nav-item.is-active::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 4px;
	height: 24px;
	background: var(--c-red);
	border-radius: 0 6px 6px 0;
}

.cert-nav-item svg {
	color: currentColor;
	flex-shrink: 0;
}

.cert-nav-badge {
	margin-left: auto;
	font-size: 0.7rem;
	font-weight: 800;
	color: var(--c-red);
	background: var(--c-red-soft);
	padding: 2px 8px;
	border-radius: 999px;
}

.cert-nav-item.is-active .cert-nav-badge {
	color: #fff;
	background: var(--c-red);
}

.cert-sidebar-cta {
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: linear-gradient(150deg, #f52252, #d40037 55%, #a90030);
	border-radius: var(--c-radius);
	padding: 18px;
	color: #fff;
	box-shadow: 0 8px 20px rgba(213, 0, 54, 0.25);
}

.cert-sidebar-cta-text strong {
	font-size: 0.94rem;
	font-weight: 800;
	display: block;
	margin-bottom: 2px;
}

.cert-sidebar-cta-text p {
	font-size: 0.8rem;
	opacity: 0.9;
	margin: 0;
}

.cert-sidebar-cta .cert-btn-primary {
	background: #fff;
	color: var(--c-red);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cert-sidebar-cta .cert-btn-primary:hover {
	background: #fef2f2;
	color: var(--c-red-dark);
	transform: translateY(-1px);
}

.cert-sidebar-cta .cert-btn-light {
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	border-color: rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(10px);
}

.cert-sidebar-cta .cert-btn-light:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
}

.cert-sidebar-help {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px;
	background: var(--c-soft);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius-sm);
	font-size: 0.8rem;
	color: var(--c-muted-strong);
	line-height: 1.4;
}

.cert-sidebar-help strong {
	color: var(--c-ink);
	font-weight: 800;
	display: block;
	margin-bottom: 2px;
}

/* --------------------------------------------------------------------------
   Content Area
   ------------------------------------------------------------------------ */
.cert-content {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
	width: 100%;
}

/* Page Hero */
.cert-page-hero {
	background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius-lg);
	padding: 32px 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	box-shadow: var(--c-shadow);
	position: relative;
	overflow: hidden;
}

.cert-page-hero::before {
	content: "";
	position: absolute;
	top: -50%;
	right: -10%;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, rgba(213, 0, 54, 0.06) 0%, transparent 70%);
	pointer-events: none;
}

.cert-page-hero-content {
	position: relative;
	z-index: 1;
}

.cert-hero-badge {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--c-red);
	background: var(--c-red-soft);
	padding: 5px 12px;
	border-radius: 6px;
	border: 1px solid rgba(213, 0, 54, 0.12);
	margin-bottom: 10px;
}

.cert-page-hero h1 {
	font-size: 1.85rem;
	font-weight: 900;
	letter-spacing: -0.03em;
	line-height: 1.15;
	color: var(--c-ink);
	margin-bottom: 6px;
}

.cert-page-hero p {
	font-size: 0.98rem;
	color: var(--c-muted);
	max-width: 540px;
	line-height: 1.55;
}

.cert-hero-actions {
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}

/* Flash Messages */
.cert-flash {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 18px;
	border-radius: var(--c-radius-sm);
	font-weight: 700;
	font-size: 0.9rem;
	border: 1px solid;
}

.cert-flash.success {
	background: var(--c-green-soft);
	color: #15803d;
	border-color: var(--c-green-border);
}

.cert-flash.error {
	background: #fef2f2;
	color: #b91c1c;
	border-color: #fecaca;
}

/* Stats Grid */
.cert-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.cert-app-attendant .cert-stats {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cert-stat {
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
	padding: 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: var(--c-shadow-sm);
	transition: all 0.2s ease;
}

.cert-stat:hover {
	transform: translateY(-2px);
	box-shadow: var(--c-shadow);
	border-color: var(--c-line-strong);
}

.cert-stat-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cert-stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	flex-shrink: 0;
}

.cert-stat-trend {
	font-size: 0.7rem;
	font-weight: 800;
	padding: 4px 10px;
	border-radius: 999px;
	color: var(--c-green);
	background: var(--c-green-soft);
	border: 1px solid var(--c-green-border);
	white-space: nowrap;
}

.cert-stat-body {
	display: flex;
	flex-direction: column;
}

.cert-stat-body strong {
	font-size: 1.75rem;
	font-weight: 900;
	line-height: 1.05;
	color: var(--c-ink);
}

.cert-stat-body small {
	color: var(--c-muted);
	font-size: 0.78rem;
	font-weight: 600;
}

.cert-stat-red .cert-stat-icon { background: var(--c-red-soft); color: var(--c-red); }
.cert-stat-green .cert-stat-icon { background: var(--c-green-soft); color: var(--c-green); }
.cert-stat-amber .cert-stat-icon { background: var(--c-amber-soft); color: var(--c-amber); }
.cert-stat-ink .cert-stat-icon { background: var(--c-soft); color: var(--c-ink); border: 1px solid var(--c-line); }

/* Panels */
.cert-panel {
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
	padding: 28px;
	box-shadow: var(--c-shadow);
	width: 100%;
}

.cert-panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 22px;
	flex-wrap: wrap;
}

.cert-panel-head h2 {
	font-size: 1.25rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	gap: 10px;
}

.cert-panel-head h2 svg {
	color: var(--c-red);
}

.cert-panel-sub {
	font-size: 0.88rem;
	color: var(--c-muted);
	margin-top: 4px;
}

.cert-panel-title {
	font-size: 1.25rem;
	font-weight: 800;
	color: var(--c-ink);
	margin: 0 0 6px;
}

/* Empty States */
.cert-empty {
	text-align: center;
	padding: 56px 28px;
	border: 2px dashed var(--c-line);
	border-radius: var(--c-radius);
	background: var(--c-soft);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.cert-empty-icon {
	color: var(--c-red);
	opacity: 0.5;
}

.cert-empty h3 {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--c-ink);
}

.cert-empty p {
	color: var(--c-muted);
	font-size: 0.9rem;
	max-width: 360px;
	line-height: 1.55;
}

.cert-empty-sm {
	padding: 36px 20px;
}

.cert-empty-sm .cert-empty-icon {
	color: var(--c-muted);
}

.cert-empty-mini {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 24px;
	color: var(--c-muted);
	font-size: 0.88rem;
	background: var(--c-soft);
	border-radius: var(--c-radius-sm);
	border: 1px dashed var(--c-line);
}

/* Certificate Cards */
.cert-cards {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

@media (min-width: 900px) {
	.cert-cards {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
	}
}

.cert-card {
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
	padding: 22px;
	background: var(--c-card);
	display: flex;
	flex-direction: column;
	gap: 18px;
	transition: all 0.2s ease;
	box-shadow: var(--c-shadow-sm);
}

.cert-card:hover {
	box-shadow: var(--c-shadow);
	border-color: var(--c-line-strong);
	transform: translateY(-2px);
}

.cert-card-manage {
	grid-column: 1 / -1;
}

.cert-card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.cert-card-title-group {
	display: flex;
	gap: 12px;
	align-items: center;
	min-width: 0;
	flex: 1;
}

.cert-card-icon {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	background: var(--c-red-soft);
	color: var(--c-red);
	flex-shrink: 0;
}

.cert-card-title-group h4 {
	font-size: 1.02rem;
	font-weight: 800;
	color: var(--c-ink);
	line-height: 1.25;
}

.cert-meta {
	color: var(--c-muted);
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
	line-height: 1.4;
}

.cert-meta strong {
	color: var(--c-ink);
	font-weight: 700;
}

.cert-dot-sep {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--c-line-strong);
	display: inline-block;
	flex-shrink: 0;
}

.cert-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	white-space: nowrap;
	background: var(--c-soft);
	color: var(--c-muted-strong);
	border: 1px solid var(--c-line);
}

.cert-badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

.cert-badge-aguardando-validacao { background: var(--c-amber-soft); color: var(--c-amber); border-color: var(--c-amber-border); }
.cert-badge-documentos-enviados { background: var(--c-blue-soft); color: var(--c-blue); border-color: var(--c-blue-border); }
.cert-badge-em-emissao { background: var(--c-purple-soft); color: var(--c-purple); border-color: var(--c-purple-border); }
.cert-badge-pronto-para-retirada { background: var(--c-green-soft); color: var(--c-green); border-color: var(--c-green-border); }
.cert-badge-concluido { background: var(--c-green-soft); color: var(--c-green); border-color: var(--c-green-border); }
.cert-badge-cancelado { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.cert-card-progress-area {
	padding-top: 4px;
}

/* Progress Stepper */
.cert-progress-wrap {
	margin: -4px 0 0;
}

.cert-progress {
	list-style: none;
	display: flex;
	padding: 0;
	margin: 0;
	counter-reset: step;
}

.cert-progress-item {
	flex: 1;
	position: relative;
	text-align: center;
}

.cert-progress-item::before {
	content: "";
	position: absolute;
	top: 12px;
	left: 50%;
	width: 100%;
	height: 2px;
	background: var(--c-line);
	z-index: 0;
}

.cert-progress-item:last-child::before {
	display: none;
}

.cert-progress-item .dot {
	position: relative;
	z-index: 1;
	width: 26px;
	height: 26px;
	margin: 0 auto 8px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--c-line);
	display: grid;
	place-items: center;
	color: #fff;
	font-weight: 800;
	font-size: 0.7rem;
	transition: all 0.2s ease;
}

.cert-progress-item .dot .n {
	color: var(--c-muted);
}

.cert-progress-item .label {
	font-size: 0.6rem;
	font-weight: 700;
	color: var(--c-muted);
	display: block;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0 4px;
}

.cert-progress-item.done::before {
	background: var(--c-green-border);
}

.cert-progress-item.done .dot {
	background: var(--c-green);
	border-color: var(--c-green);
	box-shadow: 0 0 0 4px var(--c-green-soft);
}

.cert-progress-item.done .dot .n {
	display: none;
}

.cert-progress-item.done .label {
	color: var(--c-green);
	font-weight: 800;
}

.cert-progress-item.current::before {
	background: rgba(213, 0, 54, 0.2);
}

.cert-progress-item.current .dot {
	background: var(--c-red);
	border-color: var(--c-red);
	box-shadow: 0 0 0 4px var(--c-red-soft);
	transform: scale(1.1);
}

.cert-progress-item.current .label {
	color: var(--c-red);
	font-weight: 800;
}

.cert-progress.is-cancelled .dot {
	border-color: rgba(213, 0, 54, 0.2);
}

.cert-progress.is-cancelled .label {
	color: var(--c-muted);
}

/* Notes */
.cert-note {
	background: var(--c-red-soft);
	border: 1px solid rgba(213, 0, 54, 0.15);
	border-radius: var(--c-radius-sm);
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cert-note-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.cert-note-tag {
	font-size: 0.68rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--c-red);
	background: rgba(213, 0, 54, 0.1);
	padding: 3px 8px;
	border-radius: 4px;
}

.cert-note p {
	font-size: 0.88rem;
	color: #7f1d1d;
	line-height: 1.5;
	margin: 0;
}

/* Chat / Messages */
.cert-chat {
	border-top: 1px solid var(--c-line);
	margin-top: 4px;
}

.cert-chat summary {
	list-style: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 800;
	font-size: 0.85rem;
	color: var(--c-red);
	padding: 4px 0;
	transition: opacity 0.15s ease;
}

.cert-chat summary::-webkit-details-marker {
	display: none;
}

.cert-chat summary:hover {
	opacity: 0.8;
}

.cert-chat-toggle-arrow {
	font-size: 0.65rem;
	color: var(--c-muted);
	margin-left: 4px;
	transition: transform 0.2s ease;
}

.cert-chat[open] .cert-chat-toggle-arrow {
	transform: rotate(180deg);
}

.cert-chat[open] summary {
	margin-bottom: 14px;
}

.cert-chat-content {
	padding-top: 4px;
}

.cert-messages {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.cert-messages-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-height: 360px;
	overflow-y: auto;
	padding-right: 6px;
}

.cert-message {
	display: flex;
	max-width: 88%;
}

.cert-message.mine {
	align-self: flex-end;
	flex-direction: row-reverse;
}

.cert-message.theirs {
	align-self: flex-start;
}

.cert-message-bubble {
	display: flex;
	flex-direction: column;
	max-width: 100%;
	background: var(--c-chat-received);
	border: 1px solid var(--c-line);
	border-radius: 16px;
	padding: 12px 16px;
	box-shadow: var(--c-shadow-sm);
	color: var(--c-chat-received-text);
}

.cert-message.mine .cert-message-bubble {
	background: var(--c-chat-sent);
	border-color: rgba(204, 51, 102, 0.2);
	border-bottom-right-radius: 4px;
	color: var(--c-chat-sent-text);
}

.cert-message.theirs .cert-message-bubble {
	border-bottom-left-radius: 4px;
}

.cert-message-author {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 0.72rem;
}

.cert-message-author strong {
	font-weight: 800;
	color: var(--c-chat-received-text);
	font-size: 0.75rem;
}

.cert-message.mine .cert-message-author strong {
	color: var(--c-chat-sent-text);
}

.cert-message-author small {
	color: var(--c-muted);
	font-weight: 600;
}

.cert-message.mine .cert-message-author small {
	color: rgba(255, 255, 255, 0.8);
}

.cert-message-body {
	font-size: 0.88rem;
	color: var(--c-chat-received-text);
}

.cert-message.mine .cert-message-body {
	color: var(--c-chat-sent-text);
}
	line-height: 1.5;
}

/* Reply Form */
.cert-reply-form {
	margin-top: 4px;
}

.cert-reply-input-wrap {
	display: flex;
	align-items: flex-end;
	gap: 10px;
	background: var(--c-soft);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius-sm);
	padding: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cert-reply-input-wrap:focus-within {
	border-color: var(--c-red);
	box-shadow: 0 0 0 3px var(--c-red-soft);
}

.cert-reply-input-wrap textarea {
	flex: 1;
	min-height: 48px;
	max-height: 120px;
	background: transparent;
	border: none;
	outline: none;
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--c-ink);
	line-height: 1.5;
	resize: none;
	padding: 4px 4px;
}

.cert-reply-input-wrap textarea::placeholder {
	color: var(--c-muted);
}

.cert-btn-send {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	background: var(--c-red);
	color: #fff;
	border: none;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: all 0.15s ease;
	box-shadow: 0 4px 12px rgba(213, 0, 54, 0.25);
	flex-shrink: 0;
}

.cert-btn-send:hover {
	background: var(--c-red-dark);
	transform: scale(1.05);
}

/* Buttons */
.cert-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: var(--c-radius-sm);
	padding: 12px 22px;
	cursor: pointer;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 800;
	text-decoration: none;
	transition: all 0.15s ease;
}

.cert-btn-primary {
	background: var(--c-red);
	color: #fff;
	box-shadow: 0 8px 20px rgba(213, 0, 54, 0.28);
}

.cert-btn-primary:hover {
	background: var(--c-red-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(213, 0, 54, 0.35);
}

.cert-btn-light {
	background: var(--c-soft);
	color: var(--c-muted-strong);
	border: 1px solid var(--c-line);
}

.cert-btn-light:hover {
	background: var(--c-line);
	color: var(--c-ink);
}

.cert-btn-outline {
	background: #fff;
	color: var(--c-red);
	border: 1.5px solid rgba(213, 0, 54, 0.2);
}

.cert-btn-outline:hover {
	background: var(--c-red-soft);
	color: var(--c-red-dark);
}

.cert-btn-sm {
	padding: 10px 18px;
	font-size: 0.82rem;
}

.cert-btn-block {
	width: 100%;
}

.cert-table-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: var(--c-soft);
	border: 1px solid var(--c-line);
	border-radius: 8px;
	color: var(--c-muted-strong);
	font-size: 0.8rem;
	font-weight: 700;
	transition: all 0.15s ease;
}

.cert-table-action-btn:hover {
	background: var(--c-red-soft);
	border-color: rgba(213, 0, 54, 0.2);
	color: var(--c-red);
}

/* Tables */
.cert-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
}

.cert-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
}

.cert-table th {
	text-align: left;
	padding: 14px 16px;
	background: var(--c-soft);
	color: var(--c-muted);
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	border-bottom: 1px solid var(--c-line);
}

.cert-table td {
	padding: 16px;
	border-bottom: 1px solid var(--c-line);
	font-size: 0.9rem;
	color: var(--c-ink);
}

.cert-table tr:last-child td {
	border-bottom: none;
}

.cert-table tr:hover td {
	background: var(--c-soft);
}

.cert-order-num {
	font-family: 'Poppins', monospace;
	font-weight: 700;
	color: var(--c-ink);
}

.cert-order-price {
	color: var(--c-ink);
	font-weight: 800;
}

.cert-pill {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 0.74rem;
	font-weight: 700;
	background: var(--c-soft);
	color: var(--c-muted-strong);
	border: 1px solid var(--c-line);
}

.cert-pill-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

.cert-pill-pending,
.cert-pill-on-hold { background: var(--c-amber-soft); color: var(--c-amber); border-color: var(--c-amber-border); }
.cert-pill-processing { background: var(--c-purple-soft); color: var(--c-purple); border-color: var(--c-purple-border); }
.cert-pill-completed { background: var(--c-green-soft); color: var(--c-green); border-color: var(--c-green-border); }
.cert-pill-cancelled,
.cert-pill-failed,
.cert-pill-refunded { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Filters */
.cert-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 22px;
}

.cert-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--c-soft);
	border: 1px solid var(--c-line);
	color: var(--c-muted-strong);
	font-size: 0.82rem;
	font-weight: 700;
	transition: all 0.15s ease;
}

.cert-filter-count {
	background: #fff;
	border-radius: 999px;
	padding: 2px 8px;
	font-size: 0.7rem;
	color: var(--c-muted);
	border: 1px solid var(--c-line);
}

.cert-filter:hover {
	color: var(--c-ink);
	border-color: var(--c-line-strong);
	background: #fff;
}

.cert-filter.is-active {
	background: var(--c-red-soft);
	border-color: rgba(213, 0, 54, 0.2);
	color: var(--c-red);
}

.cert-filter.is-active .cert-filter-count {
	background: var(--c-red);
	color: #fff;
	border-color: var(--c-red);
}

/* Status Form */
.cert-status-form {
	background: var(--c-soft);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius-sm);
	padding: 20px;
	margin: 8px 0 4px;
}

.cert-status-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 16px;
	align-items: end;
}

.cert-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cert-field label {
	font-size: 0.78rem;
	font-weight: 800;
	color: var(--c-muted-strong);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.cert-field select,
.cert-field input {
	width: 100%;
	height: 46px;
	background: #fff;
	border: 1.5px solid var(--c-line);
	border-radius: 10px;
	padding: 0 14px;
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--c-ink);
	outline: none;
	transition: all 0.15s ease;
}

.cert-field select:focus,
.cert-field input:focus {
	border-color: var(--c-red);
	box-shadow: 0 0 0 3px var(--c-red-soft);
}

.cert-field-action {
	display: flex;
	align-items: end;
}

/* Support Grid */
.cert-support-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin-top: 8px;
}

.cert-support-card {
	display: flex;
	gap: 16px;
	background: var(--c-soft);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius);
	padding: 20px;
	transition: all 0.2s ease;
}

.cert-support-card:hover {
	border-color: var(--c-line-strong);
	transform: translateY(-2px);
	box-shadow: var(--c-shadow);
}

.cert-support-icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	display: grid;
	place-items: center;
	background: var(--c-red-soft);
	color: var(--c-red);
	flex-shrink: 0;
}

.cert-support-icon-slate {
	background: var(--c-soft);
	color: var(--c-muted-strong);
	border: 1px solid var(--c-line);
}

.cert-support-info {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
}

.cert-support-info strong {
	font-size: 0.94rem;
	font-weight: 800;
	color: var(--c-ink);
}

.cert-support-info span {
	font-size: 0.82rem;
	color: var(--c-muted);
	line-height: 1.45;
}

.cert-support-info .cert-btn-sm {
	width: fit-content;
	margin-top: 4px;
}

/* Login Screen */
.cert-login {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 48px 24px;
	background:
		radial-gradient(1200px 600px at 50% -10%, var(--c-red-soft) 0%, transparent 60%),
		radial-gradient(800px 400px at 100% 100%, rgba(22, 163, 74, 0.08) 0%, transparent 50%),
		var(--c-bg);
}

.cert-login-panel {
	width: min(100%, 440px);
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: var(--c-radius-lg);
	padding: 42px 36px;
	box-shadow: var(--c-shadow-lg);
	position: relative;
	overflow: hidden;
}

.cert-login-panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--c-red), var(--c-amber), var(--c-green));
}

.cert-login-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-weight: 900;
	color: var(--c-ink);
	margin-bottom: 28px;
	font-size: 1.1rem;
}

.cert-login-brand .cert-brand-mark {
	width: 48px;
	height: 48px;
	border-radius: 16px;
}

.cert-login-header {
	text-align: center;
	margin-bottom: 28px;
}

.cert-login-header h1 {
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	margin-bottom: 8px;
}

.cert-login-header p {
	color: var(--c-muted);
	font-size: 0.95rem;
	line-height: 1.5;
}

.cert-login #loginform {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.cert-login #loginform p {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left;
}

.cert-login #loginform label {
	font-size: 0.82rem;
	font-weight: 800;
	color: var(--c-muted-strong);
}

.cert-login #loginform input[type="text"],
.cert-login #loginform input[type="password"],
.cert-login #loginform input[type="email"] {
	width: 100%;
	height: 52px;
	padding: 0 16px;
	border: 1.5px solid var(--c-line);
	border-radius: var(--c-radius-sm);
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--c-ink);
	background: #fff;
	outline: none;
	transition: all 0.15s ease;
}

.cert-login #loginform input:focus {
	border-color: var(--c-red);
	box-shadow: 0 0 0 4px var(--c-red-soft);
	background: #fff;
}

.cert-login #loginform .login-remember {
	flex-direction: row;
	align-items: center;
	gap: 10px;
	text-align: left;
}

.cert-login #loginform .login-remember label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	color: var(--c-muted);
	font-size: 0.85rem;
	cursor: pointer;
}

.cert-login #loginform .login-remember input {
	width: 18px;
	height: 18px;
	accent-color: var(--c-red);
	flex-shrink: 0;
}

.cert-login #loginform .login-submit {
	margin-top: 6px;
}

.cert-login #loginform input[type="submit"],
.cert-login #loginform .button-primary {
	width: 100%;
	height: 52px;
	border: none;
	border-radius: var(--c-radius-sm);
	cursor: pointer;
	background: var(--c-red);
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 800;
	box-shadow: 0 8px 20px rgba(213, 0, 54, 0.28);
	transition: all 0.15s ease;
}

.cert-login #loginform input[type="submit"]:hover {
	background: var(--c-red-dark);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(213, 0, 54, 0.35);
}

.cert-login-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 22px;
	font-size: 0.85rem;
	flex-wrap: wrap;
}

.cert-login-links a {
	color: var(--c-red);
	font-weight: 700;
	transition: color 0.15s ease;
}

.cert-login-links a:hover {
	color: var(--c-red-dark);
	text-decoration: underline;
}

.cert-dot-sep {
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--c-line-strong);
	display: inline-block;
	flex-shrink: 0;
}

.cert-login-seals {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--c-line);
	font-size: 0.72rem;
	color: var(--c-muted);
	flex-wrap: wrap;
}

.cert-login-seals span:first-child {
	color: var(--c-green);
	font-weight: 700;
}

.cert-login-foot {
	text-align: center;
	margin-top: 24px;
	font-size: 0.82rem;
	color: var(--c-muted);
}

.cert-login-foot a {
	color: var(--c-red);
	font-weight: 700;
}

.cert-login-foot a:hover {
	color: var(--c-red-dark);
	text-decoration: underline;
}

/* Links */
.cert-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--c-red);
	font-weight: 700;
	font-size: 0.84rem;
	transition: color 0.15s ease;
}

.cert-link:hover {
	color: var(--c-red-dark);
}

/* Muted text */
.cert-muted {
	color: var(--c-muted);
	font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
	.cert-app-body {
		grid-template-columns: 1fr;
	}

	.cert-sidebar {
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.cert-user-card {
		flex: 1;
		min-width: 280px;
	}

	.cert-nav-list {
		flex: 2;
		min-width: 280px;
		display: flex;
		flex-direction: column;
	}

	.cert-nav-heading {
		display: none;
	}

	.cert-nav-list > * {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
	}

	.cert-nav-item {
		flex: 1;
		justify-content: center;
		min-width: 140px;
	}

	.cert-sidebar-cta {
		flex: 1;
		min-width: 280px;
	}

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

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

@media (max-width: 768px) {
	.cert-topbar-inner {
		padding: 0 16px;
		height: auto;
		min-height: 68px;
		flex-wrap: wrap;
		padding-top: 12px;
		padding-bottom: 12px;
		gap: 12px;
	}

	.cert-app-body {
		padding: 18px 16px 0;
	}

	.cert-page-hero {
		flex-direction: column;
		align-items: stretch;
		padding: 24px 20px;
		text-align: center;
	}

	.cert-page-hero h1 {
		font-size: 1.5rem;
	}

	.cert-hero-actions {
		width: 100%;
	}

	.cert-hero-actions .cert-btn {
		width: 100%;
	}

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

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

	.cert-cards {
		grid-template-columns: 1fr;
	}

	.cert-card-manage {
		grid-column: auto;
	}

	.cert-panel {
		padding: 20px 16px;
	}

	.cert-progress-item .label {
		font-size: 0.54rem;
	}

	.cert-status-form-grid {
		grid-template-columns: 1fr;
	}

	.cert-support-grid {
		grid-template-columns: 1fr;
	}

	.cert-login-panel {
		padding: 32px 24px;
	}
}

@media (max-width: 480px) {
	.cert-topbar-actions span {
		display: none;
	}

	.cert-topbar-btn {
		padding: 10px 12px;
	}

	.cert-brand-text strong {
		font-size: 0.95rem;
	}

	.cert-brand-badge {
		font-size: 0.64rem;
		padding: 2px 6px;
	}

	.cert-table th,
	.cert-table td {
		padding: 12px 10px;
		font-size: 0.82rem;
	}
}


/* ==========================================================================
   Certificados MAIA — Global Design System Safeguards & Responsiveness
   ========================================================================== */

/* 1200px Content Container Guarantee */
.elementor-section.elementor-section-boxed > .elementor-container,
.elementor-container,
.cert-app-body,
.cert-topbar-inner {
	max-width: 1200px !important;
}

/* Global Font Guarantee */
body, h1, h2, h3, h4, h5, h6, input, button, select, textarea {
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Primary Button Standardization (Pill Style) */
.elementor-button,
a.cert-btn-primary,
button.cert-btn-primary {
	border-radius: 50px !important;
	font-weight: 600 !important;
	letter-spacing: normal !important;
}

/* Mobile Responsiveness Rules */
@media (max-width: 768px) {
	.elementor-section,
	.elementor-container,
	.elementor-column {
		max-width: 100% !important;
	}

	.elementor-section > .elementor-container,
	.cert-modal-topbar,
	.cert-checkout-header-wrap,
	.cert-order-summary-card {
		padding-left: 18px !important;
		padding-right: 18px !important;
	}
}

/* Reports + WooCommerce account shortcuts */
.cert-report-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;background:#fff;border:1px solid #e7eaf0;border-radius:16px;padding:18px 20px;margin:0 0 22px;box-shadow:0 2px 7px rgba(15,23,42,.025)}
.cert-report-toolbar>div{min-width:180px}
.cert-report-toolbar>div strong{display:block;font-size:14px;color:#171923;font-weight:800}
.cert-report-toolbar>div p{margin:5px 0 0;color:#778196;font-size:12px}
.cert-report-form{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}
.cert-report-form label{display:flex;flex-direction:column;gap:5px;color:#697386;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.cert-report-form input,.cert-report-form select{min-height:38px;max-width:170px;border:1px solid #dfe4ec;border-radius:9px;background:#fff;padding:7px 10px;color:#273044;font:inherit;font-size:12px}
.cert-report-form .cert-btn{white-space:nowrap}
.cert-account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.cert-report-admin-form{background:#fff;border:1px solid #e4e7ec;border-radius:12px;padding:18px 24px;max-width:760px}
@media(max-width:760px){.cert-report-toolbar{align-items:stretch}.cert-report-form{width:100%}.cert-report-form label{flex:1 1 135px}.cert-report-form input,.cert-report-form select{width:100%;max-width:none}.cert-account-grid{grid-template-columns:1fr}}
