.ap-root .ap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 24px;
    border: 1.5px solid transparent;
    border-radius: var(--ap-pill);
    background: transparent;
    color: var(--ap-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, filter 0.15s ease;
}

.ap-root .ap-btn:hover {
    transform: translateY(-1px);
}

.ap-root .ap-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.ap-root .ap-btn .ap-icon {
    font-size: 18px;
}

.ap-root .ap-btn--primary,
.ap-root .ap-btn--primary:hover,
.ap-root .ap-btn--primary:focus,
.ap-root .ap-btn--primary:active,
.ap-root .ap-btn--primary:visited {
    color: var(--ap-on);
}

.ap-root .ap-btn--primary {
    background: var(--ap-grad);
    box-shadow: 0 8px 18px rgba(12, 32, 22, 0.22);
}

.ap-root .ap-btn--primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 10px 22px rgba(12, 32, 22, 0.3);
}

.ap-root .ap-btn--outline,
.ap-root .ap-btn--outline:visited {
    border-color: var(--ap-brand);
    color: var(--ap-brand);
    background: transparent;
}

.ap-root .ap-btn--outline:hover,
.ap-root .ap-btn--outline:focus,
.ap-root .ap-btn--outline:active {
    border-color: var(--ap-brand);
    background: var(--ap-brand);
    color: var(--ap-on-brand);
}

.ap-root .ap-btn--ghost,
.ap-root .ap-btn--ghost:visited {
    color: var(--ap-muted);
}

.ap-root .ap-btn--ghost:hover,
.ap-root .ap-btn--ghost:focus {
    background: var(--ap-surface);
    color: var(--ap-text);
}

.ap-root .ap-btn--danger,
.ap-root .ap-btn--danger:hover,
.ap-root .ap-btn--danger:focus,
.ap-root .ap-btn--danger:visited {
    background: var(--ap-danger);
    color: #ffffff;
}

.ap-root .ap-btn--danger:hover {
    filter: brightness(1.1);
}

.ap-root .ap-btn--light,
.ap-root .ap-btn--light:hover,
.ap-root .ap-btn--light:focus,
.ap-root .ap-btn--light:visited {
    background: #ffffff;
    color: #0f2a1c;
}

.ap-root .ap-btn--light:hover {
    background: rgba(255, 255, 255, 0.9);
}

.ap-root .ap-btn--sm {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
}

.ap-root .ap-btn--lg {
    height: 52px;
    font-size: 15px;
}

.ap-root .ap-btn--block {
    width: 100%;
}

.ap-root .ap-link,
.ap-root .ap-link:visited,
.ap-root .ap-link:hover,
.ap-root .ap-link:focus {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ap-brand-text);
    font-size: inherit;
    font-weight: 600;
}

.ap-root .ap-link:hover {
    text-decoration: underline;
}

.ap-root .ap-card {
    position: relative;
    padding: 20px;
    border-radius: var(--ap-radius);
    background: var(--ap-card);
}

.ap-root .ap-card--flush {
    padding: 0;
    overflow: hidden;
}

.ap-root .ap-card + .ap-card,
.ap-root .ap-card + .ap-split,
.ap-root .ap-card + .ap-thread,
.ap-root .ap-thread + .ap-card,
.ap-root .ap-toolbar + .ap-card,
.ap-root .ap-card + .ap-pager {
    margin-top: 16px;
}

.ap-root .ap-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ap-root .ap-card__title {
    font-size: 16px;
    font-weight: 700;
}

.ap-root .ap-card__title--padded {
    padding: 20px 20px 4px;
}

.ap-root .ap-card__subtitle {
    margin: 16px 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.ap-root .ap-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 8px;
    background: var(--ap-surface);
    color: var(--ap-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 22px;
    white-space: nowrap;
}

.ap-root .ap-pill--success {
    background: #e4f2e5;
    color: #2c7a3f;
}

.ap-root .ap-pill--warn {
    background: var(--ap-warn-soft);
    color: var(--ap-warn);
}

.ap-root .ap-pill--danger {
    background: var(--ap-danger-soft);
    color: var(--ap-danger);
}

.ap-root .ap-pill--info {
    background: var(--ap-info-soft);
    color: var(--ap-info);
}

.ap-root[data-theme="dark"] .ap-pill--success {
    background: rgba(94, 190, 145, 0.16);
    color: var(--ap-c-300);
}

.ap-root .ap-flash,
.ap-root .ap-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: var(--ap-radius-sm);
    background: var(--ap-info-soft);
    color: var(--ap-info);
    font-size: 14px;
}

.ap-root .ap-flash .ap-icon,
.ap-root .ap-alert .ap-icon {
    margin-top: 3px;
    font-size: 18px;
}

