:root {
    --black: #050608;
    --red: #e63946;
    --teal: #00a8a8;
    --purple: #7a3db8;
    --ink: #cfd2d6;
    --muted: #8b93a3;
    --panel: rgba(12, 13, 19, 0.88);
    --border: rgba(255, 255, 255, 0.08);
    --success: #38b28a;
    --danger: #dc4457;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    font-family: "Manrope", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 8% 12%, rgba(230, 57, 70, 0.2) 0%, rgba(5, 6, 8, 0) 40%),
        radial-gradient(circle at 92% 18%, rgba(122, 61, 184, 0.2) 0%, rgba(5, 6, 8, 0) 44%),
        radial-gradient(circle at 78% 92%, rgba(0, 168, 168, 0.2) 0%, rgba(5, 6, 8, 0) 46%),
        var(--black);
}

.atmosphere {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(120deg, rgba(0, 0, 0, 0.1) 0%, rgba(122, 61, 184, 0.08) 34%, rgba(0, 168, 168, 0.06) 72%, rgba(230, 57, 70, 0.08) 100%);
    pointer-events: none;
    z-index: -1;
}

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

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 6, 8, 0.72);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 30;
}

.brand {
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.25rem;
    letter-spacing: 0.06em;
    color: #f5f5f7;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.nav-links > a {
    color: var(--ink);
    font-size: 0.95rem;
}

.nav-links > a:hover {
    color: #fff;
}

.nav-inline {
    margin: 0;
}

.container {
    width: min(1120px, 94vw);
    margin: 1.6rem auto 2rem;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
}

.panel + .panel {
    margin-top: 1rem;
}

h1,
h2,
h3 {
    margin: 0 0 0.9rem;
    font-family: "Chakra Petch", sans-serif;
    font-weight: 600;
}

h1 {
    font-size: 1.7rem;
}

h2 {
    font-size: 1.3rem;
}

p {
    margin: 0;
}

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

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

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

.stat-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem;
}

.stat-label {
    color: var(--muted);
    font-size: 0.8rem;
}

.stat-value {
    margin-top: 0.35rem;
    font-family: "Chakra Petch", sans-serif;
    font-size: 1.3rem;
    color: #fff;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.asset-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.95rem;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}

.asset-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.asset-code {
    font-family: "Chakra Petch", sans-serif;
    color: #f6f7fb;
}

.asset-name {
    color: var(--muted);
    font-size: 0.84rem;
}

.asset-amount {
    margin-top: 0.6rem;
    font-size: 1.15rem;
    color: #fff;
}

.asset-usd {
    margin-top: 0.2rem;
    color: var(--teal);
    font-size: 0.9rem;
}

.grid-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.form-row {
    display: grid;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.input-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--muted);
    margin-bottom: 0.35rem;
}

.input,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"] {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.35);
    color: var(--ink);
    border-radius: 10px;
    padding: 0.62rem 0.68rem;
    font: inherit;
}

.input:focus,
select:focus,
input:focus {
    border-color: var(--teal);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 168, 168, 0.2);
}

.btn {
    border: none;
    border-radius: 10px;
    padding: 0.58rem 0.88rem;
    background: linear-gradient(130deg, var(--red), var(--purple));
    color: #fff;
    font-family: "Chakra Petch", sans-serif;
    cursor: pointer;
}

.btn.secondary {
    background: linear-gradient(130deg, var(--teal), #146c6c);
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--border);
}

.btn:hover {
    filter: brightness(1.05);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

th,
td {
    text-align: left;
    padding: 0.66rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.control-cell {
    min-width: 330px;
}

.amount-form {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 0.45rem;
}

.amount-form label {
    font-family: "Chakra Petch", sans-serif;
    color: #fff;
    font-size: 0.82rem;
}

.amount-form input {
    padding: 0.5rem 0.58rem;
}

.amount-form button {
    padding: 0.5rem 0.72rem;
    font-size: 0.84rem;
}

.pill {
    display: inline-block;
    font-size: 0.73rem;
    padding: 0.26rem 0.5rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: "Chakra Petch", sans-serif;
}

.pill.admin {
    color: #fff;
    border-color: rgba(230, 57, 70, 0.45);
    background: rgba(230, 57, 70, 0.14);
}

.pill.user {
    color: #fff;
    border-color: rgba(0, 168, 168, 0.45);
    background: rgba(0, 168, 168, 0.14);
}

.alert {
    margin-bottom: 0.95rem;
    border-radius: 10px;
    padding: 0.72rem 0.85rem;
    border: 1px solid transparent;
}

.alert.error {
    border-color: rgba(220, 68, 87, 0.45);
    background: rgba(220, 68, 87, 0.12);
    color: #ffd4d9;
}

.alert.success {
    border-color: rgba(56, 178, 138, 0.5);
    background: rgba(56, 178, 138, 0.12);
    color: #d5ffef;
}

.login-shell {
    width: min(460px, 94vw);
    margin: 4.8rem auto 0;
}

.login-shell p {
    color: var(--muted);
    margin-bottom: 1rem;
}

.address-value {
    font-family: "Chakra Petch", sans-serif;
    word-break: break-all;
}

.stack {
    display: grid;
    gap: 0.7rem;
}

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

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

@media (max-width: 640px) {
    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
    }

    .nav-links {
        width: 100%;
        flex-wrap: wrap;
    }

    .hero {
        flex-direction: column;
    }

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

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