:root {
    --bg: #f5f7ff;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-solid: #ffffff;
    --line: #e4e8fb;
    --line-strong: #d7dcf4;
    --text: #1e266d;
    --muted: #6973a6;
    --accent: #414ba3;
    --accent-soft: rgba(0, 254, 223, 0.12);
    --accent-strong: #00fedf;
    --accent-deep: #1e266d;
    --shadow: 0 18px 48px rgba(30, 38, 109, 0.08);
    --radius-xl: 22px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --sidebar-width: 226px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    background:
    radial-gradient(circle at top left, rgba(0, 254, 223, 0.13), transparent 18%),
    radial-gradient(circle at top right, rgba(65, 75, 163, 0.08), transparent 22%),
        linear-gradient(180deg, #fcfdff 0%, var(--bg) 100%);
}

button,
input,
select {
    font: inherit;
}

button {
    border: 0;
    background: none;
    cursor: pointer;
}

.wallet-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 18px 12px 18px 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 247, 255, 0.96) 100%);
    border-right: 1px solid rgba(228, 232, 251, 0.95);
    backdrop-filter: blur(16px);
}

.brand-row {
    display: flex;
    align-items: center;
    padding: 2px 8px 4px;
}

.brand-logo {
    display: block;
    width: 158px;
    max-width: 100%;
    height: auto;
}

.sidebar-nav,
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group-label {
    margin: 16px 8px 6px;
    color: #7a83b1;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin: 0 2px;
    border-radius: 14px;
    color: #46508c;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
}

