html[data-if-brand="ledger"][data-if-theme="dark"] {
    --if-muted: #a6a8ba;
    --if-accent: #DAB482;
    --if-accent-ink: #2C2941;
    --if-accent-soft: #3B3141;
    --if-accent-line: #A87947;
}

html[data-if-brand="ledger"][data-if-theme="light"] {
    --if-muted: #625e70;
    --if-accent: #80562F;
    --if-accent-ink: #F3E6CF;
    --if-accent-soft: #F9EFDE;
    --if-accent-line: #A87947;
}

.ledger-brand__mark {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--if-accent-line);
    border-radius: var(--if-radius-sm);
    background: var(--if-accent-soft);
    flex: none;
}

.ledger-brand__logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ledger-sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 10px;
}

.ledger-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.ledger-user__text {
    display: grid;
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
}

.ledger-user__text strong,
.ledger-user__text small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ledger-user__text small {
    color: var(--if-muted);
}

.ledger-sidebar-logout {
    width: 100%;
    min-height: 32px;
}

.ledger-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 18% 12%, var(--if-accent-soft), transparent 32rem),
        var(--if-bg);
}

.ledger-auth-card {
    width: min(430px, 100%);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ledger-auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ledger-auth-logo {
    width: 54px;
    height: 54px;
    border: 1px solid var(--if-accent-line);
    border-radius: var(--if-radius);
    object-fit: cover;
}

.ledger-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 860px) {
    .if-app {
        display: block;
    }

    .if-sidebar {
        min-height: auto;
        padding: 14px;
        border-right: 0;
        border-bottom: 1px solid var(--if-line);
        gap: 14px;
    }

    .ledger-sidebar-foot {
        margin-top: 0;
        padding: 0;
    }

    .ledger-user__text small {
        display: none;
    }

    .if-topbar {
        padding: 10px 16px;
    }

    .if-content {
        padding: 20px 16px max(20px, env(safe-area-inset-bottom));
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

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

.ledger-dev-login {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ledger-dev-login__chip {
    border: 1px solid var(--if-accent-line);
    cursor: pointer;
    min-height: 32px;
    padding: 6px 10px;
}

.ledger-dev-login__chip:hover {
    background: var(--if-accent-soft);
}
