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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #0f172a;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
  color: #e2e8f0;
}

.container {
  width: 100%;
  max-width: 520px;
}

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

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

.logo-icon { font-size: 36px; }

h1 {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 14px;
  color: #64748b;
  font-weight: 400;
}

.card {
  background: #1e293b;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* --- FORM --- */
.search-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.form-select, .form-input {
  width: 100%;
  padding: 10px 14px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
  outline: none;
}

.form-select:focus, .form-input:focus {
  border-color: #60a5fa;
}

.form-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-select option {
  background: #1e293b;
  color: #e2e8f0;
}

.form-row {
  display: flex;
  gap: 12px;
}

.flex-1 { flex: 1; }

.year-group {
  width: 110px;
  flex-shrink: 0;
}

.btn-check {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.btn-check:hover { opacity: 0.9; }
.btn-check:active { opacity: 0.8; }

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

/* --- RESULTS --- */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 0;
  color: #64748b;
  font-size: 14px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #334155;
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.office-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #334155;
  line-height: 1.4;
}

.office-icon { font-size: 16px; }

.status-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 20px;
}

.status-badge.ready { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.status-badge.waiting { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.status-badge.unknown { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.status-icon { font-size: 22px; }

.lote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.lote-item {
  background: #0f172a;
  border-radius: 12px;
  padding: 16px 12px;
  text-align: center;
}

.lote-item.current {
  border: 1px solid #334155;
}

.lote-item.yours {
  border: 1px solid #60a5fa;
  background: rgba(96, 165, 250, 0.05);
}

.lote-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  margin-bottom: 6px;
}

.lote-label.highlight {
  color: #60a5fa;
}

.lote-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
  color: #e2e8f0;
}

.lote-value.highlight {
  color: #60a5fa;
}

.progress-section { margin-bottom: 16px; }

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}

.progress-bar {
  height: 10px;
  background: #0f172a;
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  transition: width 0.6s ease;
}

.progress-info {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-top: 8px;
}

.message-box {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 16px;
}

.message-box.success { background: rgba(34, 197, 94, 0.1); color: #4ade80; }
.message-box.info { background: rgba(59, 130, 246, 0.1); color: #60a5fa; }

.last-checked {
  text-align: center;
  font-size: 12px;
  color: #475569;
}

.error-box {
  text-align: center;
  padding: 20px;
  color: #f87171;
}

.error-icon { font-size: 28px; display: block; margin-bottom: 8px; }

footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #334155;
}

@media (max-width: 400px) {
  .form-row { flex-direction: column; }
  .year-group { width: 100%; }
  .card { padding: 20px; }
  h1 { font-size: 24px; }
}
