/* ═══════════════════════════════════════════════════════════════════
   PolyMaker - Dark Minimalist Liquid Glass iOS
   Single-pass design system. No overrides.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────────── */
:root {
    /* Ink */
    --ink:         #05070D;
    --ink-raised:  #0A0E18;
    --ink-surface: #0E1322;

    /* Glass fills */
    --glass-header:  rgba(10, 16, 28, 0.62);
    --glass-card:    rgba(255, 255, 255, 0.065);
    --glass-strong:  rgba(255, 255, 255, 0.092);
    --glass-modal:   rgba(12, 18, 30, 0.82);
    --glass-badge:   rgba(255, 255, 255, 0.078);

    /* Text */
    --text-1: #F8FBFF;
    --text-2: #AEB8C9;
    --text-3: #657086;

    /* Accents */
    --cyan:   #2EE8FF;
    --mint:   #57F2A7;
    --rose:   #FF4D6D;
    --amber:  #FFB84D;
    --violet: #A78BFA;

    /* Borders */
    --border:      1px solid rgba(255, 255, 255, 0.12);
    --border-glow: 1px solid rgba(46, 232, 255, 0.26);
    --border-sep:  1px solid rgba(255, 255, 255, 0.06);

    /* Effects */
    --blur:        blur(32px) saturate(160%);
    --blur-badge:  blur(16px) saturate(150%);
    --blur-modal:  blur(34px) saturate(175%);
    --shadow-card: 0 18px 52px rgba(0, 0, 0, 0.46),
                   inset 0 1px 0 rgba(255, 255, 255, 0.18),
                   inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    --shadow-btn:  0 12px 28px rgba(0, 0, 0, 0.35),
                   inset 0 1px 0 rgba(255, 255, 255, 0.22);
    --shadow-nav:  0 -8px 38px rgba(0, 0, 0, 0.48),
                   inset 0 1px 0 rgba(255, 255, 255, 0.16);

    /* Layout */
    --header-h: 68px;
    --tabbar-h: 78px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}


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

body {
    user-select: none;
}


/* ─── Base ──────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: var(--ink);
    color: var(--text-1);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* ─── App Shell ─────────────────────────────────────────────────── */
#app-container {
    width: 100%;
    max-width: 480px;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, var(--ink-raised), var(--ink));
    border-left: var(--border);
    border-right: var(--border);
}

/* Animated mesh background — slow, elegant, dark */
#app-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 60% 50% at 12% 16%, rgba(46, 232, 255, 0.14), transparent),
        radial-gradient(ellipse 55% 45% at 88% 18%, rgba(167, 139, 250, 0.10), transparent),
        radial-gradient(ellipse 50% 40% at 75% 78%, rgba(87, 242, 167, 0.09), transparent),
        radial-gradient(ellipse 45% 35% at 20% 88%, rgba(255, 184, 77, 0.07), transparent),
        linear-gradient(160deg, var(--ink) 0%, #07111F 50%, var(--ink) 100%);
    background-size: 180% 180%;
    animation: meshDrift 22s ease-in-out infinite alternate;
    opacity: 0.85;
}

/* Subtle light film for depth */
#app-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 30%);
    pointer-events: none;
}

@keyframes meshDrift {
    0%   { background-position: 0% 0%; }
    50%  { background-position: 60% 40%; }
    100% { background-position: 20% 80%; }
}


/* ─── Glass Mixin (via class application) ───────────────────────── */
/* All glass surfaces share this foundational style */


/* ─── Header ────────────────────────────────────────────────────── */
#app-header {
    height: var(--header-h);
    background: var(--glass-header);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: var(--border-sep);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 18px;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.app-logo {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.2px;
    color: var(--text-1);
}

.rank-badge {
    background: var(--glass-badge);
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
    border: var(--border);
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--amber);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.balance-badge {
    background: var(--glass-badge);
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
    border: var(--border);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--cyan);
    cursor: pointer;
    transition: transform 0.25s var(--ease-out), background 0.25s;
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
    font-variant-numeric: tabular-nums;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.balance-badge:active {
    transform: scale(0.94);
    background: rgba(255, 255, 255, 0.1);
}

