/* =====================================================
   1SEN WALLET CSS
   Notes:
   - Theme color follows 1SEN logo: red, gold, silver.
   - Use variables below for light/dark mode.
   - Reuse .wallet-panel / .asset-card / .wallet-input / .btn-main when possible.
   - Page-specific CSS should only handle layout differences.
===================================================== */

:root {
    --bg: #fff8f8;
    --card: rgba(255, 255, 255, .88);
    --soft: rgba(255, 245, 245, .94);
    --text: #2a1515;
    --muted: #7c5a5a;
    --line: rgba(142, 0, 0, .10);

    --primary: #D50000;
    --primary-rgb: 213, 0, 0;
    --primary-dark: #8E0000;
    --primary-soft: #FF4D4D;

    --accent: #FFC400;
    --accent-rgb: 255, 196, 0;
    --accent-soft: #FFD95C;

    --silver: #E5E7EB;
    --silver-dark: #9CA3AF;

    --danger: #ff4b5c;
    --success: #18b368;

    --shadow: 0 20px 50px rgba(150, 0, 0, .12);
    --glow: 0 0 22px rgba(213, 0, 0, .22), 0 0 46px rgba(255, 196, 0, .16);
}

[data-theme="dark"] {
    --bg: #100708;
    --card: rgba(24, 9, 10, .92);
    --soft: rgba(32, 10, 12, .88);
    --text: #ffffff;
    --muted: #c9b2b2;
    --line: rgba(255, 196, 0, .12);

    --primary: #FF3030;
    --primary-rgb: 255, 48, 48;
    --primary-dark: #730000;
    --primary-soft: #FF6B6B;

    --accent: #FFC400;
    --accent-rgb: 255, 196, 0;
    --accent-soft: #FFD95C;

    --silver: #E5E7EB;
    --silver-dark: #9CA3AF;

    --danger: #ff6677;
    --success: #39d98a;

    --shadow: 0 25px 60px rgba(0, 0, 0, .45);
    --glow: 0 0 24px rgba(255, 48, 48, .28), 0 0 55px rgba(255, 196, 0, .18);
}

/* Base */
* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), .18), transparent 31%),
        radial-gradient(circle at bottom right, rgba(var(--accent-rgb), .14), transparent 35%),
        linear-gradient(180deg, #fffafa 0%, var(--bg) 100%);
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(var(--primary-rgb), .20), transparent 31%),
        radial-gradient(circle at bottom right, rgba(var(--accent-rgb), .16), transparent 36%),
        linear-gradient(180deg, #100708 0%, #1b0d0f 100%);
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
}

/* Layout */
.wallet-app {
    position: relative;
    max-width: 520px;
    min-height: 100vh;
    margin: auto;
    padding: 8px 16px 98px;
}

.wallet-screen {
    min-height: 100vh;
    padding: 24px;
}

/* Shared Glass Cards */
.wallet-card,
.asset-card,
.wallet-panel,
.wallet-token-card,
.wallet-balance-card,
.browser-search-card,
.swap-card,
.receive-modal,
.wallet-modal {
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .66));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

[data-theme="dark"] .wallet-card,
[data-theme="dark"] .asset-card,
[data-theme="dark"] .wallet-panel,
[data-theme="dark"] .wallet-token-card,
[data-theme="dark"] .wallet-balance-card,
[data-theme="dark"] .browser-search-card,
[data-theme="dark"] .swap-card,
[data-theme="dark"] .receive-modal,
[data-theme="dark"] .wallet-modal {
    background: linear-gradient(180deg, rgba(26, 8, 9, .94), rgba(14, 5, 6, .90));
    border-color: rgba(255, 255, 255, .08);
}

.wallet-card {
    width: 100%;
    max-width: 430px;
    padding: 26px;
    border-radius: 30px;
}

.asset-card,
.wallet-panel,
.wallet-token-card,
.wallet-balance-card {
    padding: 16px;
    border-radius: 22px;
}

.browser-search-card,
.swap-card {
    padding: 16px;
    border-radius: 24px;
}

.swap-card {
    border-radius: 26px;
}

.wallet-card h1,
.wallet-card h2,
.wallet-card h3,
.wallet-card h4,
.wallet-card h5 {
    color: var(--text);
}

.wallet-card .text-muted {
    color: var(--muted) !important;
}

/* Header */
.wallet-static-header {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 18px 16px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wallet-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.wallet-static-header span,
.wallet-topbar span,
.back-link {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}

.wallet-static-header h4,
.wallet-topbar h4 {
    margin: 2px 0 0;
    color: var(--text);
    font-weight: 900;
    letter-spacing: -.4px;
}

.top-actions,
.section-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-actions button,
.theme-btn,
.icon-btn,
.action-btn {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow);
}

.action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(var(--primary-rgb), .12), rgba(var(--accent-rgb), .05));
    border-color: rgba(var(--accent-rgb), .16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .12);
}

