:root {
  --ink: #071a39;
  --blue: #0a2d63;
  --gold: #d99a22;
  --green: #17643a;
  --red: #b42318;
  --paper: #f7f8f4;
  --white: #ffffff;
  --muted: #647084;
  --line: rgba(7, 26, 57, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 12%, rgba(217, 154, 34, 0.18), transparent 28%),
    linear-gradient(135deg, #ffffff, var(--paper));
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.panel {
  width: min(920px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 64px rgba(7, 26, 57, 0.14);
  overflow: hidden;
}

.panel-header {
  padding: 28px;
  background: var(--blue);
  color: var(--white);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand img {
  width: 58px;
  height: 58px;
  padding: 6px;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--white);
}

.panel-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.02;
}

.panel-header p {
  max-width: 680px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.8);
}

.panel-body {
  padding: 28px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--ink);
  font-weight: 850;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}

.code-input {
  max-width: 260px;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-align: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 17px;
  background: var(--blue);
  color: var(--white);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.button.gold {
  background: var(--gold);
  color: var(--ink);
}

.button.light {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--blue);
}

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #fff7e0;
  color: #684c05;
  font-weight: 750;
}

.alert.error {
  background: #fff0ed;
  color: var(--red);
}

.alert.success {
  background: #edfdf4;
  color: var(--green);
}

.admin-layout {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 20px;
  box-shadow: 0 16px 40px rgba(7, 26, 57, 0.08);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.status-valid {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edfdf4;
  color: var(--green);
  font-weight: 900;
}

.status-expired,
.status-revoked {
  display: inline-block;
  padding: 6px 9px;
  border-radius: 999px;
  font-weight: 900;
}

.status-expired {
  background: #fff7e0;
  color: #8a6100;
}

.status-revoked {
  background: #fff0ed;
  color: var(--red);
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.inline-form input {
  width: 76px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.documents-admin {
  margin-top: 18px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-title-row h2,
.section-title-row p {
  margin: 0;
}

.section-title-row p {
  color: var(--muted);
}

.document-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: var(--radius);
  background: #f8fafc;
}

.verify-card {
  width: min(760px, 100%);
  text-align: center;
}

.verify-name {
  margin: 14px 0 4px;
  font-size: 2rem;
  line-height: 1.08;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  text-align: left;
}

.meta-list div {
  padding: 13px 15px;
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: #f8fafc;
}

.meta-list span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.meta-list strong {
  display: block;
  margin-top: 3px;
}

@media (max-width: 860px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    display: block;
  }

  .section-title-row,
  .document-form {
    display: block;
  }

  .document-form .field,
  .document-form .actions {
    margin-top: 12px;
  }
}
