* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0a0e14;
  color: #c5cdd9;
  min-height: 100vh;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

h1 {
  font-size: 20px;
  color: #e2e8f0;
}

h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 8px;
}

section {
  margin-bottom: 24px;
  background: #131920;
  border: 1px solid #1e2a3a;
  border-radius: 12px;
  padding: 20px;
}

.hint {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 12px;
}

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

.token-box code {
  flex: 1;
  background: #0a0e14;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

button:disabled {
  background: #1e2a3a;
  color: #475569;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background: #1d4ed8;
}

.pending-card {
  background: #0a0e14;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
}

.pending-card .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.pending-card .label {
  color: #64748b;
}

.pending-card .value {
  color: #e2e8f0;
  font-family: monospace;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pending-card .actions button.reject {
  background: #1e2a3a;
  color: #ef4444;
}

.empty {
  text-align: center;
  color: #475569;
  font-size: 13px;
  padding: 16px;
}

#log {
  max-height: 200px;
  overflow-y: auto;
  font-size: 12px;
  font-family: monospace;
}

#log .entry {
  padding: 4px 0;
  border-bottom: 1px solid #1e2a3a;
  color: #94a3b8;
}

#log .entry.ok { color: #22c55e; }
#log .entry.err { color: #ef4444; }

.hidden { display: none; }

/* --- Token creation --- */

.api-hint {
  background: #0a0e14;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.api-hint code {
  font-size: 11px;
  background: none;
  border: none;
  padding: 0;
  color: #60a5fa;
}

.create-token-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.create-token-row input {
  flex: 1;
  background: #0a0e14;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: #e2e8f0;
  outline: none;
}

.create-token-row input::placeholder {
  color: #475569;
}

.create-token-row input:focus {
  border-color: #2563eb;
}

/* --- Token list --- */

.token-card {
  background: #0a0e14;
  border: 1px solid #1e2a3a;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.token-label {
  font-size: 13px;
  color: #e2e8f0;
  font-weight: 500;
}

.token-age {
  font-size: 12px;
  color: #475569;
}

.badge-self {
  font-size: 10px;
  background: #1e3a5f;
  color: #60a5fa;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  font-weight: 400;
}

.token-card-actions button.revoke {
  background: #1e2a3a;
  color: #ef4444;
  font-size: 12px;
  padding: 6px 12px;
}

.token-card-actions button.revoke:hover {
  background: #2a1520;
}

/* --- New token banner --- */

.new-token-banner {
  background: #0f1a12;
  border: 1px solid #166534;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}

.new-token-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.new-token-header .dismiss {
  background: none;
  color: #475569;
  font-size: 12px;
  padding: 4px 8px;
}

.new-token-warning {
  font-size: 12px;
  color: #f59e0b;
  margin-bottom: 10px;
}

button.revoke-all {
  background: #1e2a3a;
  color: #ef4444;
  font-size: 12px;
  padding: 8px 14px;
}

button.revoke-all:hover {
  background: #2a1520;
}