.action-btn i {
    font-size: 15px;
    opacity: .9;
}

.action-btn:hover {
    color: var(--accent);
    border-color: rgba(var(--accent-rgb), .32);
    box-shadow: var(--glow);
}

.action-btn:active {
    transform: scale(.95);
}

.action-btn:focus {
    outline: none;
}

.action-btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .25);
}

/* Logo */
.wallet-logo {
    width: 82px;
    height: 82px;
    margin: auto;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    font-size: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: var(--glow);
}

.wallet-logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

/* Hero */
.hero-wallet,
.browser-hero,
.swap-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 18% 8%, rgba(var(--accent-rgb), .28), transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(var(--primary-rgb), .20), transparent 32%),
        linear-gradient(135deg, #3b0000 0%, #920000 52%, #d50000 100%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: var(--shadow), var(--glow);
}

.hero-wallet {
    padding: 22px;
    border-radius: 30px;
}

.browser-hero,
.swap-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-radius: 28px;
}

.swap-hero {
    justify-content: space-between;
}

.hero-wallet::before,
.browser-hero::before,
.swap-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, .14) 45%, transparent 70%);
    transform: translateX(-120%);
    animation: oneSenShine 5.6s infinite;
}

.hero-wallet>*,
.browser-hero>*,
.swap-hero>* {
    position: relative;
    z-index: 1;
}

@keyframes oneSenShine {

    0%,
    58% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.hero-wallet small,
.browser-hero p,
.swap-hero p {
    color: rgba(255, 255, 255, .72);
}

.hero-wallet h1 {
    margin: 4px 0 18px;
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -1px;
}

.browser-hero h4,
.swap-hero h4 {
    margin: 0 0 4px;
    color: #fff;
    font-weight: 900;
}

.browser-hero p,
.swap-hero p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.hero-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .66);
}

.hero-balance {
    color: #fff;
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1.5px;
}

.hero-sub-balance {
    margin-top: 7px;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    font-weight: 600;
}

.hero-glow {
    display: none;
}

.network-pill {
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .08);
}

.browser-hero-icon,
.swap-hero-icon {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    font-size: 24px;
}

/* Shared Icon Boxes */
.quick-actions span,
.browser-hero-icon,
.swap-hero-icon,
.coin-badge,
.token-icon,
.mini-dapp-icon,
.detail-coin-badge {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), .28), rgba(var(--accent-rgb), .20));
    border: 1px solid rgba(var(--accent-rgb), .24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 0 20px rgba(var(--accent-rgb), .14);
}

/* Address */
.wallet-address-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    word-break: break-all;
    color: rgba(255, 255, 255, .94);
    font-size: 13px;
    font-weight: 600;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .06);
}

.wallet-address-label {
    margin-bottom: 6px;
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.wallet-address-text {
    color: rgba(255, 255, 255, .95);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
}

.copy-address-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: rgba(255, 255, 255, .10);
}

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

.quick-actions button,
.quick-actions a,
.mini-dapp-card,
.dapp-card,
.quick-dapp-list button {
    position: relative;
    overflow: hidden;
    color: var(--text);
    background: linear-gradient(180deg, rgba(255, 255, 255, .90), rgba(255, 248, 246, .76));
    border: 1px solid rgba(var(--primary-rgb), .14);
    box-shadow: 0 12px 28px rgba(120, 0, 0, .07), inset 0 1px 0 rgba(255, 255, 255, .72);
}

[data-theme="dark"] .quick-actions button,
[data-theme="dark"] .quick-actions a,
[data-theme="dark"] .mini-dapp-card,
[data-theme="dark"] .dapp-card,
[data-theme="dark"] .quick-dapp-list button {
    background: linear-gradient(180deg, rgba(28, 9, 10, .88), rgba(14, 5, 6, .82));
    border-color: rgba(var(--accent-rgb), .14);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.quick-actions button,
.quick-actions a {
    min-height: 72px;
    border-radius: 22px;
    text-decoration: none;
    display: grid;
    place-items: center;
    align-content: center;
    font-size: 13px;
    font-weight: 700;
}

.quick-actions span {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    margin-bottom: 6px;
    border-radius: 14px;
    color: #fff;
}

.mini-dapp-card::after,
.quick-actions button::after,
.quick-actions a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 1px;
    opacity: .58;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.mini-dapp-card:hover,
.quick-actions button:hover,
.quick-actions a:hover,
.asset-click-card:hover,
.dapp-card:hover,
.quick-dapp-list button:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--accent-rgb), .42);
    box-shadow: var(--shadow), var(--glow);
}

/* Section Head */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-head h5,
.section-head h6 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 800;
}

.default-pill,
.dapp-info small,
.section-head span {
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    background: rgba(var(--accent-rgb), .10);
    border: 1px solid rgba(var(--accent-rgb), .18);
}

[data-theme="dark"] .default-pill,
[data-theme="dark"] .dapp-info small,
[data-theme="dark"] .section-head span {
    color: var(--accent);
}

