/* ═══════════════════════════════════════════════════════════════════════════
   SIGNIQO WALLET — PREMIUM MOBILE (Phantom-inspired)
   Goal: cleaner hierarchy, premium glass, tighter spacing, better usability
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    :root {
        /* Core */
        --m-bg: #07070b;
        --m-bg-2: #0b0b12;

        --m-surface: rgba(18, 18, 26, 0.86);
        --m-surface-2: rgba(24, 24, 34, 0.72);
        --m-surface-3: rgba(32, 32, 46, 0.60);

        --m-border: rgba(255, 255, 255, 0.08);
        --m-border-2: rgba(255, 255, 255, 0.12);

        --m-text: #f6f7fb;
        --m-text-2: rgba(246, 247, 251, 0.78);
        --m-text-3: rgba(246, 247, 251, 0.58);

        --m-accent: #a78bfa;
        --m-accent-2: #6366f1;
        --m-accent-3: #8b5cf6;
        --m-glow: rgba(167, 139, 250, 0.22);

        --m-success: #4ade80;
        --m-danger: #f87171;
        --m-warn: #fbbf24;

        /* Radius & spacing */
        --r-sm: 12px;
        --r-md: 16px;
        --r-lg: 20px;
        --r-xl: 28px;

        --s-1: 8px;
        --s-2: 12px;
        --s-3: 16px;
        --s-4: 20px;
        --s-5: 28px;

        --nav-h: 80px;
        --safe-b: env(safe-area-inset-bottom, 0px);

        --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.35);
        --shadow-2: 0 18px 50px rgba(0, 0, 0, 0.45);

        --ease: 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    html {
        height: 100%;
        width: 100%;
        background-color: #07070b !important;
    }

    body {
        overscroll-behavior-y: none;
        -webkit-tap-highlight-color: transparent;
        background-color: #07070b !important;
        /* Removed "Oval" radial gradient as requested */
        background-image: linear-gradient(180deg, #07070b 0%, #0b0b12 100%) !important;
        background-attachment: fixed !important;
        background-size: cover !important;
        min-height: 100%;
        padding: 0 !important;
        margin: 0 !important;
        padding-bottom: calc(var(--nav-h) + var(--safe-b) + 18px) !important;
    }

    /* Container becomes "app shell" */
    .container.app-shell {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 var(--s-3) !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Hide the gradient border pseudo-element that creates the "oval" artifact */
    .container::before,
    .container.app-shell::before {
        display: none !important;
        content: none !important;
    }

    /* Ensure .slider:before ONLY renders inside .switch or .privacy-switch */
    .slider:before {
        display: none !important;
        /* Hide by default */
    }

    .switch .slider:before,
    .privacy-switch .slider:before {
        display: block !important;
        /* Only show inside proper switch containers */
    }

    /* Hide desktop nav */
    .subnav,
    #app-nav {
        display: none !important;
    }

    /* Topbar */
    .app-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-3);
        padding: var(--s-2) 0 var(--s-2);
        position: sticky;
        top: 0;
        z-index: 20;
        background: linear-gradient(180deg, rgba(7, 7, 11, 0.92) 0%, rgba(7, 7, 11, 0.60) 60%, rgba(7, 7, 11, 0) 100%);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .topbar-account {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        border: 1px solid var(--m-border);
        background: rgba(255, 255, 255, 0.04);
        border-radius: 999px;
        padding: 10px 12px;
        color: var(--m-text);
        font-weight: 650;
        letter-spacing: -0.01em;
    }

    .acct-badge {
        width: 34px;
        height: 34px;
        border-radius: 12px;
        display: grid;
        place-items: center;
        background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(99, 102, 241, 0.12));
        border: 1px solid rgba(167, 139, 250, 0.20);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
        font-weight: 800;
        color: var(--m-accent);
    }

    .acct-name {
        font-size: 0.98rem;
    }

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

    /* Icon pill button */
    .icon-pill {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: 1px solid var(--m-border);
        background: rgba(255, 255, 255, 0.04);
        color: var(--m-text-2);
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: transform var(--ease), border-color var(--ease), background var(--ease);
    }

    .icon-pill svg {
        width: 20px !important;
        height: 20px !important;
        display: block !important;
        stroke-width: 2px;
    }



    .icon-pill:active {
        transform: scale(0.97);
        background: rgba(255, 255, 255, 0.06);
    }

    /* Typography */
    h1,
    .brand-title {
        letter-spacing: -0.03em !important;
    }

    h2 {
        font-size: 1.28rem !important;
        font-weight: 750 !important;
        color: var(--m-text) !important;
        margin: 0 0 var(--s-2) 0 !important;
        border: none !important;
        padding: 0 !important;
    }

    .section-head {
        margin: var(--s-2) 0 var(--s-3);
    }

    .section-sub {
        margin: 0;
        color: var(--m-text-3);
        font-size: 0.92rem;
        line-height: 1.35;
    }

    /* Common card */
    .card,
    .info-box,
    .settings-card,
    .glass-card,
    .hero-card {
        background: linear-gradient(180deg, rgba(22, 22, 32, 0.78) 0%, rgba(14, 14, 22, 0.86) 100%) !important;
        border: 1px solid var(--m-border) !important;
        border-radius: var(--r-xl) !important;
        box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
        backdrop-filter: blur(22px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
        padding: var(--s-4) !important;
        margin-bottom: var(--s-3) !important;
        overflow: hidden !important;
        position: relative !important;
    }

    /* Premium top highlight - DISABLED to prevent gradient overlay */
    .card::before,
    .glass-card::before,
    .hero-card::before,
    .settings-card::before {
        display: none !important;
        content: none !important;
        /* Original 1px line is disabled to prevent dashboard.css gradient from showing */
    }

    .card-head {
        display: grid;
        gap: 2px;
        margin-bottom: var(--s-3);
    }

    .card-title {
        font-size: 1.02rem;
        font-weight: 750;
        color: var(--m-text);
        letter-spacing: -0.01em;
    }

    .card-sub {
        font-size: 0.88rem;
        color: var(--m-text-3);
    }

    .row-between {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--s-2);
    }

    /* Hero */
    .hero-card {
        padding: var(--s-4) !important;
    }

    .hero-kicker {
        color: var(--m-text-3);
        font-size: 0.88rem;
        margin-bottom: var(--s-2);
    }

    .hero-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: var(--s-2);
        margin-bottom: var(--s-3);
    }

    .hero-label {
        color: var(--m-text-3);
        font-size: 0.80rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        margin-bottom: 6px;
    }

    .hero-balance {
        font-size: 2.05rem !important;
        font-weight: 850 !important;
        letter-spacing: -0.04em !important;
        color: var(--m-text) !important;
        line-height: 1.05;
    }

    .hero-sub {
        margin-top: 6px;
        color: var(--m-text-3);
        font-size: 0.92rem;
    }

    .hero-chip {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border-radius: 999px;
        border: 1px solid rgba(74, 222, 128, 0.20);
        background: rgba(74, 222, 128, 0.08);
        padding: 8px 10px;
        color: rgba(74, 222, 128, 0.95);
        font-weight: 650;
        font-size: 0.88rem;
        flex-shrink: 0;
    }

    .hero-chip .dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--m-success);
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.12);
    }

    .hero-cta {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--s-2);
        margin-bottom: var(--s-3);
    }

    /* Buttons */
    button {
        -webkit-user-select: none;
        user-select: none;
    }

    .btn-primary,
    .btn-hero-primary,
    #btn-login,
    #btn-register,
    #btn-tx,
    #btn-swap-action,
    #btn-save-settings,
    #btn-copy-recv {
        height: 52px !important;
        border-radius: 18px !important;
        border: none !important;
        color: white !important;
        font-weight: 750 !important;
        letter-spacing: -0.01em !important;
        background: linear-gradient(135deg, var(--m-accent-3) 0%, var(--m-accent-2) 55%, #4f46e5 100%) !important;
        box-shadow: 0 10px 26px rgba(99, 102, 241, 0.26) !important;
        transition: transform var(--ease), filter var(--ease);
    }

    .btn-primary:active,
    .btn-hero-primary:active,
    #btn-login:active,
    #btn-register:active,
    #btn-tx:active,
    #btn-save-settings:active,
    #btn-copy-recv:active {
        transform: scale(0.985);
        filter: brightness(1.03);
    }

    .btn-ghost,
    .btn-hero-secondary,
    #btn-qr-update,
    #btn-share,
    #modal-cancel,
    #qr-close {
        height: 52px !important;
        border-radius: 18px !important;
        border: 1px solid var(--m-border-2) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        color: var(--m-text) !important;
        font-weight: 650 !important;
        transition: transform var(--ease), background var(--ease), border-color var(--ease);
    }

    .btn-ghost:active,
    .btn-hero-secondary:active {
        transform: scale(0.985);
        background: rgba(255, 255, 255, 0.06) !important;
        border-color: rgba(255, 255, 255, 0.16) !important;
    }

    .btn-circle {
        width: 44px !important;
        height: 44px !important;
        border-radius: 999px !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        color: var(--m-text) !important;
        font-size: 1.1rem !important;
    }

    /* Quick actions */
    .quick-actions {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--s-2);
        justify-content: center;
        max-width: 320px;
        margin: 0 auto;
    }

    .qa-btn {
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        border-radius: var(--r-lg) !important;
        padding: 12px 10px !important;
        height: auto !important;
        display: grid !important;
        place-items: center !important;
        gap: 8px !important;
        color: var(--m-text) !important;
        transition: transform var(--ease), border-color var(--ease), background var(--ease);
    }

    .qa-btn:active {
        transform: scale(0.985);
        background: rgba(255, 255, 255, 0.06) !important;
    }

    .qa-ic {
        width: 44px;
        height: 44px;
        border-radius: 16px;
        display: grid;
        place-items: center;
        background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(99, 102, 241, 0.10));
        border: 1px solid rgba(167, 139, 250, 0.16);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    .qa-ic svg {
        width: 22px;
        height: 22px;
        color: var(--m-accent);
    }

    .qa-tx {
        font-size: 0.82rem;
        font-weight: 650;
        color: var(--m-text-2);
    }

    /* Forms */
    label {
        display: block !important;
        font-size: 0.78rem !important;
        font-weight: 750 !important;
        letter-spacing: 0.12em !important;
        text-transform: uppercase !important;
        color: var(--m-text-3) !important;
        margin-bottom: 10px !important;
    }

    .form-group {
        margin-bottom: var(--s-3) !important;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        width: 100% !important;
        height: 52px !important;
        border-radius: 18px !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(0, 0, 0, 0.28) !important;
        color: var(--m-text) !important;
        font-size: 16px !important;
        padding: 0 14px !important;
        transition: border-color var(--ease), box-shadow var(--ease), background var(--ease) !important;
        outline: none !important;
    }

    input::placeholder {
        color: rgba(246, 247, 251, 0.35) !important;
    }

    input:focus,
    select:focus,
    textarea:focus {
        border-color: rgba(167, 139, 250, 0.55) !important;
        box-shadow: 0 0 0 4px var(--m-glow) !important;
        background: rgba(0, 0, 0, 0.34) !important;
    }

    select {
        -webkit-appearance: none !important;
        appearance: none !important;
        padding-right: 46px !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='%23A1A1AA' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
        background-repeat: no-repeat !important;
        background-position: right 14px center !important;
    }

    .input-inline {
        display: flex !important;
        gap: 10px !important;
    }

    .input-inline input {
        flex: 1 !important;
    }

    .btn-icon {
        width: 48px !important;
        height: 52px !important;
        border-radius: 16px !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        color: var(--m-text-2) !important;
        display: grid !important;
        place-items: center !important;
    }

    .helper {
        margin-top: 10px;
        color: var(--m-text-3);
        font-size: 0.88rem;
        line-height: 1.35;
    }

    /* Chips */
    .quick-amounts {
        display: flex !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
        margin-top: 10px !important;
    }

    .chip {
        height: 36px !important;
        padding: 0 12px !important;
        border-radius: 999px !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        color: var(--m-text-2) !important;
        font-weight: 650 !important;
        font-size: 0.85rem !important;
    }

    .chip-strong {
        border-color: rgba(167, 139, 250, 0.30) !important;
        background: rgba(167, 139, 250, 0.10) !important;
        color: rgba(167, 139, 250, 0.95) !important;
    }

    /* Privacy container */
    .privacy-container {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 14px !important;
        margin-top: 12px !important;
        border-radius: var(--r-lg) !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    .privacy-title {
        font-weight: 750 !important;
        color: var(--m-text) !important;
    }

    .privacy-subtitle {
        color: var(--m-text-3) !important;
        font-size: 0.82rem !important;
    }

    .privacy-switch {
        width: 44px;
        height: 26px;
        position: relative;
        flex-shrink: 0;
    }

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

    /* SCOPED slider - only inside .switch or .privacy-switch */
    .switch .slider,
    .privacy-switch .slider {
        position: absolute !important;
        inset: 0 !important;
        border-radius: 999px !important;
        background: rgba(148, 163, 184, 0.25) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
        transition: all var(--ease) !important;
    }

    /* Fixed size for switch to prevent stretching */
    .switch {
        position: relative !important;
        width: 44px !important;
        height: 26px !important;
        display: inline-block !important;
        flex: 0 0 auto !important;
        align-self: center !important;
    }

    /* Scoped to .switch to prevent stray dots */
    .switch .slider:before,
    .privacy-switch .slider:before {
        content: "";
        position: absolute;
        left: 3px;
        top: 3px;
        width: 18px;
        height: 18px;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
        transition: all var(--ease);
    }

    /* Scoped checked state */
    .switch input:checked+.slider,
    .privacy-switch input:checked+.slider {
        background: linear-gradient(135deg, var(--m-accent-3), var(--m-accent-2)) !important;
        border-color: rgba(167, 139, 250, 0.35) !important;
    }

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

    /* Chart */
    .chart-container {
        height: 170px !important;
        margin: 0 0 var(--s-3) 0 !important;
        border-radius: var(--r-lg);
        overflow: hidden;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Token list */
    .portfolio-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .portfolio-table thead {
        display: none !important;
    }

    .portfolio-table tbody {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .portfolio-table tr {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 6px 12px !important;
        align-items: center !important;
        padding: 12px 14px !important;
        border-radius: var(--r-lg) !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.04) !important;
    }

    .portfolio-table td {
        border: none !important;
        padding: 0 !important;
    }

    .portfolio-table td:nth-child(1) {
        font-weight: 800 !important;
        color: var(--m-text) !important;
        letter-spacing: -0.01em;
    }

    .portfolio-table td:nth-child(2) {
        grid-column: 1 / 2;
        color: var(--m-text-3) !important;
        font-weight: 600 !important;
        font-size: 0.88rem !important;
    }

    .portfolio-table td:nth-child(3) {
        grid-column: 2 / 3;
        grid-row: 1 / span 2;
        justify-self: end;
        font-weight: 850 !important;
        color: var(--m-text) !important;
    }

    /* QR */
    .qr-wrap {
        display: grid !important;
        place-items: center !important;
        margin: var(--s-4) 0 !important;
    }

    .qr-box,
    #qrcode {
        background: #fff !important;
        padding: 14px !important;
        border-radius: var(--r-xl) !important;
        box-shadow: var(--shadow-2) !important;
    }

    #qrcode img {
        width: 200px !important;
        height: 200px !important;
        display: block !important;
    }

    /* Swap Redesign (Premium) */
    .swap-container {
        display: flex;
        flex-direction: column;
        gap: 4px;
        /* Tight gap, flip button covers seam */
        position: relative;
        margin-top: 10px;
    }

    .swap-panel {
        background: rgba(255, 255, 255, 0.05);
        /* Lighter glass */
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        transition: background 0.2s ease;
    }

    .swap-panel:hover,
    .swap-panel:focus-within {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .swap-label {
        font-size: 0.85rem;
        color: var(--m-text-3);
        font-weight: 500;
    }

    .swap-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .swap-input {
        background: transparent;
        border: none;
        color: #fff;
        font-size: 2.5rem;
        /* Big numbers */
        font-weight: 600;
        width: 100%;
        padding: 0;
        outline: none;
        font-family: inherit;
    }

    .swap-input:disabled {
        color: rgba(255, 255, 255, 0.5);
    }

    .swap-input::placeholder {
        color: rgba(255, 255, 255, 0.2);
    }

    /* Flip Button */
    .swap-flip-wrapper {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        /* Ensure it sits on top of the tight gap */
        pointer-events: none;
        /* Wrapper shouldn't block, button inside should */
    }

    .swap-flip-btn {
        width: 44px;
        /* Slightly larger for easier tap */
        height: 44px;
        border-radius: 50%;
        background: #1e1f26;
        /* Dark background to stand out against glass */
        border: 4px solid var(--b-bg);
        /* Match app bg to create "cutout" effect */
        color: var(--accent);
        display: grid;
        place-items: center;
        cursor: pointer;
        transition: transform 0.2s ease;
        pointer-events: auto;
        /* Re-enable pointer events */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        /* Subtle shadow for depth */
    }

    .swap-flip-btn:active {
        transform: rotate(180deg) scale(0.9);
    }

    .swap-flip-btn svg {
        width: 22px;
        height: 22px;
        display: block;
        margin: auto;
    }

    /* Generic Select Override for Swap Pills if we use native select */
    .swap-select-wrapper {
        position: relative;
        min-width: 110px;
        height: 40px;
    }

    /* Ensure native select looks okay on top of glass */
    .swap-select-wrapper select {
        width: 100%;
        height: 100%;
        appearance: none;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        /* Pill shape */
        color: white;
        padding: 0 16px;
        padding-right: 32px;
        /* Space for chevron */
        font-weight: 600;
        font-size: 1rem;
    }

    .swap-select-chevron {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        color: rgba(255, 255, 255, 0.6);
    }

    /* Info Data */
    .swap-info {
        margin-top: 12px;
        padding: 0 12px;
        display: flex;
        justify-content: space-between;
        font-size: 0.85rem;
        color: var(--m-text-3);
    }

    .quote-box {
        /* Keep old class but override if needed - generally redundant with new design but good for calc details */
        display: none;
        /* Hide old box style */
    }

    /* Alerts */
    .alert {
        padding: 14px !important;
        border-radius: var(--r-lg) !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(255, 255, 255, 0.04) !important;
        color: var(--m-text-2) !important;
        margin-top: var(--s-2) !important;
    }

    .alert.ok {
        border-color: rgba(74, 222, 128, 0.25) !important;
        background: rgba(74, 222, 128, 0.08) !important;
        color: rgba(74, 222, 128, 0.95) !important;
    }

    .alert.err,
    .toast-error {
        border-color: rgba(248, 113, 113, 0.25) !important;
        background: rgba(248, 113, 113, 0.08) !important;
        color: rgba(248, 113, 113, 0.95) !important;
    }

    /* Footer */
    .app-footer {
        margin: var(--s-5) 0 var(--s-3);
        text-align: center;
        color: rgba(246, 247, 251, 0.32);
        font-size: 0.75rem;
        letter-spacing: 0.12em;
        text-transform: uppercase;
    }

    /* Bottom Nav */
    .bottom-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: var(--nav-h) !important;
        background: rgba(10, 10, 16, 0.82) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        backdrop-filter: blur(22px) saturate(160%) !important;
        -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
        box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.50) !important;
        padding-bottom: var(--safe-b) !important;
        z-index: 999999 !important;
    }

    .nav-scroll-container {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 24px !important;
        height: var(--nav-h) !important;
        padding: 0 20px !important;
        overflow-x: visible !important;
        overflow-y: hidden !important;
    }

    .nav-scroll-container::-webkit-scrollbar {
        display: none !important;
    }

    .nav-item {
        flex: 0 0 auto !important;
        width: 56px !important;
        height: 56px !important;
        border-radius: 14px !important;
        border: 1px solid transparent !important;
        background: transparent !important;
        color: rgba(246, 247, 251, 0.50) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        padding: 6px !important;
        transition: transform var(--ease), background var(--ease), color var(--ease), border-color var(--ease);
    }

    .nav-item.active {
        color: rgba(167, 139, 250, 0.98) !important;
        background: rgba(167, 139, 250, 0.12) !important;
        border-color: rgba(167, 139, 250, 0.20) !important;
        transform: translateY(-2px);
    }

    /* Red Logout Button */
    #tab-logout-mobile {
        color: #ef4444 !important;
    }

    #tab-logout-mobile.active {
        background: rgba(239, 68, 68, 0.12) !important;
        color: #ef4444 !important;
        border-color: rgba(239, 68, 68, 0.20) !important;
    }

    .nav-icon {
        width: 24px !important;
        height: 24px !important;
        flex-shrink: 0 !important;
    }

    .nav-label {
        font-size: 10px !important;
        font-weight: 650 !important;
        white-space: nowrap !important;
        text-align: center !important;
        list-style: none !important;
    }

    /* Remove any pseudo-element dots/lines from nav items */
    .nav-item::before,
    .nav-item::after,
    .nav-btn::before,
    .nav-btn::after,
    .nav-label::before,
    .nav-label::after {
        display: none !important;
        content: none !important;
    }

    /* Modals -> bottom sheet */
    .modal {
        align-items: flex-end !important;
    }

    /* Bottom-sheet ONLY for .modal containers */
    .modal .modal-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: var(--r-xl) var(--r-xl) 0 0 !important;
        padding: var(--s-5) var(--s-4) !important;
        padding-bottom: calc(var(--s-5) + var(--safe-b)) !important;
        background: linear-gradient(180deg, rgba(18, 18, 26, 0.92) 0%, rgba(12, 12, 18, 0.96) 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
        backdrop-filter: blur(24px) saturate(170%) !important;
        transform: translateY(100%) !important;
        transition: transform 0.32s cubic-bezier(0.2, 0.9, 0.2, 1) !important;
    }

    .modal:not(.hidden) .modal-content {
        transform: translateY(0) !important;
    }

    /* Auth on mobile */
    .auth-container {
        position: fixed !important;
        inset: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: var(--s-3) !important;
        background: #07070b !important;
        /* Solid dark background, no gradient overlay */
        z-index: 10000 !important;
    }

    .login-card {
        width: 100% !important;
        max-width: 390px !important;
        border-radius: var(--r-xl) !important;
        background: linear-gradient(180deg, rgba(18, 18, 26, 0.88), rgba(10, 10, 16, 0.92)) !important;
        border: 1px solid rgba(255, 255, 255, 0.10) !important;
        box-shadow: var(--shadow-2) !important;
        padding: var(--s-5) !important;
    }

    .login-brand-side {
        display: none !important;
    }

    .form-header {
        text-align: center !important;
        margin-bottom: var(--s-4) !important;
    }

    .form-title {
        font-size: 1.55rem !important;
        font-weight: 850 !important;
        color: var(--m-text) !important;
        margin: 0 0 8px 0 !important;
    }

    .form-subtitle {
        color: var(--m-text-3) !important;
        margin: 0 !important;
    }

    .input-wrapper {
        height: 56px !important;
        border-radius: 18px !important;
        border: 1px solid var(--m-border) !important;
        background: rgba(0, 0, 0, 0.28) !important;
        padding: 0 14px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .input-wrapper input {
        height: 56px !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        outline: none !important;
    }

    .input-wrapper:focus-within {
        border-color: rgba(167, 139, 250, 0.55) !important;
        box-shadow: 0 0 0 4px var(--m-glow) !important;
    }

    /* Utility */
    .hidden {
        display: none !important;
    }
}

