.aq-bank {
    width: 100%;
    box-sizing: border-box;
    padding: 24px;
    color: #14253e;
    font-family: inherit;
}

.aq-bank *,
.aq-bank *::before,
.aq-bank *::after {
    box-sizing: border-box;
}

.aq-bank__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.aq-bank__eyebrow {
    margin: 0 0 5px;
    color: #12864d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.aq-bank h1 {
    margin: 0;
    color: #10233e;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -.035em;
}

.aq-bank__subtitle {
    max-width: 760px;
    margin: 8px 0 0;
    color: #68778c;
    line-height: 1.5;
}

.aq-bank__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.aq-bank button {
    min-height: 40px;
    border: 1px solid #d8e1e6;
    border-radius: 10px;
    padding: 8px 14px;
    background: #fff;
    color: #1c3553;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.aq-bank button:hover {
    border-color: #98c9ae;
    background: #f7fbf8;
}

.aq-bank button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.aq-bank .aq-bank__primary {
    border-color: #108a4c;
    background: #108a4c;
    color: #fff;
}

.aq-bank .aq-bank__danger {
    color: #b42318;
    border-color: #ebc2c2;
}

.aq-bank__notice {
    display: none;
    margin-bottom: 16px;
    border: 1px solid #dce5ea;
    border-radius: 10px;
    padding: 11px 14px;
    background: #fff;
    font-size: 13px;
}

.aq-bank__notice[data-kind] {
    display: block;
}

.aq-bank__notice[data-kind="success"] {
    background: #f1faf5;
    border-color: #badfc9;
    color: #12633a;
}

.aq-bank__notice[data-kind="error"] {
    background: #fff5f5;
    border-color: #edc2c2;
    color: #a52a2a;
}

.aq-bank__metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.aq-bank__metric,
.aq-bank__panel {
    border: 1px solid #dce5ea;
    border-radius: 12px;
    background: #fff;
}

.aq-bank__metric {
    min-height: 118px;
    padding: 20px;
}

.aq-bank__metric small {
    display: block;
    margin-bottom: 18px;
    color: #6f7e92;
    font-weight: 700;
}

.aq-bank__metric strong {
    display: block;
    color: #10233e;
    font-size: 27px;
}

.aq-bank__metric span {
    display: block;
    margin-top: 7px;
    color: #7d899a;
    font-size: 12px;
}

.aq-bank__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(300px, .7fr);
    gap: 16px;
    margin-bottom: 16px;
}

.aq-bank__panel {
    overflow: hidden;
    margin-bottom: 16px;
}

.aq-bank__panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 17px 20px;
    border-bottom: 1px solid #e6ecef;
}

.aq-bank__panel-head h2 {
    margin: 0;
    font-size: 16px;
}

.aq-bank__panel-head p {
    margin: 4px 0 0;
    color: #758297;
    font-size: 12px;
}

.aq-bank__accounts,
.aq-bank__controls {
    display: grid;
    gap: 10px;
    padding: 16px 20px 20px;
}

.aq-bank__account,
.aq-bank__control {
    border: 1px solid #e2e9ed;
    border-radius: 10px;
    padding: 14px;
}

.aq-bank__account {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.aq-bank__account strong {
    display: block;
}

.aq-bank__account small {
    display: block;
    margin-top: 4px;
    color: #748297;
}

.aq-bank__account-balance {
    text-align: right;
}

.aq-bank__control {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
}

.aq-bank__control i {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 8px;
    background: #eaf8f0;
    color: #12864d;
    font-style: normal;
    font-weight: 800;
}

.aq-bank__control strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
}

.aq-bank__control span {
    color: #748297;
    font-size: 12px;
    line-height: 1.4;
}

.aq-bank__scroll {
    overflow-x: auto;
}

.aq-bank table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.aq-bank th,
.aq-bank td {
    padding: 11px 13px;
    border-bottom: 1px solid #e7edef;
    text-align: left;
    white-space: nowrap;
    font-size: 12px;
}