/* Asset / Token Rows */
.asset-click-card {
    display: block;
    margin-bottom: 12px;
    text-decoration: none;
}

.asset-click-card:active,
.asset-clickable:active {
    transform: scale(.985);
}

.asset-clickable {
    cursor: pointer;
}

.asset-row,
.token-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 0 !important;
}

.asset-left,
.token-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.asset-right,
.token-right {
    text-align: right;
    flex: 0 0 auto;
}

.coin-badge,
.token-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.coin-badge img,
.token-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.asset-left strong,
.asset-right strong,
.token-left strong,
.token-right strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.1;
}

.asset-left small,
.asset-right small,
.token-left small,
.token-left span,
.token-right span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

/* Token Detail */
.token-balance-box {
    padding: 18px 14px;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.token-balance-box small,
.token-balance-box span {
    color: rgba(255, 255, 255, .68);
}

.token-balance-box h1 {
    margin: 8px 0 0;
    color: #fff;
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -1px;
}

.token-balance-box span {
    display: block;
    margin-top: 2px;
    font-size: 13px;
}

/* Forms */
.browser-search-box,
.swap-box,
.swap-info,
.history-filter,
.segmented,
.wallet-input,
.receive-address,
.receive-address-input,
.browser-url,
.browser-nav-btn {
    background: var(--soft);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.wallet-input {
    min-height: 50px;
    border-radius: 18px;
    color: var(--text);
}

.wallet-input::placeholder,
.swap-input-row input::placeholder {
    color: var(--muted);
}

.wallet-input:focus,
.browser-search-box:focus-within,
.receive-address-input:focus {
    color: var(--text);
    background: var(--soft);
    border-color: rgba(var(--accent-rgb), .56);
    box-shadow: 0 0 0 .2rem rgba(var(--primary-rgb), .13), 0 0 22px rgba(var(--accent-rgb), .12);
}

.form-label {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

/* Buttons */
.btn-main,
.btn-wallet-primary,
.browser-search-box button,
.add-mini-btn,
.mini-btn,
.history-filter button.active,
.segmented button.active,
.swap-switch-btn,
.btn-warning {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), .26);
}

.btn-main,
.btn-wallet-primary {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    font-weight: 900;
}

.btn-main:hover,
.btn-wallet-primary:hover,
.browser-search-box button:hover,
.add-mini-btn:hover,
.mini-btn:hover,
.btn-warning:hover,
.browser-nav-btn:hover {
    color: #fff;
    filter: brightness(1.08);
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), .26);
}

.add-mini-btn,
.delete-mini-btn,
.mini-btn {
    border: 0;
    border-radius: 999px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 900;
}

.delete-mini-btn,
.delete-token-btn,
.alert-danger {
    color: var(--danger);
    background: rgba(255, 85, 119, .12);
    border: 1px solid rgba(255, 85, 119, .18);
}

.delete-token-btn {
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 800;
}

.success-box {
    margin-bottom: 14px;
    padding: 12px 14px;
    color: var(--success);
    font-weight: 800;
    border-radius: 18px;
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .18);
}

/* History / Segmented */
.history-filter,
.segmented {
    display: grid;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.history-filter {
    grid-template-columns: repeat(3, 1fr);
}

.segmented {
    grid-template-columns: 1fr 1fr;
}

.history-filter button,
.segmented button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
}

.history-filter button {
    border-radius: 14px;
    padding: 10px 8px;
    font-size: 13px;
}

.segmented button {
    border-radius: 16px;
    padding: 11px;
}

.history-filter button.active,
.segmented button.active {
    color: #fff;
}

.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.history-row:last-child {
    border-bottom: 0;
}

.empty-history {
    min-height: 180px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    text-align: center;
    color: var(--muted);
}

.empty-history i {
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 34px;
}

.empty-history strong {
    color: var(--text);
}

.empty-history small {
    color: var(--muted);
}

/* Bottom Nav */
.wallet-bottom-nav,
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 80;
    width: calc(100% - 28px);
    max-width: 492px;
    height: 72px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: hidden;
    transform: translateX(-50%);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 248, 246, .72));
    border: 1px solid var(--line);
    box-shadow: 0 18px 45px rgba(150, 0, 0, .14);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

[data-theme="dark"] .wallet-bottom-nav,
[data-theme="dark"] .bottom-nav {
    background: linear-gradient(180deg, rgba(26, 8, 9, .94), rgba(14, 5, 6, .90));
    border-color: rgba(255, 255, 255, .08);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .46);
}

.wallet-bottom-nav a,
.wallet-bottom-nav button,
.bottom-nav a,
.bottom-nav button {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    display: grid;
    place-items: center;
    align-content: center;
    font-size: 12px;
    font-weight: 800;
}

.wallet-bottom-nav span,
.bottom-nav span {
    font-size: 22px;
    line-height: 1;
}

