:root {
  --red: #b91c1c;
  --red-dark: #991b1b;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --green: #16a34a;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: #111827;
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.org-name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.system-name {
  margin: 0;
  font-size: 12px;
  color: #cbd5e1;
}

.shield {
  margin-left: auto;
  font-size: 26px;
}

.hero {
  padding: 28px 0 18px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.25;
}

.hero p {
  margin: 0 0 14px;
  color: var(--muted);
}

.assurances {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}

.assurances li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--ink);
}

.tick {
  color: var(--green);
  font-weight: 700;
  line-height: 1.3;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 24px;
}

.tabs {
  display: flex;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.field {
  margin-bottom: 16px;
}

.label,
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.req {
  color: var(--red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.12);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.btn-primary,
.btn-secondary {
  width: 100%;
  padding: 12px 16px;
  border-radius: 9px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: var(--red-dark);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  width: auto;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--line);
}

.success {
  text-align: center;
  padding: 10px 0 4px;
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dcfce7;
  color: var(--green);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 10px;
}

.success h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.success p {
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto 10px;
}

.code {
  color: var(--ink);
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.status-result {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
}

.status-table th {
  color: var(--muted);
  font-weight: 600;
  width: 40%;
}

.flash {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.flash.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.flash.info {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}

.hidden {
  display: none;
}

.site-footer {
  text-align: center;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .hero h1 {
    font-size: 22px;
  }
}