@font-face {
    font-family: Inter;
    src: url("/assets/Inter.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: light;
    --canvas: #f7f5fb;
    --surface: #fff;
    --ink: #231831;
    --muted: #62566f;
    --line: #e8e0ef;
    --purple: #6d28d9;
    --purple-deep: #5620ac;
    --purple-light: #f1e8fd;
    --sidebar: #241231;
    --sidebar-text: #efe8f9;
    --sidebar-muted: #c6afd8;
    font: 14px/1.55 Inter, system-ui, sans-serif;
    color: var(--ink);
    background: var(--canvas);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
input, textarea, select, button { font: inherit; }
button, summary { cursor: pointer; }
button, a, input, textarea, select, summary { outline-offset: 3px; }
:focus-visible { outline: 2px solid #9b6be5; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 3vw, 2.48rem); line-height: 1.12; letter-spacing: -.045em; }
h2 { font-size: 1.13rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
li + li { margin-top: 5px; }

.shell { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    padding: 28px 16px 18px;
    background: linear-gradient(155deg, #472453 0%, var(--sidebar) 38%, #1a1128 100%);
    color: var(--sidebar-text);
}
.brand { display: flex; align-items: center; gap: 12px; }
.sidebar .brand { padding: 0 8px 23px; }
.brand img { flex-shrink: 0; border-radius: 12px; object-fit: cover; }
.brand strong { display: block; font-size: .97rem; font-weight: 720; line-height: 1.3; }
.brand small { display: block; margin-top: 3px; color: var(--sidebar-muted); font-size: .78rem; }
.nav {
    display: flex;
    flex-direction: column;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    gap: 2px;
}
.nav-label {
    padding: 13px 10px 4px;
    color: var(--sidebar-muted);
    font-size: .73rem;
    font-weight: 650;
}
.nav a, .mobile-menu nav a {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 550;
}
.nav a:hover, .mobile-menu nav a:hover { background: rgb(255 255 255 / 9%); }
.nav a[aria-current], .mobile-menu nav a[aria-current] {
    color: #fff;
    background: #633ba2;
}
.sidebar-foot {
    display: grid;
    gap: 5px;
    margin-top: auto;
    padding: 12px 8px 0;
    border-top: 1px solid rgb(255 255 255 / 16%);
}
.user-email {
    overflow: hidden;
    color: var(--sidebar-muted);
    font-size: .82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-button { padding: 0; color: inherit; background: none; border: 0; font-weight: 600; }
.text-button:hover { text-decoration: underline; }
.mobile-menu { display: none; }
.workspace { width: 100%; max-width: 1480px; min-width: 0; margin-inline: auto; padding: 38px 34px 50px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 23px; }
.page-head p { margin-top: 7px; color: var(--muted); }
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    min-height: 39px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
    font-weight: 660;
    line-height: 1.35;
}
.button:hover { background: #f4effa; }
.button.primary { color: #fff; border-color: var(--purple); background: var(--purple); }
.button.primary:hover { background: var(--purple-deep); border-color: var(--purple-deep); }
.button.block { width: 100%; }
.wallet-link { flex-shrink: 0; }
.surface {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 3px 12px rgb(48 24 85 / 4%);
}
.workspace > .surface + .surface, .workspace > .surface + .overview-grid { margin-top: 17px; }
.padded { padding: 20px; }
.narrow { max-width: 580px; }
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.fee-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric { display: grid; min-width: 0; gap: 10px; padding: 16px 19px; }
.metric span { font-weight: 550; color: var(--muted); }
.metric strong { font-size: clamp(1.3rem, 2.6vw, 1.98rem); letter-spacing: -.05em; line-height: 1.18; }
.overview-grid, .settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 17px; }
.settings-grid { align-items: start; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.section-head + .hint { margin-top: 7px; }
.section-head h2 { min-width: 0; overflow-wrap: anywhere; }
.badge, .count {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 8px;
    border-radius: 7px;
    background: var(--purple-light);
    color: #58318a;
    font-size: .75rem;
    font-weight: 670;
}
.badge.good { background: #dff6e9; color: #095539; }
.badge.neutral, .count { background: #f0ebf5; color: #5a4c68; }
.count { vertical-align: middle; margin-left: 4px; }
.details { display: grid; gap: 0; margin: 12px 0; }
.details > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}
dt, .hint { color: var(--muted); }
dd { margin: 0; text-align: right; font-weight: 670; font-variant-numeric: tabular-nums; }
.inline-link { color: var(--purple-deep); font-weight: 650; word-break: normal; }
.inline-link:hover, .shortcuts a:hover { text-decoration: underline; }
.shortcuts { margin-top: 12px; }
.shortcuts a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.shortcuts a span { color: var(--purple); }
.alert { padding: 11px 13px; margin-bottom: 14px; border: 1px solid; border-radius: 8px; }
.alert.error { color: #8a2540; background: #fff3f6; border-color: #f8ccda; }
.alert.success { color: #14513c; background: #edf9f2; border-color: #c9ecd7; }
.empty { padding: 14px 20px 20px; color: var(--muted); }
.form-note, .hint { margin: 8px 0 14px; }
form { min-width: 0; }
section form { margin-top: 14px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field { display: grid; min-width: 0; align-content: start; gap: 5px; margin-bottom: 14px; font-weight: 570; }
.field input, .field textarea, .field select {
    width: 100%;
    min-height: 40px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #d9cee4;
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-weight: 450;
}
.field textarea { resize: vertical; }
.field .code { font: .86rem/1.55 ui-monospace, Consolas, monospace; }
.field.confirm { max-width: 340px; }
.field.readonly strong {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #f7f4fb;
    overflow-wrap: anywhere;
}
.setting-list { padding: 15px 18px; }
.setting-list h2 { padding-bottom: 6px; }
.setting-list a { display: block; padding: 6px 0; color: var(--purple-deep); }
.setting-list a:hover { text-decoration: underline; }
.setting-list a[aria-current] { font-weight: 720; }
.check-group { min-width: 0; display: flex; gap: 8px 15px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.check-group legend { padding: 0 5px; font-weight: 600; }
.check-group label { overflow-wrap: anywhere; }
input[type="checkbox"] { accent-color: var(--purple); }
.filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; padding-top: 0; margin-top: 0; }
.filter .field { min-width: min(100%, 205px); margin-bottom: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 15px; border-top: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th { white-space: nowrap; color: var(--muted); background: #faf8fc; font-weight: 640; font-size: .8rem; }
td { overflow-wrap: anywhere; font-size: .88rem; }
td.break { min-width: 150px; max-width: 310px; }
details.row-details { min-width: 160px; }
details.row-details summary { color: var(--purple-deep); font-weight: 600; }
details.row-details .field { min-width: 146px; }
.pagination { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; }
.pagination:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.login {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 20px;
    min-height: 100vh;
    padding: 28px 16px;
    background: radial-gradient(ellipse at 70% 20%, #70419e 0%, #432851 30%, #211129 78%);
}
.login-identity { color: #fff; width: min(100%, 400px); }
.login-identity .brand { gap: 14px; }
.login-identity .brand strong { font-size: 1.17rem; }
.login-card { width: min(100%, 400px); padding: 28px; border-radius: 16px; background: #fff; box-shadow: 0 15px 38px rgb(12 3 20 / 26%); }
.login-card h1 { margin-bottom: 13px; font-size: 1.64rem; }
.login-card .block { margin-top: 3px; }
.login-card > p:not(.alert) { color: var(--muted); }
@media (max-width: 1000px) {
    .shell { grid-template-columns: 204px minmax(0, 1fr); }
    .workspace { padding: 27px 22px 40px; }
    .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .shell { display: block; }
    .sidebar {
        position: static;
        height: auto;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, auto);
        align-items: center;
        gap: 8px 12px;
        padding: 12px 14px;
    }
    .sidebar .brand { padding: 0; gap: 8px; }
    .sidebar .brand img { width: 36px; height: 36px; }
    .sidebar .brand small, .sidebar-foot .user-email, .nav { display: none; }
    .mobile-menu { display: block; grid-column: 1 / -1; grid-row: 2; }
    .mobile-menu > summary { width: fit-content; padding: 4px 6px; color: var(--sidebar-text); font-weight: 630; }
    .mobile-menu nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    .sidebar-foot { justify-self: end; margin: 0; padding: 0 4px; border: 0; }
    .workspace { padding: 21px 13px 36px; }
    .page-head { align-items: flex-start; margin-bottom: 17px; }
    .page-head p { font-size: .91rem; }
    .page-head .button { padding-inline: 9px; font-size: .84rem; }
    .overview-grid, .settings-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .settings-grid > .editor { grid-row: 1; }
    .summary { gap: 9px; margin-bottom: 12px; }
    .metric { padding: 13px 11px; }
    .fields { grid-template-columns: minmax(0, 1fr); }
    .padded, .setting-list, .login-card { padding: 16px; }
    th, td { padding: 9px 10px; }
    th:first-child, td:first-child { padding-left: 15px; }
    th:last-child, td:last-child { padding-right: 15px; }
}
@media (max-width: 360px) {
    .page-head { flex-wrap: wrap; }
    .button { min-height: 36px; }
}