.wallet-bottom-nav .active,
.bottom-nav .active {
    color: var(--accent);
    text-shadow: 0 0 14px rgba(var(--accent-rgb), .70);
}

/* Wallet Modal */
.wallet-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .65);
}

.wallet-modal {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    border-radius: 28px;
}

.wallet-bs-modal {
    padding: 0 !important;
}

.wallet-bs-modal .modal-dialog {
    width: calc(100% - 32px);
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.receive-modal {
    width: 100%;
    padding: 0;
    overflow: hidden;
    border-radius: 28px;
}

.receive-modal .modal-header {
    padding: 20px 20px 8px;
    align-items: flex-start;
}

.receive-modal .modal-body {
    padding: 14px 20px 22px;
}

.wallet-close {
    filter: none;
}

[data-theme="dark"] .wallet-close {
    filter: invert(1);
}

.qr-box {
    width: 236px;
    height: 236px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 26px;
    background: #fff;
}

.qr-box img {
    width: 216px;
    height: 216px;
    display: block;
    object-fit: contain;
}

.receive-address,
.receive-address-input {
    width: 100%;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
    word-break: break-all;
    text-align: center;
    border-radius: 18px;
}

.receive-address {
    padding: 12px 14px;
}

.receive-address-input {
    padding: 13px 14px;
    outline: none;
}

/* Warning */
.receive-warning,
.browser-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(245, 158, 11, .06));
    border: 1px solid rgba(251, 191, 36, .22);
}

.browser-warning {
    border-radius: 22px;
}

.receive-warning-icon,
.browser-warning-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fbbf24;
    background: rgba(255, 193, 7, .16);
}

.receive-warning-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border-radius: 14px;
}

