* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Onder";
  src: url("/fonts/ONDER-REGULAR.TTF") format("truetype");
  font-display: swap;
}

body {
  font-family:
    "Onder",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: linear-gradient(145deg, #f2f5fa 0%, #e9eef5 100%);
  min-height: 100vh;
  color: #1e2a3e;
  font-size: 7px;
  line-height: 1.4;
}

:root {
  --kv-blue-deep: #003b6f;
  --kv-blue-bright: #0077c8;
  --kv-accent-orange: #f39200;
  --kv-gray-border: #dce4ec;
  --shadow: 0 8px 20px rgba(0, 59, 111, 0.08);
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.header {
  background: #fff;
  color: #074575;
  padding: 24px 0 20px;
  border-bottom: 1px solid #e0e6ed;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.image {
  height: 40px;
}

.logo-text {
  font-size: 9px;
  font-weight: 500;
}

.main {
  flex: 1;
  padding: 48px 0 60px;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 32px 36px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 119, 200, 0.15);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #074575;
  margin-bottom: 24px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 9px;
  font-weight: 600;
  color: #074575;
  margin-bottom: 16px;
}

.icon-search {
  display: inline-block;
  font-size: 18px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  line-height: 1;
}

.icon-graduate {
  display: inline-block;
  font-size: 22px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  line-height: 1;
}

.icon-pin {
  display: inline-block;
  font-size: 16px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  line-height: 1;
}

.icon-cert {
  display: inline-block;
  font-size: 14px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
  line-height: 1;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--kv-gray-border);
  border-radius: 12px;
  font-size: 8px;
  transition: all 0.3s ease;
  background: #f8f9fc;
  font-family: "Onder", sans-serif;
}

input:focus {
  outline: none;
  border-color: var(--kv-blue-bright);
  box-shadow: 0 0 0 2px rgba(0, 119, 200, 0.1);
  background: white;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 9px;
  font-weight: 500;
  border-radius: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  width: 100%;
  font-family: "Onder", sans-serif;
}

.btn .icon-search {
  font-size: 16px;
}

.btn-primary {
  background: #074575;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #0a5a8a;
}

.loading {
  text-align: center;
  padding: 24px;
  margin-top: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--kv-gray-border);
  border-top-color: var(--kv-blue-bright);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-message {
  background: #fee2e2;
  border-left: 3px solid #e31e24;
  padding: 14px 18px;
  border-radius: 12px;
  margin-top: 16px;
  color: #b91c1c;
  font-weight: 500;
  font-size: 7px;
}

.result-section {
  margin-top: 32px;
}

.student-info {
  background: linear-gradient(135deg, #e6f0fa 0%, #e0eeff 100%);
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 28px;
}

.student-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--kv-blue-deep);
}

.certificates-table-wrapper {
  overflow-x: auto;
  border-radius: 16px;
  -webkit-overflow-scrolling: touch;
}

.certificates-table {
  width: 100%;
  min-width: 550px;
  border-collapse: collapse;
  margin-top: 8px;
}

.certificates-table th {
  background: var(--kv-blue-deep);
  color: white;
  padding: 12px 10px;
  text-align: left;
  font-weight: 500;
  font-size: 7px;
  white-space: nowrap;
}

.certificates-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--kv-gray-border);
  background: white;
  font-size: 7px;
  vertical-align: middle;
}

.certificates-table tr:hover td {
  background: #e6f0fa;
}

.cert-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--kv-accent-orange), #e67e00);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 6px;
  transition: all 0.3s ease;
  font-family: "Onder", sans-serif;
  white-space: nowrap;
}

.cert-link .icon-cert {
  font-size: 10px;
}

.cert-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(243, 146, 0, 0.3);
}

.footer {
  background: #1a2a3f;
  color: #fff;
  text-align: center;
  padding: 24px 0;
}

.footer p {
  font-size: 6px;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .card {
    padding: 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .card-title {
    font-size: 9px;
    margin-bottom: 20px;
  }
  .student-name {
    font-size: 9px;
  }
  .certificates-table-wrapper {
    overflow-x: auto;
  }
  .certificates-table {
    min-width: 550px;
  }
  .certificates-table th,
  .certificates-table td {
    padding: 10px 8px;
    font-size: 6px;
  }
  .cert-link {
    padding: 4px 8px;
    font-size: 5px;
  }
  .cert-link .icon-cert {
    font-size: 9px;
  }
  .btn {
    padding: 12px 20px;
    font-size: 8px;
  }
  .logo-text {
    font-size: 8px;
  }
  .image {
    height: 34px;
  }
}

@media (max-width: 480px) {
  .card-title {
    font-size: 8px;
  }
  .student-name {
    font-size: 8px;
  }
  .certificates-table {
    min-width: 500px;
  }
  .certificates-table th,
  .certificates-table td {
    padding: 8px 6px;
    font-size: 5px;
  }
  .cert-link {
    padding: 3px 6px;
    font-size: 4px;
  }
  .cert-link .icon-cert {
    font-size: 8px;
  }
  .btn {
    padding: 10px 16px;
    font-size: 7px;
  }
  .logo-text {
    font-size: 7px;
  }
  .image {
    height: 30px;
  }
  input {
    padding: 12px 14px;
    font-size: 7px;
  }
}