.nav-item:hover,
.nav-item-active {
    background: linear-gradient(90deg, rgba(0, 254, 223, 0.12) 0%, rgba(65, 75, 163, 0.08) 100%);
    color: var(--accent-deep);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.nav-icon,
.grid-squares,
.list-lines,
.icon-download span,
.collapse-button span,
.menu-button span {
    position: relative;
    display: inline-block;
}

.nav-icon {
    width: 16px;
    height: 16px;
    color: currentColor;
    opacity: 0.82;
}

.grid-icon::before,
.wallet-icon::before,
.bank-icon::before,
.users-icon::before,
.person-icon::before,
.mint-icon::before,
.invoice-icon::before,
.beneficiary-icon::before,
.history-icon::before,
.key-icon::before,
.webhook-icon::before,
.ip-icon::before,
.help-icon::before,
.settings-icon::before,
.grid-icon::after,
.wallet-icon::after,
.bank-icon::after,
.users-icon::after,
.person-icon::after,
.mint-icon::after,
.invoice-icon::after,
.beneficiary-icon::after,
.history-icon::after,
.key-icon::after,
.webhook-icon::after,
.ip-icon::after,
.help-icon::after,
.settings-icon::after {
    content: "";
    position: absolute;
}

.grid-icon::before {
    inset: 1px;
    border-radius: 4px;
    box-shadow: 0 0 0 2px currentColor inset, 7px 0 0 -1px currentColor, 0 7px 0 -1px currentColor, 7px 7px 0 -1px currentColor;
}

.wallet-icon::before {
    inset: 2px 1px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.wallet-icon::after {
    top: 6px;
    right: 0;
    width: 5px;
    height: 4px;
    background: currentColor;
    border-radius: 2px;
}

.bank-icon::before {
    left: 0;
    right: 0;
    top: 1px;
    margin: auto;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 5px solid currentColor;
}

.bank-icon::after {
    left: 2px;
    right: 2px;
    bottom: 1px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.users-icon::before,
.beneficiary-icon::before {
    top: 1px;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 7px 3px 0 0 currentColor;
}

.users-icon::after,
.beneficiary-icon::after {
    left: 0;
    bottom: 1px;
    width: 15px;
    height: 7px;
    border-radius: 7px 7px 2px 2px;
    border: 2px solid currentColor;
    border-top: 0;
}

.person-icon::before,
.help-icon::before {
    top: 0;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.person-icon::after,
.help-icon::after {
    bottom: 0;
    left: 2px;
    width: 12px;
    height: 6px;
    border-radius: 8px 8px 2px 2px;
    border: 2px solid currentColor;
    border-top: 0;
}

.mint-icon::before {
    inset: 1px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.mint-icon::after {
    inset: 4px;
    border-radius: 50%;
    background: currentColor;
}

.invoice-icon::before {
    inset: 1px 3px 1px 1px;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.invoice-icon::after {
    top: 5px;
    left: 4px;
    width: 7px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
}

.history-icon::before {
    inset: 1px;
    border-radius: 50%;
    border: 2px solid currentColor;
}

.history-icon::after {
    top: 4px;
    left: 7px;
    width: 2px;
    height: 6px;
    background: currentColor;
    transform-origin: bottom center;
    box-shadow: -3px 2px 0 0 currentColor;
}

.key-icon::before {
    top: 5px;
    left: 0;
    width: 7px;
    height: 7px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.key-icon::after {
    top: 7px;
    right: 0;
    width: 8px;
    height: 2px;
    background: currentColor;
    box-shadow: -1px 3px 0 currentColor;
}

.webhook-icon::before {
    top: 3px;
    left: 1px;
    width: 5px;
    height: 5px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.webhook-icon::after {
    top: 8px;
    right: 1px;
    width: 8px;
    height: 2px;
    background: currentColor;
    transform: rotate(-35deg);
}

.ip-icon::before {
    inset: 1px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.ip-icon::after {
    top: 5px;
    left: 4px;
    width: 8px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 4px 0 currentColor;
}

.settings-icon::before {
    inset: 3px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.settings-icon::after {
    inset: 0;
    border-radius: 50%;
    box-shadow: 0 -7px 0 -5px currentColor, 0 7px 0 -5px currentColor, 7px 0 0 -5px currentColor, -7px 0 0 -5px currentColor;
}

.main-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 18px 12px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
}

.collapse-button span {
    width: 8px;
    height: 8px;
    border-right: 2px solid #6672b8;
    border-bottom: 2px solid #6672b8;
    transform: rotate(135deg);
    margin-left: 2px;
}

.menu-button {
    gap: 3px;
}

.menu-button span {
    width: 12px;
    height: 2px;
    background: #5662a8;
    border-radius: 999px;
}

.doc-button {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(240, 244, 255, 0.96) 100%);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent);
}

.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00fedf, #414ba3);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
}

.content-area {
    padding: 24px;
}

.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.tab-switch {
    display: inline-flex;
    gap: 20px;
    align-items: center;
}

.tab-button {
    position: relative;
    padding: 10px 0;
    color: #7f88b7;
    font-weight: 700;
}

.tab-button.active {
    color: var(--text);
}

.tab-button.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -14px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-strong) 100%);
}

.panel {
    margin-top: 22px;
    padding: 20px 18px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.hidden {
    display: none;
}

.panel-header,
.transactions-header,
.panel-toolbar,
.transaction-toolbar,
.transaction-actions {
    display: flex;
    align-items: center;
}

.panel-header,
.transactions-header {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}

.panel-toolbar,
.transaction-toolbar {
    gap: 10px;
}

.search-field input,
.filter-field select,
.select-with-prefix,
.search-chip,
.filter-chip,
.primary-button {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
}

.search-field input {
    width: 196px;
    height: 42px;
    padding: 0 16px;
    outline: none;
    color: #324080;
}

.search-field input:focus,
.filter-field select:focus,
.select-with-prefix:focus-within {
    border-color: rgba(65, 75, 163, 0.28);
    box-shadow: 0 0 0 4px rgba(0, 254, 223, 0.12);
}

.view-toggle {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.view-button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #7e8b98;
}

.view-button.active {
    background: var(--accent-soft);
    color: var(--accent);
}

.grid-squares,
.list-lines {
    width: 16px;
    height: 16px;
}

.grid-squares::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 3px;
    box-shadow: 0 0 0 2px currentColor inset, 8px 0 0 -2px currentColor, 0 8px 0 -2px currentColor, 8px 8px 0 -2px currentColor;
}

.list-lines::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    width: 16px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor, 0 10px 0 currentColor;
}

.currency-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.currency-grid.list-view {
    grid-template-columns: 1fr;
}

.currency-card {
    padding: 14px 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: var(--panel-solid);
    box-shadow: 0 10px 24px rgba(30, 38, 109, 0.04);
    min-height: 134px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.currency-grid.list-view .currency-card {
    min-height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-copy {
    display: grid;
    gap: 2px;
}

.currency-value {
    font-size: 0.88rem;
    color: var(--muted);
}

.currency-amount {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.currency-name {
    color: #7a83b1;
    font-size: 0.8rem;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.action-pill {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(0, 254, 223, 0.14) 0%, rgba(65, 75, 163, 0.08) 100%);
    color: var(--accent-deep);
    font-size: 1rem;
    font-weight: 700;
}

.panel-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    color: #718090;
    font-size: 0.9rem;
}

.page-button {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 254, 223, 0.12);
    color: var(--accent);
    font-size: 1.1rem;
}

.page-button:disabled {
    opacity: 0.45;
    cursor: default;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.filter-field {
    display: grid;
    gap: 8px;
}

.filter-field span {
    color: #6f79a9;
    font-size: 0.84rem;
    font-weight: 600;
}

.filter-field select,
.select-with-prefix {
    width: 100%;
    min-height: 44px;
}

.filter-field select {
    padding: 0 38px 0 14px;
    appearance: none;
    color: #324080;
    outline: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #6672b8 50%),
        linear-gradient(135deg, #6672b8 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.with-prefix select {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.select-with-prefix {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
}

.currency-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff;
    color: #2c367c;
    font-size: 0.84rem;
    font-weight: 700;
}

.transaction-actions {
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
}

.filter-chip,
.search-chip,
.primary-button {
    min-height: 42px;
    padding: 0 16px;
    color: #55609f;
    font-weight: 700;
}

.primary-button {
    background: linear-gradient(90deg, rgba(0, 254, 223, 0.18) 0%, rgba(65, 75, 163, 0.12) 100%);
    color: var(--accent-deep);
}

.compact-search input {
    width: 192px;
}

.icon-download {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
}

.icon-download span {
    width: 14px;
    height: 14px;
}

.icon-download span::before,
.icon-download span::after {
    content: "";
    position: absolute;
}

.icon-download span::before {
    left: 6px;
    top: 0;
    width: 2px;
    height: 9px;
    background: #5864aa;
}

.icon-download span::after {
    left: 3px;
    bottom: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid #5864aa;
    border-bottom: 2px solid #5864aa;
    transform: rotate(45deg);
}

.transaction-list {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.transaction-list-head,
.transaction-row {
    display: grid;
    grid-template-columns: 2fr 1.1fr 1fr 1fr 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
}

.transaction-list-head {
    border-bottom: 1px solid var(--line);
    color: #7a83b1;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.transaction-row + .transaction-row {
    border-top: 1px solid #f1f4f8;
}

.transaction-reference {
    display: grid;
    gap: 4px;
}

.transaction-reference strong {
    font-size: 0.94rem;
}

.transaction-reference span,
.amount-meta {
    color: #7a83b1;
    font-size: 0.82rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-completed {
    background: #ebf8f1;
    color: #18794e;
}

.status-pending {
    background: #fff5df;
    color: #996b00;
}

.status-failed {
    background: #fff0ef;
    color: #b24338;
}

.flag {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(18, 33, 47, 0.08) inset;
    flex: 0 0 auto;
}

.flag-usd { background: linear-gradient(180deg, #d81e34 0 14%, #fff 14% 28%, #d81e34 28% 42%, #fff 42% 56%, #d81e34 56% 70%, #fff 70% 84%, #d81e34 84% 100%); position: relative; }
.flag-usd::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 46%; height: 46%; background: #22408c; border-radius: 50% 0 10px 0; }
.flag-bdt { background: radial-gradient(circle at 42% 50%, #d62828 0 28%, transparent 30%), #2f8f35; }
.flag-bwp { background: linear-gradient(180deg, #58a5ff 0 36%, #111 36% 44%, #fff 44% 56%, #111 56% 64%, #58a5ff 64% 100%); }
.flag-cdf { background: linear-gradient(135deg, #1e88ff 0 38%, #ffd64f 38% 44%, #d62f2f 44% 56%, #ffd64f 56% 62%, #1e88ff 62% 100%); }
.flag-egp { background: linear-gradient(180deg, #d6342a 0 33%, #fff 33% 66%, #111 66% 100%); }
.flag-eur { background: radial-gradient(circle at 50% 50%, #f8d15b 0 7%, transparent 9%), #1e5bc6; }
.flag-gbp { background: linear-gradient(90deg, #1d4db5 0 100%); position: relative; overflow: hidden; }
.flag-gbp::before { content: ""; position: absolute; inset: 0; background: linear-gradient(45deg, transparent 43%, #fff 43% 57%, transparent 57%), linear-gradient(-45deg, transparent 43%, #fff 43% 57%, transparent 57%), linear-gradient(90deg, transparent 38%, #fff 38% 62%, transparent 62%), linear-gradient(180deg, transparent 38%, #fff 38% 62%, transparent 62%), linear-gradient(90deg, transparent 44%, #d82f38 44% 56%, transparent 56%), linear-gradient(180deg, transparent 44%, #d82f38 44% 56%, transparent 56%); }
.flag-ghs { background: linear-gradient(180deg, #d73b31 0 33%, #f8d24d 33% 66%, #1e8c48 66% 100%); }
.flag-ngn { background: linear-gradient(90deg, #159a4b 0 33%, #fff 33% 66%, #159a4b 66% 100%); }
.flag-kes { background: linear-gradient(180deg, #111 0 28%, #fff 28% 34%, #c3262c 34% 66%, #fff 66% 72%, #247b4d 72% 100%); }
.flag-zar { background: linear-gradient(180deg, #e8102e 0 20%, #007a5e 20% 40%, #ffd100 40% 50%, #000 50% 60%, #fff 60% 100%); }
.flag-ugx { background: linear-gradient(180deg, #111 0 16%, #f4d13d 16% 32%, #d6332d 32% 48%, #111 48% 64%, #f4d13d 64% 80%, #d6332d 80% 100%); }
.flag-tzs { background: linear-gradient(135deg, #2bb673 0 40%, #f1d34d 40% 46%, #111 46% 54%, #f1d34d 54% 60%, #61a7ff 60% 100%); }
.flag-sle { background: linear-gradient(180deg, #40a45e 0 33%, #fff 33% 66%, #3b87dd 66% 100%); }
.flag-usdc { background: radial-gradient(circle at center, #fff 0 18%, transparent 18%), #2775ca; }
.flag-usdt { background: radial-gradient(circle at center, #fff 0 12%, transparent 13%), #26a17b; }
.flag-eurs { background: radial-gradient(circle at center, #f8d15b 0 8%, transparent 9%), #254fbe; }
.flag-gbus { background: linear-gradient(180deg, #122e64, #244c8f); }

@media (max-width: 1280px) {
    .currency-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 1024px) {
    .wallet-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .content-area {
        padding: 18px;
    }

    .page-heading,
    .panel-header,
    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .panel-toolbar,
    .transaction-toolbar {
        width: 100%;
        flex-wrap: wrap;
    }

    .transaction-list-head,
    .transaction-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .currency-grid,
    .filters-grid,
    .transaction-list-head,
    .transaction-row {
        grid-template-columns: 1fr;
    }

    .search-field input,
    .compact-search input {
        width: 100%;
    }

    .search-field,
    .filter-field,
    .transaction-toolbar,
    .panel-toolbar {
        width: 100%;
    }

    .tab-switch {
        width: 100%;
        justify-content: flex-start;
    }

    .currency-grid.list-view .currency-card {
        flex-direction: column;
        align-items: flex-start;
    }
}