:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f9fbff;
  --text: #172033;
  --muted: #667085;
  --border: #d9e2ef;
  --brand: #2656d9;
  --brand-dark: #1d43aa;
  --brand-soft: #eaf0ff;
  --success: #0f766e;
  --warning: #b45309;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(38, 86, 217, 0.12), transparent 34rem),
    linear-gradient(180deg, #f8faff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 650;
}

a:hover {
  text-decoration: underline;
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 24px;
}

.card + .card {
  margin-top: 20px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

h2 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 20px 0 8px;
}

p {
  margin: 0 0 14px;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
}

.nav-list li a {
  display: block;
  padding: 14px 16px;
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
}

.nav-list li a:hover {
  background: var(--brand-soft);
  border-color: rgba(38, 86, 217, 0.35);
  text-decoration: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.button,
button,
input[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  font: inherit;
  font-weight: 750;
  box-shadow: 0 8px 20px rgba(38, 86, 217, 0.22);
}

.button:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--brand-dark);
  color: #fff;
  text-decoration: none;
}

.button.secondary {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--border);
  box-shadow: none;
}

.button.secondary:hover {
  background: var(--brand-soft);
}

form {
  margin: 18px 0 0;
}

label {
  display: block;
  font-weight: 700;
  color: var(--text);
}

input,
select,
textarea {
  width: min(100%, 520px);
  margin-top: 6px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

select {
  width: auto;
  min-width: 140px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(38, 86, 217, 0.18);
  border-color: rgba(38, 86, 217, 0.65);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--border);
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--panel-soft);
  color: #344054;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #fbfdff;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  padding: 16px;
  background: #101828;
  color: #f8fafc;
  border-radius: 14px;
  font-size: 0.92rem;
}

img {
  max-width: 100%;
  height: auto;
}

.qr-code,
img[alt*="QR"],
img[src^="data:image/png"] {
  display: block;
  width: min(460px, 100%);
  margin: 22px auto;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 750;
  font-size: 0.86rem;
}

.success,
.notice-success {
  color: var(--success);
  font-weight: 750;
}

.warning,
.notice-warning {
  color: var(--warning);
  font-weight: 750;
}

.danger,
.notice-danger {
  color: var(--danger);
  font-weight: 750;
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 18px, 1120px);
    padding-top: 16px;
  }

  .card {
    padding: 20px;
    border-radius: 16px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .actions {
    align-items: stretch;
  }

  .actions .button,
  .actions button {
    width: 100%;
  }
}