.currency-label {
    font-size: 9px;
    opacity: 0.6;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}


/* ─── Content Area ──────────────────────────────────────────────── */
#app-content {
    flex: 1;
    margin-top: var(--header-h);
    margin-bottom: var(--tabbar-h);
    overflow-y: auto;
    padding: 22px 18px 30px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

#app-content::-webkit-scrollbar { width: 3px; }
#app-content::-webkit-scrollbar-track { background: transparent; }
#app-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 2px; }


/* ─── Tab Content ───────────────────────────────────────────────── */
.app-tab-content {
    display: none;
    animation: glassReveal 0.5s var(--ease-out) forwards;
}

.app-tab-content.active {
    display: block;
}

@keyframes glassReveal {
    0%   { opacity: 0; transform: translateY(10px) scale(0.995); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}


/* ─── Glass Card (shared surface) ───────────────────────────────── */
.glass-surface,
.stat-card,
.wallet-card,
.price-card,
.active-agent-status-card,
.ios-list,
.ios-modal-content,
.admin-bot-status-panel,
.token-alert-banner,
#pending-invoice-container {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.11), rgba(255,255,255,0.035)),
        var(--glass-card);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--border);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

/* Inner light refraction — top-left corner highlight */
.stat-card::before,
.wallet-card::before,
.price-card::before,
.active-agent-status-card::before,
.ios-list::before,
.ios-modal-content::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.14), transparent 28%),
        radial-gradient(circle at 90% 10%, rgba(46,232,255,0.06), transparent 40%);
    opacity: 0.7;
    z-index: 0;
}


/* ─── Profile ───────────────────────────────────────────────────── */
.profile-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 28px;
}

.avatar-container {
    width: 90px;
    height: 90px;
    position: relative;
    margin-bottom: 16px;
}

.avatar-glow {
    position: absolute;
    inset: -3px;
    background: conic-gradient(from 140deg, var(--cyan), var(--mint), var(--amber), var(--violet), var(--cyan));
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.55;
    animation: glowSpin 12s linear infinite;
}

@keyframes glowSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.avatar-image-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--ink-surface);
    border: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-1);
    position: relative;
    z-index: 2;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18);
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 2;
    border: var(--border);
}

.profile-hero h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

.profile-id {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 12px;
    font-weight: 500;
}

.user-role-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--glass-badge);
    border: var(--border);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.user-role-badge.admin {
    color: var(--violet);
    border-color: rgba(167, 139, 250, 0.22);
}


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

.stat-card {
    border-radius: 22px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s var(--ease-out), background 0.3s;
    min-height: 120px;
}

.stat-card:active {
    transform: scale(0.97);
}

.stat-icon {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-2);
}
.stat-icon.green  { color: var(--mint); }
.stat-icon.red    { color: var(--rose); }
.stat-icon.orange { color: var(--amber); }

.stat-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 3px;
    letter-spacing: -0.5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    color: var(--text-1);
}
.stat-value.green  { color: var(--mint); }
.stat-value.red    { color: var(--rose); }
.stat-value.orange { color: var(--amber); }

.stat-label {
    font-size: 10px;
    color: var(--text-3);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}


/* ─── iOS Lists ─────────────────────────────────────────────────── */
.ios-list-container {
    margin-bottom: 24px;
}

.list-header {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-3);
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-left: 10px;
    font-weight: 700;
}

.list-header.red {
    color: var(--rose);
}

.ios-list {
    list-style: none;
    border-radius: 22px;
    overflow: hidden;
}

.ios-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: var(--border-sep);
    min-height: 56px;
    transition: background 0.2s;
    position: relative;
    z-index: 1;
}

.ios-list-item:last-child {
    border-bottom: none;
}

.ios-list-item:active {
    background: rgba(255,255,255,0.04);
}

.item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 600;
}

