/* Axcima - Shared app styles: small, consistent typography & mobile-first UI */

:root {
	/* Single font family - consistent across app */
	--font-family:
		-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
		sans-serif;

	/* Consistent font sizes - small scale */
	--fs-xs: 0.7rem;
	--fs-sm: 0.8rem;
	--fs-base: 0.875rem;
	--fs-md: 1rem;
	--fs-lg: 1.1rem;
	--fs-xl: 1.25rem;
	--fs-2xl: 1.5rem;
	--fs-hero: 1.75rem;

	/* Spacing & layout */
	--header-h: 52px;
	--nav-h: 60px;
	--safe-bottom: env(safe-area-inset-bottom, 0);
	--page-px: 14px;
	--radius: 12px;
	--radius-lg: 15px;

	/* Colors */
	--primary: #ffd700;
	--primary-dark: #ffa500;
	--success: #28a745;
	--success-light: #20c997;
	--bg: #f5f5f5;
	--card-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	font-family: var(--font-family);
	font-size: var(--fs-base);
	line-height: 1.45;
	background: var(--bg);
	color: #333;
	min-height: 100vh;
}

/* ----- Landing ----- */
.navbar {
	background: white;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	padding: 0.6rem 0;
}
.navbar-brand {
	font-size: var(--fs-lg) !important;
	font-weight: 700;
}
.nav-link {
	font-size: var(--fs-sm) !important;
}

.hero-section {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	padding: 2rem 1rem;
	color: white;
	text-align: center;
}
.hero-section h1 {
	font-size: var(--fs-hero);
	font-weight: 700;
	margin-bottom: 0.5rem;
	font-family: var(--font-family);
}
.hero-section p {
	font-size: var(--fs-base);
	margin-bottom: 1.25rem;
}
.btn-hero {
	background: white;
	color: var(--primary-dark);
	padding: 0.5rem 1.25rem;
	border-radius: 25px;
	font-weight: 600;
	font-size: var(--fs-sm);
	border: none;
	margin: 0 6px;
}
.btn-hero:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.features-section {
	padding: 2rem 0;
	background: white;
}
.features-section h2 {
	font-size: var(--fs-xl);
	margin-bottom: 1rem;
}
.feature-card {
	text-align: center;
	padding: 1.25rem 0.75rem;
	border-radius: var(--radius-lg);
	margin-bottom: 1rem;
	transition: transform 0.2s;
}
.feature-card:hover {
	transform: translateY(-3px);
}
.feature-card h4 {
	font-size: var(--fs-md);
	margin-bottom: 0.35rem;
}
.feature-card p {
	font-size: var(--fs-sm);
	color: #666;
}
.feature-icon {
	font-size: var(--fs-2xl);
	color: var(--primary);
	margin-bottom: 0.5rem;
}

.benefits-section {
	padding: 2rem 0;
	background: #f8f9fa;
}
.benefits-section h2 {
	font-size: var(--fs-xl);
	margin-bottom: 1rem;
}
.benefits-section h5 {
	font-size: var(--fs-base);
}
.benefits-section p {
	font-size: var(--fs-sm);
}

.footer {
	background: #333;
	color: white;
	padding: 1.5rem 1rem;
	text-align: center;
	font-size: var(--fs-sm);
}
.footer a {
	color: rgba(255, 255, 255, 0.9);
	font-size: var(--fs-sm);
}

/* ----- User app shell ----- */
.app-wrap {
	padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px);
	min-height: 100vh;
}

.app-header {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	color: white;
	padding: 0.6rem var(--page-px);
	min-height: var(--header-h);
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 100;
	font-size: var(--fs-base);
}
.app-header h4,
.app-header .app-title {
	margin: 0;
	font-weight: 700;
	font-size: var(--fs-lg);
}
.app-header.header-green {
	background: linear-gradient(
		135deg,
		var(--success) 0%,
		var(--success-light) 100%
	);
}

.header-logo {
	display: flex;
	align-items: center;
	gap: 10px;
}

.header-logo img {
	width: 38px;
	border-radius: 100%;
	height: 38px;
	object-fit: contain;
}

.brand-name {
	font-size: 18px;
	font-weight: 600;
}
.header-icons {
	display: flex;
	gap: 10px;
	align-items: center;
}
.header-icons i {
	font-size: var(--fs-md);
	cursor: pointer;
}
.header-icon-link {
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}
.header-icon-link:hover {
	opacity: 0.9;
	color: inherit;
}

