:root {
  --primary: #1e3a5f;
  --secondary: #b21917;
  --bg: #eef5e9;
  --text: #1e3a5f;
  --muted: #667085;
  --line: #d8e0d2;
  --white: #ffffff;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --danger-bg: #fee2e2;
  --danger-text: #991b1b;
  --warning-bg: #fef3c7;
  --warning-text: #92400e;
  --radius: 8px;
  --shadow: 0 8px 20px rgba(30, 58, 95, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

.container {
  width: min(1050px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo img {
  display: block;
  height: 58px;
  width: auto;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
}

.brand small {
  margin-top: 2px;
  color: var(--secondary);
  font-size: 0.86rem;
  font-weight: 700;
}

.search-shell {
  max-width: 760px;
  margin: 36px auto 0;
}

.hero {
  margin-bottom: 18px;
}

.verified {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.15;
}

h2 {
  margin-bottom: 14px;
  font-size: 1.15rem;
}

p {
  line-height: 1.55;
}

.hero p {
  margin-bottom: 5px;
}

.card {
  background: var(--white);
  border: 1px solid rgba(30, 58, 95, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-card,
.card-body {
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-header h2 {
  margin: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #c7d0c0;
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(178, 25, 23, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: var(--white);
}

.btn.secondary {
  background: var(--secondary);
  color: var(--white);
}

.btn.ghost {
  background: var(--white);
  border-color: var(--line);
  color: var(--primary);
}

.btn.disabled {
  background: #eef2f6;
  color: var(--muted);
  cursor: not-allowed;
}

.message {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
}

.ok {
  background: var(--success-bg);
  color: var(--success-text);
}

.ko {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.warn {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.verification-code {
  align-self: flex-start;
  min-width: 170px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: right;
}

.verification-code span,
.verification-code strong {
  display: block;
}

.verification-code span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.verification-code strong {
  font-size: 1.1rem;
}

.grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  margin-top: 18px;
}

.course-list {
  margin: 0;
  padding-left: 20px;
}

.course-list li {
  margin: 0 0 8px;
  line-height: 1.45;
}

.course-list > li {
  margin-bottom: 14px;
}

.course-list strong {
  display: inline-block;
  margin-bottom: 6px;
}

.subcourse-list {
  margin: 4px 0 0;
  padding-left: 20px;
  color: #34495f;
}

.subcourse-list li {
  margin-bottom: 5px;
}

.certificate-card {
  overflow: hidden;
}

.certificate-preview {
  display: grid;
  min-height: 290px;
  place-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.certificate-preview img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.placeholder {
  display: grid;
  gap: 6px;
  place-items: center;
  width: 100%;
  min-height: 230px;
  padding: 18px;
  border: 1px dashed #b8c2b1;
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.placeholder strong {
  color: var(--primary);
}

.actions {
  display: flex;
  justify-content: center;
}

.empty-state {
  padding: 26px;
}

.empty-state h1 {
  margin-top: 14px;
}

footer {
  margin: 28px 0 6px;
  color: var(--primary);
  font-size: 0.85rem;
  text-align: center;
}

footer p {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .grid,
  .verified {
    grid-template-columns: 1fr;
  }

  .verified {
    display: grid;
  }

  .verification-code {
    width: 100%;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1050px);
    padding-top: 16px;
  }

  .site-header,
  .search-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  h1 {
    font-size: 1.65rem;
  }

  .btn {
    width: 100%;
  }
}
