* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; color: #333; }
.container { max-width: 800px; margin: 40px auto; padding: 0 20px; }
h1 { font-size: 24px; margin-bottom: 8px; }
.subtitle { font-size: 14px; color: #888; margin-bottom: 24px; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); padding: 24px; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eee; }
th { font-weight: 600; font-size: 13px; color: #666; }
input[type="text"], input[type="password"] { border: 1px solid #ddd; border-radius: 4px; padding: 6px 10px; font-size: 14px; width: 100%; }
input[type="text"]:focus, input[type="password"]:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }
.btn { padding: 8px 16px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; transition: background 0.15s; white-space: nowrap; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }
.btn-danger { background: #fee2e2; color: #dc2626; white-space: nowrap; }
.btn-danger:hover { background: #fecaca; }
.btn-secondary { background: #f3f4f6; color: #333; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-ghost { background: none; color: #999; font-size: 13px; padding: 4px 8px; }
.btn-ghost:hover { color: #333; }
.footer { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 20px; }
.toggle { width: 44px; height: 24px; background: #d1d5db; border-radius: 12px; cursor: pointer; position: relative; transition: background 0.2s; border: none; flex-shrink: 0; }
.toggle.active { background: #22c55e; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.toggle.active::after { transform: translateX(20px); }
.status { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; display: none; }
.status.success { display: block; background: #dcfce7; color: #166534; }
.status.error { display: block; background: #fee2e2; color: #991b1b; }
.status.loading { display: block; background: #dbeafe; color: #1e40af; }
.empty { text-align: center; padding: 40px; color: #999; }
.meta { font-size: 12px; color: #999; }
.login-card { max-width: 400px; margin: 120px auto; }
.login-card h1 { text-align: center; margin-bottom: 4px; }
.login-card .subtitle { text-align: center; margin-bottom: 20px; }
.login-form { display: flex; gap: 8px; }
.login-form input { flex: 1; }
.login-error { color: #dc2626; font-size: 13px; margin-top: 8px; display: none; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.header-left h1 { margin-bottom: 4px; }
.hidden { display: none !important; }
.history-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; color: #666; padding: 8px 0; }
.history-toggle:hover { color: #333; }
.history-toggle .arrow { transition: transform 0.2s; display: inline-block; }
.history-toggle .arrow.open { transform: rotate(90deg); }
.history-list { list-style: none; }
.history-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid #eee; font-size: 14px; }
.history-item:last-child { border-bottom: none; }
.history-time { color: #666; }
.history-btns { display: flex; gap: 6px; flex-shrink: 0; }
.btn-outline { padding: 4px 12px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #666; font-size: 13px; cursor: pointer; white-space: nowrap; }
.btn-outline:hover { border-color: #2563eb; color: #2563eb; }
.json-viewer-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.json-viewer { background: #fff; border-radius: 8px; width: 90%; max-width: 700px; max-height: 80vh; display: flex; flex-direction: column; }
.json-viewer-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #eee; }
.json-viewer-header h2 { font-size: 16px; font-weight: 600; }
.json-viewer-close { border: none; background: none; font-size: 22px; cursor: pointer; color: #999; padding: 0 4px; }
.json-viewer-close:hover { color: #333; }
.json-viewer-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.json-viewer-body pre { font-family: 'SF Mono', Consolas, monospace; font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-all; color: #333; margin: 0; }
.current-json-btn { font-size: 12px; color: #2563eb; background: none; border: none; cursor: pointer; text-decoration: underline; }
.current-json-btn:hover { color: #1d4ed8; }
