/**
 * Member Account Portal & Dashboard Styles
 * Theme: Christ Embassy Tema Newtown
 */

/* ==========================================================================
   1. HERO WELCOME & PROFILE HEADER
   ========================================================================== */
.ce-portal-page-main {
	min-height: 80vh;
	background-color: var(--bg-surface, #F8FAFC);
	padding-bottom: 90px;
}

.ce-portal-hero {
	background: linear-gradient(135deg, #001844 0%, #002060 45%, #0038A8 100%);
	color: #FFFFFF;
	padding: 50px 0 40px;
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.ce-portal-hero::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 600px;
	height: 600px;
	background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, transparent 70%);
	pointer-events: none;
}

.ce-portal-hero-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	position: relative;
	z-index: 2;
}

.ce-portal-hero-user {
	display: flex;
	align-items: center;
	gap: 20px;
}

.ce-portal-hero-avatar-wrap {
	position: relative;
	width: 76px;
	height: 76px;
	flex-shrink: 0;
}

.ce-portal-hero-avatar {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid #D4AF37;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ce-portal-hero-title {
	font-size: clamp(1.4rem, 2.8vw, 2rem);
	font-weight: 800;
	color: #FFFFFF;
	margin: 0 0 4px;
	letter-spacing: -0.02em;
}

.ce-portal-hero-subtitle {
	color: #CBD5E1;
	font-size: 0.95rem;
	margin: 0;
}

