/* ===== CoalMining Ted - Daily Task Mining Platform ===== */
/* Dark Industrial Mining Theme - Mobile-First */

:root {
    --bg-primary: #0c0e12;
    --bg-secondary: #11141a;
    --bg-card: rgba(23, 27, 34, 0.85);
    --bg-card-hover: rgba(30, 35, 44, 0.9);
    --bg-input: #161a21;
    --bg-nav: rgba(12, 14, 18, 0.96);
    --text-primary: #eef1f6;
    --text-secondary: #9aa4b2;
    --text-muted: #5f6b7a;
    --accent-amber: #f59e0b;
    --accent-amber-dark: #d97706;
    --accent-gold: #fbbf24;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
    --border-color: rgba(245, 158, 11, 0.12);
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.12);
    --radius: 14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --nav-height: 72px;
    --header-height: 56px;
    --font:
        "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
}

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

html,
body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
    width: 3px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

/* ===== App Container ===== */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--bg-primary);
    background-image:
        radial-gradient(ellipse at 50% -10%, rgba(245, 158, 11, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, #0c0e12 0%, #0e1014 100%);
}

/* ===== Auth Pages ===== */
.auth-page {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, #0c0e12 0%, #12161d 50%, #0c0e12 100%);
    overflow-y: auto;
    position: relative;
}

.auth-glow {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.auth-logo {
    text-align: center;
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

.auth-logo .logo-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border-radius: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 40px;
    box-shadow: 0 8px 40px rgba(245, 158, 11, 0.35);
    position: relative;
    overflow: hidden;
}

.auth-logo .logo-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.15) 100%);
    border-radius: inherit;
}

.auth-logo h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.auth-logo h1 span {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.auth-tabs {
    display: flex;
    background: var(--bg-input);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}

.auth-error {
    display: none;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
    padding: 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: center;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group label i {
    color: var(--accent-amber);
    margin-right: 4px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    font-family: var(--font);
}

.form-input:focus {
    border-color: var(--accent-amber);
}

.form-select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f59e0b' d='M6 8.825L.35 3.175 1.65 1.875 6 6.225l4.35-4.35 1.3 1.3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
}

.auth-footer {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-amber);
    text-decoration: none;
    font-weight: 600;
}

/* ===== Buttons ===== */
.btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0c0e12;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    width: auto;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(23, 27, 34, 0.98);
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--accent-amber);
    color: var(--text-primary);
    padding: 13px 16px;
    border-radius: 10px;
    font-size: 13px;
    box-shadow: var(--shadow);
    transition: opacity 0.3s;
}

.toast.success {
    border-left-color: var(--accent-green);
}
.toast.error {
    border-left-color: var(--accent-red);
}
.toast.info {
    border-left-color: var(--accent-amber);
}
.toast-icon {
    color: var(--accent-amber);
}
.toast.success .toast-icon {
    color: var(--accent-green);
}
.toast.error .toast-icon {
    color: var(--accent-red);
}

/* ===== App Header ===== */
.app-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

.header-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}
.header-title span {
    margin-right: 4px;
}
.header-title span:last-child,
.header-title span[style] {
    color: var(--accent-amber);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===== Content Area ===== */
.app-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 16px 100px;
    -webkit-overflow-scrolling: touch;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

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

.section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: "";
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, #fbbf24, #d97706);
    border-radius: 3px;
}

/* ===== Welcome Card ===== */
.welcome-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.welcome-card::before {
    content: "⛏️";
    position: absolute;
    right: -10px;
    bottom: -10px;
    font-size: 90px;
    opacity: 0.08;
    transform: rotate(-15deg);
}

.welcome-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.welcome-card h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}
.welcome-card h2 span {
    color: var(--accent-amber);
}
.welcome-card h2 i {
    color: var(--accent-gold);
    font-size: 14px;
}

.rank-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--border-color);
    color: var(--accent-amber);
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
}

.balance {
    font-size: 34px;
    font-weight: 800;
    margin: 14px 0 8px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.balance span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

.stats-row {
    display: flex;
    gap: 24px;
}

.stat-mini .value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-gold);
}
.stat-mini .label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ===== Task Banner ===== */
.task-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.03));
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin: 16px 0 8px;
}

.task-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.task-banner-text {
    flex: 1;
    min-width: 0;
}

.task-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.task-banner-sub {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.task-banner-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 9px;
    cursor: pointer;
    flex-shrink: 0;
}

/* ===== Quick Actions ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card:active {
    transform: scale(0.96);
    border-color: var(--accent-amber);
}

.action-icon {
    font-size: 20px;
    color: var(--accent-amber);
    margin-bottom: 8px;
}

.action-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.action-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== Plan Selector ===== */
.plan-selector {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.plan-option {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 70px;
}

.plan-option.selected {
    border-color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.1);
    box-shadow: var(--shadow-glow);
}

.plan-opt-icon {
    display: block;
    font-size: 22px;
    margin-bottom: 6px;
}

.plan-opt-name {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.plan-opt-roi {
    display: block;
    font-size: 9px;
    color: var(--accent-amber);
    margin-top: 3px;
    font-weight: 600;
}

.plan-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
}

.plan-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 14px 0;
}

.plan-detail-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.detail-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.detail-label i {
    margin-right: 4px;
    color: var(--accent-amber);
}

.detail-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Quick Amounts ===== */
.quick-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.quick-amount-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.quick-amount-btn.selected {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

.custom-amount-wrap {
    position: relative;
    margin-bottom: 14px;
}

.currency-prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-amber);
    font-weight: 700;
    font-size: 18px;
}

.custom-amount-wrap input {
    width: 100%;
    padding: 14px 16px 14px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    outline: none;
}

.custom-amount-wrap input:focus {
    border-color: var(--accent-amber);
}