.receive-warning strong,
.browser-warning strong {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.receive-warning small,
.browser-warning small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

/* DApp Browser */
.browser-search-box {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 15px;
    border-radius: 20px;
}

.browser-search-box i {
    color: var(--muted);
}

.browser-search-box input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.browser-search-box input::placeholder {
    color: var(--muted);
    font-weight: 500;
}

.browser-search-box button {
    height: 42px;
    border: 0;
    border-radius: 16px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 900;
}

.browser-note {
    display: flex;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.browser-note i {
    margin-top: 2px;
    color: var(--primary);
}

.dapp-grid,
.quick-dapp-list {
    display: grid;
    gap: 10px;
}

.dapp-card {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.dapp-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--line);
    font-size: 22px;
}

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

.dapp-info strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.dapp-info small {
    display: inline-block;
    margin-bottom: 4px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 900;
}

.dapp-info span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.dapp-card>i,
.quick-dapp-list i {
    color: var(--muted);
    font-size: 13px;
}

.quick-dapp-list button {
    width: 100%;
    min-height: 52px;
    padding: 0 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quick-dapp-list span {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--card);
}

.quick-dapp-list strong {
    flex: 1;
    text-align: left;
    font-size: 13px;
    font-weight: 900;
}

.wallet-browser-view {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.wallet-browser-top {
    height: 68px;
    flex: 0 0 68px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}

.browser-nav-btn {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 16px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.browser-url {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.browser-url small {
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1;
}

.browser-url strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-browser-frame-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #fff;
}

.wallet-browser-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.browser-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
}

[data-theme="dark"] .browser-loading {
    background: rgba(18, 6, 7, .92);
}

.browser-loading-spinner {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 3px solid rgba(213, 0, 0, .15);
    border-top-color: var(--primary);
    animation: walletBrowserSpin .8s linear infinite;
}

@keyframes walletBrowserSpin {
    to {
        transform: rotate(360deg);
    }
}

.browser-hero.compact,
.browser-search-card.compact,
.asset-card.compact,
.browser-warning.compact {
    padding: 14px;
}

.browser-hero.compact h4 {
    margin-bottom: 3px;
    font-size: 16px;
}

.browser-hero.compact p,
.browser-warning.compact small {
    margin: 0;
    font-size: 12px;
}

.browser-hero.compact .browser-hero-icon,
.browser-hero-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
    font-size: 18px;
}

/* Mini DApp */
.mini-dapp-card {
    width: 100%;
    min-height: 104px;
    padding: 12px 8px;
    border-radius: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mini-dapp-card strong {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.mini-dapp-card small {
    color: var(--muted);
    font-size: 10px;
}

.mini-dapp-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 20px;
}

.games-card {
    opacity: .85;
}

/* Swap Page */
.swap-box {
    padding: 14px;
    border-radius: 22px;
}

.swap-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.swap-box-head span {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
}

.swap-box-head small {
    color: var(--muted);
    font-size: 11px;
}

.swap-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.swap-input-row input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
}

.swap-switch-wrap {
    height: 22px;
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
}

.swap-switch-btn {
    width: 44px;
    height: 44px;
    margin-top: -11px;
    border: 4px solid var(--card);
    border-radius: 999px;
    display: grid;
    place-items: center;
}

.swap-info {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding: 14px;
    border-radius: 20px;
}

.swap-info div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.swap-info span,
.swap-info strong {
    font-size: 12px;
}

.swap-info span {
    color: var(--muted);
}

.swap-info strong {
    color: var(--text);
}

/* Swap Token Picker */
.swap-token-picker {
    min-width: 128px;
    padding: 8px 10px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    cursor: pointer;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.swap-token-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.swap-token-logo {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(var(--accent-rgb), .10);
    border: 1px solid rgba(var(--accent-rgb), .16);
}

.swap-token-left strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    line-height: 1.1;
}

.swap-token-left small {
    display: block;
    max-width: 70px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Token Picker Modal */
.token-modal-overlay {
    position: fixed;
    inset: 0;

    z-index: 10000;

    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(12px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 16px;
}

.token-modal-sheet {
    width: 100%;
    max-width: 420px;

    max-height: 75vh;

    border-radius: 28px;

    padding: 18px;

    overflow: hidden;

    background: var(--card);

    border: 1px solid var(--line);

    box-shadow:
        0 20px 80px rgba(0, 0, 0, .35);

    animation: tokenModalShow .18s ease;
}

@keyframes tokenModalShow {
    from {
        opacity: 0;
        transform: scale(.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes tokenSheetUp {
    from {
        transform: translateY(40px);
        opacity: .4;
    }

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

.token-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.token-modal-head h5 {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.token-modal-head button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.token-search-wrap {
    height: 46px;
    padding: 0 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
}

.token-search-wrap i {
    color: rgba(255, 255, 255, .55);
    font-size: 14px;
}

.token-search-wrap input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
}

.token-list {
    overflow-y: auto;
    max-height: 50vh;
}

.token-row {
    width: 100%;
    padding: 11px 4px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: transparent;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.token-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.token-row-left img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, .08);
}

.token-row-left div {
    min-width: 0;
    text-align: left;
}

.token-row-left strong {
    display: block;
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
}

.token-row-left small {
    display: block;
    max-width: 180px;
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-row>span {
    color: rgba(255, 255, 255, .65);
    font-size: 12px;
    white-space: nowrap;
}

/* Add Token */
.token-loading-dot {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.token-loading-dot span {
    width: 10px;
    height: 10px;
    display: block;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 12px rgba(34, 197, 94, .9);
    animation: tokenPulse 1s infinite ease-in-out;
}

@keyframes tokenPulse {

    0%,
    100% {
        opacity: .35;
        transform: scale(.85);
    }

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

/* SweetAlert */
.swal2-container {
    z-index: 10050 !important;
}

.wallet-swal {
    width: 320px !important;
    padding: 18px !important;
    border-radius: 24px !important;
    color: var(--text) !important;
    background: var(--card) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow), var(--glow) !important;
    backdrop-filter: blur(20px) !important;
}

.wallet-swal .swal2-title {
    margin-top: 4px !important;
    color: var(--text) !important;
    font-size: 20px !important;
    font-weight: 800 !important;
}

.wallet-swal .swal2-html-container {
    margin-top: 8px !important;
    color: var(--muted) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.wallet-swal .swal2-icon {
    margin: 10px auto 0 !important;
    transform: scale(.82);
}

.wallet-swal .swal2-confirm {
    padding: 10px 22px !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), .28) !important;
}

/* Bootstrap Override */
.btn-warning {
    border-color: transparent;
}

.btn-outline-light {
    color: var(--text);
    border-color: var(--line);
}

.btn-outline-light:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

/* Transitions */
button,
a,
.mini-dapp-card,
.asset-click-card,
.asset-clickable,
.quick-actions button,
.quick-actions a,
.dapp-card,
.quick-dapp-list button {
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, filter .18s ease;
}

/* Responsive */
@media (max-width: 390px) {
    .wallet-app {
        padding-left: 14px;
        padding-right: 14px;
    }

    .wallet-screen {
        padding: 18px;
    }

    .wallet-card {
        padding: 22px;
        border-radius: 26px;
    }

    .hero-wallet h1,
    .hero-balance {
        font-size: 34px;
    }

    .quick-actions {
        gap: 8px;
    }

    .quick-actions button,
    .quick-actions a {
        min-height: 68px;
        border-radius: 20px;
        font-size: 12px;
    }

    .wallet-bottom-nav,
    .bottom-nav {
        height: 70px;
        border-radius: 24px;
    }

    .wallet-modal,
    .receive-modal {
        border-radius: 24px;
    }

    .wallet-modal {
        padding: 18px;
    }

    .wallet-bs-modal .modal-dialog {
        width: calc(100% - 24px);
        max-width: 360px;
    }

    .qr-box {
        width: 220px;
        height: 220px;
    }

    .qr-box img {
        width: 200px;
        height: 200px;
    }

    .wallet-browser-top {
        height: 64px;
        flex-basis: 64px;
        padding: 0 10px;
    }

    .browser-nav-btn {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 14px;
    }

    .browser-url {
        height: 40px;
        padding: 0 12px;
    }

    .browser-hero {
        padding: 18px;
        border-radius: 24px;
    }

    .browser-search-box {
        padding-left: 12px;
    }

    .browser-search-box button {
        padding: 0 13px;
    }

    .swap-token-picker {
        min-width: 116px;
        padding: 7px 9px;
    }

    .swap-token-logo {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .swap-token-left small {
        max-width: 58px;
    }
}

/* Motion Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}


/* =====================================================
   ASSET DETAIL PAGE
   Uses theme variables, safe for light/dark mode.
===================================================== */
.asset-detail-card {
    padding: 18px;
    border-radius: 24px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.asset-detail-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.asset-title {
    flex: 1;
    min-width: 0;
}

.asset-title h4 {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.asset-title small,
.asset-balance span,
.asset-address span {
    color: var(--muted);
    font-size: 12px;
}

.asset-balance {
    margin-top: 22px;
}

.asset-balance strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.asset-balance small {
    color: var(--muted);
}

.asset-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
    padding: 5px;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--line);
}

.asset-tabs button {
    border: 0;
    border-radius: 12px;
    padding: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
}

.asset-tabs button.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

.asset-address {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 13px 14px;
    border-radius: 16px;
    background: var(--soft);
    border: 1px solid var(--line);
}

.asset-address div {
    min-width: 0;
}

.asset-address strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    color: var(--text);
}

.history-icon.is-in {
    color: var(--success);
}

.history-icon.is-out {
    color: var(--danger);
}

/* =====================================================
   WALLET INFO MODAL
   Extra modal body rows. Main .wallet-modal style is above.
===================================================== */
.wallet-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(10px);
}

.wallet-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.wallet-modal-head h5 {
    margin: 0;
    color: var(--text);
    font-weight: 800;
}

.wallet-modal-head small {
    color: var(--muted);
}

.wallet-modal-head button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    color: var(--text);
}

.wallet-modal-body {
    padding: 20px;
}

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

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

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

.info-row strong {
    color: var(--text);
    font-weight: 700;
}

.contract-text {
    display: block;
    margin-top: 6px;
    word-break: break-all;
    font-size: 12px;
    line-height: 1.6;
}

/* =====================================================
   SWAP EXTRA INPUTS
===================================================== */
.swap-select {
    min-width: 130px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--soft);
    color: var(--text);
    padding: 0 12px;
    font-size: 13px;
    font-weight: 800;
    outline: none;
}

.swap-select option {
    background: var(--bg);
    color: var(--text);
}

.swap-balance-btn {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: inherit;
    font-weight: 800;
}

/* Shared password input pattern for swap/withdraw */
.password-input-wrap,
.swap-password-group {
    position: relative;
}

.password-input {
    padding-right: 52px !important;
}

.swap-password-input,
.withdraw-password-input {
    width: 100%;
    height: 54px;
    padding: 0 52px 0 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: .2s;
}

.withdraw-password-input {
    height: 52px;
    border-radius: 17px;
}

.swap-password-input::placeholder,
.withdraw-password-input::placeholder {
    color: var(--muted);
}

.swap-password-input:focus,
.withdraw-password-input:focus {
    border-color: rgba(var(--accent-rgb), .56);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.swap-password-toggle,
.withdraw-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 52px;
    height: 54px;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.withdraw-password-toggle {
    height: 52px;
}

.swap-password-toggle:hover,
.withdraw-password-toggle:hover {
    color: var(--primary);
}

/* =====================================================
   WITHDRAW PAGE
   Reuses global theme variables and card/input/button behavior.
===================================================== */

.withdraw-page {
    padding: 14px;
    padding-bottom: 90px;
}

.withdraw-hero,
.withdraw-card {
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.withdraw-hero {
    padding: 18px;
    margin-bottom: 14px;
    border-radius: 22px;
}

.withdraw-card {
    padding: 16px;
    border-radius: 22px;
}

.withdraw-hero span {
    display: block;
    margin-bottom: 6px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
}

.withdraw-hero h4 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 900;
}

.withdraw-hero p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.withdraw-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    color: var(--success);
    background: rgba(34, 197, 94, .12);
    border: 1px solid rgba(34, 197, 94, .20);
    font-size: 13px;
    font-weight: 700;
}

.withdraw-card-head,
.form-label-row,
.withdraw-estimate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.withdraw-card-head {
    margin-bottom: 14px;
}

.withdraw-card-head h5 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.withdraw-card-head small,
.form-label-row small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.withdraw-form {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.form-group label,
.form-label-row label {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.form-label-row label {
    margin-bottom: 0;
}

/* =====================================================
   AMOUNT / INPUT
===================================================== */

.withdraw-form input,
.withdraw-select {
    width: 100%;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 17px;
    background: var(--soft);
    border: 1px solid var(--line);
    color: var(--text);
    outline: none;
    font-size: 14px;
    font-weight: 600;
}

.withdraw-form input::placeholder {
    color: var(--muted);
}

.withdraw-form input:focus,
.withdraw-select:focus {
    border-color: rgba(var(--accent-rgb), .56);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.withdraw-select {
    height: 52px;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
}

.withdraw-select option,
.withdraw-select optgroup {
    background: var(--card);
    color: var(--text);
}

.amount-input {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    border-radius: 17px;
    background: var(--soft);
    border: 1px solid var(--line);
    overflow: hidden;
}

.amount-input input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.amount-input button {
    height: 34px;
    padding: 0 12px;
    margin-right: 8px;
    border: 0;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), .14);
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

.amount-input span {
    padding-right: 14px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

/* =====================================================
   ESTIMATE
===================================================== */

.withdraw-estimate {
    padding: 14px;
    border-radius: 17px;
    background: rgba(var(--primary-rgb), .10);
    border: 1px solid rgba(var(--primary-rgb), .18);
}

.withdraw-estimate span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.withdraw-estimate strong {
    color: var(--text);
    font-size: 16px;
    font-weight: 900;
}

/* =====================================================
   PAYOUT ACCOUNT
===================================================== */

.payout-head {
    margin-bottom: 12px;
    padding: 0;
    background: transparent;
    border: 0;
}

.withdraw-manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(var(--primary-rgb), .12);
    border: 1px solid rgba(var(--primary-rgb), .28);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.withdraw-manage-btn:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
}

.withdraw-selected-account {
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
    background: var(--soft);
    border: 1px solid var(--line);
}

.selected-account-main {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.selected-account-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary);
}

.selected-account-main strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.selected-account-main small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.selected-default-badge {
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), .15);
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
}

.selected-account-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.selected-account-grid div {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(var(--primary-rgb), .06);
    border: 1px solid rgba(var(--primary-rgb), .08);
}

.selected-account-grid span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.selected-account-grid strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 900;
    word-break: break-word;
}

/* =====================================================
   METHOD GRID - kept for old withdraw method compatibility
===================================================== */

.withdraw-method-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.withdraw-method {
    min-height: 76px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--soft);
    color: var(--text);
    font-size: 11px;
    font-weight: 900;
}

.withdraw-method i {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 17px;
}

.withdraw-method.selected {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(var(--primary-rgb), .24);
}

.withdraw-method.selected i {
    color: #fff;
}

/* =====================================================
   PASSWORD
===================================================== */

.password-input-wrap {
    position: relative;
}

.withdraw-password-input {
    padding-right: 52px !important;
}

.withdraw-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 38px;
    height: 38px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 13px;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =====================================================
   EMPTY STATE
===================================================== */

.withdraw-empty {
    padding: 20px 14px;
    border-radius: 18px;
    background: var(--soft);
    border: 1px dashed var(--line);
    text-align: center;
}

.withdraw-empty i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    border-radius: 16px;
    background: rgba(var(--primary-rgb), .12);
    color: var(--primary);
}

