:root {
    --bg: #090909;
    --panel: #161616;
    --panel-soft: #202020;
    --border: #2d2d2d;
    --text: #f5f5f7;
    --muted: #a3a3aa;
    --purple: #a855f7;
    --cyan: #22d3ee;
    --green: #34d399;
    --amber: #fbbf24;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 248px;
    padding: 22px 14px;
    background: #141414;
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.rabbit-mark {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, #111, #6d28d9);
    border: 1px solid #8b5cf6;
    font-weight: 900;
}

.brand strong,
.brand span {
    display: block;
}

.brand span,
.workspace span,
.card p,
.hint,
.empty {
    color: var(--muted);
}

.workspace {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #1b1b1b;
    margin-bottom: 18px;
}

nav {
    display: grid;
    gap: 6px;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 8px;
}

nav a.active,
nav a:hover {
    background: #242424;
}

.shell {
    margin-left: 248px;
    padding: 28px;
}

.topbar {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    margin: -28px -28px 28px;
    padding: 26px 28px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 6px 0 0;
    color: var(--muted);
}

.eyebrow {
    color: var(--purple) !important;
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
}

.actions {
    display: flex;
    gap: 10px;
}

.ghost-button,
.icon-button,
button {
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #181818;
    color: var(--text);
    padding: 0 16px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button[type="submit"],
#copyButton {
    background: var(--purple);
    border-color: var(--purple);
}

.notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.notice.success {
    background: rgba(52, 211, 153, .12);
    border: 1px solid rgba(52, 211, 153, .45);
}

.notice.error {
    background: rgba(248, 113, 113, .12);
    border: 1px solid rgba(248, 113, 113, .45);
}

.grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 20px;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

.card-title {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.card-title h2 {
    margin: 0;
    font-size: 18px;
}

.card-title p {
    margin: 5px 0 0;
}

.card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #2a2a2a;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metrics div,
.status-panel,
.copy-box,
.table {
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.metrics div {
    padding: 13px;
}

.metrics span,
.status-panel small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.metrics strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
}

.mini-chart {
    height: 170px;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 20px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(34, 211, 238, .10), rgba(168, 85, 247, .15));
    border: 1px solid var(--border);
}

.mini-chart span {
    flex: 1;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, var(--cyan), var(--purple));
}

.achievement {
    display: grid;
}

.status-panel {
    padding: 22px;
    min-height: 180px;
    background:
        radial-gradient(circle at 80% 15%, rgba(34, 211, 238, .38), transparent 30%),
        linear-gradient(135deg, #193042, #21312a);
}

.status-panel span {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(52, 211, 153, .16);
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
}

.status-panel strong {
    display: block;
    margin: 34px 0 8px;
    font-size: 34px;
}

.settings-card,
.requests-card {
    grid-column: span 1;
}

.link-card {
    grid-column: span 1;
}

.settings-form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 800;
}

input[type="text"],
input[type="url"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #101010;
    color: var(--text);
    padding: 0 12px;
}

.toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px;
}

.table {
    overflow: hidden;
}

.table-head,
.table-row {
    display: grid;
    grid-template-columns: 110px 90px 1fr;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.table-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.table-row:last-child {
    border-bottom: 0;
}

.pill {
    width: fit-content;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(168, 85, 247, .18);
}

.empty {
    padding: 18px;
}

body.light {
    --bg: #f6f7fb;
    --panel: #ffffff;
    --panel-soft: #f2f4f8;
    --border: #d8deea;
    --text: #151923;
    --muted: #667085;
}

body.light .sidebar {
    background: #fff;
}

body.light input[type="text"],
body.light input[type="url"],
body.light .ghost-button,
body.light .icon-button {
    background: #fff;
}

@media (max-width: 980px) {
    .sidebar {
        position: static;
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .shell {
        margin-left: 0;
    }

    .topbar,
    .grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}
