/* Africahied User Account — Polished Panel UI */

:root {
	--au-primary: #111111;
	--au-accent: #be185d;
	--au-accent-hover: #9d174d;
	--au-text: #111111;
	--au-text-muted: #555555;
	--au-text-light: #888888;
	--au-border: #e2e8f0;
	--au-border-light: #f1f5f9;
	--au-bg: #f8fafc;
	--au-bg-hover: #f1f5f9;
	--au-danger: #ef4444;
	--au-success: #10b981;
	--au-warning: #f59e0b;
	--au-radius: 12px;
	--au-radius-sm: 8px;
	--au-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
	--au-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
	--au-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
}

/* Container */
#africahied-user-account {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--au-text);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

/* ═══════════ LAYOUT ═══════════ */

.au-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 2.5rem;
	min-height: 500px;
}

/* ═══════════ SIDEBAR NAV ═══════════ */

.au-nav {
	background: white;
	border: none;
	border-radius: var(--au-radius);
	padding: 0;
	box-shadow: none;
	position: sticky;
	top: 2rem;
	align-self: start;
}

.au-nav-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	height: 48px;
	padding-bottom: 1rem;
	margin-bottom: 1rem;
	border-bottom: 1px solid var(--au-border);
	box-sizing: content-box;
}

.au-nav-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--au-accent);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.125rem;
	flex-shrink: 0;
	text-transform: uppercase;
}

.au-nav-user-info {
	overflow: hidden;
}

.au-nav-user-name {
	font-weight: 600;
	font-size: 1.125rem;
	color: var(--au-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.au-nav-user-email {
	font-size: 0.875rem;
	color: var(--au-text-light);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.au-nav-items {
	display: flex;
	flex-direction: column;
	gap: 2px;

}

.au-nav a {
	padding: 0.5rem 0;
	text-decoration: none;
	color: var(--au-text);
	font-size: 1rem;
	font-weight: 500;
	border-radius: var(--au-radius-sm);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	transition: all 0.15s ease;
}

.au-nav a i {
	font-size: 1rem;
	width: 1.25rem;
	text-align: center;
	transition: color 0.15s ease;
}

.au-nav a:hover {
	color: var(--au-accent);
}

.au-nav a.active {
	color: var(--au-accent);
	font-weight: 600;
}

.au-nav a.active i {
	color: var(--au-accent);
}


/* ═══════════ PAGE HEADER ═══════════ */

.au-page-header {
	height: 48px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-bottom: 16px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--au-border);
	box-sizing: content-box;
}

.au-page-header-compact {
	margin-bottom: 19px;
}

.au-page-header-spaced {
	margin-bottom: 27px;
}

.au-page-header h2 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--au-text);
	margin: 0 0 0.125rem 0;
}

.au-page-header p {
	color: var(--au-text-light);
	margin: 0;
	font-size: 0.875rem;
}

/* ═══════════ AUTH PAGES (Login/Register/Recover) ═══════════ */

.au-auth-header {
	text-align: center;
	margin-bottom: 2rem;
}

.au-auth-header h2 {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.02em;
}

.au-auth-header p {
	color: var(--au-text-muted);
}

/* ═══════════ CARDS ═══════════ */

.au-card {
	background: white;
	border: 1px solid var(--au-border);
	border-radius: var(--au-radius);
	padding: 2.5rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--au-shadow);
}

.au-card-sm {
	max-width: 440px;
	margin: 0 auto 1.5rem;
}

.au-card h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0 0 1.5rem 0;
}

/* ═══════════ FORMS ═══════════ */

.au-form-group {
	margin-bottom: 1.25rem;
}

.au-form-group label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.375rem;
	font-size: 0.8125rem;
	color: var(--au-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.au-form-group input[type="text"],
.au-form-group input[type="email"],
.au-form-group input[type="password"],
.au-form-group input[type="number"],
.au-form-group input[type="url"],
.au-form-group textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	border: 1px solid var(--au-border);
	border-radius: var(--au-radius-sm);
	font-family: inherit;
	color: var(--au-text);
	background: white;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.au-form-group input[type="text"],
.au-form-group input[type="email"],
.au-form-group input[type="password"],
.au-form-group input[type="number"],
.au-form-group input[type="url"] {
	height: 44px;
}

.au-form-group textarea {
	resize: vertical;
	min-height: 80px;
}

.au-form-group input:focus,
.au-form-group textarea:focus {
	outline: none;
	border-color: var(--au-accent);
	box-shadow: none;
}

.au-form-group input[type="number"]::-webkit-inner-spin-button,
.au-form-group input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.au-form-group input[type="number"] {
	-moz-appearance: textfield;
}

.au-form-group input::placeholder,
.au-form-group textarea::placeholder {
	color: var(--au-text-light);
}

.au-form-row {
	display: flex;
	gap: 1rem;
}

.au-form-half {
	flex: 1;
}

.au-form-divider {
	border: none;
	border-top: 1px solid var(--au-border-light);
	margin: 1.5rem 0;
}

/* ═══════════ BUTTONS ═══════════ */

.au-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	font-size: 0.9375rem;
	font-weight: 600;
	border: none;
	border-radius: var(--au-radius-sm);
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
	letter-spacing: 0.01em;
}

