:root {
    color-scheme: dark;
    font: 16px/1.5 system-ui, sans-serif;
    color: #eef3f8;
    background: #101620;
    --panel: #192332;
    --border: #344253;
    --muted: #b6c4d3;
    --accent: #7ce1cd;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); }
button, input { font: inherit; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { background: #141d2a; border-right: 1px solid var(--border); padding: 26px 18px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 1.25rem; font-weight: 750; color: inherit; }
.brand strong { color: var(--accent); }
.sidebar nav { display: grid; gap: 5px; margin: 30px 0; }
.sidebar nav a, .action {
    color: var(--muted);
    text-decoration: none;
    border-radius: 8px;
    padding: 8px 12px;
}
.action { display: inline-block; background: var(--panel); border: 1px solid var(--border); }
.sidebar nav a:hover, .action:hover, [aria-current="page"] { background: #244039 !important; color: var(--accent) !important; }
main { width: 100%; max-width: 1440px; padding: clamp(18px, 4vw, 48px); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.page-heading h1 { margin: 0; }
h1 { font-size: clamp(1.55rem, 4vw, 2.25rem); margin: 0 0 12px; line-height: 1.2; }
h2 { font-size: 1.15rem; margin-top: 24px; }
p { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 12px; }
.card, .notice { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 12px; }
.card strong { display: block; margin-top: 8px; font-size: 1.7rem; color: var(--accent); }
.coin-icon-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.coin-icon-heading { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.coin-icon-heading img { object-fit: contain; border-radius: 50%; }
.coin-icon-reset { margin-top: 10px; }
.post-form { max-width: 760px; }
.post-form textarea { display: block; width: 100%; padding: 10px; font: inherit; resize: vertical; }
.post-form textarea[hidden] { display: none; }
.post-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--border); border-radius: 8px 8px 0 0; }
.post-toolbar button, .post-toolbar select { width: auto; margin: 0; padding: 5px 8px; color: inherit; background: #202e3e; border: 1px solid var(--border); border-radius: 5px; font: inherit; font-size: .875rem; }
.post-toolbar button:hover { background: #344253; }
.post-toolbar button[data-command^="justify"] { width: 34px; font-size: 0; }
.post-toolbar button[data-command^="justify"]::before { content: ""; display: block; width: 14px; height: 11px; margin: auto; background: linear-gradient(currentColor,currentColor) 0 1px / 14px 1px no-repeat, linear-gradient(currentColor,currentColor) var(--align, left) 5px / 8px 1px no-repeat, linear-gradient(currentColor,currentColor) 0 9px / 14px 1px no-repeat; }
.post-toolbar button[data-command="justifyCenter"] { --align: center; }
.post-toolbar button[data-command="justifyRight"] { --align: right; }
.post-editor-body { min-height: 250px; padding: 12px; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 8px 8px; background: #101620; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-editor-body img { max-width: 100%; max-height: 240px; }
.post-editor-body blockquote { margin-inline: 0; padding-left: 12px; border-left: 3px solid var(--accent); }
.post-editor-body code { padding: 2px 4px; background: var(--panel); }
.post-editor-body h1, .post-editor-body h2 { margin: 0 0 6px; }
.post-form fieldset { border: 1px solid var(--border); border-radius: 8px; min-width: 0; margin: 0 0 16px; }
.post-form input[type="checkbox"] { display: inline; width: auto; }
.post-list { list-style: none; overflow-wrap: anywhere; }
.post-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.post-list li + li { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
.post-status { margin-top: 5px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.post-actions .action { padding: 5px 9px; font-size: .875rem; }
.post-actions .post-delete { color: #ffabb5; }
.metric { text-decoration: none; color: inherit; }
.metric:hover { border-color: var(--accent); }
.notice { color: #ffda99; border-color: #705735; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.table-wrap { overflow: auto; padding: 0; }
.table-wrap .navigation-position { width: 5.5rem; }
.table-wrap .navigation-visibility { width: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); }
thead { background: #202e3e; color: var(--muted); }
tbody tr:last-child > * { border-bottom: 0; }
code { font-size: .83em; }
.badge { display: inline-block; background: #28384b; border-radius: 6px; padding: 3px 8px; }
.badge.completed { color: var(--accent); }
.badge.failed, .error { color: #ffabb5; }
.badge.queued { color: #ffda99; }
.login-shell { max-width: 500px; margin: 8vh auto 0; }
.login-shell .brand { margin-bottom: 20px; }
label { display: block; margin: 12px 0; }
input {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-top: 5px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #101620;
    color: inherit;
    padding: 8px 12px;
}
button { cursor: pointer; border: 0; border-radius: 8px; background: var(--accent); color: #10251f; padding: 8px 14px; font-weight: 650; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 720px) {
    .admin-shell { display: block; }
    .sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: 16px 18px; }
    .sidebar nav { display: flex; flex-wrap: wrap; margin: 12px 0; }
}