.withdraw-empty h6 {
    margin: 0 0 5px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.withdraw-empty p {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.withdraw-empty a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 13px;
    border-radius: 14px;
    background: rgba(var(--primary-rgb), .14);
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

/* =====================================================
   SUBMIT
===================================================== */

.withdraw-submit {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), .26);
}

.withdraw-submit span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.withdraw-submit:disabled {
    opacity: .7;
}

/* =====================================================
   VALIDATION
===================================================== */

.text-danger {
    color: var(--danger) !important;
    font-size: 11px;
    font-weight: 700;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 575px) {
    .withdraw-method-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .withdraw-card-head.payout-head {
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .withdraw-method-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .withdraw-manage-btn span {
        display: none;
    }
}

/* =====================================================
   1SEN DARK MODE FINAL OVERRIDE
   Removes old blue/navy tones and forces red-black-gold theme.
===================================================== */

[data-theme="dark"] {
    --bg: #100708;
    --card: rgba(24, 9, 10, .94);
    --soft: rgba(35, 12, 13, .90);
    --text: #ffffff;
    --muted: #d7b8b8;
    --line: rgba(255, 196, 0, .13);

    --primary: #ff3030;
    --primary-rgb: 255, 48, 48;
    --primary-dark: #720000;
    --primary-soft: #ff6b6b;

    --accent: #ffc400;
    --accent-rgb: 255, 196, 0;
    --accent-soft: #ffd95c;

    --shadow: 0 24px 60px rgba(0, 0, 0, .48);
    --glow: 0 0 24px rgba(255, 48, 48, .28), 0 0 52px rgba(255, 196, 0, .16);
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(255, 48, 48, .22), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 196, 0, .12), transparent 36%),
        linear-gradient(180deg, #070303 0%, #100708 42%, #1a0708 100%);
}