/* Small phones */
@media (max-width: 380px) {
    :root {
        --s-3: 14px;
    }

    .hero-balance {
        font-size: 1.85rem !important;
    }

    #qrcode img {
        width: 170px !important;
        height: 170px !important;
    }

    .quick-actions {
        grid-template-columns: repeat(3, 1fr);
        max-width: 280px;
    }

}


/* ─────────────────────────────────────────────────────────────
   GLOBAL AUTH (Desktop & Mobile) — Brand Glassmorphism
   ───────────────────────────────────────────────────────────── */

/* CRITICAL: Override hidden state when logged in - MUST WIN specificity */
section#auth.login.hidden,
section#auth.hidden,
#auth.login.hidden,
#auth.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

#auth.login {
    position: fixed !important;
    inset: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    display: grid;
    /* NO !important - allows .hidden to override */
    place-items: center !important;
    z-index: 10000 !important;
    background: #07070b !important;
    /* Brand Dark */
    padding: 20px !important;
}

#auth.login .login__bg-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Brand Gradient: Purple to Deep Dark */
    background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, 0.25), rgba(7, 7, 11, 0.95) 70%) !important;
    z-index: 0;
}

#auth.login .login__form {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background-color: rgba(18, 18, 26, 0.4) !important;
    /* Darker glass */
    border: 2px solid rgba(167, 139, 250, 0.15) !important;
    /* Subtle purple border */
    padding: 2.5rem 2rem;
    color: #fff;
    border-radius: 2rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#auth.login .login__title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem;
    width: 100%;
}