.ce-portal-hero-stats {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.ce-hero-stat-card {
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 12px;
	padding: 10px 18px;
	min-width: 110px;
}

.ce-hero-stat-card .stat-label {
	font-size: 0.75rem;
	color: #E2E8F0;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 2px;
}

.ce-hero-stat-card .stat-val {
	font-size: 1.1rem;
	font-weight: 800;
	color: #FFE082;
}

/* ==========================================================================
   2. PORTAL TABBED NAVIGATION
   ========================================================================== */
.ce-portal-nav-bar {
	background: #FFFFFF;
	border-bottom: 1px solid #E2E8F0;
	position: sticky;
	top: 70px;
	z-index: 40;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.ce-portal-nav {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 8px 0;
}

.ce-portal-nav::-webkit-scrollbar {
	display: none;
}

.ce-portal-tab-btn {
	background: transparent;
	border: none;
	border-radius: 9999px;
	padding: 10px 18px;
	font-size: 0.9rem;
	font-weight: 700;
	color: #64748B;
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	gap: 8px;
}

.ce-portal-tab-btn:hover {
	color: #002060;
	background: #F1F5F9;
}

.ce-portal-tab-btn.is-active {
	color: #002060;
	background: #E0E7FF;
	box-shadow: inset 0 0 0 1px rgba(0, 56, 168, 0.2);
}

/* ==========================================================================
   3. PANELS & COMMON CARDS
   ========================================================================== */
.ce-portal-container {
	padding-top: 36px;
}

.ce-portal-panel {
	display: none;
}

.ce-portal-panel.is-active {
	display: block;
	animation: ceFadeIn 0.25s ease-out;
}

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

.ce-portal-panel-header {
	margin-bottom: 24px;
}

.ce-portal-panel-title {
	font-size: 1.6rem;
	font-weight: 800;
	color: #002060;
	margin: 0 0 6px;
}

.ce-portal-panel-desc {
	color: #64748B;
	font-size: 0.95rem;
	margin: 0;
	max-width: 680px;
}

.ce-portal-card {
	background: #FFFFFF;
	border-radius: 20px;
	border: 1px solid #E2E8F0;
	padding: clamp(20px, 3vw, 28px);
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ce-portal-card-subtitle {
	font-size: 1.15rem;
	font-weight: 800;
	color: #002060;
	margin-bottom: 14px;
}

.ce-portal-divider {
	border: 0;
	border-top: 1px solid #E2E8F0;
	margin: 24px 0;
}

/* 2-Column Grid Layouts */
.ce-portal-grid-2col {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 24px;
}

.ce-portal-profile-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
}

@media (max-width: 860px) {
	.ce-portal-profile-layout {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   4. AVATAR CARD & PHOTO UPLOADER
   ========================================================================== */
.ce-portal-avatar-card {
	text-align: center;
}

.ce-portal-avatar-wrap {
	position: relative;
	width: 120px;
	height: 120px;
	margin: 0 auto 16px;
}

.ce-portal-avatar-large {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	border: 4px solid #FFFFFF;
	box-shadow: 0 8px 24px rgba(0, 32, 96, 0.15);
}

.ce-portal-avatar-upload-btn {
	position: absolute;
	bottom: 2px;
	right: 2px;
	background: #002060;
	color: #FFFFFF;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s, background 0.2s;
}

.ce-portal-avatar-upload-btn:hover {
	transform: scale(1.1);
	background: #0038A8;
}

.ce-portal-profile-name {
	font-size: 1.2rem;
	font-weight: 800;
	color: #002060;
	margin: 0 0 4px;
}

.ce-portal-profile-email {
	font-size: 0.85rem;
	color: #64748B;
	margin: 0 0 14px;
	word-break: break-all;
}

.ce-portal-badges-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: center;
}

/* ==========================================================================
   5. PILLS & KEY-VALUE LISTS
   ========================================================================== */
.ce-pill {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 700;
}

.ce-pill-gold {
	background: #FEF3C7;
	color: #92400E;
}

.ce-pill-royal {
	background: #DBEAFE;
	color: #1E40AF;
}

.ce-pill-slate {
	background: #F1F5F9;
	color: #475569;
}

.ce-portal-kv-list {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.85rem;
}

.ce-portal-kv-list li {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #F1F5F9;
}

.ce-portal-kv-list li:last-child {
	border-bottom: none;
}

.ce-portal-kv-list .kv-label {
	color: #64748B;
}

.ce-portal-kv-list .kv-val {
	font-weight: 600;
	color: #002060;
}

/* ==========================================================================
   6. FORMS & INPUTS
   ========================================================================== */
.ce-form-row-2col {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
}

.ce-form-group {
	margin-bottom: 16px;
}

.ce-form-label {
	display: block;
	font-weight: 600;
	font-size: 0.85rem;
	color: #334155;
	margin-bottom: 6px;
}

.ce-form-input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #CBD5E1;
	border-radius: 10px;
	font-size: 0.95rem;
	color: #1E293B;
	background: #FFFFFF;
	transition: border-color 0.2s, box-shadow 0.2s;
	font-family: inherit;
}

.ce-form-input:focus {
	outline: none;
	border-color: #0038A8;
	box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.12);
}

.ce-form-hint {
	font-size: 0.8rem;
	color: #64748B;
	margin: 0 0 14px;
}

.ce-portal-alert {
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 0.9rem;
	margin-bottom: 18px;
}

.ce-portal-alert.is-success {
	background: #ECFDF5;
	border: 1px solid #A7F3D0;
	color: #065F46;
}

.ce-portal-alert.is-error {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	color: #991B1B;
}

/* ==========================================================================
   7. FOUNDATION SCHOOL CURRICULUM
   ========================================================================== */
.ce-portal-fs-banner {
	background: linear-gradient(135deg, #FFFDF5 0%, #FFFFFF 100%);
	border-color: rgba(212, 175, 55, 0.3);
}

.ce-portal-fs-banner-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.ce-portal-progress-wrap {
	width: 100%;
	height: 10px;
	background: #E2E8F0;
	border-radius: 9999px;
	overflow: hidden;
	margin-top: 12px;
}

.ce-portal-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #FDB813 0%, #0038A8 100%);
	border-radius: 9999px;
	transition: width 0.5s ease-in-out;
}

.ce-curriculum-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
	gap: 20px;
}

.ce-curriculum-card {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 22px;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s, box-shadow 0.2s;
}

.ce-curriculum-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.ce-curriculum-card.is-completed {
	border-color: #A7F3D0;
	background: #F0FDF4;
}

.ce-curriculum-card.is-current {
	border-color: #93C5FD;
	background: #EFF6FF;
}

.ce-curriculum-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.ce-curriculum-num {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: #F1F5F9;
	color: #002060;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.ce-curriculum-title {
	font-size: 1rem;
	font-weight: 700;
	color: #002060;
	margin: 0;
}

