/* ============================================================
   Apexmart MLM Pro – Frontend Stylesheet
   ============================================================ */

/* ── Reset / Base ─────────────────────────────────────────── */
.ampro-wrap * { box-sizing: border-box; }
.ampro-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1e293b; }

/* ── Layout ───────────────────────────────────────────────── */
.ampro-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }

/* ── Cards ────────────────────────────────────────────────── */
.ampro-card {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 1px 6px rgba(0,0,0,.08);
	padding: 24px;
	margin-bottom: 20px;
}
.ampro-card h3 {
	margin: 0 0 16px;
	font-size: 1.05rem;
	color: #0f172a;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 10px;
}

/* ── Auth Card ────────────────────────────────────────────── */
.ampro-auth-card {
	max-width: 480px;
	margin: 40px auto;
}
.ampro-auth-logo {
	text-align: center;
	margin-bottom: 24px;
}
.ampro-auth-logo img { height: 48px; margin-bottom: 8px; }
.ampro-auth-logo h2 { margin: 0 0 4px; font-size: 1.4rem; }
.ampro-auth-logo p  { margin: 0; color: #64748b; font-size: .9rem; }
.ampro-auth-footer  { text-align: center; margin-top: 16px; color: #64748b; }
.ampro-auth-footer a { color: #4f46e5; text-decoration: none; font-weight: 600; }

/* ── Form ─────────────────────────────────────────────────── */
.ampro-form-group { margin-bottom: 16px; }
.ampro-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .ampro-form-row { grid-template-columns: 1fr; } }
.ampro-form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .875rem; color: #334155; }
.ampro-input {
	width: 100%;
	padding: 10px 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: 8px;
	font-size: .95rem;
	color: #1e293b;
	transition: border-color .2s;
	background: #f8fafc;
}
.ampro-input:focus { outline: none; border-color: #4f46e5; background: #fff; }
.ampro-input-group { position: relative; }
.ampro-input-group .ampro-input { padding-right: 48px; }
.ampro-toggle-pw {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	background: none; border: none; cursor: pointer; font-size: 1rem; color: #64748b;
}
.ampro-input-file { width: 100%; padding: 8px 0; }
.ampro-flex-row { display: flex; justify-content: space-between; align-items: center; }
.ampro-link-small { font-size: .85rem; color: #4f46e5; text-decoration: none; }
.required { color: #ef4444; }

/* ── Buttons ──────────────────────────────────────────────── */
.ampro-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 11px 22px; border-radius: 8px; font-weight: 600;
	font-size: .95rem; cursor: pointer; border: 2px solid transparent;
	text-decoration: none; transition: all .2s;
}
.ampro-btn-block { width: 100%; justify-content: center; }
.ampro-btn-primary { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.ampro-btn-primary:hover { background: #4338ca; border-color: #4338ca; }
.ampro-btn-outline { background: transparent; color: #4f46e5; border-color: #4f46e5; }
.ampro-btn-outline:hover { background: #4f46e5; color: #fff; }
.ampro-btn-danger-outline { background: transparent; color: #ef4444; border-color: #ef4444; }
.ampro-btn-danger-outline:hover { background: #ef4444; color: #fff; }
.ampro-spinner {
	display: inline-block; width: 16px; height: 16px;
	border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
	border-radius: 50%; animation: ampro-spin .6s linear infinite;
}
@keyframes ampro-spin { to { transform: rotate(360deg); } }

/* ── Messages ─────────────────────────────────────────────── */
.ampro-message {
	padding: 12px 16px; border-radius: 8px; margin-bottom: 16px;
	font-weight: 500; font-size: .9rem;
}
.ampro-success { background: #f0fdf4; color: #16a34a; border: 1.5px solid #bbf7d0; }
.ampro-error   { background: #fef2f2; color: #dc2626; border: 1.5px solid #fecaca; }
.ampro-info    { background: #eff6ff; color: #2563eb; border: 1.5px solid #bfdbfe; }
.ampro-notice  { background: #fff7ed; color: #c2410c; border: 1.5px solid #fed7aa; padding: 12px 16px; border-radius: 8px; }

/* ── Badges ───────────────────────────────────────────────── */
.ampro-badge {
	display: inline-block; padding: 3px 10px; border-radius: 20px;
	font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.ampro-badge-active  { background: #dcfce7; color: #15803d; }
.ampro-badge-inactive { background: #fee2e2; color: #b91c1c; }
.ampro-badge-pending  { background: #fef3c7; color: #b45309; }
.ampro-badge-warning  { background: #fef3c7; color: #92400e; }

/* ── Dashboard Header ─────────────────────────────────────── */
.ampro-dashboard-header {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: 16px; margin-bottom: 20px;
}
.ampro-user-info { display: flex; align-items: center; gap: 16px; }
.ampro-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid #e2e8f0; }
.ampro-avatar-lg { width: 80px; height: 80px; }
.ampro-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Stats Grid ───────────────────────────────────────────── */
.ampro-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 16px; margin-bottom: 20px;
}
.ampro-stat-card {
	background: #fff; border-radius: 12px; padding: 20px 16px;
	text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,.07);
	border-top: 4px solid #e2e8f0;
}
.ampro-stat-wallet   { border-top-color: #4f46e5; }
.ampro-stat-roi      { border-top-color: #16a34a; }
.ampro-stat-level    { border-top-color: #d97706; }
.ampro-stat-referral { border-top-color: #0891b2; }
.ampro-stat-team     { border-top-color: #7c3aed; }
.ampro-stat-direct   { border-top-color: #db2777; }
.ampro-stat-reward   { border-top-color: #d97706; }
.ampro-stat-royalty  { border-top-color: #7c3aed; }
.ampro-stat-icon { font-size: 1.6rem; margin-bottom: 6px; }
.ampro-stat-value { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.ampro-stat-label { font-size: .78rem; color: #64748b; margin-top: 4px; }

/* ── Progress Bars ────────────────────────────────────────── */
.ampro-progress-bar {
	height: 8px; background: #e2e8f0; border-radius: 100px; overflow: hidden;
}
.ampro-progress-thick { height: 14px; margin-top: 8px; }
.ampro-progress-fill {
	height: 100%; background: #4f46e5; border-radius: 100px;
	transition: width .4s ease;
}
.ampro-progress-green { background: #22c55e; }
.ampro-completion-card { padding: 16px 24px; }
.ampro-completion-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: .9rem; font-weight: 600; }

/* ── ROI Info ─────────────────────────────────────────────── */
.ampro-roi-info { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; font-size: .88rem; }
.ampro-roi-info span { background: #f1f5f9; padding: 4px 12px; border-radius: 8px; }

/* ── Level Grid ───────────────────────────────────────────── */
.ampro-level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 600px) { .ampro-level-grid { grid-template-columns: repeat(3, 1fr); } }
.ampro-level-item {
	text-align: center; background: #f8fafc; border-radius: 10px; padding: 14px 8px;
	border: 1.5px solid #e2e8f0;
}
.ampro-level-badge {
	display: inline-block; padding: 4px 10px; background: #4f46e5; color: #fff;
	border-radius: 20px; font-size: .8rem; font-weight: 700; margin-bottom: 6px;
}
.ampro-level-rate { display: block; font-size: 1.1rem; font-weight: 700; color: #0f172a; }

/* ── Referral Box ─────────────────────────────────────────── */
.ampro-referral-box { display: flex; gap: 10px; flex-wrap: wrap; }
.ampro-referral-box .ampro-input { flex: 1; background: #f1f5f9; font-size: .85rem; }

/* ── Tables ───────────────────────────────────────────────── */
.ampro-table-wrap { overflow-x: auto; }
.ampro-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.ampro-table th { background: #f1f5f9; padding: 10px 12px; text-align: left; font-weight: 700; color: #475569; }
.ampro-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; color: #334155; }
.ampro-table tr:last-child td { border-bottom: none; }
.ampro-table tr:hover td { background: #fafafa; }
.ampro-credit { color: #16a34a; font-weight: 700; }
.ampro-debit  { color: #dc2626; font-weight: 700; }

/* ── Profile Header ───────────────────────────────────────── */
.ampro-profile-header {
	display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
	background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px;
	box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.ampro-profile-avatar-wrap { flex-shrink: 0; }
.ampro-profile-header h2 { margin: 0 0 4px; font-size: 1.3rem; }
.ampro-progress-mini { margin-left: auto; min-width: 180px; font-size: .85rem; }
.ampro-progress-mini .ampro-progress-bar { margin-top: 6px; }

/* ── Tabs ─────────────────────────────────────────────────── */
.ampro-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 20px; overflow-x: auto; }
.ampro-tab-btn {
	padding: 10px 18px; background: none; border: none; cursor: pointer;
	font-weight: 600; font-size: .9rem; color: #64748b; border-bottom: 2px solid transparent;
	margin-bottom: -2px; white-space: nowrap; transition: all .2s;
}
.ampro-tab-btn.ampro-tab-active { color: #4f46e5; border-bottom-color: #4f46e5; }
.ampro-tab-btn:hover { color: #4f46e5; }
.ampro-tab-content { display: none; }
.ampro-tab-content.ampro-tab-active { display: block; }

/* ── KYC Upload ───────────────────────────────────────────── */
.ampro-kyc-field { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #f1f5f9; }
.ampro-kyc-field:last-child { border-bottom: none; }
.ampro-doc-link { display: inline-flex; align-items: center; gap: 6px; color: #4f46e5; font-size: .88rem; text-decoration: none; margin-bottom: 8px; }
.ampro-doc-preview { display: block; max-width: 200px; border-radius: 8px; border: 1px solid #e2e8f0; margin-bottom: 8px; }
.ampro-kyc-upload-wrap { display: flex; align-items: center; gap: 12px; }
.ampro-kyc-upload-status { font-size: .85rem; font-weight: 600; }

/* ── Misc ─────────────────────────────────────────────────── */
.ampro-muted { color: #64748b; }
.ampro-small { font-size: .8rem; margin-top: 4px; }
.ampro-label { font-weight: 600; font-size: .875rem; margin-bottom: 8px; display: block; }

/* ── Package Activation Card ──────────────────────────────── */
.ampro-activation-card { border-top: 4px solid #4f46e5; }
.ampro-package-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 12px; margin-bottom: 20px;
}
.ampro-pkg-card {
	border: 2px solid #e2e8f0; border-radius: 10px; padding: 14px 10px;
	text-align: center; cursor: pointer; transition: all .15s;
}
.ampro-pkg-card:hover, .ampro-pkg-card.ampro-pkg-selected {
	border-color: #4f46e5; background: #f5f3ff;
}
.ampro-pkg-amount { font-size: 1.1rem; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.ampro-pkg-roi    { font-size: .78rem; color: #16a34a; font-weight: 600; }
.ampro-pkg-cap    { font-size: .72rem; color: #64748b; margin: 2px 0 8px; }
.ampro-pkg-select { padding: 6px 14px; font-size: .8rem; width: 100%; justify-content: center; }