.aq-bank th {
    background: #f8fafb;
    color: #657489;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.aq-bank__status {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    border-radius: 999px;
    padding: 3px 9px;
    background: #eef2f5;
    color: #536277;
    font-weight: 700;
    text-transform: capitalize;
}

.aq-bank__status--ok {
    background: #e9f8ef;
    color: #137542;
}

.aq-bank__status--open {
    background: #fff5d9;
    color: #896000;
}

.aq-bank__status--bad {
    background: #fff0f0;
    color: #ad2b2b;
}

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

.aq-bank__row-actions button {
    min-height: 31px;
    padding: 5px 9px;
    font-size: 11px;
}

.aq-bank__empty {
    padding: 26px 20px;
    text-align: center;
    color: #768499;
    font-size: 13px;
}

.aq-bank__import,
.aq-bank__review {
    display: none;
}

.aq-bank__import[data-open="1"],
.aq-bank__review[data-open="1"] {
    display: block;
}

.aq-bank__form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
}

.aq-bank__field {
    display: grid;
    gap: 6px;
}

.aq-bank__field--wide {
    grid-column: span 2;
}

.aq-bank__field label {
    font-size: 12px;
    font-weight: 700;
}

.aq-bank input,
.aq-bank select {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d7e0e5;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff;
    color: #1f344f;
    font: inherit;
}

.aq-bank__form-note,
.aq-bank__foot {
    color: #67778a;
    font-size: 12px;
    line-height: 1.45;
}

.aq-bank__form-note {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border-radius: 9px;
    background: #f7f9fa;
}

.aq-bank__form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.aq-bank__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid #e6ecef;
}

.aq-bank__summary div {
    border: 1px solid #e3eaee;
    border-radius: 9px;
    padding: 11px;
}

.aq-bank__summary small {
    display: block;
    margin-bottom: 5px;
    color: #748297;
}

.aq-bank__candidates {
    padding: 16px 20px 20px;
    border-top: 1px solid #e6ecef;
}

.aq-bank__candidate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.aq-bank__candidate {
    display: grid;
    gap: 6px;
    border: 1px solid #e0e7eb;
    border-radius: 10px;
    padding: 12px;
}

.aq-bank__candidate span {
    color: #748297;
    font-size: 12px;
}

.aq-bank__candidate button {
    justify-self: start;
}

.aq-bank__foot {
    margin-top: 0;
    border: 1px solid #dce6e3;
    border-radius: 10px;
    padding: 12px 14px;
    background: #f7fbf9;
}

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

    .aq-bank__grid {
        grid-template-columns: 1fr;
    }

    .aq-bank__form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aq-bank__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .aq-bank {
        padding: 18px;
    }

    .aq-bank__header {
        display: grid;
    }

    .aq-bank__metrics,
    .aq-bank__form,
    .aq-bank__candidate-grid {
        grid-template-columns: 1fr;
    }

    .aq-bank__field--wide {
        grid-column: auto;
    }
}

@media (max-width: 430px) {
    .aq-bank {
        padding: 14px;
    }

    .aq-bank__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .aq-bank__actions button {
        width: 100%;
    }

    .aq-bank__summary {
        grid-template-columns: 1fr;
    }

    .aq-bank__account {
        display: grid;
    }

    .aq-bank__account-balance {
        text-align: left;
    }
}

/*
 * AQUILA_BANKING_NATIVE_FINANCE_VISIBILITY_R7
 *
 * Banking route owns the visible Finance workspace.
 *
 * The native Finance shell contains Finance Overview,
 * Finance and Control / Finance Workspace, and native
 * statement presentation.
 *
 * Banking itself is mounted outside this shell.
 */

html[data-aquila-finance-banking-active="1"]
section.section-page.dedicated-module-page:has(
    [data-finance-module-stage="active"]
) {
    display: none !important;
}

