:root {
    --bg: #050206;
    --red: #ff1735;
    --gold: #ffd166;
    --gold2: #ff9f1c;
    --green: #28ff9a;
    --blue: #35a7ff;
    --text: #ffffff;
    --muted: #aeb2c3;
    --line: rgba(255,255,255,.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Tahoma, sans-serif;
    color: var(--text);
    background: #050206;
    overflow-x: hidden;
}

.app-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 10% 0%, rgba(255,23,53,.38), transparent 30%),
        radial-gradient(circle at 95% 15%, rgba(255,209,102,.18), transparent 28%),
        radial-gradient(circle at 50% 100%, rgba(53,167,255,.13), transparent 35%),
        linear-gradient(135deg, #050206, #160008 58%, #020203);
}

.app-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .09;
    background-image:
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 46px 46px;
}

a {
    color: inherit;
    text-decoration: none;
}

.shell {
    display: grid;
    grid-template-columns: 290px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
    border-right: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    gap: 13px;
    align-items: center;
    padding: 16px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255,23,53,.23), rgba(255,209,102,.10));
    border: 1px solid rgba(255,209,102,.25);
    box-shadow: 0 0 45px rgba(255,23,53,.17);
    margin-bottom: 18px;
}

.brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--red), var(--gold));
    font-weight: 1000;
    color: #190006;
    box-shadow: 0 0 32px rgba(255,23,53,.35);
}

.brand h1 {
    font-size: 23px;
    margin: 0;
}

.brand p {
    font-size: 13px;
    margin: 5px 0 0;
    color: var(--gold);
    font-weight: 900;
}

.nav {
    display: grid;
    gap: 10px;
}

.nav a {
    padding: 14px;
    border-radius: 17px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    font-weight: 900;
    color: #e5e7f3;
    transition: .18s;
}

.nav a:hover,
.nav a.active {
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #1a0900;
    transform: translateX(3px);
}

.profile {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    display: flex;
    gap: 11px;
    align-items: center;
    background: rgba(0,0,0,.3);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 13px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--gold));
    display: grid;
    place-items: center;
    color: #07070b;
    font-weight: 1000;
}

.profile b {
    display: block;
}

.profile small {
    color: var(--muted);
}

.profile a {
    color: var(--gold);
}

.content {
    padding: 24px;
}

.hero {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    padding: 24px;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
    border: 1px solid rgba(255,209,102,.22);
    box-shadow: 0 22px 60px rgba(0,0,0,.36);
    overflow: hidden;
    margin-bottom: 18px;
}

.hero::after {
    content: "";
    position: absolute;
    right: -65px;
    top: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,23,53,.20);
    filter: blur(8px);
}

.eyebrow {
    position: relative;
    color: var(--gold);
    letter-spacing: 1.4px;
    font-size: 12px;
    font-weight: 1000;
}

.hero h2 {
    position: relative;
    font-size: 36px;
    margin: 7px 0;
}

.hero p {
    position: relative;
    margin: 0;
    color: var(--muted);
    font-weight: 850;
}

.live-pill {
    position: relative;
    padding: 12px 15px;
    border-radius: 999px;
    background: rgba(40,255,154,.12);
    border: 1px solid rgba(40,255,154,.28);
    color: var(--green);
    font-weight: 1000;
}

.live-pill span {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px var(--green);
    margin-right: 7px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 18px;
}

.metric {
    position: relative;
    overflow: hidden;
    padding: 19px;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.095), rgba(255,255,255,.04));
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(0,0,0,.31);
}

.metric::after {
    content: "";
    position: absolute;
    right: -33px;
    top: -35px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(5px);
    background: rgba(255,23,53,.17);
}

.metric.blue::after {
    background: rgba(53,167,255,.18);
}

.metric.green::after {
    background: rgba(40,255,154,.16);
}

.metric.gold::after {
    background: rgba(255,209,102,.18);
}

.metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .8px;
}

.metric b {
    display: block;
    font-size: 32px;
    margin: 8px 0 4px;
}

.metric small {
    color: #d9dbe7;
}

.command-bar {
    display: grid;
    grid-template-columns: auto auto auto 1fr;
    gap: 10px;
    padding: 12px;
    border-radius: 24px;
    background: rgba(255,255,255,.055);
    border: 1px solid var(--line);
    margin-bottom: 18px;
}