#auth.login .login__subtitle {
    text-align: center;
    font-size: 0.95rem;
    color: rgba(246, 247, 251, 0.6) !important;
    margin-bottom: 2.5rem;
    width: 100%;
}

#auth.login .login__inputs {
    width: 100%;
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Input Box - Pill Shape */
#auth.login .login__box {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 40px;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 999px;
    height: 56px;
    padding: 0 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#auth.login .login__box:focus-within {
    border-color: #a78bfa !important;
    /* Brand Purple */
    background: rgba(167, 139, 250, 0.05);
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

#auth.login .login__input {
    width: 100%;
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    font-size: 1rem;
    font-weight: 500;
    height: 100%;
}

#auth.login .login__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#auth.login .login__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

#auth.login .login__box:focus-within .login__icon {
    color: #a78bfa;
}

#auth.login .login__icon svg {
    width: 22px;
    height: 22px;
}

/* Primary Button - Brand Gradient Pill */
#auth.login .login__button {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%) !important;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    border: none !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

#auth.login .login__button:active {
    transform: scale(0.98);
}

/* Secondary/Link Styles */
#auth.login .login__register {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

#auth.login .login__resister-btn {
    background: none !important;
    border: none !important;
    color: #a78bfa !important;
    /* Accent Color */
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    padding: 0 5px;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

