/* InvestEarn – Public Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
    --ie-bg:        #0d0f14;
    --ie-surface:   #161a24;
    --ie-surface2:  #1e2433;
    --ie-border:    #2a3045;
    --ie-gold:      #f0b429;
    --ie-gold-dim:  #a07a1a;
    --ie-green:     #00d084;
    --ie-red:       #ff4d4d;
    --ie-text:      #e8eaf0;
    --ie-muted:     #7a84a0;
    --ie-radius:    14px;
    --ie-font:      'DM Sans', sans-serif;
    --ie-mono:      'DM Mono', monospace;
}

.ie-wrap * { box-sizing: border-box; margin: 0; padding: 0; }
.ie-wrap { font-family: var(--ie-font); background: var(--ie-bg); color: var(--ie-text); border-radius: var(--ie-radius); padding: 0; overflow: hidden; }

/* ─── HEADER ─────────────────────────────────── */
.ie-header { background: linear-gradient(135deg, #1a1f2e 0%, #0d1220 100%); padding: 28px 32px; border-bottom: 1px solid var(--ie-border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.ie-header-title { display: flex; align-items: center; gap: 12px; }
.ie-header-title .ie-logo { width: 40px; height: 40px; background: linear-gradient(135deg, var(--ie-gold), #e0841e); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.ie-header-title h2 { font-size: 20px; font-weight: 700; color: #fff; letter-spacing: -.3px; }
.ie-header-title p { font-size: 13px; color: var(--ie-muted); margin-top: 2px; }
.ie-user-badge { background: var(--ie-surface2); border: 1px solid var(--ie-border); border-radius: 50px; padding: 8px 16px; font-size: 13px; color: var(--ie-muted); }
.ie-user-badge strong { color: var(--ie-text); }

/* ─── STATS ROW ───────────────────────────────── */
.ie-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--ie-border); border-bottom: 1px solid var(--ie-border); }
.ie-stat { background: var(--ie-surface); padding: 20px 24px; }
.ie-stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--ie-muted); margin-bottom: 6px; }
.ie-stat-val { font-size: 22px; font-weight: 700; font-family: var(--ie-mono); }
.ie-stat-val.gold  { color: var(--ie-gold); }
.ie-stat-val.green { color: var(--ie-green); }
.ie-stat-val.white { color: #fff; }

/* ─── BODY ────────────────────────────────────── */
.ie-body { padding: 28px 32px; }

/* ─── INVESTMENT CARDS ────────────────────────── */
.ie-inv-cards { display: flex; flex-direction: column; gap: 20px; }
.ie-inv-card { background: var(--ie-surface); border: 1px solid var(--ie-border); border-radius: var(--ie-radius); overflow: hidden; transition: border-color .2s; }
.ie-inv-card:hover { border-color: var(--ie-gold-dim); }
.ie-inv-card-header { padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--ie-border); }
.ie-inv-card-header .ie-inv-id { font-size: 12px; color: var(--ie-muted); font-family: var(--ie-mono); }
.ie-inv-card-header .ie-inv-amount { font-size: 20px; font-weight: 700; color: var(--ie-gold); font-family: var(--ie-mono); }
.ie-inv-status { padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.ie-inv-status.active    { background: rgba(0,208,132,.15); color: var(--ie-green); border: 1px solid rgba(0,208,132,.3); }
.ie-inv-status.pending   { background: rgba(240,180,41,.12); color: var(--ie-gold);  border: 1px solid rgba(240,180,41,.3); }
.ie-inv-status.rejected  { background: rgba(255,77,77,.12);  color: var(--ie-red);   border: 1px solid rgba(255,77,77,.3); }
.ie-inv-status.withdrawn { background: rgba(240,180,41,.1);  color: var(--ie-gold); border: 1px solid rgba(240,180,41,.25); }

/* ─── LIVE COUNTER ────────────────────────────── */
.ie-live-counter { padding: 18px 22px; display: flex; align-items: baseline; gap: 8px; }
.ie-live-label { font-size: 12px; color: var(--ie-muted); text-transform: uppercase; letter-spacing: .5px; }
.ie-live-value { font-family: var(--ie-mono); font-size: 26px; font-weight: 500; color: var(--ie-green); transition: color .1s; }
.ie-live-total { font-size: 13px; color: var(--ie-muted); margin-left: auto; font-family: var(--ie-mono); }
.ie-live-total strong { color: var(--ie-text); }

/* ─── PROGRESS BAR ────────────────────────────── */
.ie-progress-wrap { padding: 0 22px 18px; }
.ie-progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ie-muted); margin-bottom: 8px; }
.ie-progress-meta strong { color: var(--ie-text); }
.ie-progress-track { height: 8px; background: var(--ie-surface2); border-radius: 99px; overflow: hidden; }
.ie-progress-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ie-gold), var(--ie-green)); transition: width .5s ease; min-width: 4px; }
.ie-progress-days { display: flex; justify-content: space-between; margin-top: 6px; }
.ie-progress-days span { font-size: 11px; color: var(--ie-muted); font-family: var(--ie-mono); }

