@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
	--primary: #C9922A;
	--primary-light: #E8A82E;
	--primary-dark: #A67420;
	--primary-glow: rgba(201,146,42,.18);
	--gold-gradient: linear-gradient(135deg, #C9922A 0%, #F0C96A 50%, #C9922A 100%);
	--gold-shine: linear-gradient(135deg, #B8832A 0%, #F5D580 45%, #E8B84B 55%, #B8832A 100%);
	--surface: #FFFFFF;
	--surface-2: #FAF9F6;
	--bg: #F5F3EE;
	--border: rgba(201,146,42,.15);
	--border-light: rgba(0,0,0,.06);
	--text: #1A1A1A;
	--text-muted: #7A7165;
	--shadow-sm: 0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
	--shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
	--shadow-gold: 0 4px 20px rgba(201,146,42,.2);
	--radius: 18px;
	--radius-sm: 12px;
	--radius-xs: 8px;
}

* { font-family: 'Vazirmatn', Tahoma, sans-serif; }

body {
	background: var(--bg);
	padding-bottom: 88px;
	min-height: 100vh;
	color: var(--text);
}

/* ── Header ── */
.app-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border-light);
	box-shadow: var(--shadow-sm);
	position: sticky;
	top: 0;
	z-index: 100;
}

.app-logo {
	width: 40px;
	height: 40px;
	background: var(--gold-gradient);
	border-radius: 11px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 13px;
	color: #fff;
	box-shadow: var(--shadow-gold);
	letter-spacing: .5px;
}

.app-title {
	font-weight: 700;
	font-size: 15px;
	color: var(--text);
}

.badge-notif {
	position: absolute;
	top: 0;
	left: 0;
	background: #E53935;
	color: #fff;
	font-size: 10px;
	border-radius: 50%;
	width: 17px;
	height: 17px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	border: 2px solid #fff;
}

/* ── Page Content ── */
.page-content { padding: 16px; }

/* ── Cards ── */
.card-panel {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-light);
	margin-bottom: 14px;
	overflow: hidden;
}

.card-panel .card-header {
	background: var(--surface-2);
	border-bottom: 1px solid var(--border-light);
	font-weight: 700;
	font-size: 14px;
	padding: 14px 18px;
	color: var(--text);
}

.card-panel .card-body { padding: 18px; }

/* ── Buttons ── */
.btn-primary-custom {
	background: var(--gold-gradient);
	border: none;
	color: #fff;
	font-weight: 700;
	border-radius: var(--radius-sm);
	padding: 14px 24px;
	width: 100%;
	font-size: 15px;
	letter-spacing: .3px;
	box-shadow: var(--shadow-gold);
	transition: opacity .2s, transform .15s;
}
.btn-primary-custom:hover, .btn-primary-custom:active {
	opacity: .9;
	color: #fff;
	transform: translateY(-1px);
}

.btn-support {
	background: transparent;
	border: 1.5px solid var(--primary);
	color: var(--primary);
	border-radius: var(--radius-sm);
	padding: 12px;
	width: 100%;
	font-weight: 600;
	font-size: 14px;
	transition: all .2s;
}
.btn-support:hover {
	background: var(--primary);
	color: #fff;
}

/* ── Form Controls ── */
.form-control, .form-select {
	border-radius: var(--radius-sm);
	padding: 12px 14px;
	border: 1.5px solid #E5E0D8;
	background: var(--surface-2);
	font-size: 14px;
	color: var(--text);
	transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
	border-color: var(--primary-light);
	box-shadow: 0 0 0 3px var(--primary-glow);
	background: #fff;
}

.form-label {
	font-weight: 600;
	font-size: 13px;
	color: var(--text-muted);
	margin-bottom: 7px;
}

.form-text {
	color: var(--text-muted);
	font-size: 12px;
	margin-top: 5px;
}

.input-icon-wrap { position: relative; }
.input-icon-wrap i {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #C4BAA8;
	font-size: 16px;
}
.input-icon-wrap .form-control { padding-right: 42px; }

/* ── Accordion ── */
.accordion-custom .accordion-button {
	background: var(--gold-gradient);
	color: #fff;
	font-weight: 600;
	border-radius: var(--radius-sm) !important;
	margin-bottom: 8px;
	box-shadow: var(--shadow-gold);
	font-size: 14px;
}
.accordion-custom .accordion-button:not(.collapsed) {
	background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
	color: #fff;
	box-shadow: none;
}
.accordion-custom .accordion-button::after { filter: brightness(0) invert(1); }
.accordion-custom .accordion-item { border: none; background: transparent; }