#auth.login .login__resister-btn:hover {
    opacity: 0.8;
}

#auth.login .login__check {
    margin-top: 1.5rem;
    text-align: center;
}

#auth.login .login__forgot {
    background: none !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

#auth.login .login__forgot:hover {
    color: #fff !important;
}

#auth.login .alert {
    width: 100%;
    margin-top: 15px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    padding: 12px;
    border-radius: 16px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    backdrop-filter: blur(10px);
}

#auth.login .alert:not(:empty) {
    display: block;
}

/* Network Display Premium - Added by Agent */
.network-display-label {
    margin-top: var(--s-4);
    text-align: center;
    display: flex;
    justify-content: center;
}

.network-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: var(--r-full);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.crypto-symbol {
    color: var(--m-accent);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.network-name {
    color: var(--m-text-2);
    font-size: 0.9rem;
    font-weight: 500;
}

.qr-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 20px 0 !important;
}

#qrcode {
    margin: 0 auto !important;
    position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   ACCOUNTS MODALS - Phantom-style account management
   ═══════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    /* Bottom sheet on mobile */
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s var(--ease);
}

.modal-backdrop-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: none;
}

.accounts-modal-content,
.add-account-modal-content,
.edit-account-modal-content,
.import-key-modal-content,
.watch-address-modal-content {
    position: relative;
    z-index: 2;
    /* Above backdrop */
    width: 100%;
    max-width: 500px;
    /* Limit width on desktop */
    margin: 0 auto;
    background: var(--m-bg);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding: 0;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-2);
    overflow-y: auto;
    animation: slideUp 0.3s var(--ease);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.accounts-modal-content .modal-header,
