/*
 * Trezor Suite — vanilla CSS recreation.
 * Theme tokens ported from packages/theme (paletteV2, colorsV2, typography, spacings, borders).
 */

/* ----------------------------------------------------------------------------
   Theme tokens
---------------------------------------------------------------------------- */
:root {
    /* spacings (px) */
    --sp-xxxs: 2px;
    --sp-xxs: 4px;
    --sp-xs: 8px;
    --sp-sm: 12px;
    --sp-md: 16px;
    --sp-lg: 20px;
    --sp-xl: 24px;
    --sp-xxl: 32px;
    --sp-xxxl: 40px;
    --sp-xxxxl: 48px;

    /* radii */
    --radius-xxs: 4px;
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-full: 100px;

    /* brand */
    --brand: #5ad38e;

    --header-height: 60px;
    --sidebar-width: 280px;
    --sidebar-min: 84px;
}

/* Dark theme (default) — ported from colorsV2.dark */
[data-theme='dark'] {
    --surface-page: #151719; /* darkCoolGrey0 */
    --surface-sunken: #0e0f10; /* darkCoolGreyMinus25 */
    --surface-raised: #1c1e20; /* darkCoolGrey25 */
    --surface-elevated: #313335; /* darkCoolGrey100 elementFillElevated */
    --surface-elevated-hover: #383a3c; /* darkCoolGrey150 */
    --surface-modal: #151719; /* darkCoolGrey0 */
    --surface-modal-underlay: rgba(0, 0, 0, 0.5);
    --surface-action: #1c1e20;

    --border-neutral: #ffffff17; /* globalWhiteAlpha75 */
    --border-sunken: #1c1e20; /* darkCoolGrey25 */
    --border-elevated: #232527; /* darkCoolGrey50 */
    --border-field: #ffffff26; /* globalWhiteAlpha150 */

    --content-primary: #ffffff;
    --content-secondary: #ffffff9e; /* globalWhiteAlpha600 */
    --content-tertiary: #ffffff80; /* globalWhiteAlpha500 */
    --content-disabled: #ffffff61;

    --fill-ghost-hover: #ffffff0f; /* globalWhiteAlpha50 */
    --fill-neutral-soft: #ffffff1f; /* globalWhiteAlpha100 */
    --fill-neutral-soft-hover: #ffffff26;
    --fill-field: #ffffff08; /* globalWhiteAlpha25 */

    --brand-fill: #5ad38e; /* darkGreen600 */
    --brand-fill-hover: #83e7af; /* darkGreen700 */
    --brand-content-on-fill: #14231d; /* darkGreen25 */
    --brand-text: #83e7af; /* darkGreen700 */
    --brand-soft: #37ae6a42; /* darkGreenAlpha100 */

    --content-critical: #fea9af; /* darkRed700 */
    --content-success: #83e7af;
    --content-info: #acc6f6; /* darkBlue700 */

    --shadow-elevated: 0 1px 2px rgba(0, 0, 0, 0.16), 0 0 1px rgba(0, 0, 0, 0.12);
    --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.4);

    color-scheme: dark;
}

