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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f1f5f9;
  color: #1e293b;
  line-height: 1.5;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  color: #002C5F;
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.subtitle {
  color: #64748b;
  font-size: 0.95rem;
}

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  padding: 24px;
  margin-bottom: 20px;
}

.card h2 {
  font-size: 1rem;
  color: #002C5F;
  margin-bottom: 10px;
  margin-top: 16px;
}

.card h2:first-child { margin-top: 0; }

textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.8rem;
  resize: vertical;
  background: #f8fafc;
}

textarea:focus, input:focus, select:focus {
  outline: none;
  border-color: #00AAD2;
  box-shadow: 0 0 0 3px rgba(0,170,210,.15);
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-row select {
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  min-width: 160px;
}

.search-row input {
  flex: 1;
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.9rem;
}

.btn {
  padding: 9px 20px;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.btn.primary {
  background: #002C5F;
  color: #fff;
}

.btn.primary:hover { background: #001d3f; }

.btn.download {
  background: #00AAD2;
  color: #fff;
  padding: 12px 32px;
  font-size: 1rem;
  margin-top: 16px;
}

.btn.download:hover { background: #0090b3; }

.btn:disabled {
  opacity: .6;
  cursor: wait;
}

.hint {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 6px;
}

.hint code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.78rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 10px;
}

thead th {
  background: #002C5F;
  color: #fff;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
}

tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
}

tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: #eef2ff; }

.badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

.pdf-form {
  text-align: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

@media (max-width: 640px) {
  .search-row { flex-direction: column; }
  .search-row select, .search-row input { width: 100%; }
  header h1 { font-size: 1.4rem; }
  table { font-size: 0.75rem; }
  thead th, tbody td { padding: 5px 6px; }
}
