:root {
    --red: #ff474f;
    --ink: #17171b;
    --text: #686d78;
    --line: #e5e6ea;
    --soft: #f7f8fa;
    --sidebar: 248px;
    --green: #16945a;
    --amber: #b86f12;
}

* { box-sizing: border-box; }
html {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
}
body {
    margin: 0;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.campaign-app {
    min-height: 100vh;
    display: flex;
    background: #fff;
}

.campaign-sidebar {
    width: var(--sidebar);
    height: 100vh;
    padding: 25px 18px;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    border-right: 1px solid var(--line);
    background: #fafbfc;
}

.sidebar-head {
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.campaign-brand img {
    display: block;
    width: 105px;
}

.sidebar-close {
    display: none;
    border: 0;
    background: none;
    font-size: 27px;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
    margin-top: 34px;
}

.sidebar-nav a,
.sidebar-logout {
    height: 49px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 13px;
    border-radius: 11px;
    color: #777b85;
    font-size: 13px;
    font-weight: 600;
    transition: .2s;
}

.sidebar-nav a span,
.sidebar-logout span {
    width: 21px;
    color: #8e97a8;
    text-align: center;
    font-size: 18px;
}

.sidebar-nav a:hover,
.sidebar-logout:hover {
    color: var(--ink);
    background: #f0f1f3;
}

.sidebar-nav a.active {
    color: var(--red);
    background: #fff0f0;
    box-shadow: inset 3px 0 var(--red);
}

.sidebar-nav a.active span {
    color: var(--red);
}

.sidebar-logout { margin-top: 12px; }

.sidebar-help {
    margin-top: auto;
    padding: 18px;
    border: 1px solid #ece8e3;
    border-radius: 14px;
    background: #fff;
}

.sidebar-help span {
    font-size: 12px;
    font-weight: 800;
}

.sidebar-help p {
    margin: 5px 0 12px;
    color: var(--text);
    font-size: 11px;
    line-height: 1.5;
}

.sidebar-help a {
    color: var(--red);
    font-size: 11px;
    font-weight: 800;
}

.campaign-shell {
    width: calc(100% - var(--sidebar));
    min-height: 100vh;
    margin-left: var(--sidebar);
    display: flex;
    flex-direction: column;
}

.campaign-header {
    height: 76px;
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.96);
    backdrop-filter: saturate(1.2) blur(8px);
}

.menu-toggle {
    display: none;
    border: 0;
    background: none;
}

.menu-toggle span {
    width: 23px;
    height: 2px;
    margin: 5px;
    display: block;
    background: var(--ink);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 13px;
}

.support-email,
.wallet-chip,
.user-chip {
    min-height: 42px;
    padding: 0 17px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    font-size: 12px;
    font-weight: 650;
}

.wallet-chip {
    color: #fff;
    background: #17171b;
    border-color: #17171b;
}

.user-chip {
    padding-left: 6px;
    border-color: transparent;
}

.avatar {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--red);
    background: #fff0ef;
    font-weight: 800;
}

.wallet-main {
    width: min(calc(100% - 60px), 1120px);
    margin: 0 auto;
    padding: 24px 0 60px;
}

.section-tag {
    margin: 0 0 12px;
    color: var(--red);
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 10px;
    font-weight: 800;
}

.wallet-topup-card,
.wallet-history-card {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(25,28,35,.07);
}

.wallet-topup-card {
    padding: 22px;
    background: linear-gradient(135deg, #fffefb 0%, #fff 62%, #fff8f3 100%);
    overflow: hidden;
}

.wallet-topup-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 24px;
    align-items: start;
}

.wallet-topup-copy {
    min-width: 0;
    padding-right: 0;
    max-width: 470px;
}

.wallet-topup-card h2,
.wallet-form-head h3,
.wallet-history-card h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.wallet-copy {
    max-width: 430px;
    margin: 10px 0 0;
    color: var(--text);
    font-size: 12px;
    line-height: 1.6;
}

.quick-amounts {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-amounts button {
    height: 38px;
    padding: 0 15px;
    border: 1px solid #f0c5c4;
    border-radius: 12px;
    color: var(--red);
    background: #fff3f3;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    transition: transform .2s, box-shadow .2s;
}

.quick-amounts button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255,71,79,.12);
}

.wallet-note {
    margin-top: 14px;
    padding: 12px 13px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border-radius: 14px;
    background: #f9fbff;
    border: 1px solid #e3eaf9;
}

.wallet-note span {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #426cf5;
    font-size: 12px;
    font-weight: 800;
}

.wallet-note p {
    margin: 0;
    color: #61708a;
    font-size: 11px;
    line-height: 1.55;
}

.wallet-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.wallet-topup-panel {
    min-width: 0;
    padding: 0 0 0 12px;
    border-left: 0;
}

.safe-chip {
    padding: 6px 11px;
    border-radius: 999px;
    color: var(--green);
    background: #e9f8f0;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.wallet-topup-card label {
    display: block;
    margin-top: 16px;
    margin-bottom: 9px;
    color: #21232c;
    font-size: 12px;
    font-weight: 750;
}

.wallet-input-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.currency {
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid #dfe3ed;
    border-radius: 14px;
    background: #fff;
    color: var(--red);
    font-size: 18px;
    font-weight: 800;
}

.wallet-input-row input {
    height: 52px;
    padding: 0 18px;
    border: 1px solid #dfe3ed;
    border-radius: 14px;
    background: #fff;
    outline: 0;
    color: var(--ink);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.wallet-input-row input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(255,71,79,.1);
}