.item-icon {
    font-size: 17px;
    width: 24px;
    text-align: center;
    color: var(--text-2);
}

.item-right {
    display: flex;
    align-items: center;
    color: var(--text-2);
    font-size: 14px;
}


/* ─── Toggle Switch ─────────────────────────────────────────────── */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 26px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.06);
    transition: .3s var(--ease-out);
    border-radius: 26px;
}

.switch-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background: white;
    transition: .3s var(--ease-out);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.ios-switch input:checked + .switch-slider {
    background: var(--mint);
    border-color: transparent;
}

.ios-switch input:checked + .switch-slider::before {
    transform: translateX(18px);
}


/* ─── Segmented Control ─────────────────────────────────────────── */
.ios-segmented-control {
    background: rgba(255,255,255,0.06);
    border: var(--border);
    border-radius: 12px;
    padding: 3px;
    display: flex;
    gap: 2px;
    user-select: none;
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
}

.seg-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-3);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
}

.seg-btn.active {
    background: rgba(255,255,255,0.12);
    color: var(--text-1);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}


/* ─── Wallet ────────────────────────────────────────────────────── */
.wallet-card {
    border-radius: 28px;
    padding: 26px;
    margin-bottom: 24px;
}

/* Subtle light caustic streak */
.wallet-card::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 50px;
    right: -60px;
    top: 18px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    filter: blur(8px);
    opacity: 0.5;
    pointer-events: none;
    transform: rotate(-14deg);
    animation: causticSlide 10s ease-in-out infinite alternate;
}

@keyframes causticSlide {
    0%   { transform: rotate(-14deg) translateX(-12px); opacity: 0.3; }
    100% { transform: rotate(-10deg) translateX(18px); opacity: 0.55; }
}

.wallet-balance-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 24px;
}

.wallet-balance-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-3);
    margin-bottom: 4px;
    font-weight: 700;
}

.wallet-balance-val {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-1);
    line-height: 1;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.wallet-usdc-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.wallet-usdc-sub::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--mint);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--mint);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.6; }
    50%      { opacity: 1; }
}

.wallet-actions {
    display: flex;
    gap: 12px;
}

.wallet-btn {
    flex: 1;
    border: none;
    border-radius: 22px;
    height: 56px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.28s var(--ease-out), box-shadow 0.28s;
    position: relative;
    overflow: hidden;
}

.wallet-btn .btn-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 3px;
}

.wallet-btn:active {
    transform: scale(0.94);
}

.deposit-btn {
    background: linear-gradient(135deg, rgba(46,232,255,0.88), rgba(87,242,167,0.82));
    color: #061018;
    box-shadow: var(--shadow-btn);
    border: 1px solid rgba(255,255,255,0.2);
}

.withdraw-btn {
    background: var(--glass-card);
    color: var(--text-1);
    border: var(--border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}


/* ─── Buttons (Shared) ──────────────────────────────────────────── */
.ios-btn {
    flex: 1;
    background: linear-gradient(135deg, rgba(46,232,255,0.85), rgba(87,242,167,0.78));
    color: #061018;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    height: 52px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform 0.25s var(--ease-out);
}

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

.ios-btn-small {
    background: var(--glass-badge);
    color: var(--text-1);
    border: var(--border);
    border-radius: 14px;
    padding: 6px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.2s var(--ease-out);
}

.ios-btn-small:active {
    transform: scale(0.95);
}


/* ─── Input ─────────────────────────────────────────────────────── */
.ios-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.28);
    border: var(--border);
    border-radius: 16px;
    color: var(--text-1);
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    min-height: 46px;
    transition: border-color 0.25s, box-shadow 0.25s;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.ios-input:focus {
    border-color: rgba(46, 232, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(46,232,255,0.1), inset 0 1px 0 rgba(255,255,255,0.06);
}

.ios-select {
    background: transparent;
    border: none;
    color: var(--text-1);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    text-align: right;
    cursor: pointer;
}

.ios-select option {
    background: var(--ink-surface);
    color: var(--text-1);
}


/* ─── Agent Section ─────────────────────────────────────────────── */
.agent-hero {
    background: var(--glass-card);
    border: var(--border);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 24px;
}

.profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.profit-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profit-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.06);
}