/* Light theme — ported from colorsV2.light */
[data-theme='light'] {
    --surface-page: #f4f5f7; /* lightCoolGrey50 */
    --surface-sunken: #e6e8eb; /* lightCoolGrey100 */
    --surface-raised: #ffffff;
    --surface-elevated: #ffffff;
    --surface-elevated-hover: #f9fafb; /* lightCoolGrey25 */
    --surface-modal: #f9fafb;
    --surface-modal-underlay: #2e395212;
    --surface-action: #ffffff;

    --border-neutral: #2e395212; /* lightCoolGreyAlpha75 */
    --border-sunken: #dee0e4; /* lightCoolGrey150 */
    --border-elevated: #31487208;
    --border-field: #23304345; /* lightCoolGreyAlpha200 */

    --content-primary: #0e1115; /* lightCoolGreyAlpha900 */
    --content-secondary: #212830ba; /* lightCoolGreyAlpha600 */
    --content-tertiary: #242d3899; /* lightCoolGreyAlpha500 */
    --content-disabled: #29334278;

    --fill-ghost-hover: #2e395212;
    --fill-neutral-soft: #1f2c471c; /* lightCoolGreyAlpha100 */
    --fill-neutral-soft-hover: #232f4826;
    --fill-field: #203a600d; /* lightCoolGreyAlpha50 */

    --brand-fill: #60e198; /* lightGreen300 */
    --brand-fill-hover: #4bce81; /* lightGreen400 */
    --brand-content-on-fill: #062d16; /* lightGreen900 */
    --brand-text: #1e5736; /* lightGreen700 */
    --brand-soft: #60e1984d;

    --content-critical: #82262c; /* lightRed700 */
    --content-success: #1e5736;
    --content-info: #1d4690;

    --shadow-elevated: 0 1px 2px rgba(0, 40, 71, 0.08), 0 0 1px rgba(0, 40, 71, 0.06);
    --shadow-modal: 0 16px 48px rgba(0, 40, 71, 0.12);

    color-scheme: light;
}

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

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family:
        'TT Satoshi', 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica,
        Arial, sans-serif;
    background: var(--surface-page);
    color: var(--content-primary);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    /* body-md */
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: -0.16px;
}

button {
    font-family: inherit;
}

/* typography helpers */
.t-headline-lg {
    font-size: 48px;
    line-height: 56px;
    font-weight: 500;
    letter-spacing: -1.44px;
}
.t-headline-md {
    font-size: 32px;
    line-height: 40px;
    font-weight: 500;
    letter-spacing: -0.8px;
}
.t-headline-sm {
    font-size: 22px;
    line-height: 32px;
    font-weight: 500;
    letter-spacing: -0.4px;
}
.t-body-md-strong {
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    letter-spacing: -0.16px;
}
.t-body-md {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    letter-spacing: -0.16px;
}
.t-body-sm-strong {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    letter-spacing: -0.08px;
}
.t-body-sm {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    letter-spacing: -0.08px;
}
.t-body-xs {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.c-secondary {
    color: var(--content-secondary);
}
.c-tertiary {
    color: var(--content-tertiary);
}
.c-success {
    color: var(--content-success);
}
.c-critical {
    color: var(--content-critical);
}

/* ----------------------------------------------------------------------------
   Layout
---------------------------------------------------------------------------- */
.suite-layout {
    display: flex;
    flex-direction: row;
    height: 100dvh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    position: relative;
    flex: 0 0 auto;
    width: var(--sidebar-width);
    height: 100%;
    background: var(--surface-sunken);
    border-right: 1px solid var(--border-sunken);
    display: flex;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden;
}

.sidebar-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    z-index: 5;
}
.sidebar-resizer:hover {
    background: var(--brand-soft);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    padding: 28px 20px 12px;
    margin-top: 28px;
    height: 60px;
}

.app-collapsed .sidebar-logo {
    justify-content: center;
    padding: 28px 0 12px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 8px;
    margin-top: 16px;
}

.app-collapsed .nav {
    align-items: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 8px;
    border: 0;
    background: none;
    border-radius: var(--radius-sm);
    color: var(--content-secondary);
    cursor: pointer;
    transition: 0.15s ease-in-out;
    text-align: left;
}
.nav-item:hover {
    background: var(--fill-ghost-hover);
}
.nav-item.active {
    background: var(--surface-elevated);
    box-shadow: var(--shadow-elevated);
    color: var(--content-primary);
}
.nav-item .icon {
    flex: 0 0 auto;
}
.app-collapsed .nav-item {
    width: 40px;
    justify-content: center;
}
.app-collapsed .nav-item .nav-label {
    display: none;
}

.nav-badge {
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brand-fill);
    color: var(--brand-content-on-fill);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}
.app-collapsed .nav-badge {
    display: none;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.accounts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 8px;
}
.accounts-heading {
    padding: 8px 12px 4px;
    color: var(--content-secondary);
}
.app-collapsed .accounts-heading {
    display: none;
}

