/* PayPal-inspired panel chrome and dashboard */

.fi-body-has-topbar,
.fi-body-has-top-navigation {
    background: #f5f7fa;
    color: #001c64;
    font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.fi-body-has-topbar .fi-topbar-ctn,
.fi-body-has-top-navigation .fi-topbar-ctn {
    background: #003087;
    box-shadow: none;
    border: 0;
}

.fi-body-has-topbar .fi-topbar,
.fi-body-has-top-navigation .fi-topbar {
    min-height: 64px;
    padding: 0 20px;
    background: #003087;
    color: #fff;
    box-shadow: none;
    border: 0;
}

.fi-body-has-topbar .fi-topbar-start,
.fi-body-has-topbar .fi-topbar-end,
.fi-body-has-topbar .fi-topbar-nav-groups {
    align-items: center;
}

.fi-body-has-topbar .fi-topbar-nav-groups {
    flex: 1;
    justify-content: center;
    gap: 4px;
}

.fi-body-has-topbar .fi-logo,
.fi-body-has-topbar .fi-logo img {
    height: 28px !important;
    width: auto;
}

.fi-body-has-topbar .fi-topbar-item-btn,
.fi-body-has-topbar .fi-topbar-item-label,
.fi-body-has-topbar .fi-topbar-group-toggle-icon,
.fi-body-has-topbar .fi-topbar .fi-icon-btn,
.fi-body-has-topbar .fi-topbar .fi-icon-btn svg {
    color: #fff !important;
}

.fi-body-has-topbar .fi-topbar-item-icon {
    display: none;
}

.fi-body-has-topbar .fi-topbar-item-btn {
    min-height: 36px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    background: transparent;
}

.fi-body-has-topbar .fi-topbar-item-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.fi-body-has-topbar .fi-topbar-item.fi-active .fi-topbar-item-btn {
    background: #e7e8ea;
}

.fi-body-has-topbar .fi-topbar-item.fi-active .fi-topbar-item-btn,
.fi-body-has-topbar .fi-topbar-item.fi-active .fi-topbar-item-label,
.fi-body-has-topbar .fi-topbar-item.fi-active .fi-topbar-group-toggle-icon {
    color: #001c64 !important;
}

.fi-body-has-topbar .fi-topbar-open-sidebar-btn,
.fi-body-has-topbar .fi-topbar-close-sidebar-btn {
    color: #fff;
}

.fi-body-has-topbar .fi-global-search-ctn,
.fi-body-has-topbar .fi-global-search {
    display: none;
}

.fi-body-has-topbar .fi-sidebar {
    background: #001c64;
}

.fi-body-has-topbar .fi-sidebar-nav,
.fi-body-has-topbar .fi-sidebar-item-label,
.fi-body-has-topbar .fi-sidebar-group-label {
    color: #fff;
}

.fi-body-has-topbar .fi-main,
.fi-body-has-topbar .fi-main-ctn,
.fi-body-has-topbar .fi-page {
    background: #f5f7fa;
}

.fi-body-has-topbar .chp-dash-page .fi-page-header,
.fi-body-has-topbar .chp-dash-page .fi-header {
    display: none;
}

.fi-body-has-topbar .chp-dash-page .fi-page-content {
    padding-top: 8px;
}

.chp-topbar-end {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.chp-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    border-radius: 999px;
}

.chp-topbar-icon svg {
    width: 22px;
    height: 22px;
}

.chp-topbar-icon:hover {
    background: rgba(255, 255, 255, 0.12);
}

.chp-topbar-logout {
    border: 0;
    background: transparent;
    color: #fff;
    font: 700 13px/1 "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: 0.08em;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
}

.chp-topbar-logout:hover {
    background: rgba(255, 255, 255, 0.12);
}

.chp-dash {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1180px;
    margin: 0 auto 32px;
    padding: 8px 8px 24px;
}

.chp-dash__body {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 24px;
}

.chp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 28, 100, 0.06);
    overflow: hidden;
}

.chp-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-width: 0;
    position: relative;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.16s ease;
}

.chp-stat + .chp-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: #e8ecf0;
}

.chp-stat:hover {
    background: #f6f8fb;
}

.chp-stat__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chp-stat__icon svg {
    width: 20px;
    height: 20px;
}

.chp-stat__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.chp-stat__label {
    color: #545d68;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chp-stat__value {
    color: #001c64;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    white-space: nowrap;
}

.chp-stat--empty .chp-stat__value {
    color: #8a94a0;
    font-weight: 600;
}

.chp-stat__hint {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chp-stat__hint--up {
    color: #0d7a3f;
}

.chp-stat__hint--down {
    color: #c45500;
}

.chp-stat__hint--warn {
    color: #0070ba;
}

.chp-stat--collected .chp-stat__icon,
.chp-stat--paid .chp-stat__icon {
    background: #e6f4ea;
    color: #0d7a3f;
}

.chp-stat--outstanding .chp-stat__icon,
.chp-stat--customers .chp-stat__icon {
    background: #e6f1fb;
    color: #0070ba;
}

.chp-stat--overdue .chp-stat__icon {
    background: #f3e6c8;
    color: #8a5a00;
}

.chp-stat--overdue.chp-stat--empty .chp-stat__icon {
    background: #e6f4ea;
    color: #0d7a3f;
}

.chp-stat--overdue.chp-stat--live {
    background: #fbf6ea;
}

.chp-stat--overdue.chp-stat--live:hover {
    background: #f6eed8;
}

.chp-stat--drafts .chp-stat__icon {
    background: #eef0f2;
    color: #545d68;
}

.chp-stat--drafts.chp-stat--live .chp-stat__icon {
    background: #e6f1fb;
    color: #0070ba;
}

.chp-dash__main,
.chp-dash__side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.chp-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 28, 100, 0.06);
    padding: 20px 22px;
}

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