.au-btn-primary {
	background: var(--au-primary);
	color: white;
}

.au-btn-primary:hover {
	background: #1e293b;
	box-shadow: var(--au-shadow-md);
	transform: translateY(-1px);
}

.au-btn-accent {
	background: var(--au-accent);
	color: white;
}

.au-btn-accent:hover {
	background: var(--au-accent-hover);
	box-shadow: var(--au-shadow-md);
	transform: translateY(-1px);
}

.au-btn-danger {
	background: var(--au-danger);
	color: white;
}

.au-btn-danger:hover {
	box-shadow: var(--au-shadow-md);
	transform: translateY(-1px);
}

.au-btn-outline {
	background: white;
	color: var(--au-text);
	border: 1px solid var(--au-border);
}

.au-btn-outline:hover {
	background: var(--au-bg);
	border-color: var(--au-text-light);
}

.au-btn-block {
	width: auto;
}

.au-btn-block-always {
	width: 100%;
}

@media (max-width: 1024px) {
	.au-btn-block {
		width: 100%;
	}
}

.au-btn-sm {
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
}

.au-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none !important;
	box-shadow: none !important;
}

/* ═══════════ ALERTS ═══════════ */

.au-alert {
	padding: 0.875rem 1rem;
	border-radius: var(--au-radius-sm);
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.au-alert-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.au-alert-danger {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.au-alert-info {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

/* ═══════════ LINKS & TEXT ═══════════ */

.au-link {
	color: var(--au-accent);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.15s;
}

.au-link:hover {
	color: var(--au-accent-hover);
	text-decoration: underline;
}

.au-text-muted {
	color: var(--au-text-muted);
	font-size: 0.875rem;
}

/* ═══════════ DASHBOARD STATS ═══════════ */

.au-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
	margin-bottom: 2rem;
}

.au-stat {
	background: white;
	border: 1px solid var(--au-border);
	border-radius: var(--au-radius);
	padding: 1.5rem;
	box-shadow: var(--au-shadow);
	transition: box-shadow 0.2s, transform 0.2s;
}

.au-stat:hover {
	box-shadow: var(--au-shadow-md);
	transform: translateY(-2px);
}

.au-stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.125rem;
	margin-bottom: 1rem;
}

.au-stat-icon--credits {
	background: #fef3c7;
	color: #b45309;
}

.au-stat-icon--summaries {
	background: #fce7f3;
	color: #be185d;
}

.au-stat-icon--login {
	background: #d1fae5;
	color: #047857;
}

.au-stat-value {
	font-size: 1.75rem;
	font-weight: 700;
	margin-bottom: 0.25rem;
	letter-spacing: -0.02em;
	color: var(--au-primary);
}

.au-stat-label {
	font-size: 0.8125rem;
	color: var(--au-text-light);
	font-weight: 500;
}

/* ═══════════ QUICK LINKS ═══════════ */

.au-quick-links {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.25rem;
}

.au-quick-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 0.75rem;
	padding: 1.5rem 1rem;
	background: white;
	border: 1px solid var(--au-border);
	border-radius: var(--au-radius);
	text-decoration: none !important;
	color: var(--au-text) !important;
	transition: all 0.2s ease;
	box-shadow: var(--au-shadow);
}

.au-quick-link:hover {
	border-color: var(--au-accent);
	color: var(--au-text) !important;
}

.au-quick-link:visited {
	color: var(--au-text) !important;
}

.au-quick-link i {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: #fdf2f8;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--au-accent);
	font-size: 1.125rem;
}

.au-quick-link strong {
	display: block;
	font-weight: 600;
	font-size: 0.9375rem;
	margin-bottom: 0.125rem;
	color: var(--au-text);
}

.au-quick-link span {
	font-size: 0.8125rem;
	color: var(--au-text-light);
	line-height: 1.4;
}

/* ═══════════ TOP UP ═══════════ */

.au-topup-action {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.au-topup-action .au-form-group {
	flex: 1;
	max-width: calc(50% - 0.375rem);
	margin-bottom: 0;
}

.au-topup-action .au-btn {
	margin-top: 1.5rem;
	white-space: nowrap;
	flex: 1;
	max-width: calc(50% - 0.375rem);
}

@media (max-width: 1024px) {
	.au-topup-action {
		flex-direction: column;
	}

	.au-topup-action .au-form-group {
		max-width: none;
		width: 100%;
	}

	.au-topup-action .au-btn {
		margin-top: 0;
		width: 100%;
	}
}

.au-topup-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
}

.au-topup-left,
.au-topup-right {
	background: white;
	border: 1px solid var(--au-border);
	border-radius: var(--au-radius);
	padding: 1.5rem;
	box-shadow: var(--au-shadow);
}

.au-topup-amounts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.au-topup-amount {
	padding: 1rem;
	text-align: center;
	font-weight: 700;
	font-size: 1.125rem;
	border: 2px solid var(--au-border);
	border-radius: var(--au-radius-sm);
	cursor: pointer;
	transition: all 0.2s ease;
	background: white;
}

