/* QuickySoft License Admin — carried over from the Node server's inline
   styles, moved to a real stylesheet so the page can run under a CSP
   with no 'unsafe-inline'. */

:root {
  --ink: #1a1a1a;
  --bg: #f5f6f8;
  --line: #e6e6e9;
  --muted: #777;
  --good: #2e7d32;
  --bad: #c62828;
}

* { box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
}

code {
  background: #f2f2f2;
  padding: 2px 5px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- login ---------- */
.login-body .wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.login-body .card { width: 320px; padding: 32px; }
.login-body h1 { font-size: 18px; margin: 0 0 4px; }
.login-body p.sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.login-body button { width: 100%; margin-top: 20px; padding: 10px; }

/* ---------- shell ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar b { font-weight: 600; }
.topbar .who { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.topbar .user { color: #9aa0a6; }

.linkbtn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin: 0;
}
.linkbtn:hover { color: #fff; }

.content { max-width: 860px; margin: 32px auto; padding: 0 16px; }

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
  padding: 20px 24px;
  margin-bottom: 24px;
}
h2 { font-size: 16px; margin: 0 0 16px; }

/* ---------- forms ---------- */
label { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; }

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=date] {
  width: 100%;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 4px;
  background: #fff;
  color: var(--ink);
}
input:focus-visible,
button:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 1px;
}

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1 1 120px; }

.checks { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.checks label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin-top: 0; }

button {
  margin-top: 16px;
  padding: 8px 18px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
}
button:hover { background: #333; }

button.small {
  margin: 0;
  padding: 4px 10px;
  font-size: 12px;
  background: #fff;
  color: var(--ink);
}
button.small:hover { background: #f0f0f0; }

#result { margin-top: 16px; padding: 12px; border-radius: 6px; display: none; }
#result.ok { background: #e6f7ec; border: 1px solid var(--good); }
#result.err { background: #fdecea; border: 1px solid var(--bad); }
.bigkey { font-size: 16px; }

.err {
  margin-top: 14px;
  padding: 10px;
  background: #fdecea;
  border: 1px solid var(--bad);
  border-radius: 6px;
  font-size: 13px;
  color: var(--bad);
}

.banner-warn {
  background: #fff8e1;
  border: 1px solid #f9a825;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}

/* ---------- table ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td.empty { color: var(--muted); text-align: center; padding: 18px; white-space: normal; }

.has-history { cursor: help; border-bottom: 1px dotted #999; }
.has-history sup { margin-left: 2px; }

.st-revoked { color: var(--bad); font-weight: 600; }
.st-active { color: var(--good); }
.st-unused { color: #999; }
