
:root {
    --bg: #0b1220;
    --card: #0f1a33;
    --muted: #9fb0d0;
    --text: #eaf0ff;
    --accent: #3aa0ff;
    --accent2: #22c55e;
    --warn: #f59e0b;
    --danger: #ef4444;
    --border: rgba(255,255,255,.10);
    --shadow: 0 20px 60px rgba(0,0,0,.35);
    --radius: 16px;
    --max: 1400px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
    color: var(--text);
    background: radial-gradient(1200px 800px at 15% 10%, rgba(58,160,255,.25), transparent 60%), radial-gradient(900px 600px at 90% 20%, rgba(34,197,94,.18), transparent 60%), linear-gradient(180deg, var(--bg), #070b14);
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 18px;
}

.topbar {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    background: rgba(7,11,20,.45);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

    .topbar .row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .2px;
}

.logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(58,160,255,.95), rgba(34,197,94,.85));
    box-shadow: 0 10px 30px rgba(58,160,255,.15);
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
}

    .nav a {
        padding: 10px 10px;
        border-radius: 10px;
    }

        .nav a:hover {
            background: rgba(255,255,255,.06);
            color: var(--text);
        }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 900;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.06);
    box-shadow: 0 14px 40px rgba(0,0,0,.25);
    cursor: pointer;
    user-select: none;
}

    .btn.primary {
        border-color: rgba(58,160,255,.45);
        background: linear-gradient(135deg, rgba(58,160,255,.95), rgba(58,160,255,.65));
        color: #071022;
    }

    .btn.good {
        border-color: rgba(34,197,94,.45);
        background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(34,197,94,.65));
        color: #06150c;
    }

    .btn.warn {
        border-color: rgba(245,158,11,.45);
        background: linear-gradient(135deg, rgba(245,158,11,.95), rgba(245,158,11,.55));
        color: #1a1206;
    }

    .btn:hover {
        filter: brightness(1.06);
    }

    .btn.ghost:hover {
        background: rgba(255,255,255,.10);
    }

.page {
    padding: 22px 0 46px;
}

.header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 0 10px;
}

    .header h1 {
        margin: 0;
        font-size: 28px;
        letter-spacing: -.3px;
    }

    .header .sub {
        margin: 6px 0 0;
        color: var(--muted);
        font-weight: 700;
        font-size: 14px;
        line-height: 1.5;
    }

/* Setup Banner */
.banner {
    border: 1px solid rgba(245,158,11,.35);
    background: rgba(245,158,11,.10);
    border-radius: var(--radius);
    padding: 14px 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    box-shadow: var(--shadow);
    margin: 12px 0 18px;
}

    .banner .left {
        display: flex;
        gap: 12px;
        align-items: flex-start;
    }

.badge {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(245,158,11,.20);
    border: 1px solid rgba(245,158,11,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 1000;
    color: rgba(245,158,11,.95);
    flex: 0 0 38px;
}

.banner h3 {
    margin: 0;
    font-size: 16px;
}

.banner p {
    margin: 6px 0 0;
    color: rgba(234,240,255,.85);
    font-size: 13px;
    line-height: 1.55;
}

.banner .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* KPI cards */
.kpi-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 30px;
}

.kpi .label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.kpi .value {
    margin-top: 8px;
    font-size: 18px;
    color: #ffffff;
    font-weight: 1000;
    letter-spacing: -.3px;
}

.kpi .hint {
    margin-top: 2px;
    color: rgba(159,176,208,.9);
    font-size: 16px;
    font-weight: 700;
}

.card.kpi {
    display: flex;
    flex-direction: column;
    gap: 4px; /* spacing between rows */
}




/* Main grid layout */
.main-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1.25fr .75fr;
    align-items: start;
    margin-top: 14px;
}

@media (max-width: 1100px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

    .section-title h2 {
        margin: 0;
        font-size: 16px;
        letter-spacing: -.2px;
    }

    .section-title .right {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 14px;
}

thead th {
    text-align: left;
    font-size: 12px;
    color: rgba(159,176,208,.95);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,.20);
}

tbody td {
    padding: 12px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: rgba(234,240,255,.92);
    font-size: 13px;
    vertical-align: top;
}

tbody tr:hover {
    background: rgba(255,255,255,.04);
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
}

.status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 1000;
    font-size: 11px;
    letter-spacing: .4px;
    text-transform: uppercase;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
    color: rgba(234,240,255,.88);
    width: fit-content;
}

    .status.sent {
        border-color: rgba(58,160,255,.35);
        background: rgba(58,160,255,.10);
        color: rgba(58,160,255,.95);
    }

    .status.redeemed {
        border-color: rgba(34,197,94,.35);
        background: rgba(34,197,94,.12);
        color: rgba(34,197,94,.95);
    }

    .status.void {
        border-color: rgba(239,68,68,.35);
        background: rgba(239,68,68,.10);
        color: rgba(239,68,68,.95);
    }