.chp-card__head h2 {
    margin: 0;
    color: #001c64;
    font-size: 18px;
    font-weight: 700;
}

.chp-card__menu {
    display: inline-flex;
    color: #001c64;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.chp-card__menu svg {
    width: 18px;
    height: 18px;
}

.chp-card__menu:hover,
.chp-card__link:hover {
    background: #f1f2f3;
}

.chp-card__link {
    color: #0070ba;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 8px;
}

.chp-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    padding: 18px 20px;
}

.chp-notice__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #e6f1fb;
    color: #003087;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chp-notice__icon svg {
    width: 24px;
    height: 24px;
}

.chp-notice__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chp-notice__copy strong {
    color: #001c64;
    font-size: 16px;
}

.chp-notice__copy span {
    color: #545d68;
    font-size: 14px;
}

.chp-balance__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 4px 0 18px;
}

.chp-balance__tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px 16px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    min-height: 148px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.chp-balance__tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 28, 100, 0.08);
}

.chp-balance__tile--collected {
    background: #e8f5ee;
}

.chp-balance__tile--outstanding {
    background: #e6f1fb;
}

.chp-balance__tile-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chp-balance__tile-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
}

.chp-balance__tile-icon svg {
    width: 18px;
    height: 18px;
}

.chp-balance__tile--collected .chp-balance__tile-icon {
    color: #0d7a3f;
}

.chp-balance__tile--outstanding .chp-balance__tile-icon {
    color: #0070ba;
}

.chp-balance__amount {
    margin: 14px 0 0;
    color: #001c64;
    font-size: 36px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chp-balance__meta {
    margin: 0;
    color: #001c64;
    font-size: 15px;
    font-weight: 700;
}

.chp-balance__hint {
    margin-top: 6px;
    font-size: 13px;
    color: #545d68;
}

.chp-balance__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    background: #001c64;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.chp-balance__cta:hover {
    background: #003087;
}

.chp-balance__note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f3e6c8;
    color: #001c64;
    font-size: 14px;
    line-height: 1.45;
}

.chp-balance__note svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.chp-balance__note p {
    margin: 0;
}

.chp-balance__note a {
    color: #0070ba;
    font-weight: 700;
    text-decoration: none;
}

.chp-balance__note a:hover {
    text-decoration: underline;
}

.chp-activity__row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid #eef0f2;
}

.chp-activity__row:first-of-type {
    border-top: 0;
}

.chp-activity__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #003087;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.chp-activity__avatar--credit {
    background: #0070ba;
}

.chp-activity__copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chp-activity__copy strong {
    color: #001c64;
    font-size: 15px;
}

.chp-activity__copy span {
    color: #6c7378;
    font-size: 13px;
}

.chp-activity__amount {
    color: #001c64;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.chp-activity__amount--credit {
    color: #001c64;
}

.chp-empty {
    margin: 8px 0 0;
    color: #6c7378;
    font-size: 14px;
}

.chp-quick {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px 4px 4px;
}

.chp-quick__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    text-decoration: none;
    color: #001c64;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
}

.chp-quick__icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #e8eef5;
    color: #001c64;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chp-quick__icon svg {
    width: 26px;
    height: 26px;
}

.chp-quick__item:hover .chp-quick__icon {
    background: #d7e3f2;
}

.chp-send__row {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 8px 0 4px;
}

.chp-send__person {
    flex: 0 0 auto;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    text-decoration: none;
    color: #001c64;
    font-size: 12px;
    font-weight: 600;
}

.chp-send__search,
.chp-send__avatar {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chp-send__search {
    background: #0070ba;
    color: #fff;
}

.chp-send__search svg {
    width: 24px;
    height: 24px;
}

.chp-send__avatar {
    background: #e8eef5;
    color: #001c64;
    font-size: 14px;
}

.chp-tools__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px;
    text-decoration: none;
    color: #001c64;
    font-size: 15px;
    font-weight: 600;
    border-top: 1px solid #eef0f2;
}

.chp-tools__row:first-of-type {
    border-top: 0;
}

.chp-tools__row:hover {
    color: #0070ba;
}

.chp-tools__icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e8eef5;
    color: #001c64;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chp-tools__icon svg {
    width: 20px;
    height: 20px;
}

.fi-body-has-topbar .fi-section,
.fi-body-has-topbar .fi-ta-ctn,
.fi-body-has-topbar .fi-wi {
    border-radius: 16px;
}

.fi-topbar-notifications .fi-badge,
.fi-db-notif-btn .fi-badge {
    background: #d20000 !important;
    color: #fff !important;
}

@media (max-width: 980px) {
    .chp-dash {
        padding: 0 0 24px;
    }

    .chp-dash__body {
        grid-template-columns: 1fr;
    }

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

    .chp-stat:nth-child(2n + 1)::before {
        display: none;
    }

    .chp-stat:nth-child(n + 3) {
        border-top: 1px solid #e8ecf0;
    }

    .chp-quick {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .chp-balance__amount {
        font-size: 32px;
    }
}

@media (max-width: 640px) {
    .fi-body-has-topbar .fi-topbar-nav-groups {
        display: none;
    }

    .chp-stats {
        grid-template-columns: 1fr 1fr;
    }

    .chp-stat {
        padding: 16px;
    }

    .chp-stat__icon {
        width: 40px;
        height: 40px;
    }

    .chp-stat__value {
        font-size: 22px;
    }

    .chp-balance__grid {
        grid-template-columns: 1fr;
    }

    .chp-balance__tile {
        min-height: 0;
    }

    .chp-quick {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 16px;
    }
}