/* ===== Invest Summary ===== */
.invest-summary-modern {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.summary-row .label {
    font-size: 13px;
    color: var(--text-secondary);
}
.summary-row .label i {
    color: var(--accent-amber);
    margin-right: 5px;
}

.summary-row .value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== Glass Card ===== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 8px;
}

.coin-network-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
}

.coin-network-hint i {
    color: var(--accent-amber);
}

.balance-display {
    text-align: center;
    padding: 18px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.bal-amount {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-gold);
}

.bal-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Transaction Items ===== */
.transaction-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.tx-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.tx-icon.deposit,
.tx-icon.roi {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
}

.tx-icon.withdrawal {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.tx-icon.referral,
.tx-icon.rank_gift,
.tx-icon.rank_salary {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-amber);
}

.tx-icon.investment {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.tx-info {
    flex: 1;
    min-width: 0;
}

.tx-type {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.tx-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.tx-amount {
    text-align: right;
}

.amount {
    font-size: 14px;
    font-weight: 700;
}

.amount.credit {
    color: var(--accent-green);
}

.amount.debit {
    color: var(--accent-red);
}

.tx-status {
    font-size: 10px;
    font-weight: 600;
    margin-top: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.tx-status.completed {
    color: var(--accent-green);
}
.tx-status.pending {
    color: var(--accent-amber);
}
.tx-status.failed,
.tx-status.expired {
    color: var(--accent-red);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 30px 16px;
    background: var(--bg-card);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius);
}

.empty-icon {
    font-size: 28px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.empty-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Investment Item ===== */
.investment-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
}

.invest-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.invest-plan {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-amber);
    margin-bottom: 4px;
}

.invest-plan-icon {
    font-size: 14px;
}

.invest-amount {
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
}

.invest-status {
    font-size: 10px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.invest-status.active {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-green);
}

.invest-status.completed {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.invest-status.cancelled {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.progress-bar {
    height: 7px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 4px;
    transition: width 0.4s;
    min-width: 2px;
}

.invest-days {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.invest-days i {
    margin-right: 4px;
}

.invest-summary {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: var(--bg-nav);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    backdrop-filter: blur(10px);
    z-index: 20;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font);
    transition: color 0.2s;
}

.nav-item .nav-icon {
    font-size: 19px;
}

.nav-item .nav-label {
    font-size: 10px;
    font-weight: 600;
}

.nav-item.active {
    color: var(--accent-amber);
}

.nav-item.active .nav-icon {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

/* ===== Team Tabs ===== */
.team-tabs {
    display: flex;
    background: var(--bg-input);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
}

.team-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
}

.team-tab.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
}

/* ===== Rank Hero ===== */
.rank-hero {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.05));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.rank-hero::before {
    content: "👑";
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 70px;
    opacity: 0.06;
}

.rank-hero-icon {
    font-size: 42px;
    margin-bottom: 8px;
}

.rank-hero-label {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-amber);
    letter-spacing: 1px;
}

.rank-hero-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
}

.rank-progress {
    margin-top: 14px;
}

.rank-progress-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-amber);
    margin-top: 6px;
}

/* ===== Rank Ladder ===== */
.rank-ladder-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 10px;
    position: relative;
    opacity: 0.55;
}

.rank-ladder-item.current {
    border-color: var(--accent-amber);
    background: rgba(245, 158, 11, 0.08);
    box-shadow: var(--shadow-glow);
    opacity: 1;
}

.rank-ladder-item.past {
    opacity: 0.8;
}

.rank-ladder-icon {
    font-size: 26px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rank-ladder-main {
    flex: 1;
    min-width: 0;
}

.rank-ladder-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.rank-ladder-req {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.rank-ladder-req i {
    color: var(--accent-amber);
    margin-right: 3px;
}

.rank-ladder-rewards {
    text-align: right;
    flex-shrink: 0;
}

.rank-reward {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.rank-reward i {
    color: var(--accent-amber);
    margin-right: 3px;
}

.rank-reward.salary {
    color: var(--accent-gold);
    margin-top: 3px;
}

.rank-current-badge {
    position: absolute;
    top: -1px;
    right: 14px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 8px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 0 0 8px 8px;
    letter-spacing: 1px;
}

/* ===== Referral Card ===== */
.ref-code {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--accent-amber);
    text-align: center;
    padding: 14px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px dashed var(--accent-amber);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.bonus-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 4px;
    border-bottom: 1px solid var(--border-light);
}

.bonus-tier:last-child {
    border-bottom: none;
}

.tier-label {
    font-size: 13px;
    color: var(--text-secondary);
}
.tier-label i {
    color: var(--accent-amber);
    margin-right: 4px;
}

.tier-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-gold);
}

/* ===== Profile ===== */
.profile-header {
    text-align: center;
    padding: 20px 0 16px;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-size: 30px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.3);
}

.profile-header h3 {
    font-size: 19px;
    font-weight: 700;
}

.profile-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 3px;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-menu-item:active {
    transform: scale(0.98);
    border-color: var(--accent-amber);
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.menu-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.menu-arrow {
    color: var(--text-muted);
}

/* ===== History Tabs ===== */
.history-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 14px;
    padding-bottom: 4px;
}

.history-tab {
    flex-shrink: 0;
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.history-tab.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: calc(100% - 40px);
    max-width: 420px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    transform: scale(0.95);
    transition: transform 0.25s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

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

.modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}
.modal-header h3 i {
    color: var(--accent-amber);
    margin-right: 6px;
}

.modal-close {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-info {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 12px;
    color: var(--text-muted);
}

.info-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.copy-btn {
    background: rgba(245, 158, 11, 0.12);
    border: none;
    color: var(--accent-amber);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}