/* ── Bottom Nav ── */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--surface);
	border-top: 1px solid var(--border-light);
	box-shadow: 0 -4px 20px rgba(0,0,0,.08);
	display: flex;
	justify-content: space-around;
	padding: 8px 0 calc(10px + env(safe-area-inset-bottom));
	z-index: 1000;
}

.bottom-nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: #B5ADA0;
	font-size: 11px;
	padding: 4px 10px;
	min-width: 58px;
	border-radius: var(--radius-xs);
	transition: color .15s;
}
.bottom-nav-item i {
	font-size: 22px;
	margin-bottom: 3px;
	transition: transform .15s;
}
.bottom-nav-item.active {
	color: var(--primary);
	font-weight: 700;
}
.bottom-nav-item.active i { transform: translateY(-1px); }

/* ── Wallet Card (home) ── */
.wallet-card {
	background: linear-gradient(135deg, #1A1A2E 0%, #2C2C54 100%);
	color: #fff;
	border-radius: var(--radius);
	padding: 22px 20px;
	margin-bottom: 14px;
	position: relative;
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(26,26,46,.3);
}
.wallet-card::before {
	content: '';
	position: absolute;
	top: -40px;
	left: -40px;
	width: 180px;
	height: 180px;
	background: radial-gradient(circle, rgba(201,146,42,.25) 0%, transparent 70%);
	pointer-events: none;
}
.wallet-card::after {
	content: '';
	position: absolute;
	bottom: -30px;
	right: -30px;
	width: 130px;
	height: 130px;
	background: radial-gradient(circle, rgba(201,146,42,.12) 0%, transparent 70%);
	pointer-events: none;
}
.wallet-card .amount-label {
	font-size: 12px;
	opacity: .65;
	margin-bottom: 4px;
	letter-spacing: .3px;
}
.wallet-card h3 {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: .5px;
}
.wallet-card .available {
	font-size: 12px;
	opacity: .7;
	margin-top: 2px;
}
.wallet-card .verified-badge {
	background: var(--gold-gradient);
	color: #fff;
	padding: 6px 14px;
	border-radius: 30px;
	font-size: 12px;
	font-weight: 700;
	box-shadow: var(--shadow-gold);
	letter-spacing: .3px;
}

/* ── Stat Cards ── */
.stat-card {
	text-align: center;
	padding: 16px 8px;
}
.stat-card .stat-value {
	font-size: 22px;
	font-weight: 800;
	color: var(--primary);
	letter-spacing: .5px;
}
.stat-card .stat-label {
	font-size: 11px;
	color: var(--text-muted);
	margin-top: 3px;
	font-weight: 500;
}

/* ── Menu Grid ── */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-grid-item {
	background: var(--surface);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-light);
	padding: 22px 12px 18px;
	text-align: center;
	text-decoration: none;
	color: var(--text);
	transition: transform .18s, box-shadow .18s;
	position: relative;
	overflow: hidden;
}
.menu-grid-item::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 60px;
	height: 60px;
	border-radius: 0 var(--radius) 0 60px;
	opacity: .06;
	background: var(--primary);
}
.menu-grid-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,.1);
	color: var(--text);
}
.menu-grid-item i {
	font-size: 30px;
	margin-bottom: 10px;
	display: block;
}
.menu-grid-item span {
	font-size: 13px;
	font-weight: 600;
}