.au-topup-amount:hover {
	border-color: var(--au-accent);
	background: #f8faff;
}

.au-topup-amount.selected {
	background: var(--au-accent);
	color: white;
	border-color: var(--au-accent);
}

/* ═══════════ PAYMENT CARD ═══════════ */

.au-payment-card {
	background: #0f172a;
	color: white;
	border-radius: var(--au-radius);
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--au-shadow-lg);
}

.au-payment-card-header {
	display: flex;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.au-payment-card-number {
	font-size: 1.125rem;
	font-weight: 600;
	letter-spacing: 0.1em;
}

.au-payment-card-type {
	font-size: 0.75rem;
	text-transform: uppercase;
	opacity: 0.7;
}

.au-payment-card .au-text-muted {
	color: rgba(255,255,255,0.6);
}

.au-payment-card .au-form-group input {
	background: rgba(255,255,255,0.08);
	border-color: rgba(255,255,255,0.15);
	color: white;
}

.au-payment-card .au-form-group input:focus {
	border-color: rgba(255,255,255,0.4);
	box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

/* ═══════════ TOGGLE ═══════════ */

.au-toggle {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.au-toggle input[type="checkbox"] {
	appearance: none;
	width: 44px;
	height: 24px;
	background: #cbd5e1;
	border-radius: 12px;
	position: relative;
	cursor: pointer;
	transition: background 0.2s;
	flex-shrink: 0;
}

.au-toggle input[type="checkbox"]:checked {
	background: var(--au-success);
}

.au-toggle input[type="checkbox"]::after {
	content: '';
	width: 20px;
	height: 20px;
	background: white;
	border-radius: 50%;
	position: absolute;
	top: 2px;
	left: 2px;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.au-toggle input[type="checkbox"]:checked::after {
	transform: translateX(20px);
}

/* ═══════════ TABLE ═══════════ */

.au-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border: 1px solid var(--au-border);
	border-radius: var(--au-radius);
	overflow: hidden;
	box-shadow: var(--au-shadow);
}

.au-table th {
	background: var(--au-bg);
	font-weight: 600;
	text-align: left;
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--au-border);
	font-size: 0.8125rem;
	color: var(--au-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.au-table td {
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--au-border);
	font-size: 0.9375rem;
}

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

.au-table tr:hover td {
	background: var(--au-bg);
}

.au-table a {
	color: var(--au-accent);
	text-decoration: none;
}

.au-table a:hover {
	text-decoration: underline;
}

/* ═══════════ PAGINATION ═══════════ */

.au-pagination {
	display: flex;
	justify-content: center;
	gap: 0.375rem;
	margin-top: 1.5rem;
}

.au-pagination button {
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--au-border);
	background: white;
	border-radius: var(--au-radius-sm);
	cursor: pointer;
	font-weight: 500;
	font-size: 0.875rem;
	transition: all 0.15s;
	color: var(--au-text);
}

.au-pagination button:hover {
	border-color: var(--au-accent);
	color: var(--au-accent);
}

.au-pagination button.active {
	background: var(--au-accent);
	color: white;
	border-color: var(--au-accent);
}

/* ═══════════ SPINNER ═══════════ */

.au-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: au-spin 0.6s linear infinite;
	margin-right: 0.5rem;
}

.au-spinner-dark {
	width: 32px;
	height: 32px;
	border: 3px solid var(--au-border);
	border-top-color: var(--au-accent);
}

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

/* ═══════════ UTILITIES ═══════════ */

.au-text-center { text-align: center; }
.au-mt-1 { margin-top: 0.5rem; }
.au-mt-2 { margin-top: 1rem; }
.au-mb-1 { margin-bottom: 0.5rem; }
.au-mb-2 { margin-bottom: 1rem; }

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 1024px) {
	.au-layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.au-nav {
		position: static;
		padding: 0;
		overflow: hidden;
		background: none;
		border: none;
		box-shadow: none;
		border-radius: 0;
	}

	.au-nav-user {
		display: none;
	}

	.au-nav-items {
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 0;
		margin: 0;
		padding: 0;
		border: none;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		-ms-overflow-style: none;
		-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent 100%);
		mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent 100%);
	}

	.au-nav-items::-webkit-scrollbar {
		display: none;
	}

	.au-nav a {
		white-space: nowrap;
		font-size: 0.8125rem;
		padding: 0.625rem 0.875rem;
		flex-shrink: 0;
		border-radius: 0;
	}

	.au-nav a:first-child {
		padding-left: 0;
	}

	.au-nav-logout {
		flex-shrink: 0;
		margin-right: 2rem;
	}

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

	.au-quick-links {
		grid-template-columns: 1fr;
	}

	.au-topup-grid {
		grid-template-columns: 1fr;
	}

	.au-card {
		padding: 1.5rem;
	}

	.au-page-header h2 {
		font-size: 1.5rem;
	}

	.au-form-row {
		flex-direction: column;
		gap: 0;
	}
}

@media (max-width: 640px) {
	.au-topup-amounts {
		grid-template-columns: 1fr;
	}

	.au-stat-value {
		font-size: 1.5rem;
	}
}