.profit-label {
    font-size: 10px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 700;
}

.profit-val {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.profit-val.positive { color: var(--mint); }
.profit-val.negative { color: var(--rose); }


/* ─── Pricing Cards (Agent Selection) ───────────────────────────── */
.agent-selection-header {
    padding: 10px 10px 0 10px;
}

.pricing-cards-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 2px 22px;
    overflow-y: auto;
}

.price-card {
    border-radius: 26px;
    padding: 20px;
    transition: transform 0.3s var(--ease-out);
}

.price-card:active {
    transform: scale(0.98);
}

/* Subtle caustic streak on price cards */
.price-card::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 40px;
    right: -50px;
    top: 16px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
    filter: blur(6px);
    opacity: 0.4;
    pointer-events: none;
    transform: rotate(-14deg);
    animation: causticSlide 10s ease-in-out infinite alternate;
}

.card-glow {
    position: absolute;
    top: 12px;
    right: -40px;
    width: 160px;
    height: 40px;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.2;
    pointer-events: none;
    transform: rotate(-16deg);
}

.card-glow.blue   { background: var(--cyan); }
.card-glow.purple { background: var(--violet); }
.card-glow.orange { background: var(--amber); }

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.card-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.card-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-1);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.card-body-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 12px 14px;
    position: relative;
    z-index: 1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.detail-label {
    color: var(--text-3);
}

.detail-val {
    font-weight: 700;
    color: var(--text-2);
}

.buy-agent-btn {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    padding: 13px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out);
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-btn);
}

.buy-agent-btn:active {
    transform: scale(0.97);
}

#card-agent-low .buy-agent-btn {
    background: linear-gradient(135deg, var(--cyan), var(--mint));
    color: #061018;
}

#card-agent-medium .buy-agent-btn {
    background: linear-gradient(135deg, var(--violet), #e879f9);
    color: #fff;
}

#card-agent-big .buy-agent-btn {
    background: linear-gradient(135deg, var(--amber), var(--mint));
    color: #061018;
}


/* ─── Active Agent Status Card ──────────────────────────────────── */
.active-agent-status-card {
    border: var(--border-glow);
    border-radius: 28px;
    padding: 22px;
    margin: 8px 0 18px;
}

/* Caustic streak on agent card */
.active-agent-status-card::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 50px;
    right: -60px;
    top: 20px;
    background: linear-gradient(90deg, transparent, rgba(46,232,255,0.06), rgba(255,255,255,0.05), transparent);
    filter: blur(6px);
    opacity: 0.45;
    pointer-events: none;
    transform: rotate(-14deg);
    animation: causticSlide 10s ease-in-out infinite alternate;
}

.status-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.status-top h2 {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.4px;
}

.agent-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.agent-status-indicator::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.agent-status-indicator.running {
    color: var(--mint);
}
.agent-status-indicator.running::before {
    background: var(--mint);
    box-shadow: 0 0 8px var(--mint);
    animation: statusBlink 1.8s ease-in-out infinite;
}

.agent-status-indicator.stopped {
    color: var(--rose);
}
.agent-status-indicator.stopped::before {
    background: var(--rose);
}

@keyframes statusBlink {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 1; }
}

.status-toggle-btn {
    border: var(--border);
    background: var(--glass-badge);
    color: var(--text-1);
}

.status-toggle-btn:active {
    background: rgba(255,255,255,0.1);
}

.status-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.status-metric {
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 9px;
    color: var(--text-3);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 3px;
}