.wallet-actions-row {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wallet-submit {
    width: 156px;
    height: 48px;
    margin-top: 0;
    margin-left: 0;
    display: block;
    border: 0;
    border-radius: 14px;
    color: #fff;
    background: var(--red);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 12px 25px rgba(255,71,79,.23);
    transition: transform .2s, box-shadow .2s;
}

.wallet-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 30px rgba(255,71,79,.3);
}

.wallet-submit span {
    margin-left: 6px;
    font-size: 18px;
}

.wallet-help {
    margin: 8px 0 0;
    color: #8a8f9b;
    font-size: 10px;
    line-height: 1.6;
}

.wallet-history-card {
    padding: 26px 0 18px;
}

.history-head {
    padding: 0 26px 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid var(--line);
}

.history-head p:last-child {
    margin: 11px 0 0;
    color: var(--text);
    font-size: 12px;
}

.history-tools {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.history-filter {
    height: 35px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #6f7480;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    font-weight: 750;
}

.history-filter.active {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
}

.history-table-wrap {
    padding: 18px 20px 8px;
}

.history-search {
    width: min(310px, 100%);
    height: 42px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.history-search span {
    color: #999da6;
    font-size: 18px;
}

.history-search input {
    width: 100%;
    border: 0;
    outline: 0;
    font-size: 12px;
}

.table-shell {
    overflow-x: auto;
}

.wallet-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.wallet-table thead th {
    padding: 8px 10px;
    color: #92959e;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-size: 9px;
    white-space: nowrap;
}

.wallet-table tbody tr {
    background: #fafafa;
    transition: transform .2s, box-shadow .2s;
}

.wallet-table tbody tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 9px 22px rgba(27,29,36,.08);
}

.wallet-table tbody td {
    padding: 14px 10px;
    border-top: 1px solid #eceef1;
    border-bottom: 1px solid #eceef1;
    color: #424650;
    font-size: 11px;
    vertical-align: middle;
}

.wallet-table tbody td:first-child {
    border-left: 1px solid #eceef1;
    border-radius: 12px 0 0 12px;
    font-weight: 800;
}

.wallet-table tbody td:last-child {
    border-right: 1px solid #eceef1;
    border-radius: 0 12px 12px 0;
}

.amount-pill,
.type-pill {
    min-width: 86px;
    padding: 6px 10px;
    display: inline-flex;
    justify-content: center;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.amount-pill.credit,
.type-pill.credit {
    color: var(--green);
    background: #e9f8f0;
}

.amount-pill.debit,
.type-pill.debit {
    color: #d14d57;
    background: #fff0f0;
}

.empty-row td {
    padding: 0 !important;
    background: #fff !important;
    border: 0 !important;
}

.empty-state {
    padding: 34px 20px;
    text-align: center;
}

.empty-state strong {
    display: block;
    font-size: 15px;
}

.empty-state p {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 12px;
}

.campaign-footer {
    margin-top: auto;
    padding: 20px 34px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    background: #fafbfc;
    color: #858993;
    font-size: 10px;
}

.campaign-footer p { margin: 0; }
.campaign-footer div { display: flex; gap: 22px; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(20,20,22,.42);
}

@media (max-width: 1080px) {
    .wallet-topup-grid { grid-template-columns: 1fr; }
    .wallet-topup-panel {
        padding: 18px 0 0;
        border-top: 1px solid #dfe7f3;
        margin-top: 2px;
    }
    .history-head { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 900px) {
    .campaign-sidebar { transform: translateX(-100%); transition: transform .25s; }
    .campaign-sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .campaign-shell { width: 100%; margin-left: 0; }
    .campaign-header { justify-content: space-between; }
    .menu-toggle { display: block; }
    .sidebar-overlay.show { display: block; }
    .wallet-main { width: calc(100% - 36px); padding-top: 18px; }
    .support-email { display: none; }
    .campaign-footer { align-items: center; gap: 12px; flex-direction: column; }
    .campaign-footer div { gap: 14px; }
}

@media (max-width: 700px) {
    .campaign-header { height: 68px; padding: 0 15px; }
    .wallet-chip { padding: 0 13px; }
    .user-chip > span:last-child { display: none; }
    .wallet-main { width: calc(100% - 28px); padding: 14px 0 50px; }
    .wallet-topup-card,
    .wallet-history-card { border-radius: 16px; }
    .wallet-topup-card { padding: 20px; }
    .wallet-topup-card h2,
    .wallet-form-head h3,
    .wallet-history-card h2 { font-size: 22px; }
    .wallet-input-row { grid-template-columns: 1fr; }
    .currency { display: none; }
    .wallet-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .quick-amounts {
        justify-content: flex-start;
    }
    .wallet-submit {
        width: 100%;
        height: 48px;
    }
    .history-head,
    .history-table-wrap { padding-left: 16px; padding-right: 16px; }
    .history-search { width: 100%; }
    .wallet-table thead { display: none; }
    .wallet-table,
    .wallet-table tbody,
    .wallet-table tr,
    .wallet-table td { display: block; width: 100%; }
    .wallet-table tbody tr {
        margin-bottom: 15px;
        padding: 11px;
        border: 1px solid var(--line);
        border-radius: 13px;
    }
    .wallet-table tbody td {
        padding: 8px;
        border: 0 !important;
        border-radius: 0 !important;
    }
    .wallet-table tbody td:nth-child(3)::before { content: 'Amount: '; color: #999; }
    .wallet-table tbody td:nth-child(4)::before { content: 'Type: '; color: #999; }
    .wallet-table tbody td:nth-child(5)::before { content: 'Payment Info: '; color: #999; }
    .wallet-table tbody td:nth-child(6)::before { content: 'Date: '; color: #999; }
    .wallet-table tbody td:nth-child(7)::before { content: 'Remarks: '; color: #999; }
    .campaign-footer { padding: 20px; gap: 13px; align-items: center; flex-direction: column; }
}