.add-account-modal-content .modal-header,
.edit-account-modal-content .modal-header,
.import-key-modal-content .modal-header,
.watch-address-modal-content .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--m-border);
}

.accounts-modal-content .modal-header h2,
.add-account-modal-content .modal-header h2,
.edit-account-modal-content .modal-header h2,
.import-key-modal-content .modal-header h2,
.watch-address-modal-content .modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--m-text);
    margin: 0;
    flex: 1;
    text-align: center;
}

.modal-close-btn,
.modal-back-btn,
.modal-settings-btn {
    background: none;
    border: none;
    color: var(--m-text);
    padding: 8px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.modal-close-btn:hover,
.modal-back-btn:hover,
.modal-settings-btn:hover {
    opacity: 1;
}

.modal-close-btn {
    font-size: 24px;
    line-height: 1;
}

/* Accounts List */
.accounts-list {
    padding: 12px 16px;
    min-height: 80px;
    flex: 1;
    overflow-y: auto;
}

/* Ensure add button is always visible at bottom */
.accounts-modal-content .btn-add-account {
    flex-shrink: 0;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--m-accent);
    border-radius: var(--r-xl);
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.account-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-1);
}

.account-item.active {
    background: var(--m-accent);
}

.account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
}

.account-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--m-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    color: var(--m-text);
    margin: 24px auto;
}

