:root {
    color-scheme: light;
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --ok: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    margin-bottom: 12px;
}

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

.subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.input-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.input-title {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

#tokenInput {
    width: 100%;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.4;
}

.input-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

button {
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

button:hover {
    background: var(--primary-dark);
}

button.secondary {
    background: #475569;
}

button.secondary:hover {
    background: #334155;
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.input-tip {
    font-size: 12px;
    color: var(--muted);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.summary-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
}

.summary-card .label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.summary-card .value {
    font-size: 20px;
    font-weight: 700;
}

.table-section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1020px;
}

thead {
    background: #f9fafb;
}

th,
td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 13px;
}

tbody tr:hover {
    background: #f9fbff;
}

.name-main {
    font-weight: 700;
}

.name-sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.tag {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 18px;
}

.tag.ok {
    color: #166534;
    background: #dcfce7;
}

.tag.no {
    color: #854d0e;
    background: #fef3c7;
}

.tag.error {
    color: #991b1b;
    background: #fee2e2;
}

.progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-track {
    width: 110px;
    height: 8px;
    border-radius: 99px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
}

.progress-bar.ok {
    background: var(--ok);
}

.progress-bar.warn {
    background: var(--warn);
}

.progress-bar.danger {
    background: var(--danger);
}

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

.footer {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.error-text {
    color: var(--danger);
}
