:root {
  --bg: #070b14;
  --fg: #e8eefc;
  --muted: #93a0b8;
  --card: #121a2f;
  --border: #1e2a44;
  --blue: #3b82f6;
  --danger: #ef4444;
  --ok: #22c55e;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, Segoe UI, sans-serif;
  color: var(--fg);
  background:
    radial-gradient(1000px 500px at 10% -10%, #1d4ed633, transparent 55%),
    radial-gradient(800px 400px at 90% 0%, #0ea5e933, transparent 50%),
    var(--bg);
}
a { color: #93c5fd; text-decoration: none; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 16px 48px; }
.card {
  background: linear-gradient(180deg, #121a2f, #0d1424);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.nav {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-bottom: 22px;
  padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 14px; background: #0a1220cc; backdrop-filter: blur(8px);
}
.nav .links { display: flex; flex-wrap: wrap; gap: 8px; }
.nav a, .btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; padding: 8px 12px; font-size: 14px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; min-height: 34px;
}
.nav a { background: #152038; color: #c7d2e8; }
.nav a.active, .btn-primary { background: #2563eb; color: #fff; }
.btn-secondary { background: #18233a; border-color: #2a3b5c; color: #e8eefc; }
.btn-danger { background: #3f1218; border-color: #7f1d1d; color: #fecaca; }
.btn-success { background: #052e1a; border-color: #166534; color: #bbf7d0; }
.btn-sm { padding: 5px 9px; font-size: 12px; min-height: 28px; border-radius: 7px; }
.btn-lg { padding: 12px 16px; font-size: 15px; min-height: 44px; width: 100%; }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.muted { color: var(--muted); }
h1 { margin: 0 0 6px; font-size: 28px; }
h2 { margin: 0 0 12px; font-size: 18px; }
label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.field {
  width: 100%; background: #0a1222; border: 1px solid #243352; color: var(--fg);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; min-height: 42px;
}
.field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px #3b82f633; }
.form-row { margin-bottom: 12px; }
.alert {
  border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 14px;
}
.alert-error { background: #3f121866; border: 1px solid #7f1d1d; color: #fecaca; }
.alert-ok { background: #052e1a66; border: 1px solid #166534; color: #bbf7d0; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 820px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.badge {
  display: inline-flex; border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 700;
  text-transform: capitalize;
}
.badge-active { background: #052e1a; color: #86efac; border: 1px solid #166534; }
.badge-revoked { background: #3f1218; color: #fca5a5; border: 1px solid #7f1d1d; }
.badge-expired { background: #3b2a08; color: #fcd34d; border: 1px solid #92400e; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.machine-card {
  background: #0a1222;
  border: 1px solid #243352;
  border-radius: 10px;
  padding: 8px 10px;
  margin-top: 6px;
  max-width: 320px;
}
input[type="date"].field,
input[type="time"].field,
input[type="datetime-local"].field {
  color-scheme: dark;
  min-height: 44px;
}
input[type="date"].field::-webkit-calendar-picker-indicator,
input[type="time"].field::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
  cursor: pointer;
  opacity: 0.9;
}
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; }
.stat { font-size: 30px; font-weight: 700; margin-top: 6px; }
.brand { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #93c5fd; font-weight: 700; }