.account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-name {
    font-weight: 600;
    color: #000;
    font-size: 1rem;
}

.account-active-badge {
    font-size: 0.75rem;
    color: rgba(0, 0, 0, 0.6);
}

.account-edit-btn {
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s;
}

.account-edit-btn:hover {
    color: rgba(0, 0, 0, 0.8);
}

/* Add Account Button */
.btn-add-account {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 32px);
    margin: 16px;
    padding: 14px 20px;
    background: var(--m-accent);
    color: #000;
    border: none;
    border-radius: var(--r-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-add-account:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-1);
}

/* Add Account Options */
.add-account-options {
    padding: 16px;
}

.add-account-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-border);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, transform 0.2s;
}

.add-account-option:hover {
    background: var(--m-surface-3);
    transform: translateX(4px);
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--r-sm);
    background: var(--m-surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--m-text);
}

.option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-text strong {
    color: var(--m-text);
    font-size: 0.95rem;
}

.option-text span {
    color: var(--m-text-3);
    font-size: 0.8rem;
}

/* Edit Account */
.edit-account-options {
    padding: 0 16px 16px;
}

.edit-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-border);
    border-radius: var(--r-md);
    margin-bottom: 12px;
}

.edit-option span:first-child {
    color: var(--m-text);
    font-weight: 500;
}