/* ─── WITHDRAW SECTION ────────────────────────── */
.ie-card-footer { padding: 14px 22px; border-top: 1px solid var(--ie-border); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ie-withdraw-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.ie-withdraw-form input[type=text] { flex: 1; min-width: 200px; background: var(--ie-surface2); border: 1px solid var(--ie-border); border-radius: 8px; padding: 9px 14px; color: var(--ie-text); font-size: 13px; font-family: var(--ie-mono); outline: none; transition: border-color .2s; }
.ie-withdraw-form input[type=text]:focus { border-color: var(--ie-gold); }
.ie-btn { padding: 9px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; font-family: var(--ie-font); transition: opacity .2s, transform .1s; }
.ie-btn:active { transform: scale(.97); }
.ie-btn.primary { background: linear-gradient(135deg, var(--ie-gold), #e0841e); color: #000; }
.ie-btn.primary:hover { opacity: .9; }
.ie-btn.primary:disabled { opacity: .4; cursor: not-allowed; }
.ie-btn.ghost { background: transparent; border: 1px solid var(--ie-border); color: var(--ie-muted); }
.ie-lock-msg { font-size: 12px; color: var(--ie-muted); display: flex; align-items: center; gap: 6px; }
.ie-lock-msg .lock { color: var(--ie-gold); }

/* ─── REFERRAL SECTION ────────────────────────── */
.ie-section { margin-top: 28px; }
.ie-section-title { font-size: 13px; font-weight: 600; color: var(--ie-muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 14px; }
.ie-ref-box { background: var(--ie-surface); border: 1px solid var(--ie-border); border-radius: var(--ie-radius); padding: 20px 22px; }
.ie-ref-link-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ie-ref-link-input { flex: 1; background: var(--ie-surface2); border: 1px solid var(--ie-border); border-radius: 8px; padding: 10px 14px; color: var(--ie-muted); font-family: var(--ie-mono); font-size: 13px; outline: none; min-width: 0; }
.ie-ref-stats { display: flex; gap: 24px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ie-border); }
.ie-ref-stat label { font-size: 11px; color: var(--ie-muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.ie-ref-stat .val { font-size: 18px; font-weight: 700; font-family: var(--ie-mono); color: var(--ie-gold); }

/* ─── WITHDRAWAL HISTORY ──────────────────────── */
.ie-wh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ie-wh-table th { text-align: left; padding: 8px 12px; color: var(--ie-muted); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--ie-border); }
.ie-wh-table td { padding: 10px 12px; border-bottom: 1px solid var(--ie-border); font-family: var(--ie-mono); font-size: 12px; }
.ie-wh-table tr:last-child td { border: none; }
.ie-badge-sm { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.ie-badge-sm.pending  { background: rgba(240,180,41,.15); color: var(--ie-gold); }
.ie-badge-sm.approved { background: rgba(0,208,132,.15);  color: var(--ie-green); }
.ie-badge-sm.rejected { background: rgba(255,77,77,.15);  color: var(--ie-red); }

/* ─── INVEST FORM ─────────────────────────────── */
.ie-invest-form-wrap { background: var(--ie-surface); border: 1px solid var(--ie-border); border-radius: var(--ie-radius); padding: 28px; max-width: 500px; }
.ie-invest-form-wrap h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.ie-invest-form-wrap p { font-size: 13px; color: var(--ie-muted); margin-bottom: 20px; }
.ie-field { margin-bottom: 16px; }
.ie-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ie-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.ie-field input { width: 100%; background: var(--ie-surface2); border: 1px solid var(--ie-border); border-radius: 8px; padding: 11px 14px; color: var(--ie-text); font-size: 15px; font-family: var(--ie-mono); outline: none; transition: border-color .2s; }
.ie-field input:focus { border-color: var(--ie-gold); }
.ie-calc-preview { background: var(--ie-surface2); border: 1px solid var(--ie-border); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; }
.ie-calc-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.ie-calc-row:last-child { margin: 0; padding-top: 8px; border-top: 1px solid var(--ie-border); font-weight: 700; }
.ie-calc-row .v { font-family: var(--ie-mono); color: var(--ie-green); }

/* ─── MESSAGES ────────────────────────────────── */
.ie-alert { border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }
.ie-alert.success { background: rgba(0,208,132,.12); border: 1px solid rgba(0,208,132,.3); color: var(--ie-green); }
.ie-alert.error   { background: rgba(255,77,77,.12);  border: 1px solid rgba(255,77,77,.3);  color: var(--ie-red); }
.ie-notice { color: var(--ie-muted); font-size: 14px; }
.ie-empty { text-align: center; padding: 40px; color: var(--ie-muted); font-size: 14px; }
.ie-empty .ie-empty-icon { font-size: 40px; margin-bottom: 12px; }

@media(max-width:600px) {
    .ie-header, .ie-body { padding: 20px 16px; }
    .ie-live-value { font-size: 20px; }
}

/* ─── DEPOSIT MODAL ───────────────────────────────────────────── */
.ie-modal-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.75);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
    animation: ie-fade-in .2s ease;
}
@keyframes ie-fade-in { from { opacity:0 } to { opacity:1 } }

.ie-modal {
    background: #161a24;
    border: 1px solid #2a3045;
    border-radius: 18px;
    width: 100%; max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    animation: ie-slide-up .25s ease;
}
@keyframes ie-slide-up { from { transform:translateY(24px);opacity:0 } to { transform:translateY(0);opacity:1 } }

.ie-modal-header {
    padding: 24px 28px 18px;
    border-bottom: 1px solid #2a3045;
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.ie-modal-header h3 { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.ie-modal-header p  { font-size: 13px; color: var(--ie-muted); margin: 0; }
.ie-modal-close {
    background: #1e2433; border: 1px solid #2a3045; border-radius: 8px;
    color: var(--ie-muted); font-size: 18px; line-height: 1;
    padding: 6px 10px; cursor: pointer; flex-shrink: 0;
    transition: color .15s;
}
.ie-modal-close:hover { color: #fff; }

.ie-modal-amount-badge {
    margin: 0 28px 20px;
    margin-top: 20px;
    background: linear-gradient(135deg, rgba(240,180,41,.12), rgba(0,208,132,.08));
    border: 1px solid rgba(240,180,41,.25);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex; align-items: center; gap: 12px;
}
.ie-modal-amount-badge .ie-badge-icon { font-size: 28px; }
.ie-modal-amount-badge .ie-badge-text label { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ie-muted); display: block; margin-bottom: 2px; }
.ie-modal-amount-badge .ie-badge-text strong { font-size: 22px; font-weight: 700; color: var(--ie-gold); font-family: var(--ie-mono); }

.ie-modal-accounts { padding: 0 28px 8px; }
.ie-modal-accounts-title { font-size: 11px; text-transform: uppercase; letter-spacing: .7px; color: var(--ie-muted); margin-bottom: 12px; }

.ie-deposit-account {
    background: #1e2433; border: 1px solid #2a3045; border-radius: 12px;
    padding: 18px; margin-bottom: 12px;
    transition: border-color .2s;
}
.ie-deposit-account:hover { border-color: var(--ie-gold-dim); }

.ie-da-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ie-da-icon   { font-size: 28px; line-height: 1; }
.ie-da-label  strong { font-size: 15px; font-weight: 700; color: #fff; display: block; }
.ie-da-label  span   { font-size: 12px; color: var(--ie-muted); }

.ie-da-account-box {
    background: #0d0f14; border: 1px solid #2a3045; border-radius: 8px;
    padding: 10px 14px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 10px;
}
.ie-da-account-box code {
    flex: 1; font-family: var(--ie-mono); font-size: 13px; color: var(--ie-green);
    word-break: break-all; line-height: 1.5;
}
.ie-copy-account-btn {
    background: #1e2433; border: 1px solid #2a3045; border-radius: 6px;
    color: var(--ie-muted); font-size: 11px; font-weight: 600;
    padding: 5px 10px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
    transition: all .15s;
}
.ie-copy-account-btn:hover  { border-color: var(--ie-gold); color: var(--ie-gold); }
.ie-copy-account-btn.copied { border-color: var(--ie-green); color: var(--ie-green); }

.ie-da-instructions {
    font-size: 12px; color: var(--ie-muted); line-height: 1.6;
    background: rgba(240,180,41,.05); border-left: 3px solid var(--ie-gold);
    padding: 10px 12px; border-radius: 0 6px 6px 0; margin-top: 8px;
}

.ie-modal-footer { padding: 16px 28px 24px; border-top: 1px solid #2a3045; margin-top: 8px; }
.ie-modal-footer p { font-size: 12px; color: var(--ie-muted); margin-bottom: 14px; line-height: 1.6; }
.ie-modal-done-btn {
    width: 100%; padding: 13px; font-size: 14px;
    background: linear-gradient(135deg, var(--ie-gold), #e0841e);
    color: #000; font-weight: 700; border: none; border-radius: 10px;
    cursor: pointer; transition: opacity .2s;
}
.ie-modal-done-btn:hover { opacity: .9; }

.ie-no-accounts-msg {
    padding: 28px; text-align: center; color: var(--ie-muted); font-size: 14px;
}
