:root {
  --brand: #28348f;
  --brand-dark: #1c2568;
  --bg: #f1f3f9;
  --card-bg: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --warning-bg: #fff1f0;
  --warning-border: #f5a3a0;
  --warning-text: #9b1c1c;
  --ok-bg: #ecfdf5;
  --ok-border: #86e0bb;
  --ok-text: #0f6b47;
  --error-bg: #fff7ed;
  --error-border: #fbbf7a;
  --error-text: #92400e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--bg) 0%, #dde3f3 100%);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 45px rgba(40, 52, 143, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.logo-img {
  width: 128px;
  max-width: 100%;
  height: auto;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 8px;
  color: var(--text);
}

.subtitle {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
  margin: 0 0 28px;
}

.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.search-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1.5px solid #d7dedd;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-form input:focus {
  border-color: var(--brand);
}

.search-form button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
  white-space: nowrap;
}

.search-form button:hover {
  background: var(--brand-dark);
}

.result {
  margin-top: 22px;
  padding: 18px;
  border-radius: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  animation: fade-in 0.2s ease;
}

.result p {
  margin: 0 0 4px;
  line-height: 1.5;
}

.result-title {
  font-weight: 700;
  margin-bottom: 6px !important;
}

.result .icon {
  font-size: 1.3rem;
  line-height: 1;
}

.result-warning {
  background: var(--warning-bg);
  border: 1.5px solid var(--warning-border);
  color: var(--warning-text);
}

.result-ok {
  background: var(--ok-bg);
  border: 1.5px solid var(--ok-border);
  color: var(--ok-text);
}

.result-error {
  background: var(--error-bg);
  border: 1.5px solid var(--error-border);
  color: var(--error-text);
}

.footer {
  margin-top: 28px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.8;
}

.footer-link {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
}

.footer-link:hover {
  text-decoration: underline;
}

.last-update {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 20px;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
  text-align: left;
}

.upload-form input[type="file"] {
  padding: 10px;
  border: 1.5px dashed #c3cbe0;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #f8f9fc;
}

.upload-form button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.upload-form button:hover {
  background: var(--brand-dark);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
  text-align: left;
}

.login-form input {
  padding: 12px 14px;
  border: 1.5px solid #d7dedd;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.login-form input:focus {
  border-color: var(--brand);
}

.login-form button {
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  background: var(--brand);
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.login-form button:hover {
  background: var(--brand-dark);
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 420px) {
  .card {
    padding: 32px 22px;
  }

  .search-form {
    flex-direction: column;
  }
}