.icon-red { color: #E53935; }
.icon-teal { color: #00897B; }
.icon-green { color: #43A047; }
.icon-yellow { color: var(--primary); }
.icon-blue { color: #1E6FD9; }

/* ── Leaderboard ── */
.leaderboard-item {
	display: flex;
	align-items: center;
	padding: 14px 18px;
	border-bottom: 1px solid var(--border-light);
	transition: background .15s;
}
.leaderboard-item:last-child { border-bottom: none; }
.leaderboard-item:hover { background: var(--surface-2); }
.rank-badge {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 14px;
	margin-left: 14px;
	flex-shrink: 0;
}
.rank-1 {
	background: var(--gold-gradient);
	color: #fff;
	box-shadow: var(--shadow-gold);
}
.rank-2 {
	background: linear-gradient(135deg, #9E9E9E, #E0E0E0);
	color: #fff;
}
.rank-3 {
	background: linear-gradient(135deg, #A0522D, #D2845A);
	color: #fff;
}
.rank-other { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border-light); }

/* ── Progress ── */
.progress-target {
	height: 6px;
	border-radius: 3px;
	background: #EDE8DF;
	overflow: hidden;
	margin-top: 6px;
}
.progress-target .bar {
	height: 100%;
	background: var(--gold-gradient);
	border-radius: 3px;
	transition: width .6s ease;
}

/* ── Team Card ── */
.team-card { padding: 16px; }
.team-card .team-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.team-card .team-actions .btn { font-size: 12px; padding: 5px 12px; border-radius: var(--radius-xs); }

/* ── Lead Status Badges ── */
.lead-status {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 30px;
	font-weight: 700;
	letter-spacing: .2px;
}
.lead-status-new { background: #E3F2FD; color: #1565C0; }
.lead-status-contacted { background: #FFF8E1; color: #E65100; }
.lead-status-sold { background: #E8F5E9; color: #2E7D32; }
.lead-status-lost { background: #FFEBEE; color: #C62828; }

/* ── Captcha ── */
.captcha-box {
	background: var(--surface-2);
	border: 1.5px dashed #D4CABC;
	border-radius: var(--radius-sm);
	padding: 10px 16px;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: 8px;
	text-align: center;
	user-select: none;
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

/* ── Login Page ── */
.login-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(160deg, #1A1A2E 0%, #2C2C54 40%, var(--bg) 40%);
	padding: 24px;
}
.login-card {
	max-width: 400px;
	width: 100%;
}
.login-card .card-panel {
	border: 1px solid var(--border-light);
	box-shadow: 0 20px 60px rgba(0,0,0,.15);
}
.login-card .card-panel::before {
	content: '';
	display: block;
	height: 4px;
	background: var(--gold-gradient);
}
.login-card h4 {
	font-weight: 800;
	font-size: 20px;
	color: var(--text);
}

/* ── Sticky Alert ── */
.sticky-alert {
	position: fixed;
	top: 64px;
	left: 16px;
	right: 16px;
	z-index: 9999;
}
.sticky-alert .msg {
	background: var(--text);
	color: #fff;
	padding: 13px 18px;
	border-radius: var(--radius-sm);
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

/* ── Alerts ── */
.alert {
	border: none;
	border-radius: var(--radius-sm);
	font-size: 14px;
}
.alert-danger {
	background: #FFF5F5;
	border-right: 3px solid #E53935;
	color: #C62828;
}
.alert-warning {
	background: #FFFBF0;
	border-right: 3px solid var(--primary);
	color: var(--primary-dark);
}
.alert-info {
	background: #F0F7FF;
	border-right: 3px solid #1E6FD9;
	color: #1565C0;
}
.alert-success {
	background: #F0FFF4;
	border-right: 3px solid #43A047;
	color: #2E7D32;
}

/* ── Badges ── */
.badge {
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 30px;
	font-size: 11px;
}

/* ── Table ── */
.table { font-size: 13px; }
.table td, .table th { vertical-align: middle; padding: 10px 14px; }
.table th { font-weight: 700; color: var(--text-muted); font-size: 12px; }

/* ── Dividers ── */
hr {
	border-color: var(--border-light);
	opacity: 1;
	margin: 18px 0;
}

.impersonate-banner {
	background: linear-gradient(90deg, #B8860B, #D4AF37);
	color: #1a1a1a;
	padding: 8px 12px;
	font-size: 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
}
.impersonate-banner .btn-light {
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
}

/* ── Workflow timeline ── */
.workflow-timeline {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 16px 0;
	padding-right: 8px;
}
.timeline-step {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 6px 0;
	position: relative;
}
.timeline-step:not(:last-child)::before {
	content: '';
	position: absolute;
	right: 11px;
	top: 28px;
	width: 2px;
	height: calc(100% - 8px);
	background: var(--border-light);
}
.timeline-step.done:not(:last-child)::before {
	background: var(--primary);
}
.timeline-dot {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 2px solid var(--border-light);
	background: var(--card-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	flex-shrink: 0;
	z-index: 1;
}
.timeline-step.done .timeline-dot {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}
.timeline-step.active .timeline-dot {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25);
}
.timeline-label {
	font-size: 12px;
	color: var(--text-muted);
}
.timeline-step.done .timeline-label,
.timeline-step.active .timeline-label {
	color: var(--text);
	font-weight: 600;
}
.funnel-bar { margin-bottom: 12px; }
.funnel-label { font-size: 12px; margin-bottom: 4px; color: var(--text-muted); }

/* ── Responsive ── */
@media (min-width: 768px) {
	.page-content { max-width: 500px; margin: 0 auto; }
}
