/* ==========================================================================
   ملف التنسيق الأساسي: money.css
   التصميم: واجهات رصيدي، العروض المتاحة، وطلبات الشحن
   ========================================================================== */

:root {
    --bg-dark: #080514;
    --gold-title: #ffe69a;
    --gold-primary: #e6c56c;
    --gold-border: rgba(230, 197, 108, 0.35);
    --cyan-border: rgba(56, 189, 248, 0.35);
    --green-status: #34d399;
    --green-border: rgba(52, 211, 153, 0.4);
    --text-silver: #c9c1de;
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    font-family: var(--font-body);
    color: #ffffff;
    overflow-x: hidden;
}

/* 1. إطار الشاشة المتجاوب مع خلفية النجوم الفلكية */
.money-screen-container {
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    position: relative;
    padding: 16px 16px 32px 16px;
    display: flex;
    flex-direction: column;
    background-color: #070412;
    background-image: 
        radial-gradient(1px 1px at 30px 40px, #ffffff, transparent),
        radial-gradient(1.5px 1.5px at 120px 80px, #ffe69a, transparent),
        radial-gradient(1px 1px at 290px 140px, #ffffff, transparent),
        radial-gradient(1.8px 1.8px at 80px 300px, rgba(216, 180, 254, 0.8), transparent),
        radial-gradient(1px 1px at 340px 420px, #ffffff, transparent),
        radial-gradient(circle at 50% 15%, rgba(68, 25, 115, 0.3) 0%, transparent 60%),
        linear-gradient(180deg, #070412 0%, #0e0824 50%, #05030e 100%);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.95);
}

/* 2. شريط التنقل العلوي السريع */
.money-nav-bar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    background: rgba(20, 14, 42, 0.7);
    border: 1px solid rgba(230, 197, 108, 0.2);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 16px;
}

.nav-tab-btn {
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 9px 4px;
    color: var(--text-silver);
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.nav-tab-btn.active {
    background: linear-gradient(135deg, rgba(84, 45, 145, 0.9), rgba(46, 24, 86, 0.9));
    border: 1px solid rgba(230, 197, 108, 0.45);
    color: var(--gold-title);
    font-weight: 700;
    box-shadow: 0 0 10px rgba(230, 197, 108, 0.2);
}

/* 3. إدارة التبديل بين الأقسام */
.money-view-section {
    display: none;
    width: 100%;
    flex-direction: column;
    animation: fadeInView 0.25s ease;
}

.money-view-section.active {
    display: flex;
}

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

/* 4. رأس الصفحة الرئيسي */
.section-top-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0 14px 0;
}

.header-gold-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold-title);
    text-shadow: 0 0 10px rgba(230, 197, 108, 0.4);
}

.btn-back-header {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-spacer {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   5. تنسيقات شاشة رصيدي
   ========================================================================== */

/* بطاقة الرصيد المشحون */
.card-paid-balance {
    width: 100%;
    background: rgba(22, 16, 46, 0.65);
    border: 1px solid var(--gold-border);
    border-radius: 18px;
    padding: 18px 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.balance-card-header .label-muted {
    font-size: 13.5px;
    color: var(--text-silver);
}

.balance-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0;
}

.coin-number-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.huge-gold-num {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 800;
    color: var(--gold-title);
    line-height: 1;
    text-shadow: 0 2px 10px rgba(230, 197, 108, 0.35);
}

.saturn-planet-visual svg {
    filter: drop-shadow(0 0 10px rgba(229, 193, 88, 0.3));
}

.balance-note {
    font-size: 13px;
    color: var(--text-silver);
    line-height: 1.5;
    margin-bottom: 14px;
}

.balance-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(230, 197, 108, 0.15);
}

.last-update {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-silver);
}

.btn-refresh-balance {
    background: #2b1754;
    border: 1px solid #7c3aed;
    border-radius: 12px;
    padding: 8px 14px;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-refresh-balance:hover {
    background: #3b1f73;
    box-shadow: 0 0 12px rgba(124, 58, 237, 0.4);
}

/* بطاقة الرصيد المجاني */
.card-free-balance {
    width: 100%;
    background: rgba(14, 24, 46, 0.6);
    border: 1px solid var(--cyan-border);
    border-radius: 18px;
    padding: 16px;
    backdrop-filter: blur(10px);
    margin-bottom: 14px;
}

.free-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.free-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.free-title-text {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.free-amount-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

.free-num {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #38bdf8;
}

.free-desc {
    font-size: 12.5px;
    color: #a5b4fc;
    line-height: 1.5;
    margin-bottom: 12px;
}

.progress-bar-container {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    border-radius: 4px;
}

.progress-label {
    font-size: 11.5px;
    color: var(--text-silver);
}

/* بطاقة الانتقال لطلبات الشحن */
.card-link-orders {
    width: 100%;
    background: rgba(20, 15, 40, 0.6);
    border: 1px solid rgba(230, 197, 108, 0.25);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 14px;
    transition: all 0.2s ease;
}

.card-link-orders:hover {
    border-color: var(--gold-primary);
    background: rgba(30, 22, 60, 0.75);
}

.orders-right-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orders-text-wrap {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.orders-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

.orders-count-sub {
    font-size: 12px;
    color: var(--text-silver);
}

.chevron-nav {
    color: var(--gold-title);
}

/* بانر العملات الرقمية */
.banner-crypto-promo {
    width: 100%;
    background: rgba(13, 26, 36, 0.65);
    border: 1px solid rgba(94, 234, 212, 0.3);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.crypto-icon-badge {
    color: #5eead4;
    flex-shrink: 0;
}

.crypto-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    color: #ffe69a;
    line-height: 1.4;
    margin-bottom: 4px;
}

.crypto-sub {
    font-size: 12px;
    color: #a7f3d0;
}

/* ==========================================================================
   6. تنسيقات شاشة العروض المتاحة
   ========================================================================== */

.offers-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.section-badge-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vertical-gold-bar {
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #c084fc, #7c3aed);
    border-radius: 2px;
}

.section-badge-title h2 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
}

.btn-refresh-offers {
    background: #2b1754;
    border: 1px solid #7c3aed;
    border-radius: 16px;
    padding: 6px 14px;
    color: #ffffff;
    font-size: 12.5px;
    font-family: var(--font-body);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.offers-update-time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-silver);
    margin-bottom: 16px;
}

/* بطاقة العرض */
.offer-card-item {
    width: 100%;
    background: rgba(18, 16, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.offer-right-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.offer-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.day-pill {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
}

.month-pill {
    background: rgba(230, 197, 108, 0.15);
    border: 1px solid rgba(230, 197, 108, 0.4);
    color: var(--gold-title);
}

.coins-count-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coins-big-num {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.validity-text {
    font-size: 11.5px;
    color: var(--text-silver);
}

.offer-left-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.offer-price-tag {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.price-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: #38bdf8;
}

.price-unit {
    font-size: 11px;
    color: #a5b4fc;
}

.btn-charge-yellow {
    background: #f59e0b;
    border: none;
    border-radius: 12px;
    padding: 8px 24px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 800;
    color: #1e1035;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-charge-yellow:hover {
    background: #fbbf24;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.6);
}

.btn-charge-yellow:active {
    transform: scale(0.96);
}

/* ==========================================================================
   7. تنسيقات شاشة طلبات الشحن
   ========================================================================== */

.info-alert-card {
    width: 100%;
    background: rgba(14, 22, 42, 0.65);
    border: 1px solid var(--cyan-border);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.alert-card-text p {
    font-size: 13px;
    color: var(--text-silver);
    line-height: 1.4;
}

.order-record-card {
    width: 100%;
    background: rgba(14, 24, 38, 0.65);
    border: 1px solid var(--green-border);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.order-record-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-status-pill {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.4);
    border-radius: 10px;
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--green-status);
}

.order-amount-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-coins-val {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.order-meta-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.meta-blockchain {
    font-size: 12.5px;
    font-weight: 600;
    color: #6ee7b7;
}

.meta-date {
    font-size: 11.5px;
    color: var(--text-silver);
}

/* ==========================================================================
   8. أنماط الباقات والطلبات الجارية (منقولة من money.html لتصبح في مكان واحد)
   ========================================================================== */

.credit-tag-gold {
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #ffd700;
    margin-right: 6px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.credit-tag-blue {
    font-family: 'Cairo', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #38bdf8;
    margin-right: 4px;
}
.bonus-tag {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}
.active-packages-card {
    margin-top: 14px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
}
.packages-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.package-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.order-pending-card {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
}
.order-pending-badge {
    background: #eab308;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
}
.timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fde047;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
}
.btn-pay-now {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eab308;
    color: #000;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 8px;
    margin-top: 10px;
    transition: opacity 0.2s;
}
.btn-pay-now:hover {
    opacity: 0.9;
}

/* حالات الطلبات المنتهية / الفاشلة */
.order-record-card.order-card-closed {
    border-color: rgba(148, 163, 184, 0.35);
}

.order-status-pill.order-status-closed {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.35);
    color: #94a3b8;
}

.order-card-closed .meta-blockchain {
    color: var(--text-silver);
}

.order-code {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--text-silver);
    word-break: break-all;
}

/* زر الشحن أثناء الإرسال */
.btn-charge-yellow:disabled,
.btn-charge-yellow:disabled:hover,
.btn-charge-yellow:disabled:active {
    background: #f59e0b;
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}


/* ===== نافذة الدفع وحذف الطلب ===== */
.pay-modal { position: fixed; inset: 0; background: rgba(4, 2, 12, 0.75); display: flex; align-items: flex-end; justify-content: center; z-index: 999; }
.pay-modal[hidden] { display: none; }
.pay-sheet { width: 100%; max-width: 480px; max-height: 88vh; overflow-y: auto; background: #120d24; border: 1px solid var(--gold-border); border-radius: 20px 20px 0 0; padding: 18px 16px 22px; }
.pay-sheet-small { border-radius: 20px; margin: auto 16px; padding: 22px 18px; text-align: center; align-self: center; }
.pay-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.pay-sheet-title { font-family: var(--font-heading); font-weight: 800; font-size: 17px; color: var(--gold-title); }
.pay-sheet-sub { font-size: 13px; color: var(--text-silver); margin-top: 3px; }
.pay-close { background: none; border: none; color: #94a3b8; font-size: 20px; cursor: pointer; }
.pay-section-title { font-family: var(--font-heading); font-weight: 700; font-size: 14px; color: #fff; margin: 16px 0 10px; display: flex; align-items: center; gap: 8px; }
.pay-usdt-chip { background: rgba(52, 211, 153, 0.15); border: 1px solid var(--green-border); color: var(--green-status); font-size: 11px; padding: 2px 8px; border-radius: 20px; }
.pay-empty { text-align: center; color: #94a3b8; padding: 18px; font-size: 13px; }
.net-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.net-card { display: flex; flex-direction: column; gap: 4px; align-items: center; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 12px; padding: 12px 8px; color: #fff; cursor: pointer; font-family: var(--font-body); }
.net-card.selected { border-color: var(--gold-primary); background: rgba(230, 197, 108, 0.12); box-shadow: 0 0 0 1px var(--gold-primary); }
.net-name { font-weight: 700; font-size: 14px; }
.net-type { font-size: 11px; color: #94a3b8; }
.id-card { background: linear-gradient(135deg, rgba(56, 189, 248, 0.07), rgba(15, 23, 42, 0.8)); border: 1px solid var(--cyan-border); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.id-card-head { font-family: var(--font-heading); font-weight: 800; color: #7dd3fc; margin-bottom: 8px; }
.id-step { font-size: 12.5px; color: var(--text-silver); margin: 8px 0 6px; }
.id-account-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: rgba(0, 0, 0, 0.35); border-radius: 10px; padding: 8px 10px; }
.id-account { font-weight: 800; font-size: 15px; color: #fff; word-break: break-all; }
.btn-copy, .btn-verify { background: #38bdf8; color: #00121f; border: none; border-radius: 8px; font-weight: 800; font-size: 12px; padding: 7px 12px; cursor: pointer; font-family: var(--font-body); }
.id-input { width: 100%; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(148, 163, 184, 0.35); border-radius: 10px; color: #fff; padding: 9px 10px; font-size: 14px; margin-bottom: 8px; }
.btn-verify { width: 100%; padding: 10px; }
.btn-verify:disabled { opacity: 0.6; }
.id-msg, .pay-error { color: #f87171; font-size: 12.5px; margin-top: 6px; }
.btn-pay-confirm { width: 100%; margin-top: 14px; background: #eab308; color: #000; border: none; border-radius: 12px; font-weight: 800; font-size: 15px; padding: 13px; cursor: pointer; font-family: var(--font-heading); }
.btn-pay-confirm:disabled { opacity: 0.4; cursor: not-allowed; }
.order-actions { display: flex; gap: 8px; align-items: center; }
.btn-order-delete { margin-top: 10px; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.5); color: #f87171; font-weight: 800; font-size: 12px; padding: 6px 14px; border-radius: 8px; cursor: pointer; font-family: var(--font-body); }
.del-text { font-size: 13.5px; color: var(--text-silver); line-height: 1.7; margin: 10px 0 16px; }
.del-actions { display: flex; gap: 10px; }
.btn-del-yes, .btn-del-no { flex: 1; border-radius: 10px; font-weight: 800; padding: 11px; cursor: pointer; font-family: var(--font-body); border: 1px solid transparent; }
.btn-del-yes { background: #ef4444; color: #fff; }
.btn-del-no { background: transparent; border-color: rgba(148, 163, 184, 0.5); color: #cbd5e1; }

.pay-tabs { display: flex; gap: 8px; margin: 12px 0; }
.pay-tab { flex: 1; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.3); color: #cbd5e1; border-radius: 10px; padding: 10px; font-weight: 800; cursor: pointer; font-family: var(--font-body); }
.pay-tab.active { background: rgba(230, 197, 108, 0.14); border-color: var(--gold-primary); color: var(--gold-title); }
.btn-open-pay { display: block; text-align: center; margin-top: 10px; background: var(--green-status); color: #00130c; text-decoration: none; font-weight: 800; border-radius: 12px; padding: 12px; }

.order-actions { flex-direction: column; align-items: stretch; min-width: 130px; }
.order-actions > * { text-align: center; }
.btn-order-check { margin-top: 8px; background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.5); color: #7dd3fc; font-weight: 800; font-size: 12px; padding: 7px 14px; border-radius: 8px; cursor: pointer; font-family: var(--font-body); }
.btn-order-check:disabled { opacity: 0.6; }
.order-check-msg { font-size: 12px; color: var(--text-silver); margin-top: 6px; line-height: 1.5; }
.toast-box { position: fixed; top: 14px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 2000; pointer-events: none; }
.toast-item { background: #0f2a1f; border: 1px solid var(--green-border); color: var(--green-status); font-weight: 800; font-size: 14px; padding: 12px 18px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); max-width: 90%; text-align: center; }

.pay-notice { background: rgba(234, 179, 8, 0.1); border: 1px solid rgba(234, 179, 8, 0.45); color: #fde68a; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.7; margin: 10px 0; }
.pay-notice b { color: #fff; font-size: 15px; }