.account-item {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    cursor: pointer;
}
.account-item:hover {
    background: var(--fill-ghost-hover);
}
.app-collapsed .account-item {
    justify-content: center;
    padding: 8px;
}
.app-collapsed .account-item .account-name {
    display: none;
}

.quick-actions {
    display: flex;
    gap: 16px;
    padding: 16px;
    align-items: center;
    justify-content: space-evenly;
    border-top: 1px solid var(--border-sunken);
}
.app-collapsed .quick-actions {
    flex-direction: column;
}
.qa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: var(--radius-xs);
    background: none;
    color: var(--content-secondary);
    cursor: pointer;
    transition: 0.15s;
}
.qa-btn:hover {
    background: var(--fill-ghost-hover);
    color: var(--content-primary);
}

/* Main */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface-page);
}

.page-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: var(--header-height);
    height: var(--header-height);
    padding: 8px 24px;
    background: var(--surface-page);
    border-bottom: 1px solid var(--border-neutral);
    z-index: 10;
}
.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-scroll {
    flex: 1;
    overflow-y: auto;
}
.content {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: flex;
    flex-direction: column;
    gap: 48px;
}

/* ----------------------------------------------------------------------------
   Components
---------------------------------------------------------------------------- */
.card {
    background: var(--surface-elevated);
    border: 1px solid var(--border-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
}
.card-pad {
    padding: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-full);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.08px;
    cursor: pointer;
    transition: 0.15s;
    white-space: nowrap;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-primary {
    background: var(--brand-fill);
    color: var(--brand-content-on-fill);
}
.btn-primary:not(:disabled):hover {
    background: var(--brand-fill-hover);
}
.btn-secondary {
    background: var(--fill-neutral-soft);
    color: var(--content-primary);
}
.btn-secondary:not(:disabled):hover {
    background: var(--fill-neutral-soft-hover);
}
.btn-block {
    width: 100%;
}
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-field);
    background: var(--fill-field);
    color: var(--content-secondary);
    cursor: pointer;
    transition: 0.15s;
}
.icon-btn:hover {
    color: var(--content-primary);
    background: var(--fill-neutral-soft);
}
.icon-btn.active {
    color: var(--brand-text);
    background: var(--brand-soft);
}
.btn-group {
    display: inline-flex;
}
.btn-group .icon-btn:first-child {
    border-radius: var(--radius-xs) 0 0 var(--radius-xs);
}
.btn-group .icon-btn:last-child {
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    border-left: 0;
}

/* UI icons — real Suite SVG files (assets/icons), recolored via CSS mask so
   they follow the current theme text color. */