/* Container - mobile first, centered on desktop */
.container-app {
	max-width: 100%;
	margin: 0 auto;
	padding: 4px;
}
@media (min-width: 768px) {
	.container-app {
		max-width: 420px;
		padding: 0 20px;
	}
}

/* Cards & sections */
.wallet-section,
.form-section,
.profile-section,
.task-section,
.rate-banner,
.balance-section,
.reward-banner,
.level-section {
	background: white;
	margin: 0.5rem 0;
	padding: 0.75rem;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	border: 1px solid #f0f0f0;
	font-size: var(--fs-base);
}
.rate-banner,
.balance-section,
.reward-banner,
.level-section {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	color: white;
	text-align: center;
}
.balance-section,
.reward-banner.level-section {
	background: linear-gradient(
		135deg,
		var(--success) 0%,
		var(--success-light) 100%
	);
}
.rate-banner h3,
.reward-banner h3 {
	font-size: var(--fs-md);
	margin-bottom: 0.35rem;
}
.rate-banner h2,
.balance-section h2 {
	font-size: var(--fs-xl);
}
.wallet-balance h6 {
	font-size: var(--fs-xs);
	color: #666;
	margin-bottom: 0.25rem;
}
.wallet-balance h2 {
	font-size: var(--fs-lg);
	font-weight: 700;
}
.wallet-balance p {
	font-size: var(--fs-xs);
}

/* Stats grid - compact & professional, clickable */
.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.35rem;
	margin: 0.45rem 0;
}
.stat-card {
	background: white;
	padding: 0.4rem 0.3rem;
	border-radius: 8px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	border: 1px solid #f0f0f0;
}
.stat-card-link {
	text-decoration: none;
	color: inherit;
	display: block;
	cursor: pointer;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.stat-card-link:hover {
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
	border-color: var(--primary);
}
.stat-card-link:active {
	opacity: 0.9;
}
.stat-card h5 {
	color: var(--primary);
	font-weight: 700;
	font-size: var(--fs-sm);
	margin-bottom: 0.05rem;
}
.stat-card p {
	color: #666;
	font-size: 0.6rem;
	margin: 0;
}

/* Action buttons - compact */
.action-buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin: 0.5rem 0;
}
.action-btn {
	background: white;
	border: none;
	padding: 0.6rem 0.5rem;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	text-align: center;
	border: 1px solid #f0f0f0;
	text-decoration: none;
	color: #333;
	display: block;
	font-size: var(--fs-sm);
}
.action-btn i {
	font-size: var(--fs-lg);
	margin-bottom: 0.2rem;
	display: block;
}
.action-btn div {
	font-size: var(--fs-sm);
}
.action-btn small {
	font-size: 0.65rem;
	opacity: 0.95;
}
.action-btn.buy {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	color: white;
	border: none;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.action-btn.sell {
	background: linear-gradient(
		135deg,
		var(--success) 0%,
		var(--success-light) 100%
	);
	color: white;
	border: none;
	box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Section title */
.section-title {
	padding: 0.4rem 0;
	font-weight: 700;
	color: #333;
	font-size: var(--fs-sm);
}

/* Task cards - compact & professional */
.task-card {
	background: white;
	margin: 0.35rem 0;
	padding: 0.5rem 0.6rem;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	border: 1px solid #f0f0f0;
	font-size: var(--fs-sm);
}
.task-card h6 {
	font-size: var(--fs-sm);
	margin-bottom: 0.15rem;
	font-weight: 600;
}
.task-card p {
	color: #666;
	font-size: var(--fs-xs);
	margin-bottom: 0.35rem;
	line-height: 1.35;
}
.task-card .mb-2 {
	margin-bottom: 0.35rem !important;
}
.task-card .btn {
	font-size: var(--fs-xs);
	padding: 0.35rem 0.5rem;
}
.task-badge {
	display: inline-block;
	padding: 0.2rem 0.4rem;
	border-radius: 6px;
	font-size: 0.65rem;
	margin-right: 0.2rem;
}

/* Bottom nav - compact, professional */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #fff;
	box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.06);
	display: flex;
	justify-content: space-around;
	align-items: center;
	padding: 0.3rem 0;
	padding-bottom: calc(0.3rem + var(--safe-bottom));
	z-index: 100;
	border-top: 1px solid #eee;
}
.nav-item {
	text-align: center;
	text-decoration: none;
	color: #666;
	flex: 1;
	font-size: 0.6rem;
	font-weight: 500;
	padding: 0.2rem 0.15rem;
	min-height: 38px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	transition: color 0.15s ease;
}
.nav-item:hover {
	color: #333;
}
.nav-item.active {
	color: var(--primary);
	font-weight: 600;
}
.nav-item i {
	font-size: 1rem;
	display: block;
	line-height: 1;
}
.nav-item .nav-avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