.cell-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.mini {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.05);
}

    .mini:hover {
        background: rgba(255,255,255,.10);
    }

/* Side panels */
.side-stack {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

.field {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

    .field label {
        color: rgba(159,176,208,.95);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .7px;
    }

    .field input {
        width: 100%;
        padding: 12px 12px;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,.12);
        background: rgba(0,0,0,.20);
        color: rgba(234,240,255,.95);
        outline: none;
    }

        .field input::placeholder {
            color: rgba(159,176,208,.55);
        }

.divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 14px 0;
}

.note {
    color: rgba(159,176,208,.92);
    font-size: 13px;
    line-height: 1.6;
}

.copyrow {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.copybox {
    flex: 1;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.20);
    color: rgba(234,240,255,.92);
    font-size: 12px;
}

footer {
    padding: 26px 0 30px;
    color: rgba(159,176,208,.85);
    border-top: 1px solid var(--border);
    margin-top: 18px;
}







.egift-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45); /* less dim so the page still reads */
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.egift-modal {
    width: min(760px, 96vw);
    border-radius: 16px;
    border: 1px solid rgba(120,170,255,.20);
    background: #141826;
    box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 20px 60px rgba(0,0,0,.65);
    color: rgba(234,240,255,.96);
    overflow: hidden;
}

.egift-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.egift-modal-title {
    font-size: 18px;
    font-weight: 900;
}

.egift-modal-sub {
    margin-top: 3px;
    color: rgba(159,176,208,.95);
    font-weight: 600;
    font-size: 13px;
}

.egift-modal-x {
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.20);
    color: rgba(234,240,255,.92);
    border-radius: 10px;
    width: 40px;
    height: 36px;
    cursor: pointer;
    font-size: 22px;
    line-height: 0;
}

.egift-modal-body {
    padding: 16px 18px;
}

.egift-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.egift-field-wide {
    grid-column: 1 / -1;
}

.egift-field label {
    display: block;
    font-weight: 800;
    font-size: 12px;
    color: rgba(159,176,208,.95);
    margin-bottom: 6px;
    letter-spacing: .3px;
    text-transform: uppercase;
}

.egift-field input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(0,0,0,.28);
    color: rgba(234,240,255,.96);
    outline: none;
}

    .egift-field input:disabled {
        opacity: .85;
        background: rgba(0,0,0,.22);
        color: rgba(234,240,255,.80);
    }

.egift-help {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,180,80,.95);
    min-height: 16px;
}

.egift-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.10);
}





.dashboard-grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 360px;
    align-items: start;
}

/* Full-width purchases row */
.purchases-card {
    grid-column: 1 / -1; /* span both columns */
}

/* Row 2 left column */
.stack-left {
    grid-column: 1;
}

/* Keep your existing .side-stack styles; just ensure it sits in col 2 */
.side-stack {
    grid-column: 2;
    display: grid;
    gap: 14px;
}

/* Quick tools inside its card */
.quick-tools-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr;
}

/* Responsive: stack everything */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .purchases-card,
    .stack-left,
    .side-stack {
        grid-column: 1;
    }

    .quick-tools-grid {
        grid-template-columns: 1fr;
    }
}



@media (max-width: 1200px) {
    .side-stack {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .side-stack {
        grid-template-columns: 1fr;
    }
}






html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    background-attachment: fixed;
}

.page, .wrap, .container, .content, .main, .layout-wrapper {
    background: transparent !important;
}



.status.done {
    background: #22c55e;
    color: #022c22;
}

.status.pending {
    background: #2563eb;
    color: #e0f2fe;
}



/* add to your theme */
.btn-success {
    background: #22c55e !important;
    color: #052e16 !important;
    border-color: rgba(34,197,94,.35) !important;
}

.btn-fail {
    background: #ef4444 !important;
    color: #fff !important;
    border-color: rgba(239,68,68,.35) !important;
}



.toast.local {
    position: relative; /* not absolute */

    max-width: 260px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e5e7eb;
    box-shadow: 0 6px 18px rgba(0,0,0,.35);
    opacity: 0;
    transform: translateY(2px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap; /* keeps it compact */
}

    .toast.local.show {
        opacity: 1;
        transform: translateY(0);
    }

.toast.local {
    max-width: 0;
    overflow: hidden;
}

    .toast.local.show {
        max-width: 260px;
    }

/*    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }
*/
    .toast.success {
        border-color: rgba(34,197,94,.35);
    }

    .toast.fail {
        border-color: rgba(239,68,68,.35);
    }


.integration-actions {
    position: relative;
}



.copy-success {
    background-color: #4CAF50; /* green */
    color: white;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

    .copy-success::after {
        content: " ✓ ";
        font-weight: bold;
    }


/*   Optional tiny pop animation:   */
.copy-success {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
}