.metric-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-1);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.agent-card-actions {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.ai-upgrade-desc {
    font-size: 10px;
    color: var(--text-3);
    margin-top: 1px;
}


/* ─── Terminal Logs ─────────────────────────────────────────────── */
.agent-terminal {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 14px;
    height: 120px;
    overflow-y: auto;
    overflow-x: hidden;
    color: var(--mint);
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.agent-terminal::-webkit-scrollbar { width: 3px; }
.agent-terminal::-webkit-scrollbar-track { background: transparent; }
.agent-terminal::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }


/* ─── Sub-tabs ──────────────────────────────────────────────────── */
.list-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.bet-size-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--cyan);
    background: var(--glass-badge);
    border: var(--border);
    padding: 3px 10px;
    border-radius: 10px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.tabs-sub-nav {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: var(--border);
    padding: 4px;
    border-radius: 16px;
    margin-bottom: 12px;
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
}

.sub-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-3);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s var(--ease-out);
    min-height: 34px;
}

.sub-tab-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.sub-tab-btn:active {
    transform: scale(0.97);
}


/* ─── Bet Items ─────────────────────────────────────────────────── */
.bet-item-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

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

.match-teams {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.2px;
    color: var(--text-1);
}

.bet-status-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--glass-badge);
    border: var(--border);
    backdrop-filter: var(--blur-badge);
    -webkit-backdrop-filter: var(--blur-badge);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.bet-status-badge.pending {
    color: var(--amber);
    border-color: rgba(255, 184, 77, 0.22);
}

.bet-status-badge.won {
    color: var(--mint);
    border-color: rgba(87, 242, 167, 0.22);
}

.bet-status-badge.lost {
    color: var(--rose);
    border-color: rgba(255, 77, 109, 0.22);
}

.bet-item-details {
    display: flex;
    justify-content: space-between;
    color: var(--text-2);
    font-size: 12px;
    font-weight: 600;
}

.prediction-badge {
    color: var(--cyan);
    font-weight: 700;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.bet-time {
    font-size: 9px;
    color: var(--text-3);
    font-weight: 500;
}


/* ─── Leaderboard ───────────────────────────────────────────────── */
.leaderboard-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 28px;
    text-align: center;
}

.leaderboard-icon-glow {
    font-size: 48px;
    margin-bottom: 8px;
    filter: drop-shadow(0 0 10px rgba(255,184,77,0.3));
    animation: gentleBob 4s ease-in-out infinite;
}

@keyframes gentleBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-3px) rotate(4deg); }
}

.leaderboard-hero h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.4px;
}

.leaderboard-hero p {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 500;
}

.rank-number {
    font-size: 13px;
    font-weight: 800;
    width: 24px;
    text-align: center;
    color: var(--text-3);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
}

.ios-list-item.rank-1 .rank-number { color: #ffd700; font-size: 17px; }
.ios-list-item.rank-2 .rank-number { color: #c0c0c0; font-size: 16px; }
.ios-list-item.rank-3 .rank-number { color: #cd7f32; font-size: 15px; }

.leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-1);
    border: var(--border);
    background: var(--glass-card);
}

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

.ios-list-item.user-highlight {
    background: rgba(46, 232, 255, 0.04);
    border-left: 3px solid var(--cyan);
}

.user-xp-display {
    font-weight: 800;
    color: var(--cyan);
    font-size: 13px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}


/* ─── Transaction List ──────────────────────────────────────────── */
.tx-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.tx-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.tx-icon-box.deposit  { background: rgba(87,242,167,0.08); color: var(--mint); border: 1px solid rgba(87,242,167,0.15); }
.tx-icon-box.withdraw { background: rgba(255,77,109,0.08); color: var(--rose); border: 1px solid rgba(255,77,109,0.15); }
.tx-icon-box.bet      { background: rgba(46,232,255,0.08); color: var(--cyan); border: 1px solid rgba(46,232,255,0.15); }

.tx-details {
    display: flex;
    flex-direction: column;
}

.tx-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
}

.tx-time {
    font-size: 10px;
    color: var(--text-3);
    font-weight: 500;
}

.tx-amount {
    font-size: 14px;
    font-weight: 800;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-variant-numeric: tabular-nums;
}