.icon {
    display: inline-block;
    flex: 0 0 auto;
    background-color: currentColor;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Trezor logo — real wordmark / symbol (assets/logos), masked + tinted. */
.logo-wordmark,
.logo-symbol {
    display: inline-block;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: left center;
    mask-position: left center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.logo-wordmark {
    width: 104px;
    height: 26px;
    background-color: var(--content-primary);
}
.logo-symbol {
    width: 22px;
    height: 26px;
    background-color: var(--brand-fill);
}

/* Coin badge — real full-color circular coin logos (assets/coins). */
.coin-logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    line-height: 0;
}
.coin-logo img {
    display: block;
    width: 100%;
    height: 100%;
}
.coin-logo--fallback {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

/* Dashboard section */
.section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.section-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Portfolio */
.portfolio {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
}
.portfolio-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.price-status {
    transition: opacity 0.2s;
}
.price-status.is-loading {
    opacity: 0.7;
}
.portfolio-balance {
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.portfolio-change {
    font-size: 14px;
    font-weight: 600;
}
.sparkline {
    width: 100%;
    height: 120px;
    margin-top: 8px;
}

/* Asset rows (table) */
.asset-table {
    display: flex;
    flex-direction: column;
}
.asset-row {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 20px;
    cursor: pointer;
}
.asset-row:hover {
    background: var(--fill-ghost-hover);
}
.asset-row + .asset-row {
    border-top: 1px solid var(--border-neutral);
}
.asset-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}
.asset-names {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.asset-mid {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 96px;
}
.asset-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 110px;
}
.asset-sub {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 24h change chip */
.change-chip {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 3px 6px;
    border-radius: var(--radius-xxs);
    background: var(--fill-neutral-soft);
}
.change-chip.c-success {
    background: var(--brand-soft);
}
.change-chip.c-critical {
    background: color-mix(in srgb, var(--content-critical) 16%, transparent);
}

@media (max-width: 620px) {
    .asset-mid {
        display: none;
    }
}

/* Asset grid (cards) */
.asset-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
}
.asset-card {
    all: unset;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background: var(--surface-elevated);
    border: 1px solid var(--border-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-elevated);
    cursor: pointer;
    transition: 0.15s;
}
.asset-card:hover {
    background: var(--surface-elevated-hover);
}
.asset-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.asset-card-amounts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Empty state */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 48px 24px;
    text-align: center;
}

/* Discreet (hide balances) */
.app-discreet .discreet {
    filter: blur(7px);
    transition: filter 0.1s;
    user-select: none;
}
.app-discreet .discreet:hover {
    filter: blur(0);
}

/* ----------------------------------------------------------------------------
   Settings
---------------------------------------------------------------------------- */
.settings {
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}
.settings-row + .settings-row {
    border-top: 1px solid var(--border-neutral);
}
.settings-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* segmented control */
.segmented {
    display: inline-flex;
    background: var(--fill-field);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 3px;
}
.segmented button {
    border: 0;
    background: none;
    color: var(--content-secondary);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.segmented button.active {
    background: var(--surface-elevated);
    color: var(--content-primary);
    box-shadow: var(--shadow-elevated);
}

/* select */
.select {
    appearance: none;
    background: var(--fill-field);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-xs);
    color: var(--content-primary);
    padding: 8px 36px 8px 12px;
    font-size: 14px;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* toggle switch */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: var(--fill-neutral-soft);
    border: 0;
    cursor: pointer;
    transition: 0.15s;
}
.switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--content-secondary);
    transition: 0.15s;
}
.switch.on {
    background: var(--brand-fill);
}
.switch.on::after {
    left: 23px;
    background: var(--brand-content-on-fill);
}

/* ----------------------------------------------------------------------------
   Modal
---------------------------------------------------------------------------- */
.modal-root {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    overflow-y: auto;
    background: var(--surface-modal-underlay);
    backdrop-filter: blur(4px);
    z-index: 100;
}
.modal-root.open {
    display: flex;
}
.modal {
    width: 100%;
    max-width: 480px;
    background: var(--surface-modal);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    padding: 32px;
    animation: modal-in 0.18s ease-out;
}
@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--fill-neutral-soft);
    color: var(--content-secondary);
    cursor: pointer;
}
.modal-close:hover {
    color: var(--content-primary);
}

.tabs {
    display: flex;
    gap: 8px;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-field label {
    color: var(--content-secondary);
    font-size: 13px;
    font-weight: 600;
}
.input-field input {
    width: 100%;
    background: var(--fill-field);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-xs);
    color: var(--content-primary);
    padding: 12px 14px;
    font-size: 15px;
}
.input-field input:focus {
    outline: none;
    border-color: var(--brand-fill);
}

.address-box {
    word-break: break-all;
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-xs);
    background: var(--fill-field);
    border: 1px solid var(--border-field);
}

.qr {
    width: 168px;
    height: 168px;
    padding: 12px;
    background: #fff;
    border-radius: var(--radius-xs);
}

.col {
    display: flex;
    flex-direction: column;
}
.center {
    align-items: center;
}
.gap-xs {
    gap: 8px;
}
.gap-sm {
    gap: 12px;
}
.gap-md {
    gap: 16px;
}
.gap-lg {
    gap: 20px;
}

.tx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}
.tx-row + .tx-row {
    border-top: 1px solid var(--border-neutral);
}
.tx-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tx-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 15px;
}
.tx-icon.recv {
    background: rgba(90, 211, 142, 0.16);
    color: var(--content-success);
}
.tx-icon.sent {
    background: var(--fill-neutral-soft);
    color: var(--content-secondary);
}
.tx-empty {
    padding: 32px 0;
}

