.aira-debt {
    position: relative;
    padding: 1.1rem;
    border-radius: 1.25rem;
    background: radial-gradient(140% 120% at 50% 0%, rgba(88, 28, 135, 0.55) 0%, rgba(15, 23, 42, 0.92) 60%, rgba(2, 6, 23, 0.95) 100%);
    border: 1px solid #4b5563;
    box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.8), 0 10px 26px -18px rgba(236, 72, 153, 0.55);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#debt-display:hover {
    color: #86efac;
}

.aira-debt.aira-debt--admin {
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
}

.aira-debt--admin .aira-debt__message:empty {
    display: none;
}

.aira-debt__empty {
    margin: 0;
    color: #9ca3af;
    text-align: center;
}

.aira-debt__signin {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.aira-debt__signin p {
    margin: 0;
    font-weight: 600;
}

.aira-debt__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.aira-debt__amount-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.aira-debt__label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}

.aira-debt__amount {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(90deg, #f87171, #ec4899);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-variant-numeric: tabular-nums;
}

.aira-debt__interest {
    font-size: 0.8rem;
    color: #f9a8d4;
}

.aira-debt__throne {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.6rem 1.6rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px -12px rgba(236, 72, 153, 0.9);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.aira-debt__throne:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.aira-debt__form {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.6);
}

.aira-debt__heading {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fbcfe8;
}

.aira-debt__form-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.aira-debt__field {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    padding: 0 0.75rem;
    border-radius: 0.75rem;
    background: rgba(55, 65, 81, 0.8);
    border: 1px solid #4b5563;
    transition: border-color 0.15s ease;
}

.aira-debt__field:focus-within {
    border-color: #ec4899;
}

.aira-debt__field--amount {
    flex: 0 0 9.5rem;
}

.aira-debt__field--order {
    flex: 1;
    min-width: 0;
}

.aira-debt__prefix {
    font-weight: 800;
    color: #f9a8d4;
}

.aira-debt__input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: #e5e7eb;
    font-size: 1rem;
    padding: 0.55rem 0;
}

.aira-debt__input--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85rem;
}

.aira-debt__paste {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(236, 72, 153, 0.5);
    background: rgba(236, 72, 153, 0.12);
    color: #fbcfe8;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.aira-debt__send {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 1.5rem;
    border-radius: 0.75rem;
    border: 0;
    background: linear-gradient(90deg, #ec4899, #e11d48);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.aira-debt__send:disabled {
    opacity: 0.6;
    cursor: default;
}

.aira-debt__message {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    min-height: 1.2em;
}

.aira-debt__message--ok { color: #86efac; }
.aira-debt__message--error { color: #ef4444; font-weight: 700; }

.aira-debt button:focus-visible,
.aira-debt a:focus-visible {
    outline: 2px solid #f9a8d4;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .aira-debt {
        padding: 0.85rem;
    }

    .aira-debt__summary {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .aira-debt__amount-wrap {
        align-items: center;
    }

    .aira-debt__amount {
        font-size: 2.2rem;
    }

    .aira-debt__form-row {
        flex-direction: column;
    }

    .aira-debt__field--amount {
        flex: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aira-debt__throne {
        transition: none;
    }
}

.aira-debt__history {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(75, 85, 99, 0.6);
}

.aira-debt__history .aira-debt__empty {
    text-align: left;
    font-size: 0.9rem;
}

.aira-debt__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.aira-debt__item {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.25rem 1rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.75rem;
    background: rgba(31, 41, 55, 0.6);
    border: 1px solid rgba(75, 85, 99, 0.5);
}

.aira-debt__item-amount {
    flex-shrink: 0;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.aira-debt__item-date {
    min-width: 0;
    font-size: 0.8rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aira-debt__item.is-truncated {
    cursor: pointer;
}

.aira-debt__item.is-expanded .aira-debt__item-date {
    white-space: normal;
    overflow: visible;
    overflow-wrap: anywhere;
}