.tx-amount.positive { color: var(--mint); }
.tx-amount.negative { color: var(--text-1); }


/* ─── Admin ─────────────────────────────────────────────────────── */
.admin-only-block {
    display: none;
    margin-top: 24px;
}

.admin-card {
    background: rgba(255,77,109,0.02);
    border: 1px dashed rgba(255,77,109,0.2);
    border-radius: 20px;
    padding: 16px;
}

.admin-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.admin-row-btns {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.admin-bot-status-panel {
    border-radius: 18px;
    padding: 14px;
}

.bot-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}

.bot-status-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    background: var(--mint);
    color: #061018;
}

.bot-status-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    font-size: 12px;
    color: var(--text-2);
}


/* ─── Bottom Nav Bar ────────────────────────────────────────────── */
#app-nav {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    height: 62px;
    background: var(--glass-header);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--border);
    border-radius: 28px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: var(--shadow-nav);
}

.nav-item {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-3);
    height: 44px;
    margin: 0 4px;
    border-radius: 20px;
    transition: all 0.3s var(--ease-out);
    position: relative;
    z-index: 6;
}

.nav-item.active {
    pointer-events: none;
}

.nav-icon {
    font-size: 18px;
    opacity: 0.55;
    transition: all 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-label {
    display: none;
}

.nav-item.active {
    color: #061018;
    background: linear-gradient(135deg, rgba(46,232,255,0.92), rgba(87,242,167,0.85));
    box-shadow:
        0 8px 22px rgba(46,232,255,0.18),
        inset 0 1px 0 rgba(255,255,255,0.35);
}

.nav-item.active .nav-icon {
    opacity: 1;
    color: #061018;
    filter: none;
    transform: scale(1.05);
}

.nav-item:active {
    transform: scale(0.93);
}


/* ─── Modals ────────────────────────────────────────────────────── */
.ios-modal {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.ios-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.ios-modal-content {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)),
        var(--glass-modal);
    backdrop-filter: var(--blur-modal);
    -webkit-backdrop-filter: var(--blur-modal);
    width: 100%;
    max-height: 85vh;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border-top: var(--border);
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.42s var(--ease-out);
    box-shadow: 0 -12px 42px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

.ios-modal.active .ios-modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.modal-close-btn {
    background: rgba(255,255,255,0.08);
    border: var(--border);
    color: var(--text-1);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close-btn:active {
    background: rgba(255,255,255,0.14);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* smooth iOS touch momentum scrolling */
    padding-right: 4px;
    padding-bottom: 16px;
}

.admin-inline-select {
    width: auto;
    min-width: 120px;
    padding: 4px 8px;
    font-size: 13px;
    text-align: right;
    background: rgba(255,255,255,0.08) !important;
}

/* Polish nested lists inside admin cards to look clean and spacious */
.admin-bot-status-panel .ios-list {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.admin-bot-status-panel .ios-list-item {
    padding-left: 2px;
    padding-right: 2px;
    background: transparent !important;
    border-bottom: var(--border-sep) !important;
}

.admin-bot-status-panel .ios-list-item:last-child {
    border-bottom: none !important;
}

/* Styled clean scrollbar for modal content */
.modal-body::-webkit-scrollbar {
    width: 5px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

.modal-desc {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500;
    line-height: 1.5;
}

.modal-input-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modal-input-row label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-3);
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.copy-address-box {
    background: rgba(0, 0, 0, 0.28);
    border: var(--border);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

#deposit-address-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    word-break: break-all;
    flex: 1;
    color: var(--text-2);
}

.copy-btn {
    background: linear-gradient(135deg, rgba(46,232,255,0.85), rgba(87,242,167,0.78));
    color: #061018;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px;
    padding: 8px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.copy-btn:active {
    opacity: 0.85;
}


/* ─── Toast ─────────────────────────────────────────────────────── */
#ios-toast {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(24px);
    background:
        linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
        rgba(10, 16, 28, 0.88);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: var(--border);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    transition: all 0.35s var(--ease-spring);
    text-align: center;
    width: max-content;
    max-width: 90%;
}

#ios-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ─── Token Alert Banner ────────────────────────────────────────── */
.token-alert-banner {
    color: var(--amber);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    width: 100%;
    z-index: 99;
    border-radius: 0;
    animation: alertPulse 2.5s ease-in-out infinite;
}

@keyframes alertPulse {
    0%, 100% { opacity: 0.9; }
    50%      { opacity: 0.7; }
}

.alert-text {
    font-size: 11px;
}


/* ─── Pending Invoice ───────────────────────────────────────────── */
#pending-invoice-container {
    border-radius: 20px;
}


/* ─── Admin Trigger Button ──────────────────────────────────────── */
.admin-trigger-btn {
    background: rgba(255,77,109,0.06);
    border: 1px solid rgba(255,77,109,0.2);
    color: var(--rose);
}


/* ─── Empty States ──────────────────────────────────────────────── */
.empty-state-row {
    justify-content: center;
    color: var(--text-3);
    font-size: 13px;
}


/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 370px) {
    #app-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .wallet-balance-val {
        font-size: 36px;
    }

    .sub-tab-btn {
        font-size: 10px;
    }

    .price-card,
    .wallet-card,
    .active-agent-status-card {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.scanner-admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}

.scanner-admin-grid label,
.admin-toggle-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: rgba(235, 235, 245, 0.62);
    font-size: 11px;
    font-weight: 600;
}