.ap-root .ap-flash--success,
.ap-root .ap-alert--success {
    background: #e4f2e5;
    color: #2c7a3f;
}

.ap-root .ap-flash--error,
.ap-root .ap-alert--danger {
    background: var(--ap-danger-soft);
    color: var(--ap-danger);
}

.ap-root .ap-alert--warning {
    background: var(--ap-warn-soft);
    color: var(--ap-warn);
}

.ap-root .ap-alert__body {
    flex: 1 1 auto;
}

.ap-root .ap-alert__body p {
    margin-top: 2px;
}

.ap-root .ap-alert__close {
    padding: 2px;
    border: 0;
    background: transparent;
    color: inherit;
    opacity: 0.7;
}

.ap-root .ap-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.ap-root .ap-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ap-text);
}

.ap-root .ap-req {
    color: var(--ap-danger);
}

.ap-root .ap-input,
.ap-root .ap-select,
.ap-root .ap-textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border: 1.5px solid var(--ap-line-strong);
    border-radius: var(--ap-radius-sm);
    background: var(--ap-card);
    box-shadow: none;
    color: var(--ap-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ap-root .ap-textarea {
    min-height: 120px;
    resize: vertical;
}

.ap-root .ap-input:focus,
.ap-root .ap-select:focus,
.ap-root .ap-textarea:focus {
    border-color: var(--ap-c-700);
    box-shadow: 0 0 0 4px var(--ap-brand-soft);
    outline: 0;
}

.ap-root .ap-input--ltr {
    direction: ltr;
    text-align: right;
}

.ap-root .ap-input--code {
    direction: ltr;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 8px;
}

.ap-root .ap-hint {
    font-size: 12px;
    line-height: 1.9;
    color: var(--ap-muted);
}

.ap-root .ap-hint--center {
    margin-bottom: 14px;
    text-align: center;
}

.ap-root .ap-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.ap-root .ap-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ap-c-700);
}

.ap-root .ap-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.ap-root .ap-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ap-root .ap-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 16px;
}

.ap-root .ap-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.ap-root .ap-password {
    position: relative;
}

.ap-root .ap-password .ap-input {
    padding-inline-end: 48px;
}

.ap-root .ap-password__toggle {
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    margin-top: -18px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ap-muted);
    font-size: 19px;
}

.ap-root .ap-strength {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ap-root .ap-strength span {
    position: relative;
    flex: 1 1 auto;
    height: 6px;
    border-radius: 6px;
    background: var(--ap-line);
    overflow: hidden;
}

.ap-root .ap-strength span::after {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: var(--ap-level, 0%);
    border-radius: 6px;
    background: var(--ap-level-color, var(--ap-danger));
    transition: width 0.2s ease;
}

.ap-root .ap-strength em {
    min-width: 42px;
    font-size: 12px;
    font-style: normal;
    color: var(--ap-muted);
}

.ap-root .ap-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.ap-root .ap-table th {
    padding: 14px 20px;
    border-bottom: 1px solid var(--ap-line);
    color: var(--ap-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.ap-root .ap-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--ap-line);
    vertical-align: middle;
}

.ap-root .ap-table tbody tr:last-child td {
    border-bottom: 0;
}

.ap-root .ap-table tbody tr:hover td {
    background: var(--ap-surface);
}

.ap-root .ap-table__link {
    font-weight: 600;
}

.ap-root .ap-table__link:hover {
    color: var(--ap-brand-text);
}

.ap-root .ap-amount {
    font-weight: 700;
    direction: ltr;
    unicode-bidi: plaintext;
}

.ap-root .ap-amount--in {
    color: #2c7a3f;
}

.ap-root .ap-amount--out {
    color: var(--ap-danger);
}

.ap-root .ap-list > li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--ap-line);
}

.ap-root .ap-list > li:last-child {
    border-bottom: 0;
}

.ap-root .ap-list__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ap-brand-soft);
    color: var(--ap-brand-text);
    font-size: 20px;
}

.ap-root .ap-list__main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.ap-root .ap-list__main small {
    color: var(--ap-muted);
    font-size: 12px;
}

.ap-root .ap-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ap-root .ap-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ap-root .ap-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--ap-pill);
    background: var(--ap-card);
    color: var(--ap-muted);
    font-size: 13px;
    font-weight: 600;
}

.ap-root .ap-tab:hover {
    background: var(--ap-brand-soft);
    color: var(--ap-text);
}

.ap-root .ap-tab.is-active,
.ap-root .ap-tab.is-active:hover,
.ap-root .ap-tab.is-active:focus {
    background: var(--ap-solid);
    color: var(--ap-on);
}

.ap-root .ap-tab__count {
    min-width: 22px;
    padding: 0 6px;
    border-radius: 8px;
    background: var(--ap-surface);
    color: var(--ap-muted);
    font-size: 11px;
    line-height: 20px;
    text-align: center;
}