/* Profile */
.profile-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: var(--fs-2xl);
	font-weight: 700;
	margin: 0 auto 0.75rem;
	overflow: hidden;
}
.profile-avatar-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.profile-section h5 {
	font-size: var(--fs-md);
}
.profile-section p,
.profile-section small {
	font-size: var(--fs-sm);
}

/* Social links on profile (admin-managed) */
.social-profile-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--primary);
	color: #000;
	font-size: 1.25rem;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
}
.social-profile-link:hover {
	color: #000;
	transform: scale(1.08);
	box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.wallet-section.dark {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	color: white;
}
.wallet-section.dark h6 {
	color: rgba(255, 255, 255, 0.85);
	font-size: var(--fs-sm);
}
.wallet-section.dark h3 {
	font-size: var(--fs-xl);
}

.menu-item {
	background: white;
	margin: 0.4rem 0;
	padding: 0.75rem 1rem;
	border-radius: var(--radius);
	box-shadow: var(--card-shadow);
	display: flex;
	justify-content: space-between;
	align-items: center;
	text-decoration: none;
	color: #333;
	font-size: var(--fs-base);
	min-height: 44px;
}
.menu-item i {
	font-size: var(--fs-lg);
	color: var(--primary);
	margin-right: 0.75rem;
}

/* Tabs */
.tabs-section {
	background: white;
	margin: 0.75rem 0;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--card-shadow);
}
.nav-tabs {
	border: none;
	display: flex;
}
.nav-tabs .nav-link {
	flex: 1;
	border: none;
	color: #666;
	text-align: center;
	padding: 0.6rem;
	font-size: var(--fs-sm);
}
.nav-tabs .nav-link.active {
	background: var(--primary);
	color: #333;
	font-weight: 600;
}
.orders-content,
.tab-section {
	padding: 1rem;
	min-height: 200px;
}
.order-card {
	background: #f8f9fa;
	padding: 0.75rem;
	border-radius: var(--radius);
	margin-bottom: 0.75rem;
	font-size: var(--fs-sm);
}
.empty-state-icon {
	font-size: var(--fs-2xl) !important;
	color: #999;
}

/* Forms */
.form-control {
	border-radius: 8px;
	padding: 0.6rem 0.75rem;
	font-size: var(--fs-base);
	font-family: var(--font-family);
}
.btn-submit {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	border: none;
	border-radius: 8px;
	padding: 0.6rem;
	font-weight: 600;
	font-size: var(--fs-base);
	color: #333;
	width: 100%;
	font-family: var(--font-family);
}
.btn-submit.btn-green {
	background: linear-gradient(
		135deg,
		var(--success) 0%,
		var(--success-light) 100%
	);
	color: white;
}