.scanner-admin-grid .ios-input {
    min-height: 38px;
    font-size: 12px;
    padding: 8px 10px;
}

.admin-toggle-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-height: 34px;
    padding: 0 2px;
}

.admin-toggle-row input {
    accent-color: var(--accent-blue);
}

/* Dark iOS glass override: calm graphite surfaces, no neon glow. */
:root {
    --ink: #05070D;
    --ink-raised: #07111F;
    --ink-surface: #0a0f1d;
    --glass-header: rgba(10, 15, 30, 0.65);
    --glass-card: rgba(255, 255, 255, 0.07);
    --glass-strong: rgba(255, 255, 255, 0.12);
    --glass-modal: rgba(8, 12, 24, 0.92);
    --glass-badge: rgba(255, 255, 255, 0.08);
    --text-1: #F8FBFF;
    --text-2: #AEB8C9;
    --text-3: #657086;
    --cyan: #2EE8FF;
    --mint: #57F2A7;
    --rose: #FF4D6D;
    --amber: #FFB84D;
    --violet: #A78BFA;
    --accent-blue: #0a84ff;
    --border: 1px solid rgba(255, 255, 255, 0.12);
    --border-glow: 1px solid rgba(255, 255, 255, 0.2);
    --border-sep: 1px solid rgba(255, 255, 255, 0.08);
    --blur: blur(34px) saturate(175%);
    --blur-badge: blur(18px) saturate(170%);
    --blur-modal: blur(34px) saturate(175%);
    --shadow-card: 0 24px 80px rgba(0,0,0,.55),
                   inset 0 1px 0 rgba(255, 255, 255, 0.22),
                   inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    --shadow-btn: 0 10px 24px rgba(46,232,255,0.12),
                  inset 0 1px 0 rgba(255, 255, 255, 0.16);
    --shadow-nav: 0 -24px 80px rgba(0,0,0,.45),
                  inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#app-container {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%),
        linear-gradient(180deg, #0B0C10 0%, #050507 100%);
}

#app-container::before {
    background:
        radial-gradient(ellipse 90% 62% at 50% -18%, rgba(255, 255, 255, 0.055), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(0, 0, 0, 0.18));
    background-size: 100% 100%;
    animation: none !important;
    opacity: 1;
}

#app-container::after,
.glass-card::before,
.price-card::before,
.agent-card::before {
    animation: none !important;
    filter: none !important;
}

