:root {
    --portal-blue: #155eef;
    --portal-blue-dark: #0b3b91;
    --portal-ink: #102a43;
    --portal-muted: #6b7c93;
    --portal-bg: #f5f8fc;
    --portal-border: #e5edf7;
    --portal-white: #ffffff;
    --portal-sidebar: 272px;
    --portal-radius: 18px;
    --portal-shadow: 0 16px 45px rgba(16, 42, 67, .08);
}

* { box-sizing: border-box; }

body.portal-body {
    margin: 0;
    color: var(--portal-ink);
    background: var(--portal-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.portal-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--portal-sidebar);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    color: #c8d7f2;
    background: linear-gradient(180deg, #092b66 0%, #0c3d8e 55%, #155eef 100%);
    box-shadow: 12px 0 36px rgba(9, 43, 102, .12);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 55px;
    padding: 0 10px 24px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.16);
    text-decoration: none;
}

.portal-brand img {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
}

.portal-brand strong { display: block; font-size: 14px; line-height: 1.1; letter-spacing: .02em; }
.portal-brand small { display: block; margin-top: 4px; color: #b9cef0; font-size: 10px; }

.portal-nav { display: grid; gap: 6px; }
.portal-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 46px;
    padding: 0 14px;
    color: #c8d7f2;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.portal-nav a i { width: 18px; text-align: center; font-size: 14px; }
.portal-nav a:hover { color: #fff; background: rgba(255,255,255,.12); transform: translateX(2px); }
.portal-nav a.active { color: #0c3d8e; background: #fff; box-shadow: 0 8px 20px rgba(4, 28, 75, .16); }
.portal-nav .nav-label { flex: 1; }

.portal-sidebar-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.16); }
.portal-sidebar-footer a { color: #ffd1d1; }

.portal-main { min-height: 100vh; margin-left: var(--portal-sidebar); padding: 26px 30px 0; }
.portal-container { width: min(1400px, 100%); margin: 0 auto; }

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 72px;
    padding: 14px 18px 14px 22px;
    margin-bottom: 26px;
    background: rgba(255,255,255,.92);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: 0 8px 28px rgba(16,42,67,.05);
}
.portal-title h1 { margin: 0; color: var(--portal-ink); font-size: clamp(19px, 2vw, 25px); font-weight: 800; letter-spacing: -.03em; }
.portal-title p { margin: 4px 0 0; color: var(--portal-muted); font-size: 12px; }
.portal-menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--portal-border); border-radius: 11px; color: var(--portal-blue); background: #fff; }
.portal-account { display: flex; align-items: center; gap: 10px; }
.portal-account-copy { text-align: right; }
.portal-account-copy strong { display: block; color: var(--portal-ink); font-size: 13px; }
.portal-account-copy span { display: block; color: var(--portal-muted); font-size: 11px; }
.portal-avatar { display: grid; place-items: center; width: 42px; height: 42px; color: #fff; background: linear-gradient(135deg, var(--portal-blue), #5a8fff); border-radius: 14px; font-weight: 800; }

.portal-section-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.portal-section-label h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.portal-section-label p { margin: 0; color: var(--portal-muted); font-size: 12px; }
.portal-card { background: var(--portal-white); border: 1px solid var(--portal-border); border-radius: var(--portal-radius); box-shadow: var(--portal-shadow); }
.portal-card-pad { padding: 24px; }

.portal-stat { height: 100%; padding: 20px; background: #fff; border: 1px solid var(--portal-border); border-radius: 16px; box-shadow: 0 10px 30px rgba(16,42,67,.05); }
.portal-stat .icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 18px; color: var(--portal-blue); background: #eaf1ff; border-radius: 13px; }
.portal-stat span { display: block; color: var(--portal-muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.portal-stat strong { display: block; margin-top: 7px; color: var(--portal-ink); font-size: 24px; letter-spacing: -.04em; }

.portal-wallet { position: relative; min-height: 220px; overflow: hidden; padding: 28px; color: #fff; background: linear-gradient(135deg, #0b3b91 0%, #155eef 58%, #4c8dff 100%); border-radius: var(--portal-radius); box-shadow: 0 18px 40px rgba(21,94,239,.22); }
.portal-wallet::after { position: absolute; right: -75px; bottom: -105px; width: 275px; height: 275px; border: 34px solid rgba(255,255,255,.12); border-radius: 50%; content: ""; }
.portal-wallet .eyebrow { color: #c9dcff; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.portal-wallet .balance { margin: 23px 0 28px; font-size: clamp(28px, 4vw, 39px); font-weight: 850; letter-spacing: -.05em; }
.portal-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 0 17px; border: 0; border-radius: 11px; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.portal-button-primary { color: #fff; background: var(--portal-blue); }
.portal-button-primary:hover { color: #fff; background: #0d4bd0; }
.portal-button-light { color: var(--portal-blue-dark); background: #fff; }
.portal-button-outline { color: var(--portal-blue); background: #fff; border: 1px solid #cbdcff; }

.portal-table-wrap { overflow-x: auto; }
.portal-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.portal-table th { padding: 13px 16px; color: var(--portal-muted); background: #f7faff; border-bottom: 1px solid var(--portal-border); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.portal-table td { padding: 16px; border-bottom: 1px solid #edf2f8; color: var(--portal-ink); font-size: 13px; }
.portal-table tr:last-child td { border-bottom: 0; }
.portal-empty { padding: 48px 20px; color: var(--portal-muted); text-align: center; }
.portal-empty i { display: block; margin-bottom: 12px; color: #b7c8e4; font-size: 28px; }
.portal-status { display: inline-flex; padding: 5px 10px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.portal-status-success { color: #157347; background: #e7f7ee; }
.portal-status-pending { color: #926300; background: #fff5d8; }
.portal-status-failed { color: #b42318; background: #ffebe9; }

.portal-footer { padding: 28px 0; margin-top: 36px; color: var(--portal-muted); border-top: 1px solid var(--portal-border); font-size: 11px; }
.portal-footer-inner { display: flex; justify-content: space-between; gap: 12px; }

.portal-overlay { display: none; position: fixed; inset: 0; z-index: 1030; background: rgba(4, 24, 58, .48); }

@media (max-width: 992px) {
    .portal-sidebar { transform: translateX(-105%); transition: transform .25s ease; }
    .portal-sidebar.open { transform: translateX(0); }
    .portal-overlay.open { display: block; }
    .portal-main { margin-left: 0; padding: 17px 16px 0; }
    .portal-menu-button { display: inline-grid; place-items: center; }
}

@media (max-width: 576px) {
    .portal-topbar { padding: 12px 14px; }
    .portal-account-copy { display: none; }
    .portal-card-pad { padding: 18px; }
    .portal-wallet { padding: 23px; }
    .portal-footer-inner { display: block; line-height: 1.8; }
}