/* Auth pages */
.auth-wrap {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.login-container,
.register-container {
	background: white;
	border-radius: var(--radius-lg);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	max-width: 380px;
	width: 100%;
	overflow: hidden;
}
.login-header,
.register-header {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	color: white;
	padding: 1.25rem;
	text-align: center;
	font-size: var(--fs-lg);
}
.login-form,
.register-form {
	padding: 1.25rem;
}
.login-form .form-control,
.register-form .form-control {
	font-size: var(--fs-base);
	padding: 0.6rem 0.75rem;
}
.btn-login,
.btn-register {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	border: none;
	border-radius: 8px;
	padding: 0.6rem;
	font-weight: 600;
	font-size: var(--fs-base);
	color: #333;
	font-family: var(--font-family);
}

/* Level badge on rewards */
.level-badge {
	font-size: var(--fs-2xl);
	font-weight: 700;
	margin-bottom: 0.35rem;
}

/* Referral / rewards tab */
.referral-code-box {
	background: white;
	padding: 1rem;
	border-radius: var(--radius-lg);
	text-align: center;
	margin: 0.75rem 0;
	box-shadow: var(--card-shadow);
}
.referral-code {
	font-size: var(--fs-xl);
	font-weight: 700;
	color: var(--primary);
	margin: 0.5rem 0;
}
.tab-content {
	background: white;
	padding: 1rem;
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
	box-shadow: var(--card-shadow);
}
.referral-card {
	background: #f8f9fa;
	padding: 0.75rem;
	border-radius: var(--radius);
	margin-bottom: 0.5rem;
	font-size: var(--fs-sm);
}
.reward-box {
	background: linear-gradient(
		135deg,
		var(--primary) 0%,
		var(--primary-dark) 100%
	);
	color: white;
	padding: 1rem;
	border-radius: var(--radius-lg);
	text-align: center;
	margin: 0.75rem 0;
	font-size: var(--fs-base);
}
.reward-box h3 {
	font-size: var(--fs-lg);
	margin: 0;
}

/* Form labels */
.form-label {
	font-size: var(--fs-sm);
	font-family: var(--font-family);
}

/* Utility */
.text-muted {
	font-size: var(--fs-sm);
}
small {
	font-size: var(--fs-xs);
}

/* Home slider (admin-managed) */
.home-slider-wrap {
	margin: 0.5rem 0;
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.home-slider {
	position: relative;
	min-height: 100px;
}
.home-slide {
	display: none;
	padding: 0.75rem 1rem;
	min-height: 90px;
}
.home-slide.active {
	display: block;
}
.home-slide-link {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: var(--radius);
	overflow: hidden;
	position: relative;
}
.home-slide-bg {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
	opacity: 0.92;
}
.home-slide-img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0.85;
}
.home-slide-content {
	position: relative;
	padding: 0.6rem 0.5rem;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.home-slide-title {
	font-size: var(--fs-md);
	font-weight: 700;
	margin-bottom: 0.2rem;
	color: #fff;
}
.home-slide-text {
	font-size: var(--fs-xs);
	margin-bottom: 0.25rem;
	opacity: 0.95;
}
.home-slide-cta {
	font-size: var(--fs-xs);
	font-weight: 600;
	text-decoration: underline;
}
.home-slider-dots {
	display: flex;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.4rem;
	background: #f5f5f5;
}
.home-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #ccc;
	cursor: pointer;
	transition: background 0.2s;
}
.home-dot.active {
	background: var(--primary);
	transform: scale(1.2);
}

/* Home four tabs (Buy rules, Sell rules, Help Center, Guidelines) */
.home-four-tabs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.35rem;
	margin: 0.5rem 0;
}
.home-tab-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 0.25rem;
	background: white;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	text-decoration: none;
	color: #333;
	font-size: 0.6rem;
	text-align: center;
	border: 1px solid #f0f0f0;
	transition: border-color 0.15s;
}
.home-tab-item i {
	font-size: 1.1rem;
	color: var(--primary);
	margin-bottom: 0.2rem;
}
.home-tab-item:hover {
	border-color: var(--primary);
	color: #333;
}

.home-orders-msg {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.5rem;
	font-size: var(--fs-xs);
	color: #666;
	margin-bottom: 0.5rem;
}
.home-orders-msg i {
	color: var(--primary);
}

.slider-page-content {
	font-size: var(--fs-sm);
	line-height: 1.5;
}
.slider-page-content img {
	max-width: 100%;
	height: auto;
}

/* Login modals - one by one after login */
.login-modals-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.5);
	z-index: 1000;
}
.login-modal {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 2rem);
	max-width: 360px;
	max-height: 85vh;
	background: #fff;
	border-radius: var(--radius-lg);
	box-shadow: 0 8px 32px rgba(0,0,0,0.2);
	z-index: 1001;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.login-modal-header {
	background: var(--primary);
	color: #000;
	font-weight: 700;
	font-size: var(--fs-md);
	padding: 0.6rem 1rem;
	text-align: center;
}
.login-modal-body {
	padding: 1rem;
	overflow-y: auto;
	font-size: var(--fs-sm);
}
.login-modal-body ol {
	margin-bottom: 0.5rem;
}
.login-modal-link {
	color: #0d6efd;
	text-decoration: underline;
	font-weight: 600;
}

@media (min-width: 576px) {
	:root {
		--fs-hero: 2rem;
		--page-px: 20px;
	}
	.hero-section {
		padding: 2.5rem 1.5rem;
	}
	.feature-icon {
		font-size: 2.25rem;
	}
}