/* Elegant, soft glows (Minimalist Liquid Glass iOS) */
.avatar-glow,
.card-glow,
.leaderboard-icon-glow {
    display: block !important;
    opacity: 0.18 !important;
    filter: blur(32px) !important;
}

.wallet-card::after,
.active-agent-status-card::after {
    display: block !important;
    opacity: 0.45 !important;
}

.price-card,
.wallet-card,
.glass-card,
.agent-card,
.active-agent-status-card,
.settings-card,
.admin-bot-status-panel,
.transaction-item,
.bet-item,
.leaderboard-item,
.ios-modal-content,
.bottom-tab-bar {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.082), rgba(255, 255, 255, 0.032)) !important;
    border: 1px solid rgba(255, 255, 255, 0.105) !important;
    box-shadow: var(--shadow-card) !important;
}

.ios-btn,
.ios-btn-small,
.agent-select-btn,
.tg-main-button,
.copy-btn {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.075)) !important;
    color: var(--text-1) !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    box-shadow: var(--shadow-btn) !important;
    text-shadow: none !important;
}

/* Make primary action buttons pop with gradient */
.buy-agent-btn,
.deposit-btn,
.upgrade-btn,
#agent-upgrade-submit-btn {
    background: linear-gradient(135deg, rgba(46,232,255,0.9), rgba(87,242,167,0.85)) !important;
    color: #05070D !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 10px 24px rgba(46,232,255,0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    font-weight: 800 !important;
    text-shadow: none !important;
}

.ios-btn:active,
.ios-btn-small:active,
.buy-agent-btn:active,
.agent-select-btn:active,
.upgrade-btn:active,
.tg-main-button:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.11) !important;
}

.balance-badge,
.rank-badge,
.status-badge,
.bot-status-badge,
.sub-tab-btn,
.nav-item,
.admin-trigger-btn {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    color: var(--text-2) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
    text-shadow: none !important;
}

.sub-tab-btn.active,
.nav-item.active,
.agent-select-btn.active,
.bot-status-badge.active {
    color: var(--text-1) !important;
    background: rgba(255, 255, 255, 0.105) !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.status-dot,
.live-dot {
    background: rgba(245, 245, 247, 0.72) !important;
    box-shadow: none !important;
    animation: none !important;
}

.leaderboard-icon-glow svg,
.stat-icon,
.nav-icon,
.tx-icon-box {
    filter: none !important;
    text-shadow: none !important;
}

.ios-input,
input,
textarea,
select {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: var(--text-1) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.ios-input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.045),
                inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    outline: none;
}

* {
    text-shadow: none !important;
}

/* ─── Nav Magnifier (Apple Liquid Glass Slider) ────────────────────── */
.nav-magnifier {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.35),
        inset 0 4px 6px rgba(255, 255, 255, 0.45),
        inset 0 -3px 6px rgba(0, 0, 0, 0.25),
        0 0 16px rgba(46, 232, 255, 0.25);
    z-index: 5; /* Sit behind/below the text/icon of active tab to show it through the lens */
    cursor: grab;
    pointer-events: auto;
    transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.2s;
}

/* Glass shine overlay */
.nav-magnifier::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 8px;
    right: 8px;
    height: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: 50% / 100% 100% 0% 0%;
    pointer-events: none;
}

/* Liquid scale/stretch transition when dragging */
.nav-magnifier.dragging {
    cursor: grabbing;
    transform: translateY(-50%) scale(1.15) scaleY(0.95);
    box-shadow: 
        0 14px 40px rgba(0, 0, 0, 0.45),
        inset 0 4px 6px rgba(255, 255, 255, 0.55),
        inset 0 -3px 6px rgba(0, 0, 0, 0.2),
        0 0 24px rgba(87, 242, 167, 0.4);
    border-color: rgba(255, 255, 255, 0.65);
}

/* Redesigned Bot Settings Inline Inputs */
.ios-input-inline {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-1) !important;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    padding: 6px 10px;
    border-radius: 10px;
    width: 80px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.ios-input-inline:focus {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.settings-item-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}