[data-theme="dark"] .wallet-card,
[data-theme="dark"] .asset-card,
[data-theme="dark"] .wallet-panel,
[data-theme="dark"] .wallet-token-card,
[data-theme="dark"] .wallet-balance-card,
[data-theme="dark"] .browser-search-card,
[data-theme="dark"] .swap-card,
[data-theme="dark"] .receive-modal,
[data-theme="dark"] .wallet-modal,
[data-theme="dark"] .asset-detail-card,
[data-theme="dark"] .withdraw-hero,
[data-theme="dark"] .withdraw-card {
    background:
        radial-gradient(circle at top left, rgba(255, 48, 48, .08), transparent 34%),
        linear-gradient(180deg, rgba(28, 9, 10, .96), rgba(12, 5, 6, .92));
    border-color: rgba(255, 196, 0, .13);
}

[data-theme="dark"] .quick-actions button,
[data-theme="dark"] .quick-actions a,
[data-theme="dark"] .mini-dapp-card,
[data-theme="dark"] .dapp-card,
[data-theme="dark"] .quick-dapp-list button,
[data-theme="dark"] .asset-click-card .asset-card,
[data-theme="dark"] .token-row,
[data-theme="dark"] .history-row {
    background:
        radial-gradient(circle at top left, rgba(255, 48, 48, .10), transparent 34%),
        linear-gradient(180deg, rgba(28, 9, 10, .92), rgba(10, 5, 6, .88));
    border-color: rgba(255, 196, 0, .12);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .06);
}

