:root {
  --background: #f5f8fb;
  --foreground: #0d1623;
  --card: #ffffff;
  --muted: #eef4f8;
  --muted-foreground: #607086;
  --primary: #075f8f;
  --primary-dark: #064f78;
  --primary-soft: #e5f2fb;
  --border: #d9e3ea;
  --success: #15935f;
  --success-soft: #e9f8f1;
  --success-border: #a8dfc4;
  --warning: #f4cb33;
  --warning-soft: #fff9d9;
  --warning-border: #f5df72;
  --danger: #c93636;
  --shadow: 0 16px 40px rgba(30, 52, 75, 0.12);
  --radius: 16px;
  --font-display: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-plate: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 0 0, rgba(7, 95, 143, 0.08), transparent 42%),
    radial-gradient(circle at 100% 0, rgba(216, 236, 249, 0.7), transparent 40%),
    var(--background);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 227, 234, 0.8);
  background: rgba(245, 248, 251, 0.86);
  backdrop-filter: blur(12px);
}

.header-inner,
.hero-inner,
.results-shell {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  color: var(--foreground);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
  transition: opacity 0.18s ease;
}

.brand:hover {
  opacity: 0.84;
}

.brand:focus-visible {
  outline: 3px solid rgba(7, 95, 143, 0.28);
  outline-offset: 4px;
}

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.header-note {
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 600;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(217, 227, 234, 0.75);
  background-image: url("https://d2xsxph8kpxj0f.cloudfront.net/310519663218874858/nGMhLUagNkKUqiF2hYzpYX/checkviatura-hero-bg-G3RZQkQ9Hd4rRFPBNvSJ36.webp");
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(245, 248, 251, 0.9), rgba(245, 248, 251, 0.72), rgba(245, 248, 251, 0.93));
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 54px 0 72px;
}

.hero-copy {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero-copy p {
  margin: 16px 0 0;
  color: var(--muted-foreground);
  font-size: clamp(15px, 2vw, 18px);
}

.search-card {
  max-width: 760px;
  margin: 34px auto 0;
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.plate-wrap {
  position: relative;
}

.plate-input {
  width: 100%;
  height: clamp(82px, 14vw, 112px);
  padding: 0 76px 0 28px;
  border: 2px solid rgba(7, 95, 143, 0.2);
  border-radius: 15px;
  background: transparent;
  color: var(--foreground);
  font-family: var(--font-plate);
  font-size: clamp(40px, 9vw, 64px);
  font-weight: 800;
  letter-spacing: 0.15em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.plate-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(7, 95, 143, 0.16);
}

.search-button {
  position: absolute;
  top: 50%;
  right: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  transform: translateY(-50%);
  border: 1.5px solid rgba(7, 95, 143, 0.25);
  border-radius: 11px;
  background: rgba(7, 95, 143, 0.08);
  color: var(--primary);
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.search-button:hover:not(:disabled) {
  background: rgba(7, 95, 143, 0.15);
  border-color: rgba(7, 95, 143, 0.45);
}

.search-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.search-icon {
  width: 22px;
  height: 22px;
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(7, 95, 143, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-loading .search-icon {
  display: none;
}

.is-loading .spinner {
  display: block;
}

.status-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
  text-align: center;
}

.status-message.error {
  color: var(--danger);
  font-weight: 700;
}

.history-panel {
  margin-top: 24px;
  text-align: center;
}

.history-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.history-title svg {
  width: 15px;
  height: 15px;
}

.history-title button {
  border: 0;
  background: transparent;
  color: rgba(96, 112, 134, 0.8);
  font-size: 12px;
  font-weight: 700;
  text-transform: lowercase;
}

.history-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.history-list button {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 0 4px 10px rgba(30, 52, 75, 0.08);
  color: var(--foreground);
  font-family: var(--font-plate);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  padding: 8px 14px;
}

.history-list button:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.feature {
  text-align: center;
}

.feature-icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
}

.feature-icon svg {
  width: 25px;
  height: 25px;
}

.feature h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
}

.feature p {
  margin: 8px 0 0;
  color: var(--muted-foreground);
  font-size: 14px;
}

.results-shell {
  padding: 48px 0 96px;
}

.results {
  scroll-margin-top: 80px;
}

.results,
.loading-panel {
  display: grid;
  gap: 24px;
}

.summary-card,
.group-card,
.theft-card,
.skeleton-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(30, 52, 75, 0.08);
}

.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.summary-kicker {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-title {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
}

.summary-title span {
  color: var(--muted-foreground);
  font-weight: 600;
}

.summary-plate {
  border: 2px solid rgba(13, 22, 35, 0.12);
  border-radius: 10px;
  background: var(--background);
  font-family: var(--font-plate);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.2em;
  padding: 10px 16px;
  white-space: nowrap;
}

.group-card,
.theft-card {
  padding: 22px;
}

.group-title,
.theft-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
}

.title-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
}

.title-icon svg {
  width: 17px;
  height: 17px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.field {
  min-width: 0;
  border: 1px solid rgba(217, 227, 234, 0.8);
  border-radius: 13px;
  background: rgba(245, 248, 251, 0.6);
  padding: 12px 14px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-label svg {
  width: 14px;
  height: 14px;
}

.field-value {
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--foreground);
  font-size: 14px;
  font-weight: 800;
}

.field-value.mono {
  font-family: var(--font-plate);
  letter-spacing: 0.04em;
}

.theft-card.alert {
  border: 2px solid var(--warning-border);
  background: var(--warning-soft);
}

.theft-found {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  border-radius: 10px;
  background: var(--warning);
  color: #25200a;
  font-size: 18px;
  font-weight: 900;
  padding: 10px 14px;
}

.theft-found svg,
.theft-clear svg {
  width: 20px;
  height: 20px;
}

.theft-country {
  margin: 14px 0 0;
  color: rgba(13, 22, 35, 0.82);
  font-size: 16px;
}

.theft-clear {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--success-border);
  border-radius: 12px;
  background: var(--success-soft);
  color: var(--foreground);
  font-size: 15px;
  font-weight: 800;
  padding: 13px 16px;
}

.theft-clear svg {
  color: var(--success);
}

.skeleton-card {
  padding: 22px;
}

.skeleton-card span,
.skeleton-card i {
  display: block;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--muted), #f7fafc, var(--muted));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
}

.skeleton-card span {
  width: 170px;
  height: 20px;
}

.skeleton-card div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.skeleton-card i {
  height: 68px;
}

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 12px;
  padding: 24px 16px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 820px) {
  .header-note {
    display: none;
  }

  .hero-inner {
    padding: 40px 0 54px;
  }

  .features,
  .field-grid,
  .skeleton-card div {
    grid-template-columns: 1fr;
  }

  .summary-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .hero-inner,
  .results-shell {
    width: min(100% - 24px, 1080px);
  }

  .plate-input {
    height: 78px;
    padding: 0 64px 0 16px;
    font-size: clamp(34px, 12vw, 46px);
    letter-spacing: 0.1em;
  }

  .search-button {
    right: 8px;
    width: 40px;
    height: 40px;
  }

  .history-title {
    flex-wrap: wrap;
  }

  .summary-plate {
    font-size: 18px;
  }
}