.edit-option span:last-child {
    color: var(--m-text-3);
}

.edit-option.readonly {
    opacity: 0.7;
}

.edit-input {
    background: transparent;
    border: none;
    color: var(--m-text-3);
    text-align: right;
    font-size: 0.95rem;
    outline: none;
    max-width: 150px;
}

/* Import Form */
.import-form {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-field {
    width: 100%;
    padding: 14px 16px;
    background: var(--m-surface-2);
    border: 1px solid var(--m-border);
    border-radius: var(--r-md);
    color: var(--m-text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-field:focus {
    border-color: var(--m-accent);
}

.input-field::placeholder {
    color: var(--m-text-3);
}

.textarea-field {
    resize: vertical;
    min-height: 80px;
    font-family: monospace;
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: var(--m-accent);
    color: #000;
    border: none;
    border-radius: var(--r-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 16px;
    width: calc(100% - 32px);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-1);
}

.btn-danger {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 14px 20px;
    background: transparent;
    color: var(--m-danger);
    border: 1px solid var(--m-danger);
    border-radius: var(--r-xl);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* ═══════════════════════════════════════════════════════════════
   CRITICAL: Auth overlay hide rules - MUST BE AT END OF FILE
   These rules MUST win over #auth.login { display: grid }
   ═══════════════════════════════════════════════════════════════ */
#auth.hidden,
#auth.login.hidden,
section#auth.hidden,
section#auth.login.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}


/* ─────────── NEW PREMIUM LOGIN SCREEN ─────────── */
.login-screen {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    background: radial-gradient(circle at 50% 30%, rgba(79, 70, 229, 0.15) 0%, rgba(7, 7, 11, 0) 70%),
        var(--m-bg) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: var(--safe-b) var(--s-3) !important;
    padding-top: max(env(safe-area-inset-top), 60px) !important;
    overflow-y: auto !important;
}

.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo-icon {
    width: 72px !important;
    height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    margin: 0 auto 1.5rem !important;
    background: linear-gradient(135deg, var(--m-accent-2), var(--m-accent-3)) !important;
    border-radius: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.3) !important;
    color: white !important;
}

.auth-logo-icon svg {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

.login-header h1 {
    font-size: 2.4rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    background: linear-gradient(to right, #fff, #a78bfa) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    margin-bottom: 0.5rem !important;
    text-shadow: 0 0 30px rgba(167, 139, 250, 0.3) !important;
}

.login-header p {
    color: var(--m-text-3) !important;
    font-size: 1.05rem !important;
    max-width: 280px;
    margin: 0 auto;
}

/* Auth Toggle */
.auth-toggle-wrapper {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--m-border) !important;
    border-radius: 18px !important;
    padding: 4px !important;
    display: flex !important;
    margin-bottom: 2rem !important;
    position: relative !important;
    height: 56px !important;
}

.auth-toggle-btn {
    flex: 1;
    background: transparent !important;
    border: none !important;
    color: var(--m-text-3) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    z-index: 2 !important;
    transition: color 0.3s ease !important;
    border-radius: 14px !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.auth-toggle-btn:hover {
    background: transparent !important;
    transform: none !important;
}

.auth-toggle-btn.active {
    color: white !important;
}

.auth-toggle-glider {
    position: absolute !important;
    top: 4px !important;
    left: 4px !important;
    bottom: 4px !important;
    width: calc(50% - 4px) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
    z-index: 1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Form Elements */
.input-group-premium {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group-premium input {
    height: 64px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--m-border) !important;
    border-radius: 22px !important;
    padding-left: 64px !important;
    font-size: 1.15rem !important;
    transition: all 0.3s ease !important;
    color: white !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

#user {
    padding-left: 70px !important;
    background-position: 70px center !important;
    /* Just in case */
}

.input-group-premium input:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--m-accent) !important;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15) !important;
}

.input-icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--m-text-3);
    pointer-events: none;
    z-index: 10;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-icon-left svg {
    width: 24px;
    height: 24px;
}

.btn-premium-large {
    width: 100%;
    height: 64px !important;
    border-radius: 22px !important;
    font-size: 1.15rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-premium-large .icon-fingerprint {
    width: 24px;
    height: 24px;
}

.btn-secondary-accent {
    background: white !important;
    color: black !important;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important;
}

.info-card-biometric {
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.15);
    border-radius: 22px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.info-card-biometric svg {
    color: #4ade80;
    width: 32px;
    height: 32px;
}

.info-card-biometric p {
    margin: 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.auth-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 1rem;
}

.text-link {
    background: none;
    border: none;
    color: var(--m-text-3);
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0;
    width: auto !important;
    display: inline-block !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.text-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.hidden-visual {
    display: none !important;
}

/* Biometric Icon Animation */
@keyframes pulse-bio {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(1);
        opacity: 0.8;
    }
}

.icon-fingerprint {
    animation: pulse-bio 3s infinite ease-in-out;
}

/* --- ASSET WIDGET (Replaces Chart) --- */
.asset-list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.asset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.asset-row:active {
    background: rgba(255, 255, 255, 0.08);
    transform: scale(0.98);
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.asset-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asset-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    letter-spacing: 0.3px;
}

.asset-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.asset-value {
    text-align: right;
}

.value-main {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

/* Ensure chart container handles height properly */
.chart-container {
    height: auto !important;
    min-height: 120px;
    background: transparent !important;
    border: none !important;
}
/* --- AUTH GUIDANCE (Smart Default) --- */
@keyframes pulse-guide {
    0% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(167, 139, 250, 0); }
    100% { box-shadow: 0 0 0 0 rgba(167, 139, 250, 0); }
}

.pulse-guide {
    animation: pulse-guide 2s infinite;
    position: relative;
    z-index: 5;
    background: rgba(167, 139, 250, 0.1) !important;
}

.auth-tooltip-helper {
    text-align: center;
    color: var(--m-accent);
    font-size: 0.9rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
    padding: 8px 16px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 12px;
    display: inline-block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInUp 0.5s ease;
    transition: opacity 0.5s;
    pointer-events: none;
}

.auth-tooltip-helper::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 25%; /* Point to Register tab roughly */
    width: 10px;
    height: 10px;
    background: inherit;
    border-top: 1px solid rgba(167, 139, 250, 0.2);
    border-left: 1px solid rgba(167, 139, 250, 0.2);
    transform: rotate(45deg);
    background-color: #0d0d12; /* Match bg mainly */
}