.ce-curriculum-desc {
	font-size: 0.85rem;
	color: #64748B;
	line-height: 1.5;
	margin: 0 0 12px;
	flex-grow: 1;
}

.ce-curriculum-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.ce-topic-tag {
	font-size: 0.7rem;
	background: rgba(15, 23, 42, 0.06);
	color: #334155;
	padding: 3px 8px;
	border-radius: 4px;
	font-weight: 600;
}

/* ==========================================================================
   8. GIVING & PLEDGES STYLES
   ========================================================================== */
.ce-giving-channels-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 16px;
}

.ce-channel-mini-box {
	background: #F8FAFC;
	border: 1px solid #CBD5E1;
	border-radius: 12px;
	padding: 14px;
}

.channel-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	font-weight: 700;
	color: #0038A8;
	margin-bottom: 4px;
}

.channel-val-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.channel-val {
	font-size: 1.1rem;
	font-weight: 800;
	color: #002060;
}

.channel-hint {
	font-size: 0.75rem;
	color: #64748B;
	margin-top: 4px;
}

.ce-pledges-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ce-pledge-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #F8FAFC;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	padding: 10px 14px;
}

.ce-pledge-arm {
	font-size: 0.9rem;
	font-weight: 700;
	color: #002060;
}

.ce-pledge-meta {
	font-size: 0.8rem;
	color: #64748B;
}

.btn-xs {
	padding: 3px 8px;
	font-size: 0.75rem;
	border-radius: 6px;
}

.btn-outline-danger {
	background: transparent;
	color: #DC2626;
	border: 1px solid #FECACA;
	cursor: pointer;
}

.btn-outline-danger:hover {
	background: #FEE2E2;
}

/* Giving Statement Table */
.ce-table-responsive {
	overflow-x: auto;
}

.ce-portal-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.ce-portal-table th {
	text-align: left;
	padding: 10px 12px;
	background: #F8FAFC;
	color: #475569;
	font-weight: 700;
	border-bottom: 2px solid #E2E8F0;
	font-size: 0.8rem;
	text-transform: uppercase;
}

.ce-portal-table td {
	padding: 12px;
	border-bottom: 1px solid #F1F5F9;
	color: #1E293B;
}

.ce-portal-table tr:hover td {
	background: #F8FAFC;
}

.ce-delete-giving-btn {
	background: transparent;
	border: none;
	color: #94A3B8;
	font-size: 1.2rem;
	cursor: pointer;
	line-height: 1;
}

.ce-delete-giving-btn:hover {
	color: #DC2626;
}

/* ==========================================================================
   9. SERMON BOOKMARKS & NOTES
   ========================================================================== */
.ce-saved-sermons-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

.ce-sermon-card {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
	display: flex;
	flex-direction: column;
}

.ce-sermon-thumb-wrap {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #0B1120;
	overflow: hidden;
}

.ce-sermon-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}

.ce-sermon-card:hover .ce-sermon-thumb {
	transform: scale(1.04);
}

.ce-sermon-thumb-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #FFE082;
	font-weight: 800;
	font-size: 0.9rem;
	background: #002060;
}

.ce-sermon-dur {
	position: absolute;
	bottom: 8px;
	right: 8px;
	background: rgba(0, 0, 0, 0.8);
	color: #FFFFFF;
	font-size: 0.75rem;
	padding: 2px 6px;
	border-radius: 4px;
	font-weight: 600;
}

.ce-sermon-play-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.25);
	opacity: 0;
	transition: opacity 0.2s;
	color: #FFFFFF;
	font-size: 2rem;
	text-decoration: none;
}

.ce-sermon-card:hover .ce-sermon-play-overlay {
	opacity: 1;
}

.ce-sermon-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.ce-sermon-badge-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
}

.ce-sermon-date {
	font-size: 0.75rem;
	color: #64748B;
}

.ce-sermon-title {
	font-size: 1rem;
	font-weight: 700;
	color: #002060;
	margin: 0 0 12px;
	line-height: 1.4;
	flex-grow: 1;
}

.ce-sermon-title a {
	color: inherit;
	text-decoration: none;
}

.ce-sermon-title a:hover {
	color: #0038A8;
}

.ce-sermon-actions {
	display: flex;
	gap: 8px;
	align-items: center;
	border-top: 1px solid #F1F5F9;
	padding-top: 12px;
}