.ap-root .ap-tab.is-active .ap-tab__count {
    background: rgba(127, 127, 127, 0.28);
    color: var(--ap-on);
}

.ap-root .ap-tabs--pill {
    margin-bottom: 20px;
    padding: 5px;
    border-radius: var(--ap-pill);
    background: var(--ap-surface);
}

.ap-root .ap-tabs--pill .ap-tab {
    flex: 1 1 0;
    justify-content: center;
    background: transparent;
}

.ap-root .ap-tabs--pill .ap-tab.is-active {
    background: var(--ap-card);
    color: var(--ap-text);
    box-shadow: 0 2px 8px rgba(12, 32, 22, 0.08);
}

.ap-root .ap-searchbar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px;
    border-radius: var(--ap-pill);
    background: var(--ap-card);
}

.ap-root .ap-searchbar--wide {
    margin-bottom: 16px;
}

.ap-root .ap-searchbar input {
    flex: 1 1 auto;
    min-width: 220px;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
}

.ap-root .ap-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}

.ap-root .ap-pager__link,
.ap-root .ap-pager__gap {
    display: inline-flex;
    min-width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--ap-card);
    font-size: 13px;
    font-weight: 600;
}

.ap-root .ap-pager__link:hover {
    background: var(--ap-brand-soft);
}

.ap-root .ap-pager__link.is-current,
.ap-root .ap-pager__link.is-current:hover {
    background: var(--ap-solid);
    color: var(--ap-on);
}

.ap-root .ap-pager__gap {
    background: transparent;
}

.ap-root .ap-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 48px 20px;
    text-align: center;
}

.ap-root .ap-empty__icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--ap-brand-soft);
    color: var(--ap-brand-text);
    font-size: 30px;
}

.ap-root .ap-empty__title {
    font-size: 16px;
}

.ap-root .ap-empty__text {
    max-width: 380px;
    color: var(--ap-muted);
}

.ap-root .ap-kv {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 36px;
}

.ap-root .ap-kv > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.ap-root .ap-kv small {
    color: var(--ap-muted);
    font-size: 12px;
}

.ap-root .ap-dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
}

.ap-root .ap-dl dt {
    color: var(--ap-muted);
}

.ap-root .ap-dl dd {
    font-weight: 600;
}

.ap-root .ap-progress-bar {
    height: 8px;
    margin: 10px 0 8px;
    border-radius: 8px;
    background: var(--ap-line);
    overflow: hidden;
}

.ap-root .ap-progress-bar span {
    display: block;
    height: 100%;
    border-radius: 8px;
    background: var(--ap-grad);
}

.ap-root .ap-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.ap-root .ap-checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ap-muted);
}

.ap-root .ap-checklist li.is-done {
    color: var(--ap-text);
}

.ap-root .ap-checklist li.is-done .ap-icon {
    color: var(--ap-brand-text);
}

.ap-root .ap-checklist li:not(.is-done) .ap-icon {
    color: var(--ap-warn);
}

.ap-root .ap-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.ap-root .ap-split--aside {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.ap-root .ap-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ap-root .ap-tips__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 16px;
    padding-inline-start: 18px;
    list-style: disc;
    color: var(--ap-muted);
}

.ap-root .ap-tips__list {
    list-style: disc;
}

@media (max-width: 900px) {
    .ap-root .ap-split,
    .ap-root .ap-split--aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .ap-root .ap-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .ap-root .ap-table thead {
        display: none;
    }

    .ap-root .ap-table,
    .ap-root .ap-table tbody,
    .ap-root .ap-table tr,
    .ap-root .ap-table td {
        display: block;
        width: 100%;
    }

    .ap-root .ap-table tr {
        padding: 12px 16px;
        border-bottom: 1px solid var(--ap-line);
    }

    .ap-root .ap-table td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 6px 0;
        border: 0;
        text-align: left;
    }

    .ap-root .ap-table td::before {
        content: attr(data-label);
        color: var(--ap-muted);
        font-size: 12px;
    }

    .ap-root .ap-table td:not([data-label])::before {
        content: none;
    }
}

.ap-toasts {
    position: fixed;
    inset-inline: 0;
    bottom: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.ap-toast {
    padding: 11px 22px;
    border-radius: var(--ap-pill, 999px);
    background: #0f452b;
    color: #ffffff;
    font-family: "Abar", Tahoma, Arial, sans-serif;
    font-size: 13px;
    box-shadow: 0 12px 30px rgba(4, 21, 11, 0.3);
    animation: ap-toast-in 0.25s ease;
}

.ap-toast.is-leaving {
    opacity: 0;
    transition: opacity 0.3s ease;
}

@keyframes ap-toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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