:root {
  --bg: #f4f8fb;
  --ink: #152235;
  --muted: #66758a;
  --line: #dbe5ee;
  --blue: #087ea4;
  --green: #278b55;
  --red: #b42318;
}

* { box-sizing: border-box; }

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

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

h1, h2 { margin: 0 0 16px; }
h1 { font-size: 32px; }
h2 { font-size: 22px; }

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(21, 34, 53, .07);
  margin-bottom: 18px;
  padding: 22px;
}

.login-panel {
  max-width: 420px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: block;
  font-weight: 800;
  margin-bottom: 7px;
}

input {
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font: inherit;
  margin-bottom: 12px;
  padding: 11px;
  width: 100%;
}

.button {
  align-items: center;
  background: var(--blue);
  border: 0;
  border-radius: 7px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 10px 14px;
  text-decoration: none;
}

.button.light {
  background: #eaf7fb;
  color: var(--blue);
}

.button.danger {
  background: var(--red);
}

.muted {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 10px;
}

.alert {
  border-radius: 8px;
  margin-bottom: 16px;
  padding: 12px;
}

.alert.error {
  background: #fdecec;
  border: 1px solid #f5b8b8;
  color: #9f1d1d;
}

.alert.success {
  background: #e8f7ee;
  border: 1px solid #bfe7ce;
  color: #17603a;
}

.qr-preview {
  align-items: center;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 22px;
}

.qr-image {
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 260px;
  width: 260px;
}

.qr-thumb {
  height: 86px;
  width: 86px;
}

.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.actions form {
  margin: 0;
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
}

th, td {
  border-bottom: 1px solid #e5edf5;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #eef8fa;
}

@media (max-width: 760px) {
  .shell { padding: 14px; }
  .topbar, .grid, .qr-preview { display: block; }
  .qr-image { margin-top: 12px; }
}