/* coin picker grid in activate modal */
.coin-picker {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    margin: 4px -8px -8px;
    padding: 4px 8px 8px;
}
.coin-pick {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-field);
    background: var(--fill-field);
    cursor: pointer;
    transition: 0.12s;
}
.coin-pick:hover {
    background: var(--fill-neutral-soft);
}
.coin-pick.selected {
    border-color: var(--brand-fill);
    background: var(--brand-soft);
}
.coin-pick .check {
    margin-left: auto;
    color: var(--brand-text);
    opacity: 0;
}
.coin-pick.selected .check {
    opacity: 1;
}

/* notifications */
.notif-list {
    display: flex;
    flex-direction: column;
}
.notif-item {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    align-items: flex-start;
}
.notif-item + .notif-item {
    border-top: 1px solid var(--border-neutral);
}
.notif-dot {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-soft);
    color: var(--brand-text);
}

/* ----------------------------------------------------------------------------
   Welcome / onboarding (fullscreen)
---------------------------------------------------------------------------- */
.welcome-root {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 48px 24px;
    background: var(--surface-page);
    z-index: 150;
}
.welcome-root.open {
    display: flex;
}
.welcome-panel {
    width: 100%;
    max-width: 560px;
}

.ob-card-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 48px;
}
.ob-card {
    width: 100%;
    border-radius: var(--radius-md);
}
.ob-card-inner {
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding: 60px;
}
.ob-card--icon .ob-card-inner {
    padding-top: 72px;
}
.ob-icon {
    position: absolute;
    top: 0;
    z-index: 2;
}
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-text);
    border: 4px solid var(--surface-page);
}
.ob-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.row-center {
    display: flex;
    justify-content: center;
}
.spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 4px solid var(--fill-neutral-soft);
    border-top-color: var(--brand-fill);
    animation: spin 0.9s linear infinite;
}
.spinner-sm {
    width: 28px;
    height: 28px;
    border-width: 3px;
}
.spinner-xs {
    width: 16px;
    height: 16px;
    border-width: 2px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* QR fallback placeholder (only if the QR lib failed to load) */
.qr-fallback {
    width: 168px;
    height: 168px;
    border-radius: var(--radius-xs);
    background: var(--fill-field);
    border: 1px solid var(--border-field);
}

/* Send: confirm-on-device + success */
.send-confirm {
    width: 100%;
}
.device-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: var(--surface-elevated);
    border: 1px solid var(--border-neutral);
    box-shadow: var(--shadow-elevated);
}
.device-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-fill);
    animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}
.confirm-sheet {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: var(--fill-field);
    border: 1px solid var(--border-field);
}
.confirm-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.success-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-text);
}

.ob-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ob-option {
    all: unset;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 32px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: 0.15s;
}
.ob-option:hover {
    background: var(--surface-elevated-hover);
}
.ob-option .icon {
    color: var(--content-primary);
}
.ob-option--center {
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.count-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.seed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.seed-word {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--fill-field);
    border: 1px solid var(--border-field);
}
.words-scroll {
    width: 100%;
    max-height: 320px;
    overflow-y: auto;
}
.seed-input {
    width: 100%;
    background: var(--fill-field);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-xs);
    color: var(--content-primary);
    padding: 10px 12px;
    font-size: 14px;
}
.seed-input:focus {
    outline: none;
    border-color: var(--brand-fill);
}

.gap-xxs {
    gap: 4px;
}

@media (max-width: 600px) {
    .ob-card-inner {
        padding: 32px 20px;
    }
    .ob-card--icon .ob-card-inner {
        padding-top: 56px;
    }
    .seed-grid,
    .count-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* toast */
.toast-root {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 200;
    align-items: center;
}
.toast {
    background: var(--surface-elevated);
    color: var(--content-primary);
    border: 1px solid var(--border-neutral);
    border-radius: var(--radius-full);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-modal);
    animation: toast-in 0.2s ease-out;
}
@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* responsive */
@media (max-width: 760px) {
    .sidebar {
        width: var(--sidebar-min) !important;
    }
    .suite-layout {
        --collapsed: 1;
    }
}
