/* License Admin — minimal, fast, pure CSS */
:root {
  --bg: #f8fafc;
  --surface: #fff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #0ea5e9;
  --accent-hover: #0284c7;
  --success-bg: #ecfdf5;
  --success-text: #059669;
  --error-bg: #fef2f2;
  --error-text: #dc2626;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 12px rgba(15,23,42,.08);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
}

/* Header */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Nav / back */
.nav-back {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-back:hover { color: var(--accent); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}
.alert--success { background: var(--success-bg); color: var(--success-text); }
.alert--error { background: var(--error-bg); color: var(--error-text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, box-shadow .15s;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn--secondary:hover { background: var(--bg); }
.btn--danger { background: var(--error-text); color: #fff; }
.btn--danger:hover { background: #b91c1c; color: #fff; }
.btn--sm { padding: 0.35rem 0.65rem; font-size: 0.8125rem; }
.btn + .btn { margin-left: 0.5rem; }

/* Table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.table th,
.table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table th {
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .btn, .form-input, .table tbody tr { transition: none; }
}
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--bg); }
.table .num { font-variant-numeric: tabular-nums; }
.table code {
  font-size: 0.8125rem;
  padding: 0.2em 0.4em;
  background: var(--bg);
  border-radius: 4px;
  word-break: break-all;
}
.table .cell-actions { white-space: nowrap; }
.table .cell-actions .btn { margin-right: 0.35rem; }
.expiry-fail { font-size: 0.75rem; color: var(--text-muted); }

/* Empty state */
.empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.empty a { color: var(--accent); text-decoration: none; }
.empty a:hover { text-decoration: underline; }

/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text);
}
.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0;
}
.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.form-input[readonly] {
  background: var(--bg);
  color: var(--text-muted);
  cursor: default;
}
.form-actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* Form card (narrow for create/update) */
.form-card { max-width: 480px; }
.card__body { padding: 1.5rem; }

/* Top bar with primary action */
.toolbar { margin-bottom: 1rem; }
