:root{
    --ink:#12121a;
    --muted:#6d6a7c;
    --card:rgba(255,255,255,.8);
    --brand:#7c3cff;
    --brand2:#00d4ff;
    --success:#22c55e;
    --danger:#ef4444;
}

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

body{
    margin:0;
    min-height:100vh;
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    color:var(--ink);
    background:
        radial-gradient(circle at 15% 10%,rgba(124,60,255,.35),transparent 30%),
        radial-gradient(circle at 85% 5%,rgba(0,212,255,.35),transparent 28%),
        radial-gradient(circle at 50% 100%,rgba(255,207,74,.35),transparent 35%),
        linear-gradient(135deg,#fbfbff,#f1f5ff 45%,#fff8e6);
    padding:26px 16px 56px;
}

a{color:inherit}

h1{
    margin:0;
    font-size:34px;
    line-height:1;
    letter-spacing:-.06em;
}

h2{
    margin:0 0 8px;
    font-size:30px;
    letter-spacing:-.05em;
}

/* Header / Navigation */
.topbar{
    max-width:1040px;
    margin:0 auto 24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:950;
    letter-spacing:-.05em;
    font-size:30px;
    text-decoration:none;
}

.logo{
    width:38px;
    height:38px;
    border-radius:14px;
    background:linear-gradient(135deg,var(--brand),var(--brand2));
    box-shadow:0 14px 35px rgba(124,60,255,.35);
    position:relative;
}

.logo:before,
.logo:after{
    content:"";
    position:absolute;
    border-radius:999px;
    background:white;
}

.logo:before{
    width:15px;
    height:15px;
    left:8px;
    top:8px;
}

.logo:after{
    width:8px;
    height:8px;
    right:9px;
    bottom:10px;
    opacity:.8;
}

.nav{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    background:rgba(255,255,255,.58);
    border:1px solid rgba(255,255,255,.7);
    padding:6px;
    border-radius:999px;
    backdrop-filter:blur(18px);
}

.nav a{
    border-radius:999px;
    padding:10px 14px;
    font-weight:900;
    color:var(--muted);
    text-decoration:none;
    font-size:14px;
}

.nav a.active,
.nav a:hover{
    background:white;
    color:var(--ink);
    box-shadow:0 8px 18px rgba(45,37,86,.08);
}

/* Layout */
.shell{
    width:min(460px,100%);
    margin:0 auto;
}

.wide{
    max-width:1040px;
    margin:0 auto;
}

.card,
.panel,
.main-card,
.sidebar{
    background:var(--card);
    backdrop-filter:blur(22px);
    border:1px solid rgba(255,255,255,.65);
    border-radius:34px;
    padding:22px;
    box-shadow:0 24px 80px rgba(45,37,86,.18);
    overflow:hidden;
    position:relative;
}

.card:before{
    content:"";
    position:absolute;
    inset:-90px -90px auto auto;
    width:190px;
    height:190px;
    border-radius:999px;
    background:linear-gradient(135deg,rgba(124,60,255,.25),rgba(0,212,255,.14));
}

/* Landing / Hero */
.hero{
    text-align:center;
    position:relative;
    padding:38px 0;
}

.hero h1{
    font-size:56px;
    line-height:1;
    letter-spacing:-.08em;
    margin:0;
}

.hero p{
    color:var(--muted);
    font-size:18px;
    line-height:1.5;
    max-width:620px;
    margin:18px auto;
}

.hero-actions,
.cta{
    display:flex;
    justify-content:center;
    gap:10px;
    flex-wrap:wrap;
    margin-top:20px;
}

/* Public Profile */
.profile{
    text-align:center;
    position:relative;
    padding:12px 0 22px;
}

.avatar{
    width:110px;
    height:110px;
    border-radius:30px;
    margin:0 auto 14px;
    display:grid;
    place-items:center;
    font-size:36px;
    font-weight:900;
    color:white;
    background:
        linear-gradient(135deg,rgba(255,255,255,.28),transparent),
        linear-gradient(135deg,var(--brand),#20114f);
    box-shadow:0 20px 38px rgba(124,60,255,.32);
    border:3px solid rgba(255,255,255,.78);
}

img.avatar,
img.dash-avatar{
    object-fit:cover;
    display:block;
}

.profile h1{
    margin-top:6px;
}

.tagline{
    color:var(--muted);
    margin:10px auto 0;
    max-width:330px;
    line-height:1.45;
    font-size:15px;
}

.profile .tagline,
.profile .bio-text{
    margin-top:22px;
    max-width:520px;
    font-size:1.08rem;
    line-height:1.75;
}

.bio-text{
    white-space:normal;
}

.bio-text a{
    color:#4f2bd4;
    font-weight:900;
    text-decoration:none;
    word-break:break-word;
}

.profile .bio-text a{
    font-weight:700;
}

.bio-text a:hover{
    text-decoration:underline;
}

.bio-text strong{
    font-weight:950;
}

.bio-text em{
    font-style:italic;
}

.url{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:16px;
    background:rgba(255,255,255,.72);
    border:1px solid rgba(18,18,26,.08);
    padding:9px 13px;
    border-radius:999px;
    font-weight:800;
    font-size:14px;
    box-shadow:0 10px 24px rgba(45,37,86,.08);
}

.profile .url{
    margin-top:18px;
}

.pulse{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--success);
    box-shadow:0 0 0 6px rgba(34,197,94,.12);
}

/* Assets / Addresses */
.section-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:8px 0 12px;
    font-size:13px;
    color:var(--muted);
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.asset-group{
    background:rgba(255,255,255,.52);
    border:1px solid rgba(18,18,26,.07);
    border-radius:25px;
    padding:10px;
    margin:12px 0;
    box-shadow:0 10px 25px rgba(45,37,86,.05);
}

.group-head{
    display:flex;
    align-items:center;
    gap:12px;
    padding:5px 5px 10px;
}

.asset-icon{
    width:46px;
    height:46px;
    border-radius:17px;
    display:grid;
    place-items:center;
    color:white;
    font-weight:950;
    flex:0 0 auto;
}

.asset-icon[style]{
    background-image:none !important;
}

.orange{background:linear-gradient(135deg,#ffbf3c,#ff8a00)}
.purple{background:linear-gradient(135deg,#8b8cff,#3f35d4)}
.green{background:linear-gradient(135deg,#24c081,#0c8c61)}
.blue{background:linear-gradient(135deg,#4aa3ff,#1265e8)}
.rainbow{background:linear-gradient(135deg,#27f5b6,#7d3cff)}
.gray{background:linear-gradient(135deg,#74748a,#222233)}

.group-copy{
    flex:1;
}

.group-copy strong{
    display:block;
    font-size:16px;
    letter-spacing:-.03em;
}

.group-copy span{
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-top:2px;
}

.source-row{
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border-radius:18px;
    background:rgba(255,255,255,.78);
    border:1px solid rgba(18,18,26,.055);
    margin-top:8px;
    transition:.18s ease;
    position:relative;
}

.source-row:hover{
    transform:translateY(-1px);
    box-shadow:0 12px 24px rgba(45,37,86,.08);
}

.source-row.preferred{
    background:linear-gradient(135deg,rgba(255,255,255,.94),rgba(236,255,245,.9));
    border:1px solid rgba(34,197,94,.36);
    box-shadow:0 14px 30px rgba(34,197,94,.12);
}

.exchange{
    min-width:82px;
    font-size:12px;
    font-weight:900;
    color:#302c45;
}

.address{
    min-width:0;
    flex:1;
    color:var(--muted);
    font-size:13px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.status{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 8px;
    border-radius:999px;
    font-size:11px;
    font-weight:950;
    background:rgba(34,197,94,.13);
    color:#10813f;
    white-space:nowrap;
}

.status:before{
    content:"✓";
}

/* Buttons */
.btn,
.copy,
.dark-btn{
    border:0;
    color:white;
    background:#11121a;
    padding:10px 12px;
    border-radius:12px;
    font-weight:850;
    cursor:pointer;
    font-size:13px;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.copy{
    padding:8px 10px;
    font-size:12px;
}

.primary{
    color:white;
    background:linear-gradient(135deg,var(--brand),#25145c);
    box-shadow:0 16px 28px rgba(124,60,255,.26);
}

.secondary,
.ghost,
.set-preferred{
    border:0;
    background:rgba(18,18,26,.06);
    color:#4f4b60;
    padding:10px 12px;
    border-radius:12px;
    font-weight:850;
    cursor:pointer;
    font-size:13px;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.danger{
    background:#ef4444;
    color:white;
}

/* Notices / Footer */
.warning{
    margin-top:14px;
    padding:14px;
    border-radius:20px;
    background:rgba(255,207,74,.23);
    border:1px solid rgba(184,129,0,.14);
    color:#6d4b00;
    font-size:13px;
    line-height:1.45;
}

.success-box,
.error-box{
    max-width:1040px;
    margin:0 auto 16px;
    padding:13px 15px;
    border-radius:18px;
    font-weight:800;
}

.success-box{
    background:rgba(34,197,94,.12);
    color:#116f38;
}

.error-box{
    background:rgba(239,68,68,.10);
    color:#9f1d1d;
}

.footer{
    text-align:center;
    color:var(--muted);
    font-size:12px;
    margin-top:18px;
}

.footer a{
    color:inherit;
    font-weight:900;
    text-decoration:none;
}

.footer a:hover{
    text-decoration:underline;
}

/* Forms */
.form{
    display:grid;
    gap:12px;
}

label{
    font-size:13px;
    font-weight:900;
    color:#3b374a;
}

input,
textarea,
select{
    width:100%;
    margin-top:6px;
    border:1px solid rgba(18,18,26,.10);
    border-radius:15px;
    padding:12px 13px;
    background:rgba(255,255,255,.82);
    font:inherit;
    color:var(--ink);
}

textarea{
    min-height:96px;
    resize:vertical;
}

input[type="color"]{
    width:110px;
    height:56px;
    padding:4px;
    border-radius:16px;
    cursor:pointer;
    border:1px solid rgba(18,18,26,.10);
    background:rgba(255,255,255,.82);
}

.field-help{
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
    line-height:1.35;
}

.form-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

/* Dashboard */
.grid{
    display:grid;
    grid-template-columns:1fr 2.1fr;
    gap:18px;
}

.dash-profile{
    display:flex;
    align-items:center;
    gap:16px;
    padding-bottom:16px;
    border-bottom:1px solid rgba(18,18,26,.08);
    min-width:0;
}

.dash-profile > div:last-child{
    min-width:0;
}

.dash-avatar{
    width:88px;
    height:88px;
    border-radius:28px;
    display:grid;
    place-items:center;
    color:white;
    font-weight:950;
    font-size:30px;
    background:linear-gradient(135deg,var(--brand),#20114f);
    object-fit:cover;
    flex-shrink:0;
}

.dash-profile strong{
    display:block;
}

.dash-profile span{
    display:block;
    color:var(--muted);
    font-size:13px;
    margin-top:2px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:160px;
}

.metric-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin:16px 0;
}

.metric{
    background:rgba(255,255,255,.72);
    border:1px solid rgba(18,18,26,.06);
    border-radius:18px;
    padding:13px;
}

.metric strong{
    display:block;
    font-size:22px;
    letter-spacing:-.04em;
}

.metric span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    margin-top:2px;
}

.menu{
    display:grid;
    gap:8px;
    margin-top:12px;
}

.menu a{
    text-align:left;
    border:0;
    background:transparent;
    border-radius:15px;
    padding:11px 12px;
    font-weight:850;
    color:#454154;
    text-decoration:none;
}

.menu a.active,
.menu a:hover{
    background:white;
    box-shadow:0 8px 18px rgba(45,37,86,.07);
    color:var(--ink);
}

.dash-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    margin-bottom:18px;
}

.dash-head p{
    margin:5px 0 0;
    color:var(--muted);
    font-size:14px;
}

/* Tables / Panels */
.table-card{
    background:rgba(255,255,255,.66);
    border:1px solid rgba(18,18,26,.06);
    border-radius:22px;
    overflow:hidden;
    margin-bottom:16px;
}

.table-row{
    display:grid;
    grid-template-columns:1.2fr 1fr 1fr auto;
    align-items:center;
    gap:12px;
    padding:14px;
    border-bottom:1px solid rgba(18,18,26,.06);
}

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

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

.actions{
    display:flex;
    gap:7px;
    flex-wrap:wrap;
}

.danger-zone{
    border:1px solid rgba(239,68,68,.28);
    background:rgba(255,255,255,.62);
    border-radius:22px;
    padding:16px;
    margin-top:24px;
}

.danger-zone h2{
    color:#dc2626;
}

.visibility-card{
    display:flex;
    align-items:flex-start;
    gap:12px;
    padding:15px;
    border-radius:20px;
    background:rgba(255,255,255,.65);
    border:1px solid rgba(18,18,26,.08);
    cursor:pointer;
}

.visibility-card input{
    width:auto;
    margin:3px 0 0;
}

.visibility-card strong{
    display:block;
    font-size:15px;
    color:var(--ink);
}

.visibility-card small{
    display:block;
    color:var(--muted);
    margin-top:3px;
    font-size:13px;
    line-height:1.35;
}

/* Appearance / Theme Picker */
.theme-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(132px,1fr));
    gap:12px;
}

.theme-card{
    display:flex;
    flex-direction:column;
    gap:8px;
    min-height:156px;
    padding:14px;
    border-radius:20px;
    background:rgba(255,255,255,.65);
    border:1px solid rgba(18,18,26,.08);
    cursor:pointer;
    transition:.18s ease;
    font:inherit;
    text-align:left;
}

button.theme-card{
    appearance:none;
    -webkit-appearance:none;
}

.theme-card:hover{
    transform:translateY(-1px);
    box-shadow:0 12px 24px rgba(45,37,86,.08);
}

.theme-card.selected{
    border-color:rgba(124,60,255,.50) !important;
    outline:3px solid rgba(124,60,255,.20);
    box-shadow:0 16px 34px rgba(124,60,255,.16) !important;
}

.theme-card input[type="radio"]{
    display:none;
}

.theme-card strong{
    font-size:14px;
}

.theme-card small{
    color:var(--muted);
    font-size:12px;
    font-weight:800;
}

.theme-swatch,
.custom-theme-swatch{
    width:44px !important;
    height:44px !important;
    border-radius:16px !important;
    box-shadow:0 10px 22px rgba(45,37,86,.12) !important;
    display:block !important;
}

.preset-theme-card[data-color="#7c3cff"] .theme-swatch{
    background:linear-gradient(135deg,#8b5cf6,#4c1d95) !important;
}

.preset-theme-card[data-color="#2563eb"] .theme-swatch{
    background:linear-gradient(135deg,#60a5fa,#2563eb) !important;
}

.preset-theme-card[data-color="#16a34a"] .theme-swatch{
    background:linear-gradient(135deg,#34d399,#059669) !important;
}

.preset-theme-card[data-color="#f97316"] .theme-swatch{
    background:linear-gradient(135deg,#fbbf24,#f97316) !important;
}

.preset-theme-card[data-color="#111827"] .theme-swatch{
    background:linear-gradient(135deg,#374151,#111827) !important;
}

.custom-swatch-wrap{
    position:relative;
    width:44px;
    height:44px;
    border-radius:16px;
}

.custom-theme-swatch{
    background-image:none !important;
}

.custom-theme-card input[type="color"],
#custom-color-picker{
    position:absolute !important;
    inset:0 !important;
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    min-height:44px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    border-radius:16px !important;
    opacity:0 !important;
    cursor:pointer !important;
    pointer-events:auto !important;
    display:block !important;
}

#custom-color-picker::-webkit-color-swatch-wrapper{
    padding:0 !important;
}

#custom-color-picker::-webkit-color-swatch,
#custom-color-picker::-moz-color-swatch{
    border:0 !important;
    border-radius:16px !important;
}

.custom-color-button{
    width:max-content;
    margin-top:2px;
}

/* Asset Editing / Custom Asset Colors */
.edit-address-form{
    margin:8px 0 12px;
    padding:14px;
    border-radius:20px;
    background:rgba(255,255,255,.58);
    border:1px solid rgba(18,18,26,.06);
}

.asset-color-row{
    display:grid;
    grid-template-columns:1fr 1fr 160px;
    gap:12px;
    align-items:end;
}

.asset-custom-wrap input[type="color"]{
    width:100%;
    height:50px;
    padding:4px;
    border-radius:16px;
    cursor:pointer;
}

/* Drag and Drop */
.draggable-asset,
.draggable-address{
    transition:transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.draggable-asset.dragging,
.draggable-address.dragging{
    opacity:.55;
    transform:scale(.995);
    box-shadow:0 20px 45px rgba(45,37,86,.16);
}

.drag-handle,
.address-drag-handle{
    border:0;
    background:rgba(18,18,26,.06);
    color:#4f4b60;
    border-radius:12px;
    cursor:grab;
    font-weight:950;
    flex:0 0 auto;
}

.drag-handle{
    width:34px;
    height:34px;
}

.address-list{
    display:block;
}

.address-drag-handle{
    width:30px;
    height:30px;
    border-radius:11px;
    line-height:1;
}

.drag-handle:active,
.address-drag-handle:active{
    cursor:grabbing;
}

/* Registration / Login Helpers */
.username-status{
    display:block;
    margin-top:7px;
    font-size:12px;
    font-weight:900;
    line-height:1.35;
}

.username-status.good{
    color:#15803d;
}

.username-status.bad{
    color:#dc2626;
}

.username-status.checking{
    color:var(--muted);
}

.username-status a{
    color:#dc2626;
    font-weight:950;
    text-decoration:underline;
}

.username-status.good a{
    color:#15803d;
}

.auth-actions{
    gap:10px;
    margin-top:16px;
}

.auth-actions .secondary{
    text-decoration:none;
}

.auth-actions .secondary:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 18px rgba(45,37,86,.08);
}



/* Dashboard overview rows */
.dashboard-card .dashboard-row,
.table-card .dashboard-row{
    grid-template-columns:minmax(180px,1.35fr) minmax(120px,.85fr) minmax(180px,1.2fr) 96px;
}

.dashboard-primary,
.dashboard-type,
.dashboard-detail,
.dashboard-action{
    min-width:0;
}

.dashboard-type,
.dashboard-detail{
    color:var(--ink);
}

.dashboard-action{
    display:flex;
    justify-content:flex-end;
}

.dashboard-action .btn,
.dashboard-action .secondary{
    min-width:82px;
}

/* Responsive */
@media(max-width:860px){
    .grid{
        grid-template-columns:1fr;
    }

    .topbar{
        display:block;
    }

    .brand{
        justify-content:center;
        margin-bottom:14px;
    }

    .nav{
        justify-content:center;
    }

    .table-row,
    .dashboard-card .dashboard-row,
    .table-card .dashboard-row{
        grid-template-columns:1fr;
    }

    .dashboard-action{
        justify-content:flex-start;
    }

    .dash-head{
        display:block;
    }

    .dash-head .btn{
        margin-top:12px;
        width:100%;
    }
}

@media(max-width:720px){
    .asset-color-row{
        grid-template-columns:1fr;
    }
}

@media(max-width:520px){
    body{
        padding:18px 12px 42px;
    }

    .card,
    .panel,
    .main-card,
    .sidebar{
        border-radius:28px;
        padding:18px;
    }

    h1{
        font-size:31px;
    }

    .hero h1{
        font-size:42px;
    }

    .exchange{
        min-width:68px;
    }

    .status{
        display:none;
    }
}

/* Character counters */
.char-counter{
    display:block;
    margin-top:6px;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    line-height:1.35;
}

.char-counter.near{
    color:#b45309;
}

.char-counter.limit{
    color:#dc2626;
}

/* Preferred asset badge/button */
.preferred-asset-badge,
.preferred-asset-button{
    display:inline-flex;
    align-items:center;
    gap:5px;
    width:max-content;
    margin-top:0;
    padding:5px 8px;
    border:0;
    border-radius:999px;
    background:rgba(124,60,255,.12);
    color:#4f2bd4;
    font:inherit;
    font-size:11px;
    font-weight:950;
    line-height:1;
    white-space:nowrap;
    cursor:pointer;
    appearance:none;
    -webkit-appearance:none;
}

.preferred-asset-badge:before,
.preferred-asset-button:before{
    content:"★";
}

.preferred-asset-badge:hover,
.preferred-asset-button:hover{
    transform:translateY(-1px);
    box-shadow:0 10px 20px rgba(124,60,255,.12);
}

/* Inline preferred updates */
.preferred-asset-form,
.preferred-address-form{
    margin:0;
}

.preferred-asset-toggle,
.set-preferred{
    cursor:pointer;
}

.source-row .preferred-address-form{
    flex:0 0 auto;
}


/* Asset preset color select preview */
.asset-preset-select-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
    align-items:end;
}

.asset-preset-preview{
    min-height:50px;
    margin-top:6px;
    padding:9px 11px;
    border:1px solid rgba(18,18,26,.10);
    border-radius:15px;
    background:rgba(255,255,255,.72);
    display:inline-flex;
    align-items:center;
    gap:8px;
    white-space:nowrap;
}

.asset-preset-preview-swatch{
    width:28px;
    height:28px;
    border-radius:10px;
    box-shadow:0 8px 16px rgba(45,37,86,.12);
    flex:0 0 auto;
}

.asset-preset-preview-text{
    color:var(--muted);
    font-size:12px;
    font-weight:900;
}

@media(max-width:720px){
    .asset-preset-select-row{
        grid-template-columns:1fr;
    }

    .asset-preset-preview{
        width:max-content;
    }
}


/* Custom asset color compact preview */
.asset-custom-color-row{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:10px;
    align-items:end;
}

.asset-custom-preview{
    min-height:50px;
    margin-top:6px;
    padding:9px 11px;
    border:1px solid rgba(18,18,26,.10);
    border-radius:15px;
    background:rgba(255,255,255,.72);
    display:inline-flex;
    align-items:center;
    gap:8px;
    white-space:nowrap;
}

.asset-custom-preview-swatch{
    width:28px;
    height:28px;
    border-radius:10px;
    box-shadow:0 8px 16px rgba(45,37,86,.12);
    flex:0 0 auto;
}

.asset-custom-preview-text{
    color:var(--muted);
    font-size:12px;
    font-weight:900;
}

.asset-custom-color-row input[type="color"]{
    width:58px;
    min-width:58px;
    height:50px;
    margin-top:6px;
    padding:4px;
    border-radius:15px;
}

@media(max-width:720px){
    .asset-custom-color-row{
        grid-template-columns:1fr;
    }

    .asset-custom-preview{
        width:max-content;
    }
}


/* Tighten custom asset color preview width */
.asset-custom-color-row{
    display:flex !important;
    align-items:flex-end;
    gap:10px;
}

.asset-custom-preview{
    width:max-content !important;
    min-width:0 !important;
    max-width:max-content !important;
    flex:0 0 auto !important;
}

.asset-custom-preview-text{
    flex:0 0 auto;
}


/* Final custom asset color picker cleanup */
.asset-custom-color-row{
    position:relative !important;
    display:flex !important;
    align-items:flex-end !important;
    gap:10px !important;
}

.asset-custom-color-row input[type="color"],
.asset-custom-color-input{
    position:absolute !important;
    left:0 !important;
    top:0 !important;
    width:1px !important;
    min-width:1px !important;
    height:1px !important;
    min-height:1px !important;
    margin:0 !important;
    padding:0 !important;
    border:0 !important;
    opacity:0 !important;
    pointer-events:none !important;
}

.asset-custom-preview{
    width:max-content !important;
    min-width:0 !important;
    max-width:max-content !important;
    flex:0 0 auto !important;
    cursor:pointer;
}

.asset-custom-preview:focus-visible{
    outline:3px solid rgba(124,60,255,.24);
    outline-offset:3px;
}

/* Public profile QR/share actions */
.profile-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin:18px auto 0;
    max-width:330px;
}

.profile-action-btn{
    width:100%;
    border-radius:16px;
    padding:12px 13px;
}

.profile-accent-card .profile-actions .primary{
    background:linear-gradient(135deg,var(--brand),#25145c);
    box-shadow:0 16px 28px rgba(var(--brand-rgb),.24);
}

.profile-accent-card .profile-actions .secondary:hover{
    box-shadow:0 12px 24px rgba(var(--brand-rgb),.12);
    transform:translateY(-1px);
}

.bitsy-modal[hidden],
.bitsy-toast[hidden]{
    display:none !important;
}

body.modal-open{
    overflow:hidden;
}

.bitsy-modal{
    position:fixed;
    inset:0;
    z-index:1000;
    display:grid;
    place-items:center;
    padding:18px;
}

.bitsy-modal-backdrop{
    position:absolute;
    inset:0;
    background:rgba(18,18,26,.38);
    backdrop-filter:blur(8px);
}

.bitsy-modal-card{
    position:relative;
    width:min(390px,100%);
    background:rgba(255,255,255,.92);
    border:1px solid rgba(255,255,255,.75);
    border-radius:30px;
    padding:22px;
    box-shadow:0 28px 90px rgba(18,18,26,.28);
    text-align:center;
}

.bitsy-modal-card h2{
    margin-bottom:8px;
}

.bitsy-modal-close{
    position:absolute;
    top:12px;
    right:12px;
    width:36px;
    height:36px;
    border:0;
    border-radius:999px;
    background:rgba(18,18,26,.06);
    color:var(--ink);
    font-size:24px;
    line-height:1;
    cursor:pointer;
}

.qr-box{
    width:max-content;
    max-width:100%;
    margin:12px auto;
    padding:12px;
    border-radius:22px;
    background:white;
    border:1px solid rgba(18,18,26,.08);
    box-shadow:0 14px 32px rgba(45,37,86,.10);
}

.qr-box img{
    width:230px;
    height:230px;
    display:block;
}

.qr-value{
    margin:10px auto 0;
    padding:10px 12px;
    border-radius:16px;
    background:rgba(18,18,26,.045);
    color:var(--muted);
    font-size:12px;
    line-height:1.35;
    word-break:break-all;
    text-align:left;
}

.qr-actions{
    justify-content:center;
    margin-top:12px;
}

.bitsy-toast{
    position:fixed;
    left:50%;
    bottom:24px;
    transform:translateX(-50%) translateY(10px);
    z-index:1100;
    padding:11px 14px;
    border-radius:999px;
    background:#11121a;
    color:white;
    font-size:13px;
    font-weight:900;
    box-shadow:0 18px 34px rgba(18,18,26,.22);
    opacity:0;
    transition:.18s ease;
}

.bitsy-toast.show{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

@media(max-width:520px){
    .profile-actions{
        grid-template-columns:1fr;
    }

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


/* Tighter asset color dropdown sizing */
.asset-color-row{
    grid-template-columns:minmax(0,1fr) minmax(240px,1fr) 160px;
}

.asset-color-type{
    max-width:196px;
}

.asset-preset-select{
    min-width:112px;
    max-width:124px;
}

.asset-preset-select-row{
    grid-template-columns:max-content auto !important;
}

@media(max-width:720px){
    .asset-color-type,
    .asset-preset-select{
        max-width:none;
        width:100%;
    }

    .asset-preset-select-row{
        grid-template-columns:1fr auto !important;
    }
}


/* Launch polish: balanced asset color controls */
.asset-color-row{
    grid-template-columns:minmax(170px,.85fr) minmax(280px,1.15fr) 160px;
}

.asset-color-type{
    min-width:0;
}

.asset-preset-select{
    width:auto !important;
    min-width:122px !important;
    max-width:138px !important;
}

.asset-preset-select-row{
    grid-template-columns:max-content auto !important;
}

/* Dashboard views reset */
.views-metric{
    position:relative;
}

.metric-reset{
    margin-top:6px;
    border:0;
    background:transparent;
    padding:0;
    color:var(--muted);
    font:inherit;
    font-size:11px;
    font-weight:900;
    cursor:pointer;
    text-decoration:underline;
}

.metric-reset:hover{
    color:var(--ink);
}

.reset-views-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}

.reset-views-row form{
    margin:0;
}

/* Mobile management polish */
@media(max-width:720px){
    .asset-color-row{
        grid-template-columns:1fr;
    }

    .asset-preset-select{
        width:100% !important;
        max-width:none !important;
    }

    .asset-preset-select-row{
        grid-template-columns:1fr auto !important;
    }

    .group-head{
        flex-wrap:wrap;
        align-items:flex-start;
    }

    .group-head .group-copy{
        min-width:160px;
    }

    .group-head form,
    .group-head > button.secondary{
        flex:1 1 auto;
    }

    .source-row{
        flex-wrap:wrap;
    }

    .source-row .address{
        flex-basis:100%;
        order:3;
    }
}

@media(max-width:620px){
    .reset-views-row{
        display:grid;
        gap:12px;
    }

    .reset-views-row .secondary{
        width:100%;
    }
}


/* Upgraded landing page */
.hero-upgraded{
    display:grid;
    grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);
    align-items:center;
    gap:28px;
    text-align:left;
    padding:42px 30px;
}

.hero-upgraded .hero-copy{
    position:relative;
    z-index:1;
}

.hero-kicker{
    display:inline-flex;
    align-items:center;
    gap:7px;
    margin-bottom:14px;
    padding:7px 11px;
    border-radius:999px;
    background:rgba(124,60,255,.10);
    color:#4f2bd4;
    font-size:12px;
    font-weight:950;
    letter-spacing:.02em;
}

.hero-kicker:before{
    content:"";
    width:8px;
    height:8px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--brand),var(--brand2));
    box-shadow:0 0 0 5px rgba(124,60,255,.10);
}

.hero-upgraded h1{
    font-size:64px;
    line-height:.94;
    letter-spacing:-.085em;
    max-width:680px;
}

.hero-upgraded p{
    margin:18px 0 0;
    max-width:620px;
    text-align:left;
    font-size:18px;
}

.hero-upgraded .hero-actions{
    justify-content:flex-start;
}

.hero-trust{
    margin-top:14px;
    color:var(--muted);
    font-size:13px;
    font-weight:800;
}

.hero-preview{
    position:relative;
    z-index:1;
}

.preview-card{
    width:min(360px,100%);
    margin-left:auto;
    padding:16px;
    border-radius:28px;
    background:rgba(255,255,255,.72);
    border:1px solid rgba(255,255,255,.74);
    box-shadow:0 24px 70px rgba(45,37,86,.16);
    backdrop-filter:blur(18px);
}

.preview-profile{
    display:flex;
    align-items:center;
    gap:12px;
    padding-bottom:14px;
    margin-bottom:12px;
    border-bottom:1px solid rgba(18,18,26,.08);
}

.preview-avatar{
    width:58px;
    height:58px;
    border-radius:20px;
    display:grid;
    place-items:center;
    color:white;
    font-size:24px;
    font-weight:950;
    background:
        linear-gradient(135deg,rgba(255,255,255,.28),transparent),
        linear-gradient(135deg,var(--brand),#20114f);
    box-shadow:0 16px 28px rgba(124,60,255,.22);
}

.preview-profile strong,
.preview-row strong{
    display:block;
    letter-spacing:-.03em;
}

.preview-profile span,
.preview-row span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    margin-top:2px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.preview-row{
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto;
    align-items:center;
    gap:10px;
    padding:10px;
    border-radius:18px;
    background:rgba(255,255,255,.76);
    border:1px solid rgba(18,18,26,.055);
    margin-top:8px;
}

.preview-row.preferred{
    background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(236,255,245,.9));
    border-color:rgba(34,197,94,.30);
}

.preview-coin{
    width:42px;
    height:42px;
    border-radius:15px;
    display:grid;
    place-items:center;
    color:white;
    font-weight:950;
}

.preview-coin.btc{background:linear-gradient(135deg,#ffbf3c,#ff8a00)}
.preview-coin.eth{background:linear-gradient(135deg,#8b8cff,#3f35d4)}
.preview-coin.usdt{background:linear-gradient(135deg,#24c081,#0c8c61)}

.preview-row button{
    border:0;
    color:white;
    background:#11121a;
    padding:8px 10px;
    border-radius:12px;
    font-weight:900;
    font-size:12px;
}

.preview-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:12px;
}

.preview-actions span{
    display:grid;
    place-items:center;
    min-height:40px;
    border-radius:14px;
    font-size:12px;
    font-weight:950;
    background:rgba(18,18,26,.06);
    color:#4f4b60;
}

.preview-actions span:first-child{
    color:white;
    background:linear-gradient(135deg,var(--brand),#25145c);
    box-shadow:0 14px 24px rgba(124,60,255,.20);
}

@media(max-width:940px){
    .hero-upgraded{
        grid-template-columns:1fr;
        text-align:center;
    }

    .hero-upgraded p{
        text-align:center;
        margin-left:auto;
        margin-right:auto;
    }

    .hero-upgraded .hero-actions{
        justify-content:center;
    }

    .preview-card{
        margin:4px auto 0;
    }
}

@media(max-width:620px){
    .hero-upgraded{
        padding:34px 18px;
    }

    .hero-upgraded h1{
        font-size:48px;
    }

    .hero-upgraded p{
        font-size:16px;
    }

    .hero-trust{
        line-height:1.45;
    }
}

@media(max-width:420px){
    .hero-upgraded h1{
        font-size:41px;
    }

    .preview-row{
        grid-template-columns:38px minmax(0,1fr);
    }

    .preview-row button{
        grid-column:1 / -1;
        width:100%;
    }

    .preview-coin{
        width:38px;
        height:38px;
    }
}


/* Profile analytics cards */
.analytics-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin:12px 0 14px;
}

.analytics-stat{
    background:rgba(255,255,255,.72);
    border:1px solid rgba(18,18,26,.06);
    border-radius:18px;
    padding:13px;
    min-height:76px;
}

.analytics-stat strong{
    display:block;
    font-size:22px;
    line-height:1;
    letter-spacing:-.04em;
}

.analytics-stat span{
    display:block;
    color:var(--muted);
    font-size:12px;
    font-weight:800;
    margin-top:6px;
}

@media(max-width:720px){
    .analytics-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