.ce-remove-saved-btn {
	margin-left: auto;
	background: transparent;
	border: none;
	color: #94A3B8;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.ce-remove-saved-btn:hover {
	color: #DC2626;
}

/* Study Notes Collapsible Box */
.ce-sermon-note-box {
	margin-top: 12px;
	background: #FFFDF5;
	border: 1px solid #FDE68A;
	border-radius: 10px;
	padding: 10px;
}

.note-box-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 6px;
}

.ce-note-textarea {
	width: 100%;
	border: 1px solid #CBD5E1;
	border-radius: 6px;
	padding: 8px;
	font-size: 0.85rem;
	background: #FFFFFF;
	font-family: inherit;
	resize: vertical;
}

.note-box-actions {
	display: flex;
	gap: 6px;
	justify-content: flex-end;
	margin-top: 6px;
}

/* Bookmark Button (Used on single videos and cards) */
.ce-bookmark-sermon-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid #CBD5E1;
	border-radius: 9999px;
	padding: 6px 14px;
	font-size: 0.85rem;
	font-weight: 700;
	color: #002060;
	cursor: pointer;
	transition: all 0.2s;
}

.ce-bookmark-sermon-btn:hover {
	background: #FFE082;
	border-color: #D4AF37;
	color: #002060;
}

.ce-bookmark-sermon-btn.is-saved {
	background: #002060;
	color: #FFE082;
	border-color: #002060;
}

.ce-bookmark-icon {
	font-size: 1rem;
	line-height: 1;
}

/* ==========================================================================
   10. LOGGED-OUT DUAL AUTH CARD (ON /my-account/)
   ========================================================================== */
.ce-portal-auth-card {
	max-width: 480px;
	margin: 50px auto 0;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 24px;
	padding: clamp(24px, 4vw, 36px);
	box-shadow: 0 20px 50px rgba(0, 32, 96, 0.08);
}

.ce-portal-auth-tabs {
	display: flex;
	background: #F1F5F9;
	border-radius: 12px;
	padding: 4px;
	margin: 20px 0;
}

.ce-portal-auth-tab {
	flex: 1;
	border: none;
	background: transparent;
	padding: 10px;
	font-size: 0.9rem;
	font-weight: 700;
	color: #64748B;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.ce-portal-auth-tab.is-active {
	background: #FFFFFF;
	color: #002060;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ce-portal-auth-panel {
	display: none;
}

.ce-portal-auth-panel.is-active {
	display: block;
}

.ce-portal-empty-state {
	text-align: center;
	padding: 40px 20px;
}

/* ═══════════════════════════════════════════════════════════════
   11. NATIVE SOCIAL OAUTH (KINGSCHAT & GOOGLE)
   ═══════════════════════════════════════════════════════════════ */
.ce-social-auth-cluster {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.ce-btn-social {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	padding: 12px 18px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 0.95rem;
	text-decoration: none !important;
	cursor: pointer;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.ce-social-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.ce-social-icon-wrap svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* KingsChat Brand Button */
.ce-btn-kingschat {
	background: #0057FF;
	color: #FFFFFF !important;
	border: 1px solid #0047D4;
	box-shadow: 0 4px 14px rgba(0, 87, 255, 0.22);
}

.ce-btn-kingschat:hover {
	background: #0047D4;
	color: #FFFFFF !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 87, 255, 0.35);
}

.ce-btn-kingschat:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(0, 87, 255, 0.25);
}

/* Google OAuth Button */
.ce-btn-google {
	background: #FFFFFF;
	color: #1F2937 !important;
	border: 1px solid #D1D5DB;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ce-btn-google:hover {
	background: #F8FAFC;
	border-color: #94A3B8;
	color: #0F172A !important;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.ce-btn-google:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Divider: or continue with email */
.ce-auth-divider {
	display: flex;
	align-items: center;
	text-align: center;
	margin: 18px 0 12px;
	color: #94A3B8;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.ce-auth-divider::before,
.ce-auth-divider::after {
	content: '';
	flex: 1;
	border-bottom: 1px solid #E2E8F0;
}

.ce-auth-divider span {
	padding: 0 14px;
}
