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

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

:root {
    --gold: #c5a059;
    --gold-light: #dbb978;
    --gold-dark: #a68545;
    --gold-glow: rgba(197, 160, 89, 0.3);
    --navy: #080e1f;
    --navy-mid: #0d1530;
    --navy-light: #1a2545;
    --navy-card: #111827;
    --white: #ffffff;
    --text-muted: rgba(255,255,255,0.55);
    --text-body: rgba(255,255,255,0.85);
    --border: rgba(197,160,89,0.15);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-gold: 0 0 30px rgba(197,160,89,0.2);
    --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Kufi Arabic', sans-serif;
    background-color: var(--navy);
    color: var(--text-body);
    direction: rtl;
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 20%, rgba(197,160,89,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 80% 80%, rgba(197,160,89,0.04) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
.container-full { width: 100%; padding: 0 16px; position: relative; z-index: 1; }

.navbar {
    background: rgba(8, 14, 31, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--navy);
    font-weight: 900;
    box-shadow: 0 0 15px var(--gold-glow);
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.logo-text span {
    color: var(--white);
    font-weight: 400;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    transform: translateY(-1px);
    box-shadow: 0 6px 25px var(--gold-glow);
    color: var(--navy);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold);
}

.btn-outline-gold:hover {
    background: var(--gold-glow);
    color: var(--gold-light);
}

.btn-ghost {
    background: rgba(255,255,255,0.07);
    color: var(--text-body);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.12);
    color: var(--white);
}

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-info { background: var(--info); color: white; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 1rem; border-radius: var(--radius); }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.hero-section {
    padding: 40px 0 30px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(197,160,89,0.12);
    border: 1px solid rgba(197,160,89,0.3);
    color: var(--gold);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 12px;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 10px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 6px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: var(--transition);
}

.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(197,160,89,0.3); box-shadow: var(--shadow-gold); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.icon-gold { background: rgba(197,160,89,0.15); color: var(--gold); }
.icon-green { background: rgba(16,185,129,0.15); color: var(--success); }
.icon-blue { background: rgba(59,130,246,0.15); color: var(--info); }
.icon-red { background: rgba(239,68,68,0.15); color: var(--danger); }

.balance-display {
    background: linear-gradient(135deg, rgba(197,160,89,0.15), rgba(197,160,89,0.05));
    border: 1px solid rgba(197,160,89,0.3);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 16px;
}

.balance-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.balance-amount {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--gold);
    line-height: 1.1;
}

.balance-currency {
    font-size: 1rem;
    color: var(--gold-light);
    margin-top: 4px;
}

.plan-card {
    background: var(--navy-card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.plan-card.featured {
    border-color: var(--gold);
    box-shadow: var(--shadow-gold);
}

.plan-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--navy);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
}

.plan-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 4px;
}

.plan-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.plan-profit {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 2px;
}

.plan-profit-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 16px; }

.plan-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.plan-detail-item {
    background: rgba(255,255,255,0.04);
    border-radius: var(--radius-sm);
    padding: 10px;
    text-align: center;
}

.detail-value { font-size: 0.95rem; font-weight: 700; color: var(--white); }
.detail-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.currency-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.currency-btn {
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

.currency-btn.active {
    background: var(--gold);
    color: var(--navy);
}

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

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-body);
    margin-bottom: 7px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: 'Noto Kufi Arabic', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--gold);
    background: rgba(197,160,89,0.06);
    box-shadow: 0 0 0 3px var(--gold-glow);
}

.form-control::placeholder { color: rgba(255,255,255,0.3); }

select.form-control option { background: var(--navy-mid); color: var(--white); }

.input-group {
    position: relative;
}

.input-group-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-group .form-control { padding-right: 38px; }

.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.alert-danger { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.3); color: #fcd34d; }
.alert-info { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-success { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-danger { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-info { background: rgba(59,130,246,0.15); color: var(--info); }
.badge-gold { background: rgba(197,160,89,0.15); color: var(--gold); }

.table-card {
    background: var(--navy-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
}

.table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.table-row:last-child { border-bottom: none; }
.table-row:hover { background: rgba(255,255,255,0.03); }

.row-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-left: 12px;
}

.row-info { flex: 1; }
.row-title { font-size: 0.875rem; font-weight: 600; color: var(--white); }
.row-subtitle { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.row-value { font-size: 0.9rem; font-weight: 700; color: var(--gold); text-align: left; }
.row-value.negative { color: var(--danger); }
.row-value.positive { color: var(--success); }

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(8,14,31,0.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 900;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    flex: 1;
    max-width: 80px;
}

.bottom-nav-item i { font-size: 1.1rem; }
.bottom-nav-item.active { color: var(--gold); }
.bottom-nav-item:hover { color: var(--gold-light); }

.bottom-nav-center {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark)) !important;
    color: var(--navy) !important;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-top: -15px;
    box-shadow: 0 0 20px var(--gold-glow);
    max-width: 50px;
}

.bottom-nav-center i { font-size: 1.2rem !important; }

.page-wrapper {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
    min-height: 100vh;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.text-gold { color: var(--gold) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--white) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-center { text-align: center; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 10px; }

.progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.08);
    border-radius: 50px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
    border-radius: 50px;
    transition: width 0.8s ease;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

.loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(197,160,89,0.3);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
    opacity: 0;
}

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

.pulse-gold {
    animation: pulseGold 2s infinite;
}

@keyframes pulseGold {
    0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); }
    50% { box-shadow: 0 0 0 8px transparent; }
}

.wa-float {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 16px;
    width: 52px;
    height: 52px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: var(--transition);
    z-index: 800;
}

.wa-float:hover { transform: scale(1.08); background: #128C7E; }

.tg-float {
    position: fixed;
    bottom: calc(140px + env(safe-area-inset-bottom));
    left: 16px;
    width: 52px;
    height: 52px;
    background: #229ED9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(34,158,217,0.4);
    transition: var(--transition);
    z-index: 800;
}

.tg-float:hover { transform: scale(1.08); }

.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px 0;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .logo-icon-lg {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--navy);
    font-weight: 900;
    box-shadow: 0 0 40px var(--gold-glow);
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--gold);
}

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

@media (max-width: 360px) {
    .hero-title { font-size: 1.7rem; }
    .balance-amount { font-size: 1.8rem; }
    .plan-profit { font-size: 2.2rem; }
}

@media (min-width: 481px) {
    .container { max-width: 480px; }
    body { background: linear-gradient(135deg, #060a16, #0d1530); }
}