[data-theme="dark"] .wallet-bottom-nav,
[data-theme="dark"] .bottom-nav {
    background:
        radial-gradient(circle at 15% 0%, rgba(255, 196, 0, .10), transparent 32%),
        linear-gradient(180deg, rgba(26, 8, 9, .96), rgba(9, 4, 5, .94));
    border-color: rgba(255, 196, 0, .14);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .50), 0 0 28px rgba(255, 48, 48, .10);
}

[data-theme="dark"] .browser-search-box,
[data-theme="dark"] .swap-box,
[data-theme="dark"] .swap-info,
[data-theme="dark"] .history-filter,
[data-theme="dark"] .segmented,
[data-theme="dark"] .wallet-input,
[data-theme="dark"] .receive-address,
[data-theme="dark"] .receive-address-input,
[data-theme="dark"] .browser-url,
[data-theme="dark"] .browser-nav-btn,
[data-theme="dark"] .asset-tabs,
[data-theme="dark"] .asset-address,
[data-theme="dark"] .withdraw-form input,
[data-theme="dark"] .withdraw-select,
[data-theme="dark"] .amount-input,
[data-theme="dark"] .withdraw-selected-account,
[data-theme="dark"] .withdraw-empty,
[data-theme="dark"] .swap-token-picker,
[data-theme="dark"] .swap-password-input,
[data-theme="dark"] .withdraw-password-input {
    background: rgba(35, 12, 13, .90);
    border-color: rgba(255, 196, 0, .12);
}

[data-theme="dark"] .hero-wallet,
[data-theme="dark"] .browser-hero,
[data-theme="dark"] .swap-hero {
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 196, 0, .22), transparent 30%),
        radial-gradient(circle at 85% 85%, rgba(255, 48, 48, .25), transparent 32%),
        linear-gradient(135deg, #3b0000 0%, #8e0000 48%, #d50000 100%);
    border-color: rgba(255, 196, 0, .20);
}

[data-theme="dark"] .token-modal-sheet {
    background:
        radial-gradient(circle at top left, rgba(255, 48, 48, .10), transparent 35%),
        linear-gradient(180deg, rgba(28, 9, 10, .98), rgba(9, 4, 5, .96));
    border-color: rgba(255, 196, 0, .14);
}

[data-theme="dark"] .token-search-wrap {
    background: rgba(35, 12, 13, .90);
    border-color: rgba(255, 196, 0, .12);
}

[data-theme="dark"] .browser-loading {
    background: rgba(18, 6, 7, .92);
}

.top-action-group {
    position: fixed;
    top: 16px;
    right: 16px;

    z-index: 9999;

    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-btn,
.logout-btn {

    width: 46px;
    height: 46px;

    border: none;
    outline: none;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    transition: .25s;

    backdrop-filter: blur(20px);

    background: rgba(255, 255, 255, .08);

    border: 1px solid rgba(255, 255, 255, .08);

    color: #fff;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .18);
}

.theme-btn:hover {

    transform: translateY(-2px);

    background: #ffbe3b;

    color: #111;
}

.logout-btn {

    background: rgba(255, 70, 70, .10);

    border-color: rgba(255, 70, 70, .25);

    color: #ff6b6b;
}

.logout-btn:hover {

    background: #ff4040;

    color: #fff;

    transform: translateY(-2px);

    box-shadow:
        0 12px 30px rgba(255, 64, 64, .35);
}

@media(max-width:768px) {

    .top-action-group {

        top: 12px;
        right: 12px;

        gap: 8px;
    }

    .theme-btn,
    .logout-btn {

        width: 42px;
        height: 42px;

        border-radius: 14px;
    }

}