:root { --bg:#0b0f1a; --card:#141a2b; --border:#232c44; --text:#e6e9f0; --muted:#8b94ab; --accent:#4f7cff; --green:#22c55e; --red:#ef4444; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", "PingFang SC", sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
header { padding: 18px 32px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
header h1 { font-size: 20px; color: var(--accent); }
#auth-area { display: flex; gap: 10px; align-items: center; }
.container { max-width: 960px; margin: 32px auto; padding: 0 24px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.card h2 { font-size: 16px; margin-bottom: 16px; }
.card h3 { font-size: 14px; margin: 16px 0 10px; color: var(--muted); }

input, select, button { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border); background: #0f1424; color: var(--text); font-size: 14px; }
input:focus { outline: 1px solid var(--accent); }
button { background: var(--accent); border: none; cursor: pointer; font-weight: 600; }
button:hover { opacity: .88; }
button.ghost { background: transparent; border: 1px solid var(--border); }
button.danger { background: var(--red); }
button.small { padding: 4px 10px; font-size: 12px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { background: #0f1424; border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.stat .num { font-size: 24px; font-weight: 700; color: var(--green); }
.stat .label { color: var(--muted); font-size: 12px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
.tag { padding: 2px 8px; border-radius: 6px; font-size: 12px; background: #1e293b; }
.tag.active { background: #14532d; color: #86efac; }
.tag.consume { background: #7f1d1d; color: #fca5a5; }
.tag.recharge { background: #14532d; color: #86efac; }
.key-box { font-family: monospace; background: #0f1424; padding: 10px; border-radius: 8px; word-break: break-all; font-size: 13px; }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 20px; cursor: pointer; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.conv { background: #0f1424; border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.conv .q { color: var(--text); margin-bottom: 8px; }
.conv .a { color: var(--muted); white-space: pre-wrap; }
.conv .meta { font-size: 11px; color: var(--muted); margin-top: 8px; }

.toast { position: fixed; top: 20px; right: 20px; background: var(--green); color: #052e16; padding: 12px 20px; border-radius: 8px; font-weight: 600; z-index: 999; }
.toast.err { background: var(--red); color: #fff; }
