:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e2e4e9;
  --text: #1c1f26;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --danger: #dc2626;
  --radius: 10px;
}

* { box-sizing: border-box; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 600;
}

.topbar .who { color: var(--muted); font-size: 13px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button, .btn {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text);
}

button.primary { background: var(--accent); border-color: var(--accent); color: white; }
button.primary:hover { background: var(--accent-dark); }
button.link { border: none; background: none; color: var(--accent); padding: 0; }
button.danger { color: var(--danger); }

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 340px; }
.login-card h1 { font-size: 18px; margin-bottom: 4px; }
.login-card p.sub { color: var(--muted); font-size: 13px; margin-top: 0; margin-bottom: 18px; }

label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
input[type=text], input[type=password], input[type=date] {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 14px;
}

.error { color: var(--danger); font-size: 13px; margin-bottom: 10px; min-height: 16px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: #fafbfc; }

.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 13px; }
.pill { display: inline-block; background: #eef2ff; color: var(--accent-dark); border-radius: 999px; padding: 2px 10px; font-size: 12px; }

.filters { display: flex; gap: 10px; align-items: flex-end; margin-bottom: 16px; flex-wrap: wrap; }
.filters > div { min-width: 160px; }
.filters input { margin-bottom: 0; }

.key-box {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  margin: 12px 0;
}
.key-box code, .install-box code {
  display: block;
  background: #111827;
  color: #d1fae5;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  overflow-x: auto;
  margin-top: 8px;
  white-space: pre-wrap;
  word-break: break-all;
}

.url-cell { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