button,
.btn {
    border: 0;
    border-radius: 15px;
    padding: 12px 15px;
    background: linear-gradient(135deg, var(--gold), var(--gold2));
    color: #190900;
    font-weight: 1000;
    cursor: pointer;
    transition: .16s;
    display: inline-block;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

button.ghost,
.ghost {
    background: rgba(255,255,255,.08);
    border: 1px solid var(--line);
    color: #fff;
}

input,
select {
    width: 100%;
    border: 1px solid rgba(255,209,102,.22);
    background: rgba(0,0,0,.42);
    color: #fff;
    border-radius: 15px;
    padding: 13px 14px;
    font-size: 16px;
    font-weight: 900;
    outline: none;
    margin: 7px 0 13px;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 17px;
}

.account-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    padding: 18px;
    background: linear-gradient(145deg, rgba(22,24,34,.98), rgba(8,9,14,.98));
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 24px 58px rgba(0,0,0,.40);
    transition: .18s;
}

.account-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,209,102,.45);
}

.card-glow {
    position: absolute;
    right: -80px;
    top: -85px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(255,23,53,.19);
    filter: blur(10px);
}

.account-card.withdraw .card-glow {
    background: rgba(53,167,255,.20);
}

.account-card.pinned {
    border-color: rgba(255,209,102,.55);
}

.account-card.dim {
    opacity: .68;
}

.card-top {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.bank-line {
    font-size: 22px;
    font-weight: 1000;
}

.kind {
    font-size: 17px;
    font-weight: 1000;
    margin-top: 13px;
}

.status {
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 1000;
}

.status.ok {
    background: var(--green);
    color: #00150a;
    box-shadow: 0 0 24px rgba(40,255,154,.35);
}

.status.warn {
    background: #ffe45e;
    color: #1d1400;
}

.status.no {
    background: var(--red);
    color: #fff;
}

.account-no {
    position: relative;
    margin: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #252837;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 12px;
    font-size: 18px;
    letter-spacing: 1px;
    cursor: pointer;
}

.meter {
    height: 16px;
    background: rgba(255,255,255,.09);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    margin: 14px 0;
}

.meter i {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--green), var(--gold), var(--red));
    box-shadow: 0 0 24px rgba(255,23,53,.25);
}

.money-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.money-grid div {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    padding: 12px;
    color: var(--muted);
    font-weight: 900;
}

.money-grid b {
    display: block;
    color: #fff;
    font-size: 20px;
    margin-top: 5px;
}

.card-note {
    position: relative;
    margin: 10px 0;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255,209,102,.09);
    border: 1px solid rgba(255,209,102,.16);
    color: #ffe6a7;
    font-weight: 900;
}

.card-actions {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 14px;
}

.panel {
    width: min(540px, 100%);
    padding: 20px;
    border-radius: 30px;
    background: linear-gradient(145deg, #1a0008, #090a10);
    border: 1px solid rgba(255,209,102,.32);
    box-shadow: 0 0 70px rgba(255,23,53,.24);
}

.quick {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
    margin: 10px 0;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background:
        radial-gradient(circle at top left, rgba(255,23,53,.35), transparent 34%),
        linear-gradient(135deg, #050206, #150007 62%, #020203);
}

.login-card {
    width: min(460px, 100%);
    padding: 30px;
    border-radius: 34px;
    background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.04));
    border: 1px solid rgba(255,209,102,.30);
    box-shadow: 0 0 80px rgba(255,23,53,.24);
    backdrop-filter: blur(18px);
}

.login-logo {
    width: 70px;
    height: 70px;
    border-radius: 23px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--red), var(--gold));
    color: #180005;
    font-weight: 1000;
}

.login-card h1 {
    text-align: center;
    margin: 0;
    font-size: 34px;
}

.login-card p {
    text-align: center;
    color: var(--gold);
    font-weight: 1000;
}

.err,
.ok {
    padding: 10px;
    border-radius: 14px;
    margin: 10px 0;
}

.err {
    background: rgba(255,0,0,.18);
    border: 1px solid rgba(255,0,0,.3);
}

.ok {
    background: rgba(40,255,154,.14);
    border: 1px solid rgba(40,255,154,.28);
}

.form-card,
.table-card {
    padding: 18px;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(0,0,0,.28);
    margin-bottom: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

label {
    display: block;
    color: var(--gold);
    font-weight: 1000;
}

.check {
    color: #fff;
    margin-bottom: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

th,
td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    text-align: left;
}

th {
    color: var(--gold);
    background: rgba(255,255,255,.05);
}

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

    .sidebar {
        position: relative;
        height: auto;
    }

    .profile {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        margin-top: 14px;
    }

    .account-grid,
    .metric-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .content {
        padding: 12px;
    }

    .account-grid,
    .metric-grid,
    .command-bar,
    .money-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .quick,
    .card-actions {
        grid-template-columns: 1fr 1fr;
    }

    .hero h2 {
        font-size: 27px;
    }

    .sidebar {
        padding: 14px;
    }
}
