/* ============================================================
   Phase 1: 주소 식별 엔진 스타일
   ============================================================ */

/* 카드 */
.card {
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* 입력 필드 */
.input-field {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #1e293b;
  transition: border-color 0.15s;
  outline: none;
  background: #f8fafc;
}
.input-field:focus {
  border-color: #3b82f6;
  background: white;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.input-field-sm {
  width: 100%;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  color: #1e293b;
  transition: border-color 0.15s;
  outline: none;
  background: #f8fafc;
}
.input-field-sm:focus {
  border-color: #3b82f6;
  background: white;
}

.label-text {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 5px;
}

/* 버튼 */
.btn-primary {
  background: #2563eb;
  color: white;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { background: #93c5fd; cursor: not-allowed; }

.btn-secondary {
  background: white;
  color: #64748b;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
}
.btn-secondary:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* 테스트 칩 */
.test-chip {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.1s;
}
.test-chip:hover { background: #e0e7ff; border-color: #818cf8; color: #4338ca; }

/* 상태 배너 */
.status-banner-confirmed {
  background: linear-gradient(135deg, #dcfce7, #d1fae5);
  border: 1px solid #86efac;
  color: #15803d;
}
.status-banner-error {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  border: 1px solid #fca5a5;
  color: #b91c1c;
}
.status-banner-warning {
  background: linear-gradient(135deg, #fef9c3, #fef08a);
  border: 1px solid #facc15;
  color: #92400e;
}
.status-banner-pending {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #93c5fd;
  color: #1d4ed8;
}

/* 게이트 배지 */
.badge-gate-blocked {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}
.badge-gate-open {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.gate-badge-blocked {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}
.gate-badge-open {
  background: #dcfce7;
  color: #16a34a;
  border: 1px solid #86efac;
}

/* 후보 카드 */
.candidate-card {
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}
.candidate-card:hover {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.12);
}

/* 이유 칩 */
.reason-chip {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
}

/* 디버그 프리 */
.debug-pre {
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  font-size: 11px;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'Courier New', monospace;
  line-height: 1.5;
}

/* 애니메이션 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
#result-section { animation: fadeIn 0.2s ease; }
